/* ==========================================================================
   Clavell Media, design system v2 "Molten"
   Cinematic dark: Higgsfield brass-ink backdrop, editorial serif type,
   one brass accent. Fraunces (display) · Inter (body) · Spline Sans Mono.
   ========================================================================== */

:root {
  --ink-0: #0b0a08;
  --ink-1: #121009;
  --ink-2: #191612;
  --ink-3: #221e18;

  --bone: #f0e9dc;
  --bone-dim: #a89f8f;
  --bone-faint: #6d675b;

  --brass: #d8a548;
  --brass-bright: #f2c368;
  --brass-soft: rgba(216, 165, 72, 0.12);
  --brass-line: rgba(216, 165, 72, 0.35);

  --garden: #a3c48b;
  --garden-bright: #c2dfa9;
  --saffron: #f5a623;

  --line: rgba(240, 233, 220, 0.09);
  --line-strong: rgba(240, 233, 220, 0.2);

  --radius: 24px;
  --wrap: 1200px;

  --serif: "Fraunces", Georgia, "Times New Roman", serif;
  --sans: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "Spline Sans Mono", ui-monospace, "SF Mono", Menlo, monospace;

  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}

/* ---------- Base ---------- */

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

body {
  font-family: var(--sans);
  background: var(--ink-0);
  color: var(--bone);
  line-height: 1.7;
  font-size: 16.5px;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

/* Film grain over everything */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 90;
  opacity: 0.055;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='2'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)' opacity='0.6'/%3E%3C/svg%3E");
}

::selection { background: var(--brass); color: var(--ink-0); }

/* Thin brass scrollbar */
::-webkit-scrollbar { width: 10px; }
::-webkit-scrollbar-track { background: var(--ink-0); }
::-webkit-scrollbar-thumb { background: #2c2418; border-radius: 10px; }
::-webkit-scrollbar-thumb:hover { background: #4a3a1e; }

a { color: var(--bone); text-decoration: none; transition: color 0.25s ease; }
a:hover { color: var(--brass-bright); }

a:focus-visible, button:focus-visible {
  outline: 2px solid var(--brass);
  outline-offset: 4px;
  border-radius: 4px;
}

img, svg, video { display: block; max-width: 100%; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 32px; }

.serif { font-family: var(--serif); }

.accent-i { font-style: italic; color: var(--brass-bright); font-weight: 440; }

.eyebrow {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--bone-dim);
  display: flex;
  align-items: center;
  gap: 16px;
}

.eyebrow::before { content: ""; width: 34px; height: 1px; background: var(--brass); flex: none; }

/* ---------- Header ---------- */

header.site {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  transition: background 0.4s ease, border-color 0.4s ease, backdrop-filter 0.4s ease;
  border-bottom: 1px solid transparent;
}

header.site.scrolled,
body.solid-header header.site {
  background: rgba(11, 10, 8, 0.72);
  backdrop-filter: blur(16px) saturate(1.2);
  -webkit-backdrop-filter: blur(16px) saturate(1.2);
  border-bottom-color: var(--line);
}

header.site .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 80px;
}

.brand {
  font-family: var(--serif);
  font-size: 22px;
  font-weight: 560;
  color: var(--bone);
  display: flex;
  align-items: baseline;
  letter-spacing: 0.01em;
}

.brand .mark { font-style: italic; font-weight: 420; color: var(--brass); margin-left: 7px; }

.brand::before {
  content: "";
  align-self: center;
  width: 10px; height: 10px;
  margin-right: 13px;
  background: linear-gradient(135deg, var(--brass-bright), var(--brass));
  border-radius: 2px;
  transform: rotate(45deg);
  box-shadow: 0 0 18px rgba(216, 165, 72, 0.5);
  flex: none;
}

header.site nav { display: flex; gap: 38px; align-items: center; }

header.site nav a {
  position: relative;
  font-family: var(--mono);
  font-size: 12.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--bone-dim);
  padding: 6px 0;
}

