/* Amana website — token-driven theming (design/tokens.json, locked).
   Dark (deep pine) leads; light (warm white-gold paper) via [data-theme].
   The matrix plates never invert — the device is dark in both worlds. */

@font-face { font-family: "Unbounded"; src: url("fonts/Unbounded-Variable.ttf"); font-weight: 200 900; font-display: swap; }
@font-face { font-family: "ReemKufi"; src: url("fonts/ReemKufi-Variable.ttf"); font-weight: 400 700; font-display: swap; }
@font-face { font-family: "SpaceGrotesk"; src: url("fonts/SpaceGrotesk-Variable.ttf"); font-weight: 300 700; font-display: swap; }
@font-face { font-family: "JetBrainsMono"; src: url("fonts/JetBrainsMono-Regular.ttf"); font-weight: 400; font-display: swap; }

:root {
  --pine: #0B1B1B;
  --paper: #F2EDE0;
  --bg: var(--pine);
  --panel: #102525;
  --panel-bright: #133029;
  --ink: #EFF2EC;
  --dim: #93ACA4;
  --gold: #CBA960;
  --gold-hi: #E0C17D;
  --gold-lo: #B18F45;
  --gold-ink: #1A1503;
  --gold-text: #CBA960;
  --green: #3FB98B;
  --led-green: #39FF88;
  --line: rgba(255, 255, 255, .09);
  --line-strong: #2B5C54;
  --nav-glass: rgba(16, 37, 37, .78);
  --shadow: rgba(0, 0, 0, .55);
  --gem: var(--gold);
  --pattern-opacity: .05;
  --disp: "Unbounded", "ReemKufi", sans-serif;
  --body: "SpaceGrotesk", "ReemKufi", -apple-system, sans-serif;
  --mono: "JetBrainsMono", ui-monospace, monospace;
}
html[data-theme="light"] {
  --bg: var(--paper);
  --panel: #FBFAF3;
  --panel-bright: #FFFFFD;
  --ink: #1C1B16;
  --dim: #56524A;
  --gold: #A67F33;
  --gold-hi: #D4AE5A;
  --gold-lo: #B9913F;
  --gold-ink: #241B06;
  --gold-text: #7A6124;
  --green: #1F7A4D;
  --line: rgba(0, 0, 0, .11);
  --line-strong: #CFC8B2;
  --nav-glass: rgba(253, 252, 246, .8);
  --shadow: rgba(12, 26, 20, .18);
  --gem: var(--green);
  --pattern-opacity: .07;
}
html[lang="ar"] {
  --disp: "ReemKufi", sans-serif;
  --body: "ReemKufi", sans-serif;
}
/* Joined Arabic law: tracking detaches letters — zero it under rtl. */
html[dir="rtl"], html[dir="rtl"] * { letter-spacing: 0 !important; }

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font-family: var(--body); font-size: 17px; line-height: 1.7;
  transition: background .35s ease, color .35s ease;
}
img { max-width: 100%; }
a { color: var(--gold-text); text-decoration: none; }
.wrap { max-width: 1120px; margin-inline: auto; padding-inline: 28px; }

/* ---------- floating nav ---------- */
.nav {
  position: fixed; inset-block-start: 0; inset-inline: 0; z-index: 40;
  padding-block-start: 14px; padding-inline: 20px;
  pointer-events: none;
}
.nav-pill {
  pointer-events: auto;
  max-width: 1080px; margin-inline: auto; min-height: 54px;
  display: flex; align-items: center; gap: 22px;
  padding-block: 6px; padding-inline: 20px 10px;
  border-radius: 999px;
  background: var(--nav-glass);
  -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px);
  border: 1px solid var(--line);
  box-shadow: 0 10px 26px -20px var(--shadow);
  transition: box-shadow .3s ease, background .35s ease;
}
.nav.is-scrolled .nav-pill {
  box-shadow: 0 16px 38px -16px var(--shadow), 0 3px 10px -6px var(--shadow);
}
.brand { display: flex; align-items: center; gap: 11px; color: var(--ink); }
.brand img { width: 28px; height: 28px; }
.brand .b-ar { font-family: "ReemKufi"; font-size: 20px; line-height: 1; }
.brand .b-en { font-family: "Unbounded"; font-size: 10.5px; letter-spacing: .3em; color: var(--gold-text); margin-top: 2px; }
.nav nav { display: flex; gap: 4px; margin-inline-start: auto; }
.nav nav a {
  color: var(--dim); font-size: 14px; padding: 8px 13px; border-radius: 999px;
  transition: color .15s ease, background .15s ease;
}
.nav nav a:hover { color: var(--ink); background: var(--line); }
.nav-actions { display: flex; align-items: center; gap: 8px; margin-inline-start: auto; }
.nav nav + .nav-actions { margin-inline-start: 0; }
.lang {
  border: 1px solid var(--gold); color: var(--gold-text); padding: 8px 15px;
  border-radius: 999px; font-size: 13px; line-height: 1;
}
.lang:hover { background: var(--gold); color: var(--gold-ink); }
.theme-btn {
  width: 36px; height: 36px; border-radius: 50%; border: 1px solid var(--line);
  background: none; color: var(--dim); font-size: 15px; line-height: 1;
  cursor: pointer; display: grid; place-items: center; padding: 0;
}
.theme-btn:hover { color: var(--ink); border-color: var(--line-strong); }

