/* ─────────────────────────────────────────────────────────────────────────
   Métamorphose IA — V1
   Midnight Aurora · Or sobre · Typographie éditoriale
   ───────────────────────────────────────────────────────────────────────── */

:root {
  /* Ink (background scale) */
  --ink-0: #04060f;
  --ink-1: #070b1c;
  --ink-2: #0c1330;
  --ink-3: #131c47;
  --ink-4: #1d2a66;

  /* Aurora (decorative, blurred & blended screen) */
  --aurora-a: #1a3b8a;
  --aurora-b: #2b1a6a;
  --aurora-c: #0a4a6b;

  /* Gold accents */
  --gold-1: #E8C26B;
  --gold-2: #C9A24E;
  --gold-3: #F2D98C;
  --gold-soft: rgba(232, 194, 107, .14);

  /* Foreground (ivory, jamais blanc pur) */
  --fg-1: #F4F1E6;
  --fg-2: rgba(244, 241, 230, .74);
  --fg-3: rgba(244, 241, 230, .50);
  --fg-4: rgba(244, 241, 230, .30);

  /* Hairlines */
  --hair: rgba(244, 241, 230, .10);
  --hair-strong: rgba(244, 241, 230, .18);

  /* Type families */
  --serif: "Cormorant Garamond", "Times New Roman", serif;
  --sans: "Inter", ui-sans-serif, system-ui, -apple-system, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;

  /* Layout */
  --maxw: 1240px;
  --gutter: clamp(20px, 4vw, 56px);

  /* Motion */
  --ease: cubic-bezier(.2, .7, .2, 1);
}

/* ── Base ───────────────────────────────────────────────────────────────── */

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { background: var(--ink-1); color: var(--fg-1); -webkit-font-smoothing: antialiased; scroll-behavior: smooth; }
body {
  font-family: var(--sans);
  font-weight: 300;
  font-size: 17px;
  line-height: 1.55;
  letter-spacing: -0.005em;
  background: var(--ink-1);
  color: var(--fg-1);
  overflow-x: hidden;
}

::selection { background: var(--gold-1); color: var(--ink-1); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    transition-duration: 200ms !important;
  }
}

/* ── Grain ──────────────────────────────────────────────────────────────── */

.grain {
  position: fixed;
  inset: -50%;
  pointer-events: none;
  z-index: 1;
  opacity: .055;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='240' height='240'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0.6 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
}

/* ── Typography ─────────────────────────────────────────────────────────── */

.eyebrow {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--fg-3);
}
.eyebrow .dot {
  display: inline-block;
  width: 5px; height: 5px;
  border-radius: 50%;
  background: var(--gold-1);
  vertical-align: middle;
  margin-right: 10px;
  transform: translateY(-1px);
  box-shadow: 0 0 12px var(--gold-1);
}

.display {
  font-family: var(--serif);
  font-weight: 300;
  font-size: clamp(48px, 9vw, 132px);
  line-height: 0.96;
  letter-spacing: -0.035em;
  color: var(--fg-1);
  text-wrap: balance;
  margin: 0;
}
.display em,
.h2 em {
  font-style: italic;
  font-weight: 300;
  background: linear-gradient(180deg, var(--gold-3), var(--gold-2) 70%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.h2 {
  font-family: var(--serif);
  font-weight: 300;
  font-size: clamp(36px, 5.4vw, 76px);
  line-height: 1.02;
  letter-spacing: -0.025em;
  text-wrap: balance;
  margin: 0 0 24px;
  max-width: 18ch;
}

.lede {
  font-size: clamp(18px, 1.6vw, 22px);
  line-height: 1.5;
  color: var(--fg-2);
  font-weight: 300;
  letter-spacing: -0.005em;
  max-width: 60ch;
  text-wrap: pretty;
  margin: 0;
}

p { color: var(--fg-2); margin: 0; }

/* ── Layout ─────────────────────────────────────────────────────────────── */

.shell { position: relative; z-index: 2; }
.section {
  position: relative;
  padding: clamp(96px, 14vh, 180px) var(--gutter);
}
.container {
  max-width: var(--maxw);
  margin: 0 auto;
  position: relative;
}

.divider {
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--hair-strong) 50%, transparent);
  margin: 0;
}

/* ── Nav ────────────────────────────────────────────────────────────────── */

