/* ============================================================
   TALAS — Landing · SUMI v3 (lavis japonais interactif)
   Encre sur papier washi · une seule couleur : le cyan.
   ============================================================ */

/* ---------- Tokens : jour (papier washi clair) ---------- */
:root {
  --accent:        #0098B5;
  --accent-hover:  #00B4D8;
  --accent-deep:   #006B7F;
  --accent-muted:  rgba(0, 152, 181, 0.14);

  --bg-void:    #EBE5DD;
  --bg-base:    #F2EDE6;
  --bg-raised:  #F7F3EC;
  --bg-overlay: #FBF8F2;

  --ink:        #1A1A1E;
  --ink-2:      #6E6960;
  --ink-3:      #9A958D;
  --hairline:   rgba(26, 26, 30, 0.12);
  --hairline-2: rgba(26, 26, 30, 0.06);

  --ink-wash:   rgba(26, 26, 30, 0.04);
  --shadow-diffuse: 0 18px 60px -28px rgba(26, 26, 30, 0.30);
  --shadow-soft:    0 6px 30px -18px rgba(26, 26, 30, 0.35);
  --glow:           0 0 0 3px rgba(0, 152, 181, 0.22);

  --washi-opacity: 0.05;

  --font-display: "Space Grotesk", ui-sans-serif, system-ui, sans-serif;
  --font-body:    "Inter", ui-sans-serif, system-ui, sans-serif;
  --font-mono:    "JetBrains Mono", ui-monospace, monospace;

  --maxw: 1120px;
  --gutter: clamp(1.25rem, 5vw, 4rem);
  --r: 18px;
}

/* ---------- Tokens : nuit (lavis inversé) ---------- */
[data-theme="night"] {
  --accent:        #00B4D8;
  --accent-hover:  #4FD3EC;
  --accent-deep:   #0098B5;
  --accent-muted:  rgba(0, 180, 216, 0.16);

  --bg-void:    #09090B;
  --bg-base:    #0D0D0F;
  --bg-raised:  #141416;
  --bg-overlay: #1A1A1E;

  --ink:        #E8E3DB;
  --ink-2:      #A7A299;
  --ink-3:      #706B63;
  --hairline:   rgba(232, 227, 219, 0.14);
  --hairline-2: rgba(232, 227, 219, 0.06);

  --ink-wash:   rgba(232, 227, 219, 0.05);
  --shadow-diffuse: 0 22px 70px -30px rgba(0, 0, 0, 0.8);
  --shadow-soft:    0 8px 34px -18px rgba(0, 0, 0, 0.7);
  --washi-opacity: 0.045;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font-body);
  background: var(--bg-base);
  color: var(--ink);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  transition: background-color .8s ease, color .8s ease;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
em { font-style: normal; color: var(--accent); }
.mono { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }

/* ---------- Washi grain overlay ---------- */
.washi {
  position: fixed; inset: 0; z-index: 9999; pointer-events: none;
  opacity: var(--washi-opacity);
  mix-blend-mode: soft-light;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%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)'/%3E%3C/svg%3E");
}

/* ---------- Layout helpers ---------- */
.ink-accent { color: var(--accent); }
.eyebrow {
  font-family: var(--font-mono);
  font-size: .72rem; letter-spacing: .22em; text-transform: uppercase;
  color: var(--accent-deep); margin-bottom: 1.4rem;
}
.section-title {
  font-family: var(--font-display); font-weight: 600;
  font-size: clamp(1.8rem, 4vw, 2.9rem); line-height: 1.08;
  letter-spacing: -0.02em;
}

