/* ------------------------------------------------------------------
   Dukans marketing site
   Palette matches the app UI: charcoal surfaces + sky blue (#0ea5e9)
   Fonts: Fraunces (display serif) + Instrument Sans (text)
   ------------------------------------------------------------------ */

@font-face {
  font-family: "Fraunces";
  src: url("../fonts/fraunces.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Fraunces";
  src: url("../fonts/fraunces-italic.woff2") format("woff2");
  font-weight: 100 900;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: "Instrument Sans";
  src: url("../fonts/instrument-sans.woff2") format("woff2");
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Instrument Sans";
  src: url("../fonts/instrument-sans-italic.woff2") format("woff2");
  font-weight: 400 700;
  font-style: italic;
  font-display: swap;
}

:root {
  --bg: #0e0f12;
  --panel: #16181c;
  --panel-2: #1c1f24;
  --text: #f1efe9;
  --muted: #a1a5ab;
  --faint: rgba(241, 239, 233, 0.55);
  --line: rgba(241, 239, 233, 0.13);
  --blue: #38bdf8;
  --blue-deep: #0ea5e9;
  --serif: "Fraunces", Georgia, serif;
  --sans: "Instrument Sans", system-ui, -apple-system, sans-serif;
  --ease: cubic-bezier(0.65, 0.05, 0, 1);
  --pad: clamp(5rem, 11vh, 7.5rem);
}

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.65;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

::selection { background: var(--blue-deep); color: #fff; }

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }

.visually-hidden {
  position: absolute; width: 1px; height: 1px;
  clip-path: inset(50%); overflow: hidden; white-space: nowrap;
}

/* --- WebGL canvas + grain ------------------------------------------------ */

#gl {
  position: fixed; inset: 0; z-index: 0;
  width: 100%; height: 100vh; height: 100svh;
  pointer-events: none;
}

.grain {
  position: fixed; inset: -50%; z-index: 30; pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.5'/%3E%3C/svg%3E");
  opacity: 0.045;
  animation: grain 9s steps(6) infinite;
}
@keyframes grain {
  0%, 100% { transform: translate(0, 0); }
  20% { transform: translate(-6%, 4%); }
  40% { transform: translate(4%, -7%); }
  60% { transform: translate(-3%, -3%); }
  80% { transform: translate(5%, 6%); }
}
@media (prefers-reduced-motion: reduce) {
  .grain { animation: none; }
}

/* --- Preloader ----------------------------------------------------------- */

.loader {
  position: fixed; inset: 0; z-index: 100;
  background: var(--bg);
  display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 1.4rem;
}
.loader__mark {
  width: clamp(66px, 16vw, 96px); height: auto;
  filter: drop-shadow(0 26px 60px rgba(14, 165, 233, 0.4));
  opacity: 0; transform: scale(0.62);
  will-change: transform, opacity;
}
.loader__thread {
  width: min(220px, 40vw); height: 1px;
  background: var(--line); position: relative; overflow: hidden;
}
.loader__thread i {
  position: absolute; inset: 0;
  background: var(--blue);
  transform: scaleX(0); transform-origin: left;
}
.loader.is-done { pointer-events: none; }

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

.header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between;
  padding: 1.1rem clamp(1.2rem, 4vw, 3rem);
  transition: transform 0.5s var(--ease), background 0.4s;
}
.header.is-scrolled {
  background: linear-gradient(rgba(14, 15, 18, 0.88), rgba(14, 15, 18, 0.62) 70%, transparent);
  backdrop-filter: blur(10px);
}
.header.is-hidden { transform: translateY(-110%); }

.brand { display: inline-flex; align-items: center; line-height: 0; }
.brand img {
  display: block; width: clamp(34px, 4.6vw, 40px); height: auto;
  transition: transform 0.3s var(--ease);
}
.brand:hover img { transform: scale(1.06); }

.nav { display: flex; gap: 2rem; align-items: center; }
.nav a {
  font-size: 0.92rem; letter-spacing: 0.02em; color: var(--faint);
  transition: color 0.25s;
}
.nav a:hover { color: var(--text); }
@media (max-width: 760px) { .nav { display: none; } }

