/* Golden Square Monaco — luxe éditorial × iOS subtil */
:root {
  /* Palette luxe (ivoire/encre/or) */
  --ivory: #FAF8F3;
  --ivory-2: #F2EEE5;
  --ivory-3: #E8E2D4;
  --ink: #0E0D0B;
  --ink-2: #1A1815;
  --ink-soft: #2A2722;
  --stone: #8B8680;
  --stone-2: #6E6963;
  --rule: rgba(14,13,11,0.10);
  --rule-2: rgba(14,13,11,0.18);
  --hairline: rgba(14,13,11,0.12);
  --gold: #B8975A;
  --gold-deep: #8E6F3D;
  --bg: var(--ivory);
  --bg-2: var(--ivory-2);
  --bg-3: var(--ivory-3);
  --surface: #FFFFFF;
  --fg: var(--ink);
  --fg-2: var(--ink-2);
  --fg-3: var(--ink-soft);
  --muted: rgba(14,13,11,0.55);
  --muted-2: rgba(14,13,11,0.42);
  --acc: var(--gold);
  --accent: var(--gold);
  --accent-2: var(--gold-deep);
  --accent-press: #6F5530;

  /* Typo : serif éditoriale (Fraunces) + sans (Inter Tight) — iOS-friendly fallback */
  --serif: "Fraunces", "Tiempos Headline", "New York", Georgia, serif;
  --sans:  "Inter Tight", "Inter", -apple-system, BlinkMacSystemFont,
           "SF Pro Display", "SF Pro Text", "Helvetica Neue", system-ui, sans-serif;
  --sf:    var(--sans);
  --mono:  ui-monospace, "JetBrains Mono", "SF Mono", Menlo, Consolas, monospace;

  --pad: clamp(20px, 4vw, 48px);
  --maxw: 1480px;

  /* Radii adoucis (iOS) mais plus discrets */
  --r-xs: 4px;
  --r-sm: 8px;
  --r-md: 12px;
  --r-lg: 18px;
  --r-xl: 22px;
  --r-2xl: 28px;

  /* Ombres douces */
  --shadow-1: 0 1px 2px rgba(14,13,11,0.04), 0 4px 14px rgba(14,13,11,0.06);
  --shadow-2: 0 6px 18px rgba(14,13,11,0.08), 0 18px 44px rgba(14,13,11,0.10);
  --shadow-3: 0 12px 30px rgba(14,13,11,0.10), 0 28px 70px rgba(14,13,11,0.14);

  --ease:      cubic-bezier(0.22, 1, 0.36, 1);
  --ease-cine: cubic-bezier(0.65, 0, 0.35, 1);
  --spring:    cubic-bezier(0.5, 1.4, 0.4, 1);
}

[data-theme="dark"] {
  --bg: #0B0A08;
  --bg-2: #141210;
  --bg-3: #1C1A16;
  --surface: #141210;
  --ivory: var(--bg);
  --ivory-2: var(--bg-2);
  --ivory-3: var(--bg-3);
  --ink: #EFEAE0;
  --ink-2: #DCD6C9;
  --ink-soft: #C9C2B3;
  --fg: var(--ink);
  --fg-2: var(--ink-2);
  --fg-3: var(--ink-soft);
  --rule: rgba(239,234,224,0.12);
  --rule-2: rgba(239,234,224,0.22);
  --hairline: rgba(239,234,224,0.16);
  --muted: rgba(239,234,224,0.55);
  --muted-2: rgba(239,234,224,0.40);
  --stone: #9A958D;
  --shadow-1: 0 1px 2px rgba(0,0,0,0.4), 0 4px 14px rgba(0,0,0,0.5);
  --shadow-2: 0 6px 18px rgba(0,0,0,0.5), 0 18px 44px rgba(0,0,0,0.6);
  --shadow-3: 0 12px 30px rgba(0,0,0,0.6), 0 28px 70px rgba(0,0,0,0.8);
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; padding: 0; }
html { -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; text-rendering: optimizeLegibility; }
body {
  background: var(--bg);
  color: var(--fg);
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.6;
  font-feature-settings: "ss01", "cv11", "kern";
  overflow-x: hidden;
  transition: background 600ms var(--ease), color 600ms var(--ease);
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

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

/* Type system */
.eyebrow {
  font-family: var(--sans);
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--muted);
}
.eyebrow.gold { color: var(--gold-deep); }

.display {
  font-family: var(--serif);
  font-weight: 300;
  font-style: normal;
  letter-spacing: -0.022em;
  line-height: 0.98;
  font-variation-settings: "opsz" 144, "SOFT" 30;
}
.display .it { font-style: italic; font-weight: 300; }

