/* LE RÉVEIL HOUSE — site styles
   Colours come from brand/tokens.json (le-reveil-house repo). Do not add new hexes here. */

@font-face { font-family: "Archivo"; src: url("../fonts/Archivo-Variable.woff2") format("woff2"); font-weight: 100 900; font-stretch: 62% 125%; font-style: normal; font-display: swap; }
@font-face { font-family: "Instrument Serif"; src: url("../fonts/InstrumentSerif-Regular.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Instrument Serif"; src: url("../fonts/InstrumentSerif-Italic.woff2") format("woff2"); font-weight: 400; font-style: italic; font-display: swap; }
@font-face { font-family: "JetBrains Mono"; src: url("../fonts/JetBrainsMono-Variable.woff2") format("woff2"); font-weight: 100 800; font-style: normal; font-display: swap; }

:root {
  --ink: #0B0B0A;
  --paper: #EFEDE6;
  --oxblood: #681F2B;
  --signal: #F2401A;
  --signal-angle: 28deg;

  /* Boardroom (default) */
  --bg: var(--paper);
  --fg: var(--ink);
  --muted: #5E5B55;
  --line: rgba(11, 11, 10, .18);
  --line-strong: rgba(11, 11, 10, .3);
  --signal-text: #C8300E;
  --focus: #C8300E;

  --font-display: "Archivo", "Helvetica Neue", Arial, sans-serif;
  --font-serif: "Instrument Serif", "Times New Roman", serif;
  --font-sans: "Archivo", "Helvetica Neue", Arial, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, Menlo, monospace;

  --ease: cubic-bezier(.16, 1, .3, 1);
  --header-h: 80px;
}

/* Grounds */
.underground {
  --bg: var(--ink); --fg: var(--paper); --muted: #A19E96;
  --line: rgba(239, 237, 230, .18); --line-strong: rgba(239, 237, 230, .3);
  --signal-text: var(--signal); --focus: var(--signal);
}
.oxblood {
  --bg: var(--oxblood); --fg: var(--paper); --muted: rgba(239, 237, 230, .8);
  --line: rgba(239, 237, 230, .28); --line-strong: rgba(239, 237, 230, .4);
  --signal-text: var(--paper); --focus: var(--paper); /* never red beside oxblood */
}
.signal-field {
  --bg: var(--signal); --fg: var(--ink); --muted: rgba(11, 11, 10, .72);
  --line: rgba(11, 11, 10, .45); --line-strong: rgba(11, 11, 10, .6);
  --signal-text: var(--ink); --focus: var(--ink);
}
.underground, .oxblood, .signal-field { background: var(--bg); color: var(--fg); }

/* Base */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: var(--header-h); }
body { margin: 0; background: var(--bg); color: var(--fg); font-family: var(--font-sans); font-size: 16px; line-height: 1.5; -webkit-font-smoothing: antialiased; }
h1, h2, h3, p, ul { margin: 0; }
ul { padding: 0; list-style: none; }
a { color: inherit; text-decoration: none; }
strong { font-weight: 600; }
img, svg { display: block; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; }
::selection { background: var(--signal); color: var(--ink); }
.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; }
.skip { position: absolute; left: 1rem; top: -100px; z-index: 100; background: var(--ink); color: var(--paper); padding: 12px 16px; }
.skip:focus { top: 1rem; }

/* Layout */
.shell { width: 100%; max-width: 1440px; margin: 0 auto; padding: 0 1.5rem; }
@media (min-width: 640px)  { .shell { padding: 0 2.5rem; } }
@media (min-width: 1024px) { .shell { padding: 0 3.5rem; } }

.section { padding: 96px 0; }
@media (min-width: 640px) { .section { padding: 160px 0; } }

.g12 { display: grid; gap: 24px; }
@media (min-width: 1024px) {
  .g12 { grid-template-columns: repeat(12, minmax(0, 1fr)); }
  .s1 { grid-column-end: span 1; } .s3 { grid-column-end: span 3; } .s4 { grid-column-end: span 4; }
  .s5 { grid-column-end: span 5; } .s6 { grid-column-end: span 6; } .s7 { grid-column-end: span 7; }
  .s8 { grid-column-end: span 8; }
  .from7 { grid-column-start: 7; } .from8 { grid-column-start: 8; }
}