.btn {
  display: inline-flex; align-items: center; gap: 0.6rem;
  padding: 0.78rem 1.5rem; border-radius: 999px;
  background: var(--text); color: var(--bg);
  font-weight: 600; font-size: 0.95rem; letter-spacing: 0.01em;
  transition: background 0.25s, color 0.25s;
  will-change: transform;
}
.btn:hover { background: var(--blue); color: #032536; }
.btn--ghost {
  background: transparent; color: var(--text);
  box-shadow: inset 0 0 0 1px var(--line);
}
.btn--ghost:hover {
  background: rgba(56, 189, 248, 0.08); color: var(--text);
  box-shadow: inset 0 0 0 1px rgba(56, 189, 248, 0.5);
}
.btn--small { padding: 0.55rem 1.1rem; font-size: 0.88rem; }

/* Stitched tag chip (clothing label motif) */
.tag {
  display: inline-flex; align-items: center; gap: 0.45rem;
  padding: 0.42rem 0.95rem;
  border: 1px dashed rgba(56, 189, 248, 0.55);
  border-radius: 999px;
  background: rgba(56, 189, 248, 0.06);
  color: var(--blue);
  font-size: 0.78rem; font-weight: 600;
  letter-spacing: 0.16em; text-transform: uppercase;
  font-variant-numeric: tabular-nums;
}
.tag b { font-weight: 700; }

/* --- Layout -------------------------------------------------------------- */

main { position: relative; z-index: 1; }

.container {
  width: min(1280px, calc(100% - clamp(2.4rem, 7vw, 5.5rem)));
  margin-inline: auto;
}

.section { padding: var(--pad) 0; position: relative; }

.h-display {
  font-family: var(--serif); font-weight: 420;
  line-height: 1.04; letter-spacing: -0.025em;
  font-size: clamp(2.4rem, 4.8vw, 4.4rem);
  text-wrap: balance;
}
.h-display em { font-style: italic; font-weight: 380; color: var(--blue); }

.lead {
  color: var(--muted); max-width: 34em;
  font-size: clamp(1.05rem, 1.3vw, 1.18rem);
}
.lead a { color: var(--blue); }
.lead a:hover { text-decoration: underline; }

/* --- Hero ---------------------------------------------------------------- */

.hero {
  min-height: 100vh; min-height: 100svh;
  display: flex; align-items: center;
  padding: clamp(6.5rem, 12vh, 8rem) 0 clamp(3rem, 6vh, 4rem);
}
.hero__inner {
  display: grid;
  grid-template-columns: minmax(0, 1.12fr) minmax(0, 0.88fr);
  align-items: center;
  gap: clamp(2.5rem, 5vw, 5rem);
}
.hero__title {
  font-family: var(--serif); font-weight: 400;
  font-size: clamp(3.3rem, 6.6vw, 7.4rem);
  line-height: 0.99; letter-spacing: -0.03em;
}
.hero__title .line { display: block; overflow: hidden; }
.hero__title .line > span { display: inline-block; will-change: transform; }
.hero__title em { font-style: italic; color: var(--blue); font-weight: 350; }

.hero__copy {
  margin-top: clamp(1.6rem, 3vh, 2.4rem);
  max-width: 30em; color: var(--muted);
  font-size: clamp(1.05rem, 1.35vw, 1.2rem);
}
.hero__copy strong { color: var(--text); font-weight: 600; }
.hero__actions {
  margin-top: clamp(1.8rem, 3.5vh, 2.6rem);
  display: flex; gap: 1rem; align-items: center; flex-wrap: wrap;
}

/* Hero stage: phone + floating fabric swatches */
.hero__stage {
  position: relative;
  display: flex; justify-content: center;
  perspective: 1400px;
}
.swatch-float {
  position: absolute; z-index: 0;
  border-radius: 16px; overflow: hidden;
  border: 1px dashed rgba(241, 239, 233, 0.35);
  outline: 6px solid var(--bg);
  box-shadow: 0 30px 60px -18px rgba(0, 0, 0, 0.65);
}
.swatch-float img { width: 100%; height: 100%; object-fit: cover; }
.swatch-float--back {
  width: clamp(120px, 11vw, 190px); height: clamp(120px, 11vw, 190px);
  top: 6%; left: max(-2rem, -4vw);
  transform: rotate(-9deg);
}
.swatch-float--front {
  width: clamp(110px, 10vw, 170px); height: clamp(86px, 8vw, 132px);
  bottom: 9%; right: max(-1.5rem, -3vw);
  transform: rotate(7deg);
  z-index: 2;
}

.phone {
  width: min(320px, 74vw); aspect-ratio: 1080 / 2210;
  border-radius: clamp(2rem, 5vw, 2.75rem);
  background: #08090b;
  box-shadow:
    inset 0 0 0 1px rgba(241, 239, 233, 0.16),
    0 0 0 6px #08090b,
    0 0 0 7px rgba(241, 239, 233, 0.1),
    0 44px 90px -30px rgba(0, 0, 0, 0.78),
    0 0 110px -36px rgba(14, 165, 233, 0.38);
  overflow: hidden; position: relative;
  transform-style: preserve-3d; will-change: transform;
  z-index: 1;
}
/* centered punch-hole camera, generic Android style */
.phone::after {
  content: ""; position: absolute; top: 13px; left: 50%;
  transform: translateX(-50%);
  width: 13px; height: 13px; border-radius: 50%;
  background: #05060a; z-index: 3;
  box-shadow:
    inset 0 0 0 2px rgba(241, 239, 233, 0.08),
    0 0 0 3px rgba(0, 0, 0, 0.4);
}
.phone__screens { position: absolute; inset: 0; }
.phone__screens img {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; object-position: top;
  clip-path: inset(0 0 100% 0);
}
.phone__screens img.is-active { clip-path: inset(0 0 0 0); }
.phone__glare {
  position: absolute; inset: 0; z-index: 2; pointer-events: none;
  background: linear-gradient(115deg, transparent 40%, rgba(241, 239, 233, 0.06) 46%, transparent 56%);
}

@media (max-width: 900px) {
  .hero { padding-top: 6.5rem; }
  .hero__inner { grid-template-columns: 1fr; gap: 3rem; }
  .hero__stage { margin-top: 0.5rem; }
  .phone { width: min(250px, 62vw); }
  .swatch-float--back { left: 2%; }
  .swatch-float--front { right: 2%; }
}

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

.marquee {
  border-block: 1px solid var(--line);
  padding: 1.15rem 0; overflow: hidden;
  background: rgba(14, 15, 18, 0.55);
  backdrop-filter: blur(4px);
}
.marquee__track { display: flex; width: max-content; will-change: transform; }
.marquee__group {
  display: flex; align-items: center; gap: 2.8rem; padding-right: 2.8rem;
  font-family: var(--serif); font-size: 1.5rem; font-weight: 420;
  letter-spacing: 0.01em; white-space: nowrap;
}
.marquee__group em { font-style: italic; color: var(--blue); }
.marquee__group .dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--blue); opacity: 0.7; flex: none;
}