header.site nav a::after {
  content: "";
  position: absolute;
  left: 0; bottom: 0;
  width: 100%; height: 1px;
  background: var(--brass);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.35s var(--ease-out);
}

header.site nav a:hover { color: var(--bone); }
header.site nav a:hover::after { transform: scaleX(1); transform-origin: left; }

/* ---------- Cinematic hero ---------- */

.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
  isolation: isolate;
}

.hero .backdrop {
  position: absolute;
  inset: -6%;
  z-index: -2;
  width: 112%;
  height: 112%;
  object-fit: cover;
  animation: heroDrift 26s var(--ease-out) both;
  will-change: transform;
}

@keyframes heroDrift {
  from { transform: scale(1.12) translateY(-1.5%); }
  to   { transform: scale(1.0) translateY(0); }
}

/* Legibility scrims over the image */
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(180deg, rgba(11,10,8,0.55) 0%, rgba(11,10,8,0.15) 38%, rgba(11,10,8,0.72) 78%, var(--ink-0) 100%),
    radial-gradient(120% 90% at 18% 88%, rgba(11,10,8,0.72) 0%, transparent 55%);
}

.hero .wrap {
  width: 100%;
  padding-top: 160px;
  padding-bottom: clamp(72px, 12vh, 130px);
}

.hero h1 {
  font-family: var(--serif);
  font-weight: 440;
  font-size: clamp(46px, 7.2vw, 108px);
  line-height: 1.02;
  letter-spacing: -0.02em;
  max-width: 14ch;
  margin: 34px 0 36px;
  text-wrap: balance;
}

.hero .lede {
  font-size: clamp(17px, 1.6vw, 21px);
  color: var(--bone-dim);
  max-width: 50ch;
  line-height: 1.75;
}

.hero .hero-actions { margin-top: 44px; display: flex; gap: 18px; flex-wrap: wrap; }

/* Scroll cue */
.scroll-cue {
  position: absolute;
  right: 40px;
  bottom: 42px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--bone-faint);
  writing-mode: vertical-rl;
}

.scroll-cue::after {
  content: "";
  width: 1px;
  height: 56px;
  background: linear-gradient(var(--brass), transparent);
  animation: cueDrop 2.2s ease-in-out infinite;
}

@keyframes cueDrop {
  0%   { transform: scaleY(0); transform-origin: top; }
  55%  { transform: scaleY(1); transform-origin: top; }
  56%  { transform-origin: bottom; }
  100% { transform: scaleY(0); transform-origin: bottom; }
}

/* Staggered line reveal (JS + motion-safe only) */
@media (prefers-reduced-motion: no-preference) {
  html.js .lr { display: block; overflow: hidden; }
  html.js .lr > span {
    display: block;
    transform: translateY(115%);
    transition: transform 1s var(--ease-out);
    transition-delay: calc(var(--i, 0) * 120ms);
  }
  html.js .in .lr > span, html.js .lr.in > span { transform: none; }

  html.js .reveal {
    opacity: 0;
    transform: translateY(28px);
    transition: opacity 0.9s var(--ease-out), transform 0.9s var(--ease-out);
    transition-delay: calc(var(--i, 0) * 90ms);
  }
  html.js .reveal.in { opacity: 1; transform: none; }
}

/* ---------- Marquee ---------- */

.marquee {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  overflow: hidden;
  padding: 20px 0;
  background: var(--ink-1);
  position: relative;
}

.marquee .track {
  display: flex;
  gap: 0;
  width: max-content;
  animation: marquee 36s linear infinite;
}

.marquee:hover .track { animation-play-state: paused; }

.marquee span {
  font-family: var(--mono);
  font-size: 12.5px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--bone-faint);
  white-space: nowrap;
  padding-right: 18px;
}

.marquee span i { font-style: normal; color: var(--brass); padding-left: 18px; }