/* ---------- girih lattice atmosphere (JS injects --girih data-URI) ---------- */
.pattern-layer {
  position: absolute; inset: 0; pointer-events: none;
  opacity: var(--pattern-opacity);
  background-image: var(--girih);
  background-size: 168px 168px;
  -webkit-mask-image: linear-gradient(180deg, black 0%, black 55%, transparent 100%);
  mask-image: linear-gradient(180deg, black 0%, black 55%, transparent 100%);
  will-change: transform;
}

/* ---------- hero ---------- */
.hero { position: relative; overflow: hidden; }
.hero::before {
  content: ""; position: absolute; inset: -20% -10% auto;
  height: 130%; pointer-events: none;
  background: radial-gradient(ellipse 60% 45% at 70% 30%, rgba(29, 65, 54, .55), transparent 70%);
}
html[data-theme="light"] .hero::before {
  background: radial-gradient(ellipse 60% 45% at 70% 30%, rgba(31, 122, 77, .14), transparent 70%);
}
.hero .wrap {
  position: relative; display: grid; grid-template-columns: 1.05fr .95fr;
  gap: 56px; align-items: center; padding-block: 150px 90px;
}
.kicker {
  font-family: "JetBrainsMono", "ReemKufi", ui-monospace, monospace;
  font-size: 12px; letter-spacing: .3em;
  color: var(--gold-text); text-transform: uppercase;
}
html[dir="rtl"] .kicker { font-family: var(--body); }
h1 {
  font-family: var(--disp); font-weight: 500; font-size: 64px;
  line-height: 1.08; margin: 20px 0 22px; text-wrap: balance;
}
.sub { color: var(--dim); font-size: 19px; max-width: 34em; margin: 0 0 34px; }
.cta-row { display: flex; gap: 16px; flex-wrap: wrap; align-items: center; }
.cta {
  display: inline-block; padding: 15px 28px; border-radius: 6px;
  font-family: var(--disp); font-size: 15px; font-weight: 500;
  background: linear-gradient(180deg, var(--gold-hi), var(--gold-lo));
  color: var(--gold-ink); box-shadow: 0 0 24px rgba(203, 169, 96, .18);
}
.cta:active { transform: translateY(1px); }
.cta-quiet {
  display: inline-block; padding: 14px 26px; border-radius: 6px;
  border: 1px solid var(--line-strong); color: var(--ink); font-size: 15px;
}
.cta-quiet:hover { border-color: var(--gold); color: var(--gold-text); }

.hero-visual { display: flex; flex-direction: column; align-items: center; gap: 26px; position: relative; }
.hero-band { width: min(390px, 84%); filter: drop-shadow(0 30px 60px var(--shadow)); }
@media (prefers-reduced-motion: no-preference) {
  img.hero-band { animation: floaty 7s ease-in-out infinite; }
  @keyframes floaty { 0%, 100% { transform: translateY(0) rotate(-1.2deg); } 50% { transform: translateY(-14px) rotate(1.2deg); } }
}
.matrix-card { text-align: center; }
.matrix-card canvas { max-width: 100%; height: auto; }
.matrix-fill canvas { width: min(560px, 100%) !important; }
.hero .matrix-card canvas { width: min(430px, 100%) !important; }
.caption {
  font-family: var(--mono); font-size: 12px; color: var(--dim);
  letter-spacing: .05em; margin-top: 10px;
}
html[dir="rtl"] .caption { font-family: var(--body); }