.h-xl { font-size: clamp(3rem, 9vw, 9rem); }
.h-lg { font-size: clamp(2.4rem, 6vw, 5.5rem); }
.h-md { font-size: clamp(1.8rem, 3.6vw, 3.2rem); }
.h-sm { font-size: clamp(1.3rem, 2vw, 2rem); }

.body-lg {
  font-family: var(--sans);
  font-size: clamp(15px, 1.05vw, 18px);
  line-height: 1.65;
  color: var(--ink-soft);
  max-width: 56ch;
}
.body-sm {
  font-family: var(--sans);
  font-size: 13px;
  line-height: 1.6;
  color: var(--muted);
}
.mono {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.04em;
  color: var(--muted);
}

/* Layout helpers */
.pad-x { padding-left: var(--pad); padding-right: var(--pad); }
.section { padding: clamp(80px, 12vh, 150px) var(--pad); position: relative; }
.section.tight { padding-top: clamp(48px, 6vh, 80px); padding-bottom: clamp(48px, 6vh, 80px); }
.row { display: flex; }
.between { display: flex; justify-content: space-between; align-items: baseline; gap: 24px; }
.rule { height: 1px; background: var(--rule); width: 100%; }
.rule-vert { width: 1px; background: var(--rule); align-self: stretch; }

/* Reveals */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity 1000ms var(--ease), transform 1000ms var(--ease); }
.reveal.in { opacity: 1; transform: none; }
.reveal-clip { clip-path: inset(0 100% 0 0); transition: clip-path 1300ms var(--ease-cine); }
.reveal-clip.in { clip-path: inset(0 0% 0 0); }
.reveal-img { clip-path: inset(0 0 100% 0); transition: clip-path 1300ms var(--ease-cine); }
.reveal-img.in { clip-path: inset(0 0 0 0); }

.split-line { display: block; overflow: hidden; padding: 0.04em 0; }
.split-line .inner { display: inline-block; transform: translateY(110%); transition: transform 1100ms var(--ease-cine); }
.split-line.in .inner { transform: translateY(0); }
.split-line.d2 .inner { transition-delay: 120ms; }
.split-line.d3 .inner { transition-delay: 240ms; }
.split-line.d4 .inner { transition-delay: 360ms; }

.cursor-dot, .cursor-ring { display: none !important; }

/* Buttons — pill iOS subtile, accent or */
.btn {
  position: relative;
  display: inline-flex; align-items: center; justify-content: center; gap: 12px;
  padding: 13px 22px;
  font-family: var(--sans);
  font-size: 11px; letter-spacing: 0.2em; text-transform: uppercase; font-weight: 500;
  color: var(--fg);
  border: 1px solid var(--rule-2);
  background: transparent;
  cursor: pointer;
  border-radius: 980px;
  transition: transform 250ms var(--spring),
              background 400ms var(--ease),
              color 400ms var(--ease),
              border-color 400ms var(--ease),
              box-shadow 400ms var(--ease);
  will-change: transform;
}
.btn .arrow { transition: transform 360ms var(--spring); display: inline-block; }
.btn:hover { background: var(--fg); color: var(--bg); border-color: var(--fg); transform: translateY(-1px); box-shadow: var(--shadow-1); }
.btn:hover .arrow { transform: translateX(4px); }
.btn:active { transform: translateY(0) scale(0.97); }

.btn.gold,
.btn.primary {
  background: var(--gold); color: #fff; border-color: var(--gold);
}
.btn.gold:hover,
.btn.primary:hover { background: var(--gold-deep); border-color: var(--gold-deep); color: #fff; }

.btn.solid { background: var(--fg); color: var(--bg); border-color: var(--fg); }
.btn.solid:hover { background: transparent; color: var(--fg); }

.btn.ghost { background: transparent; border-color: var(--rule-2); }

.link-u {
  position: relative; display: inline-block; padding-bottom: 2px;
  background-image: linear-gradient(currentColor, currentColor);
  background-position: 0 100%; background-repeat: no-repeat;
  background-size: 100% 1px;
  transition: background-size 700ms var(--ease);
}
.link-u:hover { background-size: 0% 1px; background-position: 100% 100%; }

/* Cards — discrètes, coins arrondis modérés */
.card {
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-1);
  overflow: hidden;
  transition: transform 400ms var(--spring), box-shadow 400ms var(--ease), border-color 400ms var(--ease);
}
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow-2); }

