/* NeverBuyAgain — design 3 "Viewfinder"
   Dark-first and technical: the hero sits inside a camera viewfinder with a
   scanning laser, and the page tells the story of the signature moment.
   Follows the system theme (a light variant is included). One red = "avoid". */

:root {
  color-scheme: dark light;

  --red: #D32F2F;              /* button backgrounds (white text ≥ 4.5:1) */
  --accent: #EF5350;           /* red text/lines on dark (roadmap §5.8 dark token) */
  --bg: #0E0E10;
  --surface: #16161a;
  --surface-2: #1c1c21;
  --text: #EDEDEF;
  --muted: #a3a3ad;
  --line: #2a2a31;
  --glow: rgb(239 83 80 / .28);

  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans", "Noto Sans Arabic", Tahoma, sans-serif;
  --mono: ui-monospace, "Cascadia Mono", "SF Mono", Menlo, Consolas, monospace;
  --wrap: 72rem;
}

@media (prefers-color-scheme: light) {
  :root {
    --accent: #D32F2F;
    --bg: #F6F6F4;
    --surface: #ffffff;
    --surface-2: #efefec;
    --text: #121214;
    --muted: #55555e;
    --line: #dcdcd8;
    --glow: rgb(211 47 47 / .14);
  }
}

/* Base ---------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 5rem; }
body { margin: 0; background: var(--bg); color: var(--text); font: 17px/1.6 var(--sans); }
body:lang(ar) { font-size: 18px; line-height: 1.8; }
h1, h2, h3 { margin: 0; line-height: 1.1; letter-spacing: -.025em; }
:lang(ar) :is(h1, h2, h3) { letter-spacing: 0; line-height: 1.4; }
h2 { font-size: clamp(1.9rem, 1.2rem + 2.6vw, 3.2rem); font-weight: 800; max-width: 22ch; }
h3 { font-size: 1.2rem; }
p { margin: 0; }
a { color: var(--accent); }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 4px; }
svg { fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

.wrap { max-width: var(--wrap); margin-inline: auto; padding-inline: clamp(1rem, 4vw, 2rem); }
.kicker { font-family: var(--mono); font-size: .8rem; letter-spacing: .16em; text-transform: uppercase; color: var(--accent); margin-bottom: 1rem; }
:lang(ar) .kicker { font-family: var(--sans); letter-spacing: 0; font-size: .95rem; }
.skip { position: absolute; inset-inline-start: 1rem; top: -4rem; z-index: 10; background: var(--text); color: var(--bg); padding: .6rem 1rem; border-radius: 8px; }
.skip:focus { top: 1rem; }

/* Top bar -------------------------------------------------------------- */
.topbar { position: sticky; top: 0; z-index: 5; background: color-mix(in srgb, var(--bg) 82%, transparent); backdrop-filter: blur(14px); border-bottom: 1px solid var(--line); }
.topbar__inner { display: flex; align-items: center; gap: 1.5rem; min-height: 4rem; }
.brand { display: inline-flex; align-items: center; gap: .55rem; color: var(--text); text-decoration: none; font-weight: 800; }
.brand svg { width: 1.6rem; height: 1.6rem; color: var(--accent); stroke-width: 3; }
.topnav { display: flex; gap: 1.5rem; margin-inline-start: auto; }
.topnav a { color: var(--muted); text-decoration: none; font-size: .95rem; font-weight: 600; }
.topnav a:hover { color: var(--text); }
.lang { font: inherit; font-weight: 700; font-size: .95rem; cursor: pointer; min-height: 44px; padding: 0 1rem; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); color: var(--text); }
.lang:hover { border-color: var(--accent); }