/* ---------- sections ---------- */
section { padding-block: 92px; position: relative; }
.rule { display: flex; align-items: center; gap: 14px; margin-bottom: 44px; }
.rule::before, .rule::after { content: ""; height: 1px; background: var(--line); flex: 1; }
.rule .gem { width: 8px; height: 8px; background: var(--gem); transform: rotate(45deg); }
h2 {
  font-family: var(--disp); font-weight: 450; font-size: 38px;
  line-height: 1.2; margin: 0 0 14px; text-wrap: balance;
}
.lede { color: var(--dim); font-size: 18px; max-width: 40em; margin: 0 0 40px; }

/* ritual film strip: the counting gesture, theme-swapped */
.ritual-film { margin: 0 0 44px; display: flex; justify-content: center; }
.ritual-film video {
  width: min(620px, 100%); aspect-ratio: 1 / 1; display: block;
  border-radius: 16px; border: 1px solid var(--line);
  box-shadow: 0 22px 48px -30px var(--shadow);
}

/* ritual steps */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px; }
.step {
  background: var(--panel); border: 1px solid var(--line); border-radius: 14px;
  padding: 26px 26px 30px; display: flex; flex-direction: column; gap: 14px;
  box-shadow: 0 14px 30px -24px var(--shadow);
}
.step canvas { width: 100% !important; height: auto; border-radius: 8px; }
.step .n {
  font-family: var(--mono); color: var(--gold-text); font-size: 12px; letter-spacing: .2em;
}
.step h3 { font-family: var(--disp); font-weight: 500; font-size: 22px; margin: 0; }
.step p { margin: 0; color: var(--dim); font-size: 15px; }
.goal-note {
  margin-top: 40px; text-align: center; color: var(--dim);
  font-size: 17px;
}
.goal-note .phrase {
  font-family: "ReemKufi"; color: var(--gold-text); font-size: 26px;
  margin-inline-start: 6px;
}

/* display language */
.display-grid { display: grid; grid-template-columns: .9fr 1.1fr; gap: 48px; align-items: center; }
.law { border-inline-start: 2px solid var(--green); padding: 6px 0; padding-inline-start: 18px; color: var(--dim); margin: 20px 0; }

/* privacy vessels: engraved plaques with the breathing LED marker */
.privacy { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; margin: 46px 0 18px; }
.vessel {
  position: relative; background: var(--panel-bright);
  border: 1px solid var(--gold); border-radius: 12px;
  box-shadow: inset 0 0 0 3px var(--panel-bright), inset 0 0 0 3.5px rgba(166, 127, 51, .35),
              0 16px 32px -26px var(--shadow);
  padding: 28px 24px 24px; text-align: center;
}
.vessel .dot {
  width: 8px; height: 8px; border-radius: 50%; background: var(--led-green);
  box-shadow: 0 0 10px var(--led-green);
  margin: 0 auto 14px;
}
html[data-theme="light"] .vessel .dot { background: var(--green); box-shadow: 0 0 8px rgba(31, 122, 77, .5); }
@media (prefers-reduced-motion: no-preference) {
  .vessel .dot { animation: breath 6s ease-in-out infinite; }
  .vessel:nth-child(2) .dot { animation-delay: 2s; }
  .vessel:nth-child(3) .dot { animation-delay: 4s; }
  @keyframes breath { 0%, 100% { opacity: .45; } 50% { opacity: 1; } }
}
.vessel h3 { font-family: var(--disp); font-weight: 500; font-size: 21px; margin: 0 0 8px; }
.vessel p { margin: 0; color: var(--dim); font-size: 14px; }
.app-note { text-align: center; color: var(--dim); }
.stills { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; margin-top: 40px; }
.stills img { border-radius: 18px; border: 1px solid var(--line); display: block;
  box-shadow: 0 18px 40px -30px var(--shadow); }

/* band */
.band-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: center; }
.band-grid img { width: min(460px, 100%); margin-inline: auto; display: block;
  filter: drop-shadow(0 24px 48px var(--shadow)); }