/* --- Steps (pinned) ------------------------------------------------------ */

.steps__pin {
  min-height: 100vh; min-height: 100svh;
  display: flex; align-items: center;
  padding: clamp(4.5rem, 9vh, 6rem) 0 clamp(2rem, 5vh, 3rem);
}
.steps__title { margin-bottom: clamp(1.8rem, 4vh, 2.6rem); }
.steps__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.12fr) minmax(0, 0.88fr);
  gap: clamp(2.5rem, 5vw, 5rem);
  align-items: center;
}
.steps__bar {
  margin-top: 1.1rem;
  width: min(20rem, 100%); height: 1px;
  background: var(--line);
  position: relative; overflow: hidden;
}
.steps__bar i {
  position: absolute; inset: 0; background: var(--blue);
  transform: scaleX(0); transform-origin: left;
}
.steps__copy { position: relative; margin-top: 1.9rem; min-height: 15em; }
.step-copy { position: absolute; inset: 0; opacity: 0; visibility: hidden; }
.step-copy.is-active { position: relative; opacity: 1; visibility: visible; }
.step-copy h3 {
  font-family: var(--serif); font-weight: 430;
  font-size: clamp(1.8rem, 3vw, 2.7rem);
  line-height: 1.08; letter-spacing: -0.02em;
  margin-bottom: 1rem; max-width: 13em;
}
.step-copy p { color: var(--muted); max-width: 32em; }

.phone-wrap { display: flex; justify-content: center; perspective: 1200px; }
.steps .phone { width: min(290px, 66vw); }

@media (max-width: 900px) {
  .steps__grid { grid-template-columns: 1fr; gap: 1.8rem; }
  .steps__copy { min-height: 12.5em; }
  .steps .phone { width: min(220px, 56vw); }
}

/* --- Features ------------------------------------------------------------ */