.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 50;
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px var(--gutter);
  transition: background 400ms ease, border-color 400ms ease, backdrop-filter 400ms ease;
  border-bottom: 1px solid transparent;
}
.nav.scrolled {
  background: rgba(7, 11, 28, .62);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
  backdrop-filter: blur(18px) saturate(140%);
  border-bottom-color: var(--hair);
}
.nav-logo {
  display: flex; align-items: center; gap: 12px;
  font-family: var(--serif);
  font-weight: 400;
  font-size: 18px;
  letter-spacing: -0.01em;
  color: var(--fg-1);
  text-decoration: none;
}
.nav-logo em {
  color: var(--gold-1);
  font-style: italic;
}
.nav-mark { width: 26px; height: 26px; }
.nav-links { display: flex; gap: 32px; align-items: center; }
.nav-links a {
  font-size: 13px;
  color: var(--fg-2);
  text-decoration: none;
  letter-spacing: -0.005em;
  font-weight: 400;
  transition: color 200ms ease;
}
.nav-links a:hover { color: var(--fg-1); }
.nav-cta {
  padding: 8px 16px;
  border: 1px solid var(--hair-strong);
  border-radius: 999px;
  color: var(--fg-1) !important;
  transition: border-color 200ms ease, background 200ms ease;
}
.nav-cta:hover {
  border-color: var(--fg-2);
  background: rgba(244, 241, 230, .04);
}

@media (max-width: 640px) {
  .nav-links { gap: 18px; }
  .nav-links a:not(.nav-cta) { display: none; }
}

/* ── Buttons ────────────────────────────────────────────────────────────── */

.btn {
  display: inline-flex; align-items: center; gap: 12px;
  height: 52px;
  padding: 0 26px;
  background: var(--gold-1);
  color: #1a1305;
  font-family: var(--sans);
  font-weight: 500;
  font-size: 14.5px;
  letter-spacing: -0.005em;
  border-radius: 999px;
  border: 0;
  cursor: pointer;
  text-decoration: none;
  position: relative;
  overflow: hidden;
  transition: transform 400ms var(--ease), box-shadow 400ms ease;
  box-shadow:
    0 1px 0 rgba(255, 255, 255, .4) inset,
    0 8px 32px rgba(232, 194, 107, .18),
    0 0 0 0.5px rgba(232, 194, 107, .4);
}
.btn:hover {
  transform: translateY(-1px);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, .5) inset,
    0 14px 40px rgba(232, 194, 107, .32),
    0 0 0 0.5px rgba(232, 194, 107, .6);
}
.btn .arrow {
  display: inline-block;
  transition: transform 400ms var(--ease);
}
.btn:hover .arrow { transform: translateX(4px); }

.btn-lg {
  height: 64px;
  padding: 0 32px;
  font-size: 16px;
}

.btn-ghost {
  background: transparent;
  color: var(--fg-1);
  border: 1px solid var(--hair-strong);
  box-shadow: none;
}
.btn-ghost:hover {
  border-color: var(--fg-2);
  background: rgba(244, 241, 230, .04);
  box-shadow: none;
}

/* ── Section eyebrow ────────────────────────────────────────────────────── */

.section-eyebrow {
  display: flex; align-items: center; gap: 18px;
  margin-bottom: 28px;
}
.section-eyebrow .num {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--fg-3);
  letter-spacing: 0.12em;
}
.section-eyebrow .line {
  flex: 0 0 60px;
  height: 1px;
  background: var(--hair-strong);
}
.section-eyebrow .label {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  color: var(--gold-1);
  text-transform: uppercase;
}

/* ── Hero ───────────────────────────────────────────────────────────────── */

.hero {
  min-height: 100vh;
  display: flex; flex-direction: column; justify-content: center;
  padding-top: 120px;
  padding-bottom: 120px;
  position: relative;
  overflow: hidden;
}
.hero-content { position: relative; z-index: 3; }
.hero-eyebrow { margin-bottom: 40px; }
.hero-title { margin: 0; }
.hero-lede { margin-top: 40px; }
.hero-actions {
  display: flex; gap: 14px; flex-wrap: wrap;
  margin-top: 48px;
}

.hero-meta {
  position: absolute;
  bottom: 48px; left: var(--gutter); right: var(--gutter);
  display: flex; align-items: end; justify-content: space-between;
  gap: 48px;
  z-index: 4;
}
.locale {
  display: flex; align-items: center; gap: 10px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--fg-3);
}
.locale .flag {
  display: inline-block;
  width: 18px; height: 12px;
  border-radius: 1px;
  background: linear-gradient(90deg, #2a4cf2 0 33%, #f4f1e6 33% 66%, #d6324a 66% 100%);
  opacity: .8;
}
.scroll-cue {
  display: flex; align-items: center; gap: 12px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--fg-3);
  text-decoration: none;
}
.scroll-cue .bar {
  width: 1px; height: 36px;
  background: linear-gradient(180deg, var(--gold-1), transparent);
  position: relative; overflow: hidden;
}
.scroll-cue .bar::after {
  content: "";
  position: absolute; left: 0; top: -100%;
  width: 100%; height: 100%;
  background: linear-gradient(180deg, transparent, var(--fg-1));
  animation: scrollDot 2.4s cubic-bezier(.4, .1, .3, 1) infinite;
}
@keyframes scrollDot {
  0% { top: -100%; }
  100% { top: 100%; }
}