.specs { list-style: none; margin: 0; padding: 0; }
.specs li {
  padding: 15px 2px; padding-inline-start: 22px; position: relative;
  border-top: 1px solid var(--line); color: var(--ink); font-size: 16.5px;
}
.specs li:last-child { border-bottom: 1px solid var(--line); }
.specs li::before {
  content: ""; position: absolute; inset-inline-start: 2px; top: 24px;
  width: 6px; height: 6px; transform: rotate(45deg); background: var(--gem);
}
.honest {
  margin-top: 28px; color: var(--dim); font-size: 15.5px;
  border-inline-start: 2px solid var(--gold); padding-inline-start: 18px;
}

/* waitlist */
.waitlist { text-align: center; }
.waitlist .lede { margin-inline: auto; }
.waitlist .note { font-family: var(--mono); font-size: 12.5px; color: var(--dim); margin-top: 18px; }
html[dir="rtl"] .waitlist .note { font-family: var(--body); }

/* footer */
footer { border-top: 1px solid var(--line); padding-block: 44px; }
footer .wrap { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.f-mark { display: flex; align-items: baseline; gap: 14px; }
.f-mark .b-ar { font-family: "ReemKufi"; font-size: 22px; }
.f-mark .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--gem); align-self: center; }
.f-mark .b-en { font-family: "Unbounded"; font-size: 13px; letter-spacing: .3em; color: var(--gold-text); }
footer .made { color: var(--dim); font-size: 14px; margin-inline-start: auto; }
footer .rights { color: var(--dim); font-size: 13px; width: 100%; }

/* ---------- scroll reveals (JS adds .rev; page is fully visible without JS) -- */
@media (prefers-reduced-motion: no-preference) {
  .rev { opacity: 0; transform: translateY(20px);
         transition: opacity .65s ease, transform .65s cubic-bezier(.2, .7, .2, 1);
         transition-delay: var(--rev-delay, 0ms); }
  .rev.in { opacity: 1; transform: none; }
}

/* responsive */
@media (max-width: 560px) {
  .privacy { grid-template-columns: 1fr; gap: 12px; }
  /* vessels compress into slim rows: dot beside the vow, start-aligned */
  .vessel {
    display: grid; grid-template-columns: auto 1fr; column-gap: 16px;
    align-items: center; text-align: start; padding: 16px 20px;
  }
  .vessel .dot { margin: 0; grid-row: 1 / span 2; }
  .vessel h3 { font-size: 17px; }
  .vessel p { font-size: 13px; }
  /* footer stacks centered */
  footer .wrap { flex-direction: column; align-items: center; gap: 10px; text-align: center; }
  footer .made { margin-inline-start: 0; }
  footer .rights { width: auto; }
}
@media (max-width: 900px) {
  h1 { font-size: 44px; }
  .hero .wrap { grid-template-columns: 1fr; padding-block-start: 118px; }
  .display-grid, .band-grid { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr; }
  .stills { grid-template-columns: repeat(2, 1fr); }
  .nav nav { display: none; }
}