.features__head {
  display: flex; flex-wrap: wrap; align-items: flex-end;
  justify-content: space-between; gap: 1.6rem 3rem;
  margin-bottom: clamp(2.4rem, 5vh, 3.6rem);
}
.features__head .lead { max-width: 26em; }
.features__grid {
  display: grid; gap: 1px;
  grid-template-columns: repeat(3, 1fr);
  background: var(--line);
  border: 1px solid var(--line);
}
@media (max-width: 980px) { .features__grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 620px) { .features__grid { grid-template-columns: 1fr; } }

.feature {
  background: var(--bg);
  padding: clamp(1.6rem, 3vw, 2.4rem);
  min-height: 14rem;
  display: flex; flex-direction: column; justify-content: space-between;
  gap: 2rem;
  transition: background 0.35s;
}
.feature:hover { background: var(--panel); }
.feature__icon { width: 2.5rem; height: 2.5rem; color: var(--blue); }
.feature__icon svg { width: 100%; height: 100%; }
.feature h3 {
  font-family: var(--serif); font-weight: 480;
  font-size: 1.35rem; letter-spacing: -0.01em;
  margin-bottom: 0.5rem;
}
.feature p { color: var(--muted); font-size: 0.98rem; }

/* --- Swatch strip -------------------------------------------------------- */

.swatches {
  display: flex; gap: 1rem; align-items: center;
  margin-top: 2.6rem; flex-wrap: wrap;
}
.swatches figure {
  width: 74px; height: 74px; border-radius: 14px; overflow: hidden;
  border: 1px dashed rgba(241, 239, 233, 0.3);
  transform: rotate(var(--r, 0deg));
  transition: transform 0.4s var(--ease);
}
.swatches figure:hover { transform: rotate(0deg) scale(1.08); }
.swatches figure img { width: 100%; height: 100%; object-fit: cover; }
.swatches p { font-size: 0.9rem; color: var(--faint); max-width: 24em; margin-left: 0.6rem; }

/* --- Privacy statement --------------------------------------------------- */

.statement {
  font-family: var(--serif); font-weight: 420;
  font-size: clamp(1.9rem, 4.2vw, 4rem);
  line-height: 1.16; letter-spacing: -0.02em;
}
.statement .w { display: inline-block; opacity: 0.16; transition: opacity 0.3s linear; }
.statement em { font-style: italic; color: var(--blue); }
.privacy-notes {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: clamp(1.6rem, 4vw, 3rem);
  margin-top: clamp(2.6rem, 6vh, 4rem);
}
@media (max-width: 860px) { .privacy-notes { grid-template-columns: 1fr; } }
.privacy-note { border-top: 1px solid var(--line); padding-top: 1.3rem; }
.privacy-note h3 { font-size: 1.02rem; font-weight: 600; margin-bottom: 0.5rem; }
.privacy-note p { color: var(--muted); font-size: 0.95rem; }
.privacy-note a { color: var(--blue); }
.privacy-note a:hover { text-decoration: underline; }

/* --- FAQ ------------------------------------------------------------------ */

.faq-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
  gap: clamp(2.5rem, 5vw, 5rem);
  align-items: start;
}
.faq-intro { position: sticky; top: 7.5rem; }
.faq-intro .lead { margin-top: 1.4rem; }
@media (max-width: 860px) {
  .faq-grid { grid-template-columns: 1fr; }
  .faq-intro { position: static; }
}

.faq-item { border-bottom: 1px solid var(--line); }
.faq-item:first-of-type { border-top: 1px solid var(--line); }
.faq-item button {
  width: 100%; display: flex; justify-content: space-between; align-items: center;
  gap: 1.5rem; text-align: left;
  padding: 1.4rem 0.2rem;
  font-family: var(--serif); font-size: clamp(1.15rem, 1.8vw, 1.4rem);
  font-weight: 450; letter-spacing: -0.01em;
  transition: color 0.25s;
}
.faq-item button:hover { color: var(--blue); }
.faq-item .cross {
  flex: none; width: 1rem; height: 1rem; position: relative;
  transition: transform 0.4s var(--ease);
}
.faq-item .cross::before, .faq-item .cross::after {
  content: ""; position: absolute; background: var(--blue);
  top: 50%; left: 0; width: 100%; height: 1.5px; margin-top: -0.75px;
}
.faq-item .cross::after { transform: rotate(90deg); }
.faq-item.is-open .cross { transform: rotate(45deg); }
.faq-item .answer {
  display: grid; grid-template-rows: 0fr;
  transition: grid-template-rows 0.5s var(--ease);
}
.faq-item.is-open .answer { grid-template-rows: 1fr; }
.faq-item .answer > div { overflow: hidden; }
.faq-item .answer p {
  color: var(--muted); padding: 0 2.6rem 1.5rem 0.2rem; max-width: 42em;
}