@media (max-width: 640px) {
  .hero-meta { position: static; margin-top: 64px; flex-direction: column; align-items: flex-start; gap: 24px; }
}

/* ── Morphing word ──────────────────────────────────────────────────────── */

.morph [data-word] {
  display: inline-block;
  animation: wordIn 900ms var(--ease);
}
@keyframes wordIn {
  0% { opacity: 0; transform: translateY(8px); filter: blur(6px); }
  60% { filter: blur(0); }
  100% { opacity: 1; transform: translateY(0); filter: blur(0); }
}

/* ── Aurora ─────────────────────────────────────────────────────────────── */

.aurora-wrap {
  position: absolute; inset: 0; z-index: 0;
  overflow: hidden;
}
.aurora-blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  mix-blend-mode: screen;
  will-change: transform;
  transform: translate(-50%, -50%);
}
.aurora-blob.b0 {
  left: 10%; top: 20%;
  width: 720px; height: 720px;
  background: radial-gradient(circle at center, var(--aurora-a) 0%, transparent 62%);
  opacity: .85;
  animation: auroraDrift0 26s ease-in-out infinite;
}
.aurora-blob.b1 {
  left: 70%; top: 10%;
  width: 640px; height: 640px;
  background: radial-gradient(circle at center, var(--aurora-b) 0%, transparent 62%);
  opacity: .72;
  animation: auroraDrift1 32s ease-in-out infinite;
  animation-delay: -6s;
}
.aurora-blob.b2 {
  left: 50%; top: 70%;
  width: 820px; height: 820px;
  background: radial-gradient(circle at center, var(--aurora-c) 0%, transparent 62%);
  opacity: .55;
  animation: auroraDrift2 38s ease-in-out infinite;
  animation-delay: -12s;
}
.aurora-blob.b3 {
  left: 85%; top: 60%;
  width: 560px; height: 560px;
  background: radial-gradient(circle at center, var(--aurora-a) 0%, transparent 62%);
  opacity: .50;
  animation: auroraDrift3 30s ease-in-out infinite;
  animation-delay: -18s;
}
@keyframes auroraDrift0 {
  0%, 100% { transform: translate(-50%, -50%) translate(0, 0) scale(1); }
  50% { transform: translate(-50%, -50%) translate(60px, -40px) scale(1.15); }
}
@keyframes auroraDrift1 {
  0%, 100% { transform: translate(-50%, -50%) translate(0, 0) scale(1.05); }
  50% { transform: translate(-50%, -50%) translate(-80px, 50px) scale(.92); }
}
@keyframes auroraDrift2 {
  0%, 100% { transform: translate(-50%, -50%) translate(0, 0) scale(1); }
  50% { transform: translate(-50%, -50%) translate(40px, -70px) scale(1.1); }
}
@keyframes auroraDrift3 {
  0%, 100% { transform: translate(-50%, -50%) translate(0, 0) scale(.98); }
  50% { transform: translate(-50%, -50%) translate(-50px, -30px) scale(1.12); }
}

.vignette {
  position: absolute; inset: 0; pointer-events: none; z-index: 1;
  background:
    radial-gradient(ellipse at 50% 0%, transparent 0%, rgba(7, 11, 28, .55) 70%),
    radial-gradient(ellipse at 50% 100%, transparent 30%, var(--ink-1) 90%);
}

/* ── Manifesto rotator ──────────────────────────────────────────────────── */

.manifesto-stage {
  position: relative;
  min-height: clamp(280px, 36vh, 420px);
  display: flex; align-items: center;
  margin-top: 80px;
}
.manifesto-line {
  position: absolute; inset: 0;
  display: flex; align-items: center;
  font-family: var(--serif);
  font-weight: 300;
  font-style: italic;
  font-size: clamp(32px, 5vw, 64px);
  line-height: 1.05;
  letter-spacing: -0.025em;
  color: var(--fg-1);
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 900ms var(--ease), transform 1100ms var(--ease);
  text-wrap: balance;
}
.manifesto-line.active { opacity: 1; transform: translateY(0); }
.manifesto-line.exiting { opacity: 0; transform: translateY(-14px); }
.manifesto-line .gold {
  background: linear-gradient(180deg, var(--gold-3), var(--gold-2));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* Pull quote */
.pull {
  margin: 120px auto 0;
  max-width: 920px;
  text-align: center;
  padding: 0 24px;
}
.pull q {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 300;
  font-size: clamp(24px, 3vw, 38px);
  line-height: 1.25;
  letter-spacing: -0.015em;
  color: var(--fg-1);
  quotes: "\201C" "\201D";
  text-wrap: balance;
}
.pull q::before { content: open-quote; color: var(--gold-1); margin-right: 4px; }
.pull q::after { content: close-quote; color: var(--gold-1); margin-left: 4px; }
.pull cite {
  display: block;
  margin-top: 24px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--fg-3);
  font-style: normal;
}

