/* Ruqyah Healer — shared styles */
:root {
  --night: #061f18;
  --night-2: #0a2e24;
  --emerald: #0f4a3a;
  --emerald-2: #16634d;
  --gold: #d4af5f;
  --gold-soft: #e9d49c;
  --ivory: #f6f1e4;
  --ink: #e8e2d2;
  --muted: #a9b8ae;
  --line: rgba(212, 175, 95, 0.22);
  --glass: rgba(255, 255, 255, 0.045);
  --shadow: 0 30px 60px -20px rgba(0, 0, 0, 0.6);
  --radius: 22px;
  --serif: "Cormorant Garamond", Georgia, serif;
  --sans: "Inter", system-ui, -apple-system, Segoe UI, sans-serif;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--sans);
  color: var(--ink);
  background: var(--night);
  background-image:
    radial-gradient(ellipse at 20% -10%, rgba(22, 99, 77, 0.55), transparent 55%),
    radial-gradient(ellipse at 100% 30%, rgba(212, 175, 95, 0.10), transparent 45%),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120' viewBox='0 0 120 120'%3E%3Cg fill='none' stroke='%23d4af5f' stroke-opacity='0.06'%3E%3Cpath d='M60 10 L74 46 L110 60 L74 74 L60 110 L46 74 L10 60 L46 46 Z'/%3E%3Crect x='32' y='32' width='56' height='56' transform='rotate(45 60 60)'/%3E%3Crect x='32' y='32' width='56' height='56'/%3E%3C/g%3E%3C/svg%3E");
  line-height: 1.7;
  font-size: 17px;
  overflow-x: hidden;
}
img { max-width: 100%; }
a { color: var(--gold-soft); }
a:hover { color: var(--gold); }

h1, h2, h3 { font-family: var(--serif); font-weight: 600; color: var(--ivory); line-height: 1.15; letter-spacing: 0.2px; }
h1 { font-size: clamp(2.4rem, 6vw, 4.4rem); margin: 0 0 0.4em; }
h2 { font-size: clamp(1.8rem, 3.6vw, 2.6rem); margin: 0 0 0.5em; }
h3 { font-size: 1.45rem; margin: 0 0 0.35em; }
p { margin: 0 0 1em; }
.lead { font-size: 1.15rem; color: var(--muted); max-width: 46rem; }
.eyebrow { text-transform: uppercase; letter-spacing: 0.28em; font-size: 0.74rem; color: var(--gold); margin-bottom: 0.8rem; display: block; }
.wrap { width: min(1120px, 100% - 32px); margin-inline: auto; }
.narrow { width: min(820px, 100% - 32px); margin-inline: auto; }
section { padding: 72px 0; }
.center { text-align: center; }
.center .lead { margin-inline: auto; }

/* Header */
.site-header {
  position: sticky; top: env(safe-area-inset-top, 0px); z-index: 50;
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  background: rgba(6, 31, 24, 0.72);
  border-bottom: 1px solid var(--line);
}
.nav { display: flex; align-items: center; justify-content: space-between; height: 68px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ivory); font-family: var(--serif); font-size: 1.45rem; font-weight: 600; }
.brand svg { width: 30px; height: 30px; }
.nav-links { display: flex; gap: 4px; list-style: none; margin: 0; padding: 0; }
.nav-links a { text-decoration: none; color: var(--ink); font-size: 0.92rem; padding: 8px 12px; border-radius: 999px; transition: background .25s, color .25s; }
.nav-links a:hover, .nav-links a[aria-current="page"] { background: rgba(212, 175, 95, 0.14); color: var(--gold-soft); }
.nav-toggle { display: none; background: none; border: 1px solid var(--line); color: var(--ivory); border-radius: 10px; padding: 8px 12px; font-size: 1rem; cursor: pointer; }

@media (max-width: 900px) {
  .nav-toggle { display: block; }
  .nav-links {
    position: absolute; top: 68px; left: 0; right: 0; flex-direction: column;
    background: rgba(6, 31, 24, 0.97); padding: 12px 16px 20px; border-bottom: 1px solid var(--line);
    display: none;
  }
  .nav-links.open { display: flex; }
  .nav-links a { display: block; padding: 12px 14px; font-size: 1rem; }
}