/* Type */
.t-display { font-family: var(--font-display); font-weight: 600; font-stretch: 125%; font-variation-settings: "wdth" 125; text-transform: uppercase; letter-spacing: -0.01em; line-height: .98; }
.t-editorial { font-family: var(--font-serif); font-style: italic; font-weight: 400; line-height: 1.08; }
.t-label { font-family: var(--font-mono); font-weight: 500; font-size: 11px; line-height: 1.6; letter-spacing: .12em; text-transform: uppercase; }
.muted { color: var(--muted); }
.body { font-size: 16px; line-height: 1.625; }
.body-sm { font-size: 15px; line-height: 1.625; }
.stack > * + * { margin-top: 24px; }

.h2 { margin-top: 24px; font-size: clamp(1.5rem, 5vw, 4.25rem); }
.ed-xl { font-size: clamp(2rem, 4.4vw, 3.9rem); }

/* Buttons */
.hide-sm { display: none; }
@media (min-width: 640px) { .hide-sm { display: inline-block; } }
.btn { display: inline-block; align-self: flex-start; white-space: nowrap; background: var(--fg); color: var(--bg); padding: 16px 24px; transition: opacity .3s; }
.btn:hover { opacity: .8; }
.btn--sm { padding: 12px 16px; }

/* Wordmark (official outlines from tools/brand/logo, via the inline sprite) */
.wordmark { display: block; height: auto; color: currentColor; }
.wordmark--header { width: 178px; }
@media (min-width: 640px) { .wordmark--header { width: 190px; } }
.wordmark--footer { width: clamp(220px, 34vw, 420px); }

/* The Signal: one stroke at 28° over the one word that matters */
.signal { fill: var(--signal); }
.sigword { position: relative; display: inline-block; }
.sigword .signal { position: absolute; left: .06em; top: -.34em; width: .5em; height: auto; }

