/* ============================================================
   Shared case-study stylesheet — Nadia Chebishev Halevy
   Typography matches the main site (Questrial + Lato).
   Each page sets its own --accent / --accent-2 brand colour.
   ============================================================ */

:root {
  --paper: #faf8f2;
  --paper-2: #ffffff;
  --paper-sink: #f1ede2;
  --ink: #141414;
  --ink-soft: #3a3a38;
  --muted: #6b675f;
  --line: #e7e1d3;
  --line-soft: #efeadd;
  /* defaults — overridden per page on <body data-accent> */
  --accent: #fd456b;
  --accent-2: #0097d7;
  --accent-ink: #b51f42;
  --container: 1080px;
  --radius: 18px;
  --radius-lg: 26px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: "Lato", system-ui, Helvetica, Arial, sans-serif;
  font-size: 17px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
img { display: block; max-width: 100%; }
a { color: inherit; }
*:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 4px; }

.font-display {
  font-family: "Questrial", "Lato", Helvetica, Arial, sans-serif;
  letter-spacing: -0.01em;
}
.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.28em;
  font-size: 0.72rem;
  font-weight: 700;
}
.container { max-width: var(--container); margin: 0 auto; padding: 0 24px; }

/* ---------- Nav ---------- */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: rgba(250, 248, 242, 0.82);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--line);
}
.nav-inner {
  max-width: var(--container); margin: 0 auto; padding: 14px 24px;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
}
.nav-brand { font-weight: 900; font-size: 18px; text-decoration: none; color: var(--ink); letter-spacing: -0.02em; }
.nav-brand span { color: var(--accent); }
.nav-right { display: flex; align-items: center; gap: 8px; }
.nav-back {
  text-decoration: none; color: var(--muted); font-weight: 700; font-size: 14px;
  padding: 9px 14px; border-radius: 999px; transition: color .2s var(--ease), background .2s var(--ease);
}
.nav-back:hover { color: var(--ink); background: var(--paper-sink); }
.nav-cta {
  text-decoration: none; color: #fff; background: var(--ink); font-weight: 700; font-size: 14px;
  padding: 10px 20px; border-radius: 999px; transition: transform .2s var(--ease), background .2s var(--ease);
}
.nav-cta:hover { transform: translateY(-2px); background: var(--accent); }

/* ---------- Banner hero ---------- */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.hero-banner { padding: 30px 0 6px; }
.hero-banner .wrap {
  border-radius: var(--radius-lg); overflow: hidden;
  box-shadow: 0 34px 70px -30px rgba(20,20,20,.4), 0 8px 22px -12px rgba(20,20,20,.16);
}
.hero-banner img { width: 100%; display: block; }

/* ---------- Device mockups (pre-rendered art) ---------- */
.mocks { display: flex; flex-wrap: wrap; gap: 4px 16px; margin-top: 28px; justify-content: center; align-items: flex-start; }
.mocks figure { margin: 0; width: 214px; max-width: 42vw; }
.mocks img { width: 100%; display: block; }
.mocks figcaption { text-align: center; font-size: 13px; font-weight: 700; letter-spacing: .03em; color: var(--muted); margin-top: -4px; }