@keyframes marquee {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

@media (prefers-reduced-motion: reduce) {
  .marquee .track { animation: none; }
}

/* ---------- Sections ---------- */

section.block {
  padding: clamp(96px, 14vh, 170px) 0;
  position: relative;
}

section.block + section.block { border-top: 1px solid var(--line); }

.section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: clamp(52px, 7vh, 88px);
}

.section-head h2 {
  font-family: var(--serif);
  font-weight: 460;
  font-size: clamp(34px, 4.4vw, 60px);
  letter-spacing: -0.015em;
  line-height: 1.08;
}

/* ---------- Beliefs, editorial rows ---------- */

.beliefs { border-top: 1px solid var(--line); }

.belief {
  display: grid;
  grid-template-columns: 90px 1fr 1.15fr;
  gap: 36px;
  align-items: baseline;
  padding: 44px 8px;
  border-bottom: 1px solid var(--line);
  transition: background 0.4s ease, padding-left 0.4s var(--ease-out);
}

.belief:hover {
  background: linear-gradient(90deg, var(--brass-soft), transparent 55%);
  padding-left: 26px;
}

.belief .num {
  font-family: var(--mono);
  font-size: 13px;
  letter-spacing: 0.2em;
  color: var(--brass);
}

.belief h3 {
  font-family: var(--serif);
  font-weight: 480;
  font-size: clamp(24px, 2.6vw, 34px);
  letter-spacing: -0.01em;
  line-height: 1.15;
}

.belief p { color: var(--bone-dim); font-size: 16px; max-width: 52ch; }

/* ---------- App tiles ---------- */

.tiles {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 30px;
  perspective: 1400px;
}

.tile {
  position: relative;
  display: block;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--ink-1);
  overflow: hidden;
  transform-style: preserve-3d;
  transition: border-color 0.45s ease, box-shadow 0.45s ease, transform 0.2s ease-out;
}

a.tile:hover {
  box-shadow: 0 40px 90px -30px rgba(0, 0, 0, 0.9), 0 0 0 1px var(--brass-line);
}

/* Shine sweep */
.tile .shine {
  position: absolute;
  inset: 0;
  z-index: 3;
  pointer-events: none;
  background: linear-gradient(115deg, transparent 30%, rgba(240, 233, 220, 0.08) 46%, rgba(240, 233, 220, 0.16) 50%, rgba(240, 233, 220, 0.08) 54%, transparent 70%);
  transform: translateX(-130%);
  transition: transform 1.1s var(--ease-out);
}

.tile:hover .shine { transform: translateX(130%); }

.tile .art {
  height: 340px;
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
}

.tile .art > img,
.tile .art > svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 1.4s var(--ease-out);
}

.tile:hover .art > img,
.tile:hover .art > svg { transform: scale(1.06); }

.tile .art .art-scrim {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 45%, rgba(11, 10, 8, 0.55) 100%);
}

.tile--garden:hover { border-color: rgba(163, 196, 139, 0.5); }
.tile--dipon:hover { border-color: rgba(245, 166, 35, 0.5); }

.tile .body { padding: 34px 34px 40px; position: relative; z-index: 2; }

.tile .title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 12px;
}

.tile h3 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(26px, 2.6vw, 34px);
  letter-spacing: -0.01em;
  color: var(--bone);
}

.tile p { color: var(--bone-dim); font-size: 16px; max-width: 42ch; }

.tile .cta {
  margin-top: 24px;
  font-family: var(--mono);
  font-size: 12.5px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--brass);
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.tile .cta .arr { transition: transform 0.35s var(--ease-out); }
a.tile:hover .cta .arr { transform: translateX(6px); }
a.tile:hover .cta { color: var(--brass-bright); }

.chip {
  flex: none;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 8px 14px;
  border-radius: 100px;
  border: 1px solid var(--line-strong);
  color: var(--bone-dim);
  white-space: nowrap;
  backdrop-filter: blur(6px);
}