/* --- CTA ------------------------------------------------------------------ */

.cta { text-align: center; }
.cta .h-display {
  margin-inline: auto; max-width: 12em;
  font-size: clamp(2.8rem, 5.6vw, 5.2rem);
}
.cta__actions {
  margin-top: 2.6rem; display: flex; gap: 1rem;
  justify-content: center; align-items: center; flex-wrap: wrap;
}
.cta__note { margin-top: 1.4rem; font-size: 0.88rem; color: var(--faint); }

.play-badge {
  display: inline-flex; align-items: center; gap: 0.8rem;
  padding: 0.9rem 1.7rem; border-radius: 14px;
  background: var(--text); color: var(--bg);
  transition: background 0.25s, box-shadow 0.25s;
  will-change: transform;
}
.play-badge:hover { background: #fff; box-shadow: 0 14px 44px -14px rgba(14, 165, 233, 0.6); }
.play-badge svg { width: 1.7rem; height: 1.7rem; flex: none; }
.play-badge .lines { text-align: left; line-height: 1.15; }
.play-badge .lines small {
  display: block; font-size: 0.68rem; font-weight: 600;
  letter-spacing: 0.14em; text-transform: uppercase; opacity: 0.65;
}
.play-badge .lines b { font-size: 1.05rem; font-weight: 700; letter-spacing: 0; }

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

.footer {
  border-top: 1px solid var(--line);
  padding: 3rem 0 2.4rem;
  position: relative; z-index: 1;
  background: rgba(14, 15, 18, 0.74);
  backdrop-filter: blur(6px);
}
.footer__grid {
  display: flex; flex-wrap: wrap; gap: 2rem;
  align-items: flex-start; justify-content: space-between;
}
.footer p { color: var(--faint); font-size: 0.9rem; max-width: 30em; }
.footer nav { display: flex; gap: 1.6rem; flex-wrap: wrap; }
.footer nav a { font-size: 0.9rem; color: var(--faint); transition: color 0.25s; }
.footer nav a:hover { color: var(--text); }
.footer__legal {
  margin-top: 2.6rem; padding-top: 1.4rem;
  border-top: 1px solid var(--line);
  display: flex; flex-wrap: wrap; gap: 1rem;
  justify-content: space-between;
  font-size: 0.82rem; color: var(--faint);
}

/* --- Legal pages ----------------------------------------------------------- */

.legal-page {
  max-width: 760px; margin-inline: auto;
  padding: clamp(8rem, 18vh, 11rem) 0 6rem;
}
.legal-page h1 {
  font-family: var(--serif); font-weight: 420;
  font-size: clamp(2.4rem, 5vw, 3.6rem);
  letter-spacing: -0.02em; line-height: 1.05;
  margin-bottom: 0.8rem;
}
.legal-page .updated { color: var(--faint); font-size: 0.92rem; margin-bottom: 3rem; }
.legal-page h2 {
  font-family: var(--serif); font-weight: 480;
  font-size: 1.5rem; letter-spacing: -0.01em;
  margin: 2.6rem 0 0.8rem;
}
.legal-page p, .legal-page li { color: var(--muted); margin-bottom: 0.9rem; }
.legal-page ul { padding-left: 1.2rem; margin-bottom: 1rem; }
.legal-page li { margin-bottom: 0.45rem; }
.legal-page strong { color: var(--text); font-weight: 600; }
.legal-page a { color: var(--blue); }
.legal-page a:hover { text-decoration: underline; }

/* --- Reveal defaults (pre-JS state) ---------------------------------------- */

html.js [data-reveal] { opacity: 0; transform: translateY(28px); }
html.js [data-reveal-line] .line > span { transform: translateY(110%); }

@media (prefers-reduced-motion: reduce) {
  html.js [data-reveal] { opacity: 1; transform: none; }
  html.js [data-reveal-line] .line > span { transform: none; }
}