/* ---------- Hero (legacy text variant) ---------- */
.hero { padding: 72px 0 36px; }
.hero-meta { display: flex; align-items: center; gap: 14px; color: var(--accent-ink); }
.hero-meta .num { font-weight: 800; letter-spacing: 0.18em; }
.hero-meta .rule { height: 1px; flex: 1; max-width: 80px; background: var(--accent); opacity: .5; }
.hero h1 {
  margin: 18px 0 0; font-weight: 400; line-height: 1.02;
  font-size: clamp(44px, 8vw, 88px);
}
.hero .tagline {
  margin: 22px 0 0; max-width: 720px; font-size: clamp(18px, 2.4vw, 23px);
  color: var(--ink-soft); line-height: 1.5;
}
.pills { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 30px; }
.pill {
  font-size: 13px; font-weight: 700; letter-spacing: .02em;
  padding: 8px 16px; border-radius: 999px;
  background: var(--paper-2); border: 1.5px solid var(--line); color: var(--ink-soft);
}
.pill.accent { background: color-mix(in srgb, var(--accent) 12%, #fff); border-color: color-mix(in srgb, var(--accent) 38%, #fff); color: var(--accent-ink); }

/* hero image */
.hero-figure { margin: 46px 0 0; }
.frame-browser {
  background: var(--paper-2); border: 1px solid var(--line);
  border-radius: var(--radius-lg); overflow: hidden;
  box-shadow: 0 30px 60px -28px rgba(20,20,20,.35), 0 6px 18px -10px rgba(20,20,20,.18);
}
.frame-browser .bar {
  display: flex; align-items: center; gap: 7px; padding: 13px 18px;
  background: var(--paper-sink); border-bottom: 1px solid var(--line);
}
.frame-browser .bar i { width: 11px; height: 11px; border-radius: 50%; background: #d7d0bf; display: block; }
.frame-browser .bar i:nth-child(1){ background:#e9a09a; } .frame-browser .bar i:nth-child(2){ background:#e8c98a; } .frame-browser .bar i:nth-child(3){ background:#a7cba0; }
.frame-browser .shot { max-height: 560px; overflow: hidden; }
.frame-browser .shot img { width: 100%; }

/* ---------- Content sections ---------- */
section.block { padding: 30px 0; }
.grid-lead { display: grid; grid-template-columns: 220px 1fr; gap: 40px; align-items: start; }
.block-label { color: var(--accent-ink); }
.block h2 {
  font-weight: 400; line-height: 1.1; margin: 8px 0 0;
  font-size: clamp(28px, 4vw, 40px);
}
.prose p { margin: 0 0 16px; color: var(--ink-soft); }
.prose p:last-child { margin-bottom: 0; }
.prose strong { color: var(--ink); }

ul.ticks { list-style: none; margin: 6px 0 0; padding: 0; display: grid; gap: 14px; }
ul.ticks li {
  position: relative; padding: 0 0 0 34px; color: var(--ink-soft);
}
ul.ticks li::before {
  content: ""; position: absolute; left: 0; top: 9px;
  width: 18px; height: 18px; border-radius: 50%;
  background: color-mix(in srgb, var(--accent) 18%, #fff);
  border: 2px solid var(--accent);
}
ul.ticks li strong { color: var(--ink); }

/* facts strip */
.facts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.facts .cell { background: var(--paper-2); padding: 22px 24px; }
.facts .k { font-size: 12px; letter-spacing: .22em; text-transform: uppercase; color: var(--muted); font-weight: 700; }
.facts .v { margin-top: 6px; font-weight: 700; color: var(--ink); }

/* callout */
.callout {
  margin-top: 26px; padding: 26px 28px; border-radius: var(--radius);
  background: color-mix(in srgb, var(--accent) 8%, #fff);
  border: 1px solid color-mix(in srgb, var(--accent) 26%, #fff);
}
.callout .q { font-family: "Questrial", sans-serif; font-size: clamp(20px, 2.8vw, 26px); line-height: 1.35; color: var(--ink); }
.callout .src { margin-top: 10px; font-size: 14px; font-weight: 700; color: var(--accent-ink); }

/* ---------- Gallery ---------- */
.gallery-web { display: grid; gap: 24px; margin-top: 26px; }
.gallery-web .frame-browser .shot { max-height: 620px; }

.phones { display: flex; flex-wrap: wrap; gap: 26px; margin-top: 26px; justify-content: center; }
.phone {
  width: 232px; background: #111; border-radius: 34px; padding: 10px;
  box-shadow: 0 26px 50px -24px rgba(20,20,20,.5);
}
.phone .screen { position: relative; border-radius: 26px; overflow: hidden; background: #fff; }
.phone .screen::before {
  content: ""; position: absolute; top: 8px; left: 50%; transform: translateX(-50%);
  width: 78px; height: 6px; border-radius: 6px; background: rgba(255,255,255,.55); z-index: 2;
}
.phone .screen img { width: 100%; }
.phone .cap { color: #cfcabb; text-align: center; font-size: 12px; font-weight: 700; letter-spacing: .04em; padding: 8px 0 2px; }

/* ---------- CTA footer ---------- */
.cta {
  margin-top: 40px; background: var(--ink); color: #f4f1e8;
}
.cta .inner { max-width: var(--container); margin: 0 auto; padding: 76px 24px; text-align: center; }
.cta h2 { font-weight: 400; font-size: clamp(30px, 5vw, 52px); margin: 0; line-height: 1.05; }
.cta p { margin: 16px auto 0; max-width: 520px; color: #c9c5ba; }
.cta .actions { margin-top: 32px; display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }
.btn-primary {
  text-decoration: none; background: var(--accent); color: #fff; font-weight: 700;
  padding: 15px 30px; border-radius: 999px; transition: transform .2s var(--ease), filter .2s var(--ease);
}
.btn-primary:hover { transform: translateY(-2px); filter: brightness(1.06); }
.btn-ghost {
  text-decoration: none; color: #f4f1e8; font-weight: 700; padding: 15px 26px;
  border-radius: 999px; border: 1.5px solid rgba(255,255,255,.28); transition: background .2s var(--ease);
}
.btn-ghost:hover { background: rgba(255,255,255,.08); }

.footnote { text-align: center; color: var(--muted); font-size: 13px; padding: 26px 24px 40px; }

/* ---------- Reveal on scroll ---------- */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; transition: none; } }

/* ---------- Responsive ---------- */
@media (max-width: 760px) {
  .grid-lead { grid-template-columns: 1fr; gap: 14px; }
  .facts { grid-template-columns: 1fr; }
  .hero { padding: 48px 0 24px; }
  .nav-back { display: none; }
}