.chip--garden { border-color: rgba(163, 196, 139, 0.45); color: var(--garden-bright); background: rgba(163, 196, 139, 0.08); }
.chip--saffron { border-color: rgba(245, 166, 35, 0.45); color: var(--saffron); background: rgba(245, 166, 35, 0.08); }

/* ---------- Contact ---------- */

.contact { text-align: center; overflow: hidden; }

.contact .eyebrow { justify-content: center; }
.contact .eyebrow::after { content: ""; width: 34px; height: 1px; background: var(--brass); flex: none; }

.contact h2 {
  font-family: var(--serif);
  font-weight: 450;
  font-size: clamp(34px, 5vw, 68px);
  letter-spacing: -0.015em;
  line-height: 1.1;
  max-width: 20ch;
  margin: 30px auto 20px;
  text-wrap: balance;
}

.contact > .wrap > p { color: var(--bone-dim); max-width: 46ch; margin: 0 auto; }

.email-giant {
  display: inline-block;
  margin-top: 48px;
  font-family: var(--serif);
  font-style: italic;
  font-weight: 440;
  font-size: clamp(24px, 4vw, 52px);
  letter-spacing: -0.01em;
  color: var(--brass);
  position: relative;
  padding-bottom: 10px;
}

.email-giant::after {
  content: "";
  position: absolute;
  left: 0; bottom: 0;
  width: 100%; height: 2px;
  background: linear-gradient(90deg, var(--brass), var(--brass-bright));
  transform: scaleX(0.25);
  transform-origin: left;
  transition: transform 0.6s var(--ease-out);
}

.email-giant:hover { color: var(--brass-bright); }
.email-giant:hover::after { transform: scaleX(1); }

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 18px 34px;
  border-radius: 100px;
  background: var(--brass);
  color: var(--ink-0);
  font-family: var(--mono);
  font-size: 13px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-weight: 600;
  transition: background 0.3s ease, transform 0.3s var(--ease-out), box-shadow 0.3s ease;
  will-change: transform;
}

.btn:hover {
  background: var(--brass-bright);
  color: var(--ink-0);
  box-shadow: 0 12px 40px -8px rgba(216, 165, 72, 0.45);
}

.btn--ghost {
  background: transparent;
  border: 1px solid var(--brass-line);
  color: var(--brass);
}

.btn--ghost:hover { background: var(--brass-soft); color: var(--brass-bright); box-shadow: none; }

.btn--garden { background: var(--garden); color: var(--ink-0); }
.btn--garden:hover { background: var(--garden-bright); color: var(--ink-0); box-shadow: 0 12px 40px -8px rgba(163, 196, 139, 0.4); }

/* ---------- Footer ---------- */

footer.site {
  border-top: 1px solid var(--line);
  padding: clamp(60px, 9vh, 110px) 0 46px;
  overflow: hidden;
  position: relative;
}

.footer-wordmark {
  font-family: var(--serif);
  font-weight: 520;
  font-style: italic;
  font-size: clamp(64px, 13vw, 210px);
  line-height: 0.95;
  letter-spacing: -0.03em;
  color: #1c1812;
  user-select: none;
  white-space: nowrap;
  margin-bottom: clamp(40px, 6vh, 80px);
  background: linear-gradient(180deg, #262017, #14110c);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.footer-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  align-items: center;
  justify-content: space-between;
  font-family: var(--mono);
  font-size: 12.5px;
  letter-spacing: 0.08em;
  color: var(--bone-faint);
  border-top: 1px solid var(--line);
  padding-top: 30px;
}

.footer-meta a { color: var(--bone-dim); margin-left: 24px; }
.footer-meta a:first-child { margin-left: 0; }
.footer-meta a:hover { color: var(--brass-bright); }

/* ---------- Prose (privacy, support) ---------- */

.prose {
  max-width: 720px;
  padding-top: clamp(140px, 18vh, 190px);
  padding-bottom: clamp(90px, 12vh, 150px);
}

.prose h1 {
  font-family: var(--serif);
  font-weight: 460;
  font-size: clamp(40px, 5.4vw, 64px);
  letter-spacing: -0.015em;
  line-height: 1.06;
  margin-bottom: 16px;
}

.prose .updated {
  font-family: var(--mono);
  font-size: 12.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--bone-faint);
  margin-bottom: 48px;
  padding-bottom: 36px;
  border-bottom: 1px solid var(--line);
}