/* ---------- Header ---------- */
.site-head {
  position: sticky; top: 0; z-index: 100;
  display: flex; align-items: center; justify-content: space-between;
  padding: 1.1rem var(--gutter);
  backdrop-filter: blur(10px);
  background: color-mix(in srgb, var(--bg-base) 78%, transparent);
  border-bottom: 1px solid var(--hairline-2);
}
.brand { display: flex; align-items: center; gap: .7rem; }
.brand-enso { width: 34px; height: 34px; color: var(--ink); }
.brand-enso.sm { width: 26px; height: 26px; }
.brand-word {
  font-family: var(--font-display); font-weight: 700;
  letter-spacing: .26em; font-size: 1.05rem;
}
.head-nav { display: flex; align-items: center; gap: clamp(1rem, 2.5vw, 2rem); }
.head-nav > a:not(.btn) {
  font-size: .9rem; color: var(--ink-2);
  position: relative; transition: color .25s;
}
.head-nav > a:not(.btn):hover { color: var(--ink); }
@media (max-width: 720px) {
  .head-nav > a:not(.btn) { display: none; }
}

/* ---------- Theme toggle ---------- */
.theme-toggle {
  width: 42px; height: 24px; border-radius: 99px;
  border: 1px solid var(--hairline);
  background: var(--ink-wash); cursor: pointer; padding: 0; position: relative;
  transition: background .4s;
}
.theme-dot {
  position: absolute; top: 50%; left: 3px; transform: translateY(-50%);
  width: 16px; height: 16px; border-radius: 50%;
  background: var(--ink); transition: left .4s cubic-bezier(.6,.1,.2,1), background .4s;
}
[data-theme="night"] .theme-dot { left: 21px; background: var(--accent); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  font-family: var(--font-display); font-weight: 500; font-size: .98rem;
  padding: .85rem 1.5rem; border-radius: 99px; border: 1px solid transparent;
  cursor: pointer; transition: transform .2s, box-shadow .3s, background .3s, color .3s, border-color .3s;
  line-height: 1;
}
.btn-primary {
  background: var(--accent); color: #fff;
  box-shadow: 0 8px 30px -10px color-mix(in srgb, var(--accent) 60%, transparent);
}
.btn-primary:hover { background: var(--accent-hover); transform: translateY(-2px); }
.btn-ghost { border-color: var(--hairline); color: var(--ink); background: transparent; }
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }
.btn-text { background: transparent; color: var(--ink-2); padding-inline: .4rem; }
.btn-text:hover { color: var(--accent); }
.btn-block { width: 100%; }
.btn-stripe { background: var(--ink-wash); color: var(--ink-3); border: 1px dashed var(--hairline); cursor: not-allowed; }
.btn[disabled] { opacity: .65; }

/* ============================================================
   HERO
   ============================================================ */
.hero {
  position: relative; max-width: var(--maxw); margin: 0 auto;
  padding: clamp(3.5rem, 9vw, 7rem) var(--gutter) clamp(2.5rem, 6vw, 5rem);
}
.hero-ink {
  position: absolute; top: -8%; right: -6%; width: min(48vw, 560px); aspect-ratio: 1;
  pointer-events: none; z-index: 0; opacity: .9;
  background:
    radial-gradient(closest-side, var(--accent-muted), transparent 70%),
    radial-gradient(closest-side at 60% 40%, color-mix(in srgb, var(--ink) 8%, transparent), transparent 72%);
  filter: blur(8px);
  animation: drift 18s ease-in-out infinite alternate;
}
@keyframes drift {
  to { transform: translate(-22px, 26px) scale(1.06); }
}
.hero-inner { position: relative; z-index: 1; max-width: 46rem; }
h1 {
  font-family: var(--font-display); font-weight: 700;
  font-size: clamp(2.6rem, 7.5vw, 5rem); line-height: 1.02;
  letter-spacing: -0.035em; margin: 0 0 1.6rem;
}
h1 em { color: var(--ink); position: relative; }
h1 em::after {
  content: ''; position: absolute; left: -2%; right: -2%; bottom: .08em; height: .42em;
  background: var(--accent-muted); z-index: -1; border-radius: 2px;
  transform: skewX(-12deg);
}
.lede { font-size: clamp(1.05rem, 1.6vw, 1.28rem); color: var(--ink-2); max-width: 38rem; }
.hero-cta {
  display: flex; flex-wrap: wrap; align-items: center; gap: 1rem;
  margin: 2.2rem 0 1.1rem;
}
.hero-note { font-size: .9rem; color: var(--ink-3); }