/* Placeholder image */
.ph {
  position: relative; overflow: hidden; background: var(--ivory-2);
  border: 1px solid var(--rule); border-radius: var(--r-lg);
  isolation: isolate;
}
.ph::before {
  content: ""; position: absolute; inset: 0;
  background-image: repeating-linear-gradient(
    135deg, transparent 0 22px, rgba(14,13,11,0.04) 22px 23px
  );
}
[data-theme="dark"] .ph::before {
  background-image: repeating-linear-gradient(135deg, transparent 0 22px, rgba(239,234,224,0.05) 22px 23px);
}
.ph .ph-label {
  position: absolute; left: 14px; bottom: 12px;
  font-family: var(--mono); font-size: 10px; letter-spacing: 0.08em;
  color: var(--muted); text-transform: uppercase;
  display: flex; align-items: center; gap: 8px;
}
.ph .ph-label .dot { width: 5px; height: 5px; border-radius: 50%; background: var(--gold); display: inline-block; }
.ph .ph-corner {
  position: absolute; right: 14px; top: 12px;
  font-family: var(--mono); font-size: 10px; color: var(--muted);
}
.ph .ph-mono {
  position: absolute; inset: 0; display: grid; place-items: center;
  font-family: var(--serif); font-style: italic; font-weight: 300;
  font-size: clamp(56px, 12vw, 220px); color: rgba(14,13,11,0.06);
  letter-spacing: -0.03em;
}
[data-theme="dark"] .ph .ph-mono { color: rgba(239,234,224,0.07); }

.mag { display: inline-block; transition: transform 500ms var(--spring); will-change: transform; }

.marquee {
  display: flex; gap: 64px; white-space: nowrap;
  animation: marquee 38s linear infinite;
  will-change: transform;
}
@keyframes marquee {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

.page { animation: pagein 800ms var(--ease) both; }
@keyframes pagein {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: none; }
}

.chrome-line { display: none !important; }

.kbd {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 22px; height: 22px; padding: 0 6px;
  border: 1px solid var(--rule-2); border-radius: 6px;
  font-family: var(--mono); font-size: 10.5px; color: var(--muted);
  background: var(--bg-2);
}

/* Form fields — épurés mais arrondis */
.fld {
  width: 100%;
  padding: 14px 16px;
  border: 1px solid var(--rule-2);
  border-radius: var(--r-sm);
  background: var(--surface);
  color: var(--fg);
  font-family: var(--sans);
  font-size: 15px;
  outline: none;
  transition: border-color 300ms var(--ease), box-shadow 300ms var(--ease);
}
.fld:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 4px rgba(184,151,90,0.18);
}
.fld::placeholder { color: var(--muted-2); }

/* iOS segmented control — habillé luxe */
.seg {
  display: inline-flex;
  background: var(--bg-2);
  border: 1px solid var(--rule);
  border-radius: 980px;
  padding: 3px;
  gap: 2px;
}
.seg button {
  appearance: none; border: 0; background: transparent;
  padding: 8px 18px; border-radius: 980px;
  font-family: var(--sans); font-size: 11px; font-weight: 500;
  letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--fg);
  cursor: pointer;
  transition: background 300ms var(--ease), color 300ms var(--ease), box-shadow 300ms var(--ease), transform 200ms var(--spring);
}
.seg button[data-on="true"] {
  background: var(--fg);
  color: var(--bg);
  box-shadow: 0 2px 6px rgba(14,13,11,0.12);
}
.seg button:active { transform: scale(0.96); }

/* Loader */
.loader {
  position: fixed; inset: 0; z-index: 100;
  background: var(--ivory); color: var(--ink);
  display: grid; grid-template-rows: 1fr auto; align-items: end;
  padding: var(--pad);
  transition: opacity 700ms var(--ease), transform 700ms var(--ease);
}
.loader.gone { opacity: 0; pointer-events: none; transform: translateY(-100%); }
.loader-num {
  font-family: var(--serif); font-style: italic; font-weight: 300;
  font-size: clamp(8rem, 20vw, 18rem); line-height: 0.9; letter-spacing: -0.04em;
}
.loader-bar { width: 100%; height: 1px; background: var(--rule-2); margin-top: 24px; overflow: hidden; }
.loader-bar > div { height: 100%; background: var(--ink); width: 0%; transition: width 80ms linear; }

::-webkit-scrollbar { width: 0; height: 0; }

/* Glass utility — plus discret */
.glass {
  background: color-mix(in oklab, var(--bg) 78%, transparent);
  backdrop-filter: saturate(160%) blur(18px);
  -webkit-backdrop-filter: saturate(160%) blur(18px);
  border: 1px solid var(--rule);
}