/* Hero ---------------------------------------------------------------- */
.hero {
  padding-block: clamp(3rem, 9vw, 7rem);
  background: radial-gradient(50rem 28rem at 50% 30%, var(--glow), transparent 70%);
}
.frame {
  position: relative; overflow: hidden; text-align: center;
  padding: clamp(3.5rem, 9vw, 7rem) clamp(1.25rem, 5vw, 4rem);
}
.frame__corner { position: absolute; width: clamp(1.75rem, 4vw, 3rem); aspect-ratio: 1; border: 0 solid var(--text); }
.frame__corner:nth-of-type(1) { top: 0; inset-inline-start: 0; border-block-start-width: 4px; border-inline-start-width: 4px; border-start-start-radius: 14px; }
.frame__corner:nth-of-type(2) { top: 0; inset-inline-end: 0; border-block-start-width: 4px; border-inline-end-width: 4px; border-start-end-radius: 14px; }
.frame__corner:nth-of-type(3) { bottom: 0; inset-inline-start: 0; border-block-end-width: 4px; border-inline-start-width: 4px; border-end-start-radius: 14px; }
.frame__corner:nth-of-type(4) { bottom: 0; inset-inline-end: 0; border-block-end-width: 4px; border-inline-end-width: 4px; border-end-end-radius: 14px; }
.frame__laser {
  position: absolute; inset-inline: 4%; top: 12%; height: 2px; z-index: 0;
  background: var(--accent); box-shadow: 0 0 18px 3px var(--glow), 0 0 4px 1px var(--accent);
  opacity: .75; animation: sweep 2.6s ease-in-out infinite alternate;
}
@keyframes sweep { to { top: 88%; } }
.frame__meta { position: absolute; font-family: var(--mono); font-size: .75rem; letter-spacing: .08em; color: var(--muted); text-transform: uppercase; }
:lang(ar) .frame__meta--end { font-family: var(--sans); letter-spacing: 0; font-size: .85rem; }
.frame__meta--start { top: 1.1rem; inset-inline-start: clamp(2.5rem, 6vw, 4rem); }
.frame__meta--end { bottom: 1.1rem; inset-inline-end: clamp(2.5rem, 6vw, 4rem); color: var(--accent); font-weight: 700; }
.frame h1 { position: relative; z-index: 1; font-size: clamp(2.5rem, .8rem + 6.5vw, 6.2rem); font-weight: 900; }
.lead { max-width: 38rem; margin: 2rem auto 0; text-align: center; color: var(--muted); font-size: clamp(1.1rem, 1rem + .4vw, 1.3rem); }
.actions { display: flex; flex-wrap: wrap; justify-content: center; gap: .75rem; margin-top: 2rem; }
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 52px; padding: 0 1.6rem; border-radius: 12px; font-weight: 800; text-decoration: none; transition: translate .15s ease, box-shadow .15s ease; }
.btn:hover { translate: 0 -2px; }
.btn--red { background: var(--red); color: #fff; box-shadow: 0 10px 30px -10px var(--red); }
.btn--line { color: var(--text); border: 1px solid var(--line); background: var(--surface); }

/* Sections ------------------------------------------------------------ */
.section { padding-block: clamp(4rem, 9vw, 7rem); }
.section--alt { background: var(--surface); border-block: 1px solid var(--line); }

/* Timeline */
.timeline { list-style: none; margin: 3.5rem 0 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 2rem; }
.timeline li { position: relative; padding-top: 2rem; border-top: 2px solid var(--line); }
.timeline li::before {
  content: ""; position: absolute; top: -8px; inset-inline-start: 0;
  width: 14px; height: 14px; border-radius: 50%; background: var(--bg); border: 2px solid var(--muted);
}
.timeline__hit { border-top-color: var(--accent) !important; }
.timeline__hit::before { background: var(--accent) !important; border-color: var(--accent) !important; box-shadow: 0 0 0 6px var(--glow); }
.timeline__time { font-family: var(--mono); color: var(--muted); font-size: .85rem; margin-bottom: .6rem; }
:lang(ar) .timeline__time { font-family: var(--sans); }
.timeline__hit .timeline__time { color: var(--accent); font-weight: 700; }
.timeline li > p:last-child { color: var(--muted); margin-top: .5rem; }

/* Numbers */
.numbers { border-block: 1px solid var(--line); background: var(--surface); }
.numbers__grid { display: grid; grid-template-columns: repeat(4, 1fr); }
.number { padding: 2.25rem 1.5rem; border-inline-start: 1px solid var(--line); color: var(--muted); }
.number:first-child { border-inline-start: 0; }
.number__value { font-family: var(--mono); font-size: clamp(2.4rem, 1.5rem + 2.5vw, 3.6rem); font-weight: 800; color: var(--text); line-height: 1; margin-bottom: .6rem; font-variant-numeric: tabular-nums; }
.number__value small { font-size: .45em; color: var(--accent); margin-inline-start: .15em; }
:lang(ar) .number__value small { font-family: var(--sans); }

/* Cards */
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; margin-top: 3rem; }
.card { padding: 1.75rem; border-radius: 18px; background: var(--surface); border: 1px solid var(--line); transition: border-color .2s ease; }
.card:hover { border-color: var(--accent); }
.card svg { width: 1.9rem; height: 1.9rem; color: var(--accent); margin-bottom: 1.1rem; }
.card p { color: var(--muted); margin-top: .5rem; }

/* FAQ */
.faq { display: grid; grid-template-columns: .8fr 1.2fr; gap: 3rem; align-items: start; }
.faq__list { display: grid; gap: .75rem; }
details { border: 1px solid var(--line); border-radius: 14px; background: var(--bg); }
summary {
  display: flex; justify-content: space-between; align-items: center; gap: 1rem;
  min-height: 56px; padding: .9rem 1.25rem; cursor: pointer; font-weight: 700; list-style: none;
}
summary::-webkit-details-marker { display: none; }
summary::after { content: "+"; font-family: var(--mono); font-size: 1.4rem; color: var(--accent); line-height: 1; }
details[open] summary::after { content: "−"; }
details p { padding: 0 1.25rem 1.25rem; color: var(--muted); }

/* Join */
.join { background: radial-gradient(40rem 20rem at 50% 100%, var(--glow), transparent 70%); }
.join__inner { text-align: center; display: grid; justify-items: center; }
.join h2 { margin-inline: auto; }
.join__text { max-width: 36rem; color: var(--muted); margin: 1.25rem 0 2rem; }
.join__fine { color: var(--muted); font-size: .85rem; margin-top: 1.25rem; }

/* Footer */
.footer { border-top: 1px solid var(--line); color: var(--muted); font-size: .9rem; }
.footer__inner { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .5rem 2rem; padding-block: 2rem; }
.footer a { color: inherit; }

/* Scroll reveal: only hidden when script.js is running (html.js) ------ */
.js .reveal { opacity: 0; translate: 0 18px; transition: opacity .6s ease, translate .6s ease; }
.js .reveal.is-visible { opacity: 1; translate: 0 0; }

/* Responsive ---------------------------------------------------------- */
@media (max-width: 900px) {
  .timeline, .cards { grid-template-columns: 1fr; }
  .faq { grid-template-columns: 1fr; gap: 1.5rem; }
  .numbers__grid { grid-template-columns: repeat(2, 1fr); }
  .number:nth-child(odd) { border-inline-start: 0; }
  .number:nth-child(n + 3) { border-top: 1px solid var(--line); }
}
@media (max-width: 720px) {
  .topnav { display: none; }
  .lang { margin-inline-start: auto; }
  .frame__meta { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .js .reveal { opacity: 1; translate: none; }
}