.hero-spec {
  position: relative; z-index: 1; margin-top: clamp(2.5rem, 5vw, 4rem);
  border-top: 1px solid var(--hairline); padding-top: 1.6rem;
}
.hero-spec dl {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.5rem;
}
.hero-spec dt {
  font-family: var(--font-mono); font-size: .68rem; letter-spacing: .14em;
  text-transform: uppercase; color: var(--ink-3); margin-bottom: .35rem;
}
.hero-spec dd { font-family: var(--font-display); font-weight: 500; font-size: .98rem; }
@media (max-width: 680px) { .hero-spec dl { grid-template-columns: repeat(2, 1fr); gap: 1.4rem; } }

/* ============================================================
   PILIERS
   ============================================================ */
.pillars {
  max-width: var(--maxw); margin: 0 auto;
  padding: clamp(2rem, 5vw, 4rem) var(--gutter);
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px;
  background: var(--hairline-2); border-radius: var(--r); overflow: hidden;
  border: 1px solid var(--hairline-2);
}
.pillar {
  background: var(--bg-base); padding: 2rem 1.6rem;
  transition: background .4s;
}
.pillar:hover { background: var(--bg-raised); }
.pillar-no {
  font-family: var(--font-display); font-size: 1.6rem; color: var(--accent);
  opacity: .85; display: block; margin-bottom: 1rem;
}
.pillar h3 { font-family: var(--font-display); font-weight: 600; font-size: 1.12rem; margin-bottom: .55rem; }
.pillar p { font-size: .92rem; color: var(--ink-2); }
@media (max-width: 900px) { .pillars { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px) { .pillars { grid-template-columns: 1fr; } }

/* ============================================================
   COMPARATIF
   ============================================================ */
.compare { max-width: var(--maxw); margin: 0 auto; padding: clamp(3rem, 7vw, 6rem) var(--gutter); }
.compare .section-title { margin-bottom: 2rem; }
.compare-wrap { overflow-x: auto; }
.compare-table { width: 100%; border-collapse: collapse; min-width: 540px; }
.compare-table th, .compare-table td {
  text-align: left; padding: .95rem 1rem; font-size: .95rem;
  border-bottom: 1px solid var(--hairline-2);
}
.compare-table thead th {
  font-family: var(--font-mono); font-size: .7rem; letter-spacing: .12em;
  text-transform: uppercase; color: var(--ink-3); font-weight: 500;
}
.compare-table tbody th { font-weight: 500; color: var(--ink-2); }
.compare-table td { color: var(--ink-2); }
.col-us {
  background: var(--accent-muted); color: var(--ink) !important; font-weight: 600;
  position: relative;
}
thead .col-us { color: var(--accent-deep) !important; font-weight: 700; }
.compare-table .yes { color: var(--accent-deep) !important; }
.compare-foot { margin-top: 1.2rem; font-size: .82rem; color: var(--ink-3); }

/* ============================================================
   COÛTS
   ============================================================ */
.cost {
  background: var(--bg-void); border-top: 1px solid var(--hairline-2); border-bottom: 1px solid var(--hairline-2);
  transition: background .8s;
}
.cost-head, .cost-grid { max-width: var(--maxw); margin: 0 auto; padding-inline: var(--gutter); }
.cost-head { padding-top: clamp(3rem, 7vw, 6rem); }
.cost-head p { color: var(--ink-2); max-width: 40rem; margin-top: 1rem; }
.cost-grid {
  display: grid; grid-template-columns: 1.3fr 1fr; gap: clamp(2rem, 5vw, 4rem);
  padding-top: 2.5rem; padding-bottom: clamp(3rem, 7vw, 6rem); align-items: start;
}
.cost-bars { list-style: none; padding: 0; display: flex; flex-direction: column; gap: 1.3rem; }
.cost-bars li {
  display: grid; grid-template-columns: 1fr auto; align-items: center; gap: .3rem 1rem;
}
.cost-label { font-size: .92rem; }
.cost-val { font-family: var(--font-mono); font-size: .85rem; color: var(--ink-2); }
.cost-bar {
  grid-column: 1 / -1; height: 8px; border-radius: 99px; background: var(--ink-wash);
  position: relative; overflow: hidden;
}
.cost-bar::after {
  content: ''; position: absolute; inset: 0; width: calc(var(--v) * 1%);
  background: linear-gradient(90deg, var(--accent-deep), var(--accent));
  border-radius: 99px; transform-origin: left; transform: scaleX(0);
  transition: transform 1.1s cubic-bezier(.5,.1,.1,1);
}
.cost-bars.in li .cost-bar::after { transform: scaleX(1); }
.cost-bars li:nth-child(2) .cost-bar::after { transition-delay: .08s; }
.cost-bars li:nth-child(3) .cost-bar::after { transition-delay: .16s; }
.cost-bars li:nth-child(4) .cost-bar::after { transition-delay: .24s; }
.cost-bars li:nth-child(5) .cost-bar::after { transition-delay: .32s; }

.cost-summary {
  background: var(--bg-raised); border: 1px solid var(--hairline-2);
  border-radius: var(--r); padding: 1.8rem; box-shadow: var(--shadow-soft);
}
.cost-row { display: flex; justify-content: space-between; padding: .7rem 0; border-bottom: 1px solid var(--hairline-2); font-size: .95rem; }
.cost-row span:first-child { color: var(--ink-2); }
.cost-row.total { border-bottom: none; font-weight: 600; color: var(--accent-deep); }
.cost-row.total .mono { color: var(--accent-deep); }
.cost-note { font-size: .85rem; color: var(--ink-3); margin-top: 1rem; }
@media (max-width: 820px) { .cost-grid { grid-template-columns: 1fr; } }

/* ============================================================
   MANIFESTE
   ============================================================ */
.manifeste {
  position: relative; max-width: 50rem; margin: 0 auto; text-align: center;
  padding: clamp(4rem, 10vw, 8rem) var(--gutter);
}
.manifeste-enso {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
  width: min(70vw, 420px); color: var(--ink); opacity: .05; z-index: 0;
}
.manifeste blockquote { position: relative; z-index: 1; }
.manifeste blockquote p {
  font-family: var(--font-display); font-weight: 500;
  font-size: clamp(1.3rem, 3vw, 2rem); line-height: 1.35; letter-spacing: -0.02em;
}
.manifeste blockquote p + p { margin-top: 1.4rem; font-size: clamp(1rem, 2vw, 1.25rem); color: var(--ink-2); font-weight: 400; }
.manifeste cite { position: relative; z-index: 1; display: block; margin-top: 1.8rem; font-style: normal; font-family: var(--font-mono); font-size: .8rem; letter-spacing: .1em; color: var(--ink-3); }

/* ============================================================
   SIGNUP
   ============================================================ */
.signup { max-width: var(--maxw); margin: 0 auto; padding: clamp(2rem, 5vw, 4rem) var(--gutter) clamp(3rem, 7vw, 6rem); }
.signup-card {
  display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2rem, 5vw, 4rem);
  background: var(--bg-raised); border: 1px solid var(--hairline-2);
  border-radius: calc(var(--r) + 6px); padding: clamp(2rem, 5vw, 3.5rem);
  box-shadow: var(--shadow-diffuse); align-items: center;
}
.signup-copy h2 { font-family: var(--font-display); font-weight: 700; font-size: clamp(1.7rem, 3.5vw, 2.6rem); line-height: 1.08; letter-spacing: -0.03em; margin-bottom: 1rem; }
.signup-copy p { color: var(--ink-2); }
.signup-count { margin-top: 1.2rem; font-family: var(--font-mono); font-size: .85rem; color: var(--accent-deep); }