/* ── FAQ ────────────────────────────────────────────────────────────────── */

.faq-list {
  border-top: 1px solid var(--hair);
  margin-top: 64px;
}
.faq-item {
  border-bottom: 1px solid var(--hair);
}
.faq-q {
  list-style: none;
  width: 100%;
  display: flex; align-items: center; justify-content: space-between;
  gap: 32px;
  padding: 32px 0;
  background: transparent;
  border: 0;
  cursor: pointer;
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(20px, 2vw, 26px);
  line-height: 1.2;
  letter-spacing: -0.015em;
  color: var(--fg-1);
  text-align: left;
  transition: color 200ms ease;
}
.faq-q::-webkit-details-marker { display: none; }
.faq-q:hover { color: var(--gold-3); }
.faq-q .plus {
  flex: 0 0 24px;
  width: 24px; height: 24px;
  position: relative;
  color: var(--fg-3);
  transition: color 300ms ease;
}
.faq-q .plus::before,
.faq-q .plus::after {
  content: "";
  position: absolute; inset: 0; margin: auto;
  width: 14px; height: 1px;
  background: currentColor;
  transition: transform 500ms var(--ease);
}
.faq-q .plus::after { transform: rotate(90deg); }
.faq-item[open] .faq-q .plus { color: var(--gold-1); }
.faq-item[open] .faq-q .plus::after { transform: rotate(0deg); }

.faq-a {
  overflow: hidden;
}
.faq-a-inner {
  padding: 0 0 36px 0;
  max-width: 70ch;
  color: var(--fg-2);
  font-size: 16.5px;
  line-height: 1.65;
}

/* ── Contact ────────────────────────────────────────────────────────────── */

.section-contact { padding-bottom: 64px; }

.contact-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 80px;
  align-items: end;
  margin-top: 80px;
}
@media (max-width: 900px) {
  .contact-grid { grid-template-columns: 1fr; gap: 48px; align-items: start; }
}

.contact-note {
  margin-top: 24px;
  color: var(--fg-3);
  font-size: 13px;
}

.contact-meta { display: flex; flex-direction: column; gap: 28px; }
.contact-meta-item {
  display: flex; flex-direction: column; gap: 6px;
  border-top: 1px solid var(--hair);
  padding-top: 16px;
}
.contact-meta-item .k {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--fg-3);
}
.contact-meta-item .v {
  font-family: var(--serif);
  font-size: 22px;
  font-weight: 300;
  color: var(--fg-1);
  letter-spacing: -0.01em;
}

/* ── Footer ─────────────────────────────────────────────────────────────── */

.footer {
  border-top: 1px solid var(--hair);
  padding: 40px var(--gutter);
  display: flex; align-items: center; justify-content: space-between;
  gap: 24px;
  font-size: 12px;
  color: var(--fg-3);
  font-family: var(--mono);
  letter-spacing: 0.04em;
  flex-wrap: wrap;
}
.footer a {
  color: var(--fg-3);
  text-decoration: none;
  transition: color 200ms ease;
}
.footer a:hover { color: var(--fg-1); }
.footer-links { display: flex; gap: 24px; }

/* ── Legal pages ────────────────────────────────────────────────────────── */

.legal {
  max-width: 760px;
  margin: 0 auto;
  padding: 160px var(--gutter) 96px;
}
.legal .h2 { font-size: clamp(32px, 4vw, 48px); margin-bottom: 16px; }
.legal h3 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 22px;
  letter-spacing: -0.015em;
  margin: 48px 0 16px;
  color: var(--fg-1);
}
.legal p,
.legal li {
  color: var(--fg-2);
  font-size: 16px;
  line-height: 1.65;
  margin: 0 0 14px;
}
.legal ul { padding-left: 22px; margin: 0 0 14px; }
.legal a { color: var(--gold-1); text-decoration: none; border-bottom: 1px solid var(--hair-strong); }
.legal a:hover { color: var(--gold-3); border-color: var(--gold-3); }
.legal .meta { font-family: var(--mono); font-size: 11px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--fg-3); margin-bottom: 32px; }
.legal .back {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--mono); font-size: 11px;
  letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--fg-3);
  text-decoration: none;
  border: 0;
  margin-bottom: 32px;
}
.legal .back:hover { color: var(--gold-1); }