/* Buttons */
.btn {
  display: inline-flex; align-items: center; gap: 10px; justify-content: center;
  padding: 14px 26px; border-radius: 999px; font-weight: 600; font-size: 0.98rem;
  text-decoration: none; border: 1px solid transparent; cursor: pointer; font-family: var(--sans);
  transition: transform .25s, box-shadow .25s, background .25s;
}
.btn-gold { background: linear-gradient(135deg, var(--gold-soft), var(--gold) 55%, #a8843b); color: #1d1606; box-shadow: 0 12px 30px -10px rgba(212, 175, 95, 0.6); }
.btn-gold:hover { color: #1d1606; transform: translateY(-2px); box-shadow: 0 18px 36px -10px rgba(212, 175, 95, 0.75); }
.btn-ghost { border-color: var(--line); color: var(--ivory); background: var(--glass); }
.btn-ghost:hover { color: var(--ivory); background: rgba(255, 255, 255, 0.08); transform: translateY(-2px); }
.btn-row { display: flex; gap: 14px; flex-wrap: wrap; }

/* Hero */
.hero { position: relative; min-height: min(calc(100vh - 68px), 760px); display: grid; align-items: center; padding: 40px 0 80px; overflow: hidden; }
#hero3d { position: absolute; inset: 0; z-index: 0; -webkit-mask-image: linear-gradient(#000 65%, transparent); mask-image: linear-gradient(#000 65%, transparent); }
#hero3d canvas { display: block; width: 100% !important; height: 100% !important; }
.hero-fallback { position: absolute; inset: 0; display: grid; place-items: center; z-index: 0; }
.hero-fallback svg { width: min(70vw, 560px); opacity: 0.35; animation: spin 80s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.hero .wrap { position: relative; z-index: 2; }
.hero-copy { max-width: 640px; }
.hero-copy h1 span { background: linear-gradient(120deg, var(--gold-soft), var(--gold)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.intention {
  display: inline-flex; align-items: center; gap: 10px; padding: 8px 16px; border-radius: 999px;
  border: 1px solid var(--line); background: var(--glass); font-size: 0.86rem; color: var(--gold-soft); margin-bottom: 22px;
}

/* 3D tilt cards */
.grid { display: grid; gap: 22px; }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.tilt-wrap { perspective: 1000px; }
.card {
  position: relative; height: 100%;
  background: linear-gradient(160deg, rgba(22, 99, 77, 0.38), rgba(10, 46, 36, 0.55));
  border: 1px solid var(--line); border-radius: var(--radius); padding: 30px 28px;
  box-shadow: var(--shadow); transform-style: preserve-3d;
  transition: transform .35s cubic-bezier(.2,.8,.2,1), border-color .3s;
  text-decoration: none; color: var(--ink); display: block; overflow: hidden;
}
.card::before {
  content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  background: radial-gradient(400px circle at var(--mx, 50%) var(--my, 0%), rgba(233, 212, 156, 0.16), transparent 45%);
}
.card:hover { border-color: rgba(212, 175, 95, 0.5); }
.card .icon { width: 54px; height: 54px; display: grid; place-items: center; border-radius: 16px; background: rgba(212, 175, 95, 0.12); border: 1px solid var(--line); margin-bottom: 18px; transform: translateZ(40px); }
.card .icon svg { width: 28px; height: 28px; stroke: var(--gold); fill: none; stroke-width: 1.6; }
.card h3 { transform: translateZ(30px); }
.card p { color: var(--muted); transform: translateZ(18px); }
.card .more { color: var(--gold-soft); font-weight: 600; font-size: 0.92rem; transform: translateZ(24px); display: inline-block; }
a.card:hover .more { text-decoration: underline; }

/* Page hero (inner pages) */
.page-hero { padding: 84px 0 40px; position: relative; }
.page-hero .ornament { width: 74px; height: 74px; margin-bottom: 20px; animation: float 6s ease-in-out infinite; }
@keyframes float { 50% { transform: translateY(-8px) rotate(22.5deg); } }

/* Content */
.panel { background: var(--glass); border: 1px solid var(--line); border-radius: var(--radius); padding: 30px; margin-bottom: 22px; }
.panel h3 { color: var(--gold-soft); }
.steps { counter-reset: step; list-style: none; padding: 0; margin: 0; display: grid; gap: 18px; }
.steps > li { counter-increment: step; position: relative; padding: 24px 24px 22px 84px; background: var(--glass); border: 1px solid var(--line); border-radius: var(--radius); }
.steps > li::before {
  content: counter(step); position: absolute; left: 22px; top: 22px; width: 44px; height: 44px; border-radius: 12px;
  display: grid; place-items: center; font-family: var(--serif); font-size: 1.4rem; font-weight: 700; color: #1d1606;
  background: linear-gradient(135deg, var(--gold-soft), var(--gold)); transform: rotate(45deg);
}
.steps > li h3 { margin-bottom: 6px; }
.steps > li p:last-child { margin-bottom: 0; }
ul.check { list-style: none; padding: 0; margin: 0 0 1em; }
ul.check li { padding-left: 30px; position: relative; margin-bottom: 10px; }
ul.check li::before { content: ""; position: absolute; left: 4px; top: 0.6em; width: 9px; height: 9px; background: var(--gold); transform: rotate(45deg); }
ul.cross li::before { background: #c46a5a; }
.ref { color: var(--gold); font-size: 0.86rem; white-space: nowrap; }
.verse-list { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.verse { padding: 18px 20px; border-radius: 16px; border: 1px solid var(--line); background: rgba(212, 175, 95, 0.05); }
.verse strong { display: block; color: var(--ivory); font-family: var(--serif); font-size: 1.2rem; }
.verse span { color: var(--muted); font-size: 0.92rem; }
.note {
  border-left: 3px solid var(--gold); padding: 16px 20px; background: rgba(212, 175, 95, 0.07);
  border-radius: 0 14px 14px 0; color: var(--ink); margin: 22px 0; font-size: 0.96rem;
}
.note.warn { border-left-color: #c46a5a; background: rgba(196, 106, 90, 0.08); }

/* Books */
.book { display: flex; flex-direction: column; gap: 10px; }
.book-cover {
  height: 200px; border-radius: 14px; margin-bottom: 8px; position: relative; overflow: hidden;
  background: linear-gradient(135deg, var(--emerald-2), var(--night-2)); border: 1px solid var(--line);
  display: grid; place-items: center; transform: translateZ(30px);
}
.book-cover svg { width: 110px; opacity: 0.9; }
.book .meta { font-size: 0.86rem; color: var(--muted); }
.book .btn { margin-top: auto; align-self: flex-start; }

/* Forms */
form .field { margin-bottom: 18px; }
label { display: block; font-size: 0.9rem; color: var(--gold-soft); margin-bottom: 6px; font-weight: 500; }
input, select, textarea {
  width: 100%; padding: 13px 15px; border-radius: 12px; border: 1px solid var(--line);
  background: rgba(0, 0, 0, 0.25); color: var(--ivory); font-family: var(--sans); font-size: 1rem;
}
input:focus, select:focus, textarea:focus { outline: 2px solid var(--gold); outline-offset: 1px; }
textarea { min-height: 120px; resize: vertical; }
.row-2 { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.radio-row { display: flex; gap: 10px; flex-wrap: wrap; }
.radio-row label { display: flex; align-items: center; gap: 8px; padding: 10px 16px; border: 1px solid var(--line); border-radius: 999px; color: var(--ink); cursor: pointer; margin: 0; }
.radio-row input { width: auto; accent-color: var(--gold); }
.checkline { display: flex; gap: 10px; align-items: flex-start; color: var(--ink); font-size: 0.94rem; }
.checkline input { width: auto; margin-top: 6px; accent-color: var(--gold); }
.form-status { margin-top: 14px; font-size: 0.94rem; color: var(--gold-soft); min-height: 1.4em; }

/* FAQ */
details { border: 1px solid var(--line); border-radius: 16px; background: var(--glass); margin-bottom: 12px; overflow: hidden; }
summary { cursor: pointer; padding: 18px 22px; font-weight: 600; color: var(--ivory); list-style: none; display: flex; justify-content: space-between; gap: 16px; }
summary::-webkit-details-marker { display: none; }
summary::after { content: "+"; color: var(--gold); font-size: 1.4rem; line-height: 1; transition: transform .25s; }
details[open] summary::after { transform: rotate(45deg); }
details > div { padding: 0 22px 18px; color: var(--muted); }

/* Footer */
.site-footer { border-top: 1px solid var(--line); padding: 48px 0 30px; margin-top: 40px; font-size: 0.92rem; color: var(--muted); }
.footer-grid { display: grid; gap: 28px; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.site-footer h4 { font-family: var(--serif); color: var(--ivory); font-size: 1.2rem; margin: 0 0 10px; }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin-bottom: 6px; }
.site-footer a { color: var(--muted); text-decoration: none; }
.site-footer a:hover { color: var(--gold-soft); }
.footer-base { margin-top: 30px; padding-top: 20px; border-top: 1px solid var(--line); display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; font-size: 0.84rem; }

/* Reveal */
.reveal { opacity: 1; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
@media (max-width: 600px) {
  body { font-size: 16px; }
  section { padding: 52px 0; }
  .steps > li { padding: 22px 18px 20px 72px; }
  .steps > li::before { left: 16px; width: 38px; height: 38px; font-size: 1.2rem; }
  .panel { padding: 22px; }
}