.signup-form { display: flex; flex-direction: column; gap: 1.2rem; }
.field { display: flex; flex-direction: column; gap: .5rem; border: none; padding: 0; }
.field label, .field legend { font-size: .85rem; font-weight: 500; color: var(--ink-2); padding: 0; }
.field input[type="email"] {
  font-family: var(--font-body); font-size: 1rem; color: var(--ink);
  background: var(--bg-base); border: 1px solid var(--hairline);
  border-radius: 12px; padding: .85rem 1rem; transition: border-color .25s, box-shadow .25s;
}
.field input[type="email"]:focus { outline: none; border-color: var(--accent); box-shadow: var(--glow); }
.field input::placeholder { color: var(--ink-3); }

.intent { gap: .65rem; }
.radio { display: flex; align-items: center; gap: .65rem; font-size: .92rem; color: var(--ink); cursor: pointer; font-weight: 400; }
.radio input { accent-color: var(--accent); width: 17px; height: 17px; }
.radio span { color: var(--ink-2); }
.radio:hover span { color: var(--ink); }

.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.form-status { font-size: .9rem; min-height: 1.2em; }
.form-status.ok { color: var(--accent-deep); }
.form-status.err { color: rgba(180, 80, 70, .9); }
.form-legal { font-size: .78rem; color: var(--ink-3); }
.form-legal a { color: var(--ink-2); text-decoration: underline; text-underline-offset: 2px; }