/* ---------- shop pages (order + status) — dark until activation ---------- */
.shop-wrap { max-width: 560px; margin-inline: auto; padding: 150px 24px 100px; }
.shop-h1 { font-family: var(--disp); font-weight: 500; font-size: 40px; margin: 0 0 12px; }
.order-card {
  background: var(--panel); border: 1px solid var(--line); border-radius: 16px;
  padding: 28px; display: flex; flex-direction: column; gap: 18px;
  box-shadow: 0 22px 48px -30px var(--shadow); margin-top: 26px;
}
.order-product { display: flex; align-items: center; gap: 18px; }
.order-product img { width: 84px; }
.order-product h3 { font-family: var(--disp); font-size: 19px; font-weight: 500; margin: 0 0 4px; }
.price-note { margin: 0; color: var(--gold-text); font-size: 13.5px; }
.field { display: flex; flex-direction: column; gap: 7px; font-size: 13.5px; color: var(--dim); }
.field input, .field select {
  background: var(--bg); border: 1px solid var(--line-strong); border-radius: 8px;
  color: var(--ink); font: inherit; font-size: 16px; padding: 12px 14px;
}
.field select {
  appearance: none; -webkit-appearance: none;
  padding-inline-end: 48px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5 6 6.5 11 1.5' fill='none' stroke='%2393ACA4' stroke-width='1.6' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 18px center;
}
html[dir="rtl"] .field select { background-position: left 18px center; }
html[data-theme="light"] .field select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5 6 6.5 11 1.5' fill='none' stroke='%2356524A' stroke-width='1.6' stroke-linecap='round'/%3E%3C/svg%3E");
}
.field input:focus, .field select:focus { outline: 2px solid var(--gold); outline-offset: 1px; }
.order-card .cta { border: none; cursor: pointer; font-size: 16px; margin-top: 6px; }
.order-card .cta:disabled { opacity: .55; cursor: wait; }
.secure-note { margin: 0; color: var(--dim); font-size: 12.5px; text-align: center; }
/* the completion ceremony: the band's own goal sequence above an engraved receipt */
.ceremony { padding: 0; overflow: hidden; gap: 0; }
.ceremony-matrix {
  background: #0B1A13; display: flex; justify-content: center;
  padding: 26px 20px 22px; border-bottom: 1px solid var(--line);
}
.ceremony-matrix canvas { width: min(420px, 100%) !important; height: auto; }
.ceremony-body { padding: 30px 34px 32px; text-align: center; }
.ceremony-body h3 { font-family: var(--disp); font-size: 27px; font-weight: 500; margin: 18px 0 10px; }
.ceremony-body > p { color: var(--dim); font-size: 15.5px; line-height: 1.7; margin: 0 0 8px; }
.status-tag {
  display: inline-block; font-family: var(--mono); font-size: 11px;
  letter-spacing: .18em; padding: 7px 13px; border: 1px solid var(--dim); color: var(--dim);
}
html[dir="rtl"] .status-tag { font-family: var(--body); letter-spacing: 0; }
.status-tag[data-state="paid"] { border-color: var(--green); color: var(--green); }
.status-tag[data-state="pending"] { border-color: var(--gold); color: var(--gold-text); }
.receipt {
  width: 100%; border-collapse: collapse; margin: 22px 0 4px;
}
.receipt td {
  padding: 13px 2px; border-top: 1px solid var(--line);
  font-size: 14.5px; color: var(--dim); text-align: start;
}
.receipt td + td { text-align: end; color: var(--ink); }
.receipt tr:last-child td { border-bottom: 1px solid var(--line); }
.receipt tr:last-child td + td { font-family: var(--disp); font-size: 17px; }
.receipt code { font-family: var(--mono); font-size: 13px; color: var(--ink); }
.ceremony-actions { display: flex; gap: 12px; justify-content: center; margin-top: 22px; }

/* order page v2: the band leads */
.order-wide { max-width: 1020px; }
.order-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 44px;
  align-items: start; margin-top: 70px; }
.stage-panel {
  position: relative; background: var(--panel); border: 1px solid var(--line);
  border-radius: 18px; padding: 0 20px 8px; overflow: visible;
  box-shadow: 0 24px 52px -32px var(--shadow);
}
.stage-panel .pattern-layer { border-radius: 18px; overflow: hidden; }
.stage-band {
  position: relative; display: block; width: min(330px, 96%);
  margin: -64px auto 0; filter: drop-shadow(0 30px 55px var(--shadow));
}
@media (prefers-reduced-motion: no-preference) {
  .stage-band { animation: floaty 7s ease-in-out infinite; }
}
.stage-below { padding: 22px 6px 0; text-align: center; }
.stage-tag {
  display: inline-block; border: 1px solid var(--gold); color: var(--gold-text);
  font-family: var(--mono); font-size: 11px; letter-spacing: .14em;
  padding: 7px 12px; margin-bottom: 14px;
}
html[dir="rtl"] .stage-tag { font-family: var(--body); }
.stage-name { font-family: var(--disp); font-weight: 500; font-size: 22px; margin: 0 0 10px; }
.stage-price { display: flex; align-items: baseline; justify-content: center; gap: 10px; }
.stage-price .amount { font-family: var(--disp); font-weight: 500; font-size: 40px; color: var(--gold-text); }
.stage-price .per { color: var(--dim); font-size: 13.5px; }
.total-row {
  display: flex; justify-content: space-between; align-items: baseline;
  border-top: 1px solid var(--line); padding-top: 16px; margin-top: 4px;
  font-size: 14px; color: var(--dim);
}
.total-row strong { font-family: var(--disp); font-weight: 500; font-size: 22px; color: var(--ink); }
.summary { color: var(--ink); font-size: 15px; margin: 4px 0 0; }
.email-note { color: var(--gold-text); font-size: 13.5px; margin: 2px 0 0; }
@media (max-width: 860px) {
  .order-grid { grid-template-columns: 1fr; gap: 60px; }
  .order-wide { max-width: 560px; }
}