/* Header */
.header { position: fixed; inset: 0 0 auto 0; z-index: 50; border-bottom: 1px solid var(--line); background: rgba(239, 237, 230, .95); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
.header__in { display: flex; align-items: center; justify-content: space-between; gap: 24px; height: var(--header-h); }
.nav { display: none; align-items: center; gap: 24px; }
.nav a { white-space: nowrap; }
.nav a:not(.btn) { transition: opacity .3s; }
.nav a:not(.btn):hover { opacity: .6; }
.menu-btn { display: inline-flex; align-items: center; justify-content: center; height: 40px; padding: 0 14px; border: 1px solid var(--line-strong); background: none; color: inherit; cursor: pointer; }
@media (min-width: 1024px) { .nav { display: flex; } .menu-btn { display: none; } }

.mobile { position: fixed; inset: 0; z-index: 60; display: flex; flex-direction: column; opacity: 0; pointer-events: none; transition: opacity .3s; }
.mobile.is-open { opacity: 1; pointer-events: auto; }
.mobile__top { display: flex; align-items: center; justify-content: space-between; height: var(--header-h); }
.mobile__nav { flex: 1; display: flex; flex-direction: column; justify-content: center; padding-bottom: 80px; }
.mobile__nav a:not(.btn) { display: flex; align-items: baseline; justify-content: space-between; padding: 20px 0; border-bottom: 1px solid var(--line); font-size: 1.5rem; }
.mobile__nav .btn { align-self: stretch; margin-top: 40px; text-align: center; }
@media (min-width: 1024px) { .mobile { display: none; } }

/* Hero */
.hero { display: flex; flex-direction: column; justify-content: flex-end; min-height: 100vh; min-height: 100svh; padding: 160px 0 40px; }
@media (min-width: 640px) { .hero { padding-bottom: 56px; } }
.hero h1 { margin-top: 32px; font-size: clamp(1.9rem, 7.6vw, 7.5rem); }
.hero h1 > span { display: block; }
.hero h1 > span:last-child { margin-top: .2em; }
.hero__intro { margin-top: 48px; }
.hero__intro .t-editorial { font-size: clamp(1.6rem, 2.6vw, 2.4rem); }
.hero__intro .body { max-width: 28rem; }
.hero__foot { display: flex; flex-direction: column; gap: 24px; margin-top: 56px; padding-top: 24px; border-top: 1px solid var(--line-strong); }
@media (min-width: 1024px) { .hero__foot { flex-direction: row; align-items: center; justify-content: space-between; } }

/* Announcement strip */
.strip { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 20px 0; }
.strip__in { display: flex; flex-direction: column; gap: 12px; }
@media (min-width: 640px) { .strip__in { flex-direction: row; align-items: center; justify-content: space-between; } }
.strip p { display: inline-flex; align-items: center; gap: 12px; }
.strip p svg { width: 12px; flex-shrink: 0; }
.strip a { transition: color .3s; }
.strip a:hover { color: var(--fg); }

/* Rows, tables, lists */
.rule-top { border-top: 1px solid var(--line); }
.mt-16 { margin-top: 64px; } .mt-14 { margin-top: 56px; } .mt-12 { margin-top: 48px; } .mt-10 { margin-top: 40px; } .mt-8 { margin-top: 32px; }
.lead { margin-top: 32px; max-width: 36rem; }

.house__cols { padding-top: 40px; gap: 56px; }
.house__cols .t-editorial { font-size: clamp(2rem, 4.4vw, 3.9rem); }

.row { display: grid; gap: 16px; padding: 32px 0; border-bottom: 1px solid var(--line); }
@media (min-width: 1024px) { .row { grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 24px; } }
.row--tight { padding: 28px 0; gap: 12px; }
.row--disc { padding: 24px 0; gap: 8px; align-items: baseline; }
.row h3.v { font-size: clamp(1rem, 1.9vw, 1.5rem); }
.row h3.d { font-size: clamp(1.25rem, 2.6vw, 2.1rem); }
.row h3.p { font-size: clamp(1.25rem, 2.4vw, 1.9rem); }
.row--disc .idx { transition: color .3s; }
.row--disc:hover .idx { color: var(--signal-text); }

.manifesto { margin-top: 56px; max-width: 64rem; }
.manifesto > p + p { margin-top: 56px; }
.manifesto p { font-size: clamp(1.7rem, 4vw, 3.4rem); }
.manifesto span { display: block; }

.triad { display: grid; gap: 1px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
@media (min-width: 768px) { .triad { grid-template-columns: repeat(3, minmax(0, 1fr)); } .triad > div { padding-right: 32px; } }
.triad > div { padding-top: 32px; padding-bottom: 32px; }
.triad h3 { margin-top: 16px; font-size: clamp(1.25rem, 2.2vw, 1.75rem); }
.triad p.body-sm { margin-top: 12px; }

.worlds__grid { gap: 56px; }
.wtable__head { display: none; gap: 24px; padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.wrow { display: grid; gap: 8px; padding: 20px 0; border-bottom: 1px solid var(--line); }
@media (min-width: 640px) { .wtable__head, .wrow { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; } }

.cta-row { display: flex; flex-direction: column; gap: 24px; }
@media (min-width: 640px) { .cta-row { flex-direction: row; align-items: center; justify-content: space-between; } }

/* Contact */
.contact { border-top: 1px solid var(--line); }
.contact__grid { gap: 64px; }
.form > * + * { margin-top: 28px; }
.field input, .field textarea { display: block; width: 100%; border: 0; border-bottom: 1px solid var(--line-strong); border-radius: 0; background: transparent; padding: 12px 0; font: inherit; font-size: 17px; color: var(--fg); transition: border-color .3s; resize: none; }
.field input::placeholder, .field textarea::placeholder { color: var(--muted); opacity: .6; }
.field input:focus, .field textarea:focus { outline: none; border-bottom-color: var(--fg); }
.field.has-error input, .field.has-error textarea { border-bottom-color: var(--signal-text); }
.field__err { margin-top: 6px; color: var(--signal-text); }
.form button { width: 100%; border: 0; text-align: left; cursor: pointer; font: inherit; }
.form .t-label.btn { font-family: var(--font-mono); font-weight: 500; font-size: 11px; letter-spacing: .12em; }
.form__status { min-height: 1.6em; }
.note { font-size: 12px; line-height: 1.625; }
.note a { text-decoration: underline; text-underline-offset: 2px; }
.note a:hover { color: var(--fg); }
.direct { margin-top: 32px; display: grid; gap: 6px; }

/* Footer */
.footer { padding-top: 96px; }
.footer__grid { display: grid; gap: 56px; padding-bottom: 80px; }
@media (min-width: 768px) { .footer__grid { grid-template-columns: 6fr 3fr 3fr; } }
.footer ul { margin-top: 20px; }
.footer li + li { margin-top: 8px; }
.footer a { transition: opacity .3s; }
.footer a:hover { opacity: .6; }
.footer__base { display: flex; flex-direction: column; gap: 12px; padding: 28px 0; border-top: 1px solid var(--line); }
@media (min-width: 640px) { .footer__base { flex-direction: row; align-items: center; justify-content: space-between; } }

/* Privacy page */
.legal { padding: 160px 0 120px; }
.legal__body { max-width: 42rem; margin-top: 48px; }
.legal__body p + p { margin-top: 24px; }

.legal__body h2 { margin-top: 48px; font-family: var(--font-mono); font-weight: 500; font-size: 12px; letter-spacing: .12em; text-transform: uppercase; }
.legal__body h2 + p { margin-top: 16px; }
.legal__body ul { margin-top: 16px; padding-left: 1.2em; list-style: square; }
.legal__body li + li { margin-top: 8px; }
.legal__body a { text-decoration: underline; text-underline-offset: 2px; }

/* Hero CTA (above the fold on every screen) */
.hero__cta { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 28px; margin-top: 40px; }
.link { border-bottom: 1px solid var(--line-strong); padding: 4px 0; transition: border-color .3s; }
.link:hover { border-bottom-color: var(--fg); }
.hero__foot { margin-top: 48px; }
@media (max-height: 760px) and (max-width: 1023px) { .hero { padding-top: 120px; } .hero__intro { margin-top: 32px; } .hero__cta { margin-top: 28px; } }

/* Sticky CTA on mobile */
.sticky-cta { position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; padding: 12px 1.5rem calc(12px + env(safe-area-inset-bottom)); background: rgba(239, 237, 230, .96); border-top: 1px solid rgba(11, 11, 10, .18); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); transform: translateY(110%); transition: transform .4s var(--ease); }
.sticky-cta .btn { display: block; text-align: center; background: var(--ink); color: var(--paper); }
.sticky-cta.is-visible { transform: none; }
@media (min-width: 1024px) { .sticky-cta { display: none; } }
@media (max-width: 1023px) { body.has-sticky .footer__base { padding-bottom: 96px; } }
body.has-consent .sticky-cta { display: none; }

/* Form: honeypot, loading, errors */
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form { position: relative; }
.form button { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.spinner { display: none; width: 14px; height: 14px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: spin .7s linear infinite; }
.form.is-loading button { opacity: .7; cursor: progress; }
.form.is-loading .spinner { display: inline-block; }
.form.is-loading .field { opacity: .55; pointer-events: none; }
.form__alert { padding: 14px 16px; border: 1px solid var(--signal-text); color: var(--signal-text); line-height: 1.7; }
.form__alert a { text-decoration: underline; text-underline-offset: 2px; }
@keyframes spin { to { transform: rotate(360deg); } }

/* Footer legal links */
.footer__legal { display: flex; flex-wrap: wrap; gap: 8px 24px; }
.linkbtn { background: none; border: 0; padding: 0; cursor: pointer; color: var(--muted); }
.linkbtn:hover { opacity: .6; }

/* Cookie banner */
.consent { position: fixed; left: 1rem; right: 1rem; bottom: 1rem; z-index: 80; max-width: 34rem; padding: 24px; background: var(--ink); color: var(--paper); border: 1px solid rgba(239, 237, 230, .18); --muted: #A19E96; --focus: var(--signal); }
@media (min-width: 640px) { .consent { left: auto; right: 1.5rem; bottom: 1.5rem; } }
.consent p.body-sm { margin-top: 12px; color: var(--muted); }
.consent a { text-decoration: underline; text-underline-offset: 2px; color: var(--paper); }
.consent__actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 20px; }
.consent__actions button { flex: 1 1 140px; border: 1px solid var(--paper); cursor: pointer; padding: 14px 18px; font-family: var(--font-mono); font-weight: 500; font-size: 11px; letter-spacing: .12em; text-transform: uppercase; }
.consent__actions .accept { background: var(--paper); color: var(--ink); }
.consent__actions .decline { background: transparent; color: var(--paper); }
.consent__actions button:hover { opacity: .85; }

/* Status pages (404, thank-you) */
.status-page { min-height: 100vh; min-height: 100svh; display: flex; flex-direction: column; justify-content: center; padding: 160px 0 96px; }
.status-page .t-display { margin-top: 24px; font-size: clamp(2.2rem, 8vw, 6.5rem); }
.status-page .t-editorial { margin-top: 32px; max-width: 36rem; font-size: clamp(1.5rem, 2.6vw, 2.2rem); }
.status-page .hero__cta { margin-top: 48px; }

/* Motion: the Signal draws first, content rises */
@keyframes rise { from { opacity: 0; transform: translateY(22px); } to { opacity: 1; transform: none; } }
@keyframes signalDraw { from { clip-path: polygon(0 0, 0 0, 0 100%, 0 100%); } to { clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%); } }
.rise { animation: rise 1s var(--ease) both; }
.signal-draw { animation: signalDraw .4s var(--ease) 1.1s both; }

.js .r { opacity: 0; transform: translateY(24px); transition: opacity 1.1s var(--ease), transform 1.1s var(--ease); }
.js .r.in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .rise, .signal-draw { animation: none; }
  .js .r { opacity: 1; transform: none; transition: none; }
  .sticky-cta { transition: none; }
  .spinner { animation-duration: 2s; }
}