.prose h2 {
  font-family: var(--serif);
  font-weight: 520;
  font-size: 27px;
  letter-spacing: -0.005em;
  margin: 50px 0 14px;
}

.prose h3 {
  font-family: var(--sans);
  font-weight: 600;
  font-size: 17px;
  margin: 36px 0 8px;
  color: var(--bone);
}

.prose p { color: var(--bone-dim); margin-bottom: 16px; }
.prose ul { margin: 0 0 18px 22px; color: var(--bone-dim); }
.prose li { margin-bottom: 12px; }
.prose li::marker { color: var(--brass); }
.prose strong { color: var(--bone); font-weight: 600; }
.prose a { color: var(--brass); border-bottom: 1px solid var(--brass-line); }
.prose a:hover { color: var(--brass-bright); border-bottom-color: var(--brass-bright); }

/* ---------- Sunnah Gardens page ---------- */

.page-garden ::selection { background: var(--garden); color: var(--ink-0); }
.page-garden .eyebrow::before,
.page-garden .contact .eyebrow::after { background: var(--garden); }
.page-garden .accent-i { color: var(--garden-bright); }
.page-garden .email-giant { color: var(--garden); }
.page-garden .email-giant:hover { color: var(--garden-bright); }
.page-garden .email-giant::after { background: linear-gradient(90deg, var(--garden), var(--garden-bright)); }
.page-garden .scroll-cue::after { background: linear-gradient(var(--garden), transparent); }
.page-garden .marquee span i { color: var(--garden); }

.features {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 26px;
}

.feature {
  position: relative;
  padding: 38px 34px 42px;
  background: linear-gradient(180deg, var(--ink-2), var(--ink-1));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  transition: border-color 0.4s ease, transform 0.4s var(--ease-out);
}

.feature::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(420px 200px at 20% 0%, rgba(163, 196, 139, 0.09), transparent 70%);
  opacity: 0;
  transition: opacity 0.5s ease;
}

.feature:hover { border-color: rgba(163, 196, 139, 0.45); transform: translateY(-5px); }
.feature:hover::before { opacity: 1; }

.feature .glyph {
  width: 48px; height: 48px;
  border-radius: 14px;
  background: rgba(163, 196, 139, 0.1);
  border: 1px solid rgba(163, 196, 139, 0.28);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 22px;
}

.feature .glyph svg { width: 23px; height: 23px; }

.feature h3 { font-family: var(--serif); font-weight: 500; font-size: 23px; margin-bottom: 10px; }
.feature p { color: var(--bone-dim); font-size: 15.5px; }

/* ---------- Responsive ---------- */

@media (max-width: 960px) {
  .belief { grid-template-columns: 64px 1fr; }
  .belief p { grid-column: 2; }
  .tiles { grid-template-columns: 1fr; }
  .features { grid-template-columns: 1fr; }
  .scroll-cue { display: none; }
}

@media (max-width: 640px) {
  body { font-size: 16px; }
  .wrap { padding: 0 22px; }
  header.site .wrap { height: 68px; }
  header.site nav { gap: 20px; }
  header.site nav a { font-size: 11px; letter-spacing: 0.1em; }
  .brand { font-size: 18px; }
  .brand::before { width: 8px; height: 8px; margin-right: 10px; }
  .hero .wrap { padding-top: 120px; }
  .tile .art { height: 240px; }
  .tile .body { padding: 26px 24px 30px; }
  .belief { padding: 34px 4px; gap: 20px; }
  .belief:hover { padding-left: 12px; }
  .footer-meta { flex-direction: column; align-items: flex-start; }
  .footer-meta a { margin-left: 0; margin-right: 22px; }
}