@media (max-width: 760px) { .signup-card { grid-template-columns: 1fr; } }

.preorder-soon {
  display: flex; flex-wrap: wrap; align-items: center; gap: 1rem 1.5rem;
  margin-top: 1.6rem; padding: 1.3rem 1.6rem;
  border: 1px dashed var(--hairline); border-radius: var(--r);
  background: var(--ink-wash);
}
.preorder-soon p { font-size: .9rem; color: var(--ink-2); flex: 1 1 280px; }
.soon-tag {
  font-family: var(--font-mono); font-size: .68rem; letter-spacing: .18em; text-transform: uppercase;
  color: var(--accent-deep); border: 1px solid var(--accent); border-radius: 99px; padding: .3rem .7rem;
}

/* ============================================================
   FOOTER
   ============================================================ */
.site-foot {
  max-width: var(--maxw); margin: 0 auto; padding: 2.5rem var(--gutter) 3.5rem;
  border-top: 1px solid var(--hairline-2);
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1.2rem;
}
.foot-brand { display: flex; align-items: center; gap: .6rem; font-family: var(--font-display); font-weight: 500; }
.foot-links { display: flex; gap: 1.5rem; flex-wrap: wrap; }
.foot-links a { font-size: .88rem; color: var(--ink-2); transition: color .25s; }
.foot-links a:hover { color: var(--accent); }
.foot-fine { flex-basis: 100%; font-size: .78rem; color: var(--ink-3); }

/* ============================================================
   REVEAL ANIMATIONS
   ============================================================ */
.reveal { opacity: 0; transform: translateY(18px); animation: reveal .9s cubic-bezier(.2,.6,.2,1) forwards; animation-delay: calc(var(--d, 0) * .1s); }
@keyframes reveal { to { opacity: 1; transform: none; } }

.io { opacity: 0; transform: translateY(24px); transition: opacity .8s ease, transform .8s cubic-bezier(.2,.6,.2,1); }
.io.in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal, .io { opacity: 1; transform: none; }
  .cost-bars li .cost-bar::after { transform: scaleX(1); }
  .washi { display: none; }
  html { scroll-behavior: auto; }
}
