/* ============================================================
   LE MONTORGUEIL — Café parisien · page d'ouverture
   Identité : papier crème #F4EAD4 · encre rouge #A32920
   Typo : DM Mono (labels) + Cormorant Garamond (accent serif)
   ============================================================ */

:root {
  --paper:      #f4ead4;   /* crème chaude — fond */
  --paper-deep: #ecdcb8;   /* crème foncée — vignette */
  --red:        #a32920;   /* rouge de marque */
  --red-deep:   #7d1c15;   /* rouge profond */
  --ink:        #2a211c;   /* encre — texte principal */
  --ink-dim:    rgba(42, 33, 28, 0.62);
  --ink-faint:  rgba(42, 33, 28, 0.35);

  --font-mono: "DM Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;
  --font-hand: "Cormorant Garamond", Georgia, "Times New Roman", serif;

  --maxw: 1280px;
  --pad:  clamp(1.25rem, 4vw, 3.25rem);
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

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

html { -webkit-text-size-adjust: 100%; }

body {
  font-family: var(--font-mono);
  background: var(--paper);
  background-image: radial-gradient(125% 95% at 50% 32%, #f7eed9 0%, var(--paper) 46%, var(--paper-deep) 100%);
  color: var(--ink);
  min-height: 100vh;
  min-height: 100dvh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* ---------- Grain ---------- */
.grain {
  position: fixed;
  inset: 0;
  z-index: 60;
  pointer-events: none;
  opacity: 0.5;
  mix-blend-mode: multiply;
  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.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.55'/%3E%3C/svg%3E");
}

/* ---------- Cadre décoratif (carte de café) ---------- */
.frame {
  position: fixed;
  inset: clamp(0.75rem, 1.6vw, 1.5rem);
  z-index: 40;
  pointer-events: none;
  border: 1px solid rgba(163, 41, 32, 0.4);
  outline: 1px solid rgba(163, 41, 32, 0.18);
  outline-offset: 4px;
}
.tick {
  position: absolute;
  width: 9px; height: 9px;
  border: 1px solid var(--red);
  opacity: 0.8;
}
.tick--tl { top: -1px;  left: -1px;  border-right: 0; border-bottom: 0; }
.tick--tr { top: -1px;  right: -1px; border-left: 0;  border-bottom: 0; }
.tick--bl { bottom: -1px; left: -1px;  border-right: 0; border-top: 0; }
.tick--br { bottom: -1px; right: -1px; border-left: 0;  border-top: 0; }

/* ---------- Structure ---------- */
.page {
  position: relative;
  z-index: 10;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100dvh;
  padding: clamp(1.4rem, 3vw, 2.6rem) var(--pad) clamp(1.2rem, 2.4vw, 2rem);
}

/* ===================== TOPBAR ===================== */
.topbar {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 1rem;
}
.topbar__side { display: flex; align-items: center; gap: 0.7rem; }
.topbar__side--right { justify-content: flex-end; }

.kicker {
  font-size: 0.7rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  font-weight: 500;
  color: var(--ink);
}
.kicker--muted { color: var(--ink-dim); }
.dot { color: var(--red); opacity: 0.7; font-size: 0.5rem; }

.topbar__ornament {
  color: var(--red);
  opacity: 0.7;
  font-size: 0.85rem;
}

.ghost-link {
  font-size: 0.7rem;
  letter-spacing: 0.16em;
  font-weight: 500;
  color: var(--ink);
  text-decoration: none;
  padding: 0.55rem 1.05rem;
  border: 1px solid rgba(163, 41, 32, 0.5);
  border-radius: 999px;
  transition: background 0.35s var(--ease), color 0.35s var(--ease), border-color 0.35s var(--ease);
  white-space: nowrap;
}
.ghost-link:hover { background: var(--red); color: var(--paper); border-color: var(--red); }

/* ===================== SCÈNE ===================== */
.stage {
  flex: 1;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(1rem, 3vh, 2.4rem) 0;
}

.stage__inner {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 780px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* Eyebrow */
.eyebrow {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  font-size: 0.7rem;
  letter-spacing: 0.36em;
  text-transform: uppercase;
  font-weight: 500;
  color: var(--red);
  margin-bottom: clamp(0.8rem, 2vh, 1.4rem);
}
.eyebrow .rule {
  display: block;
  width: clamp(28px, 7vw, 64px);
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(163, 41, 32, 0.65));
}
.eyebrow .rule:last-child { background: linear-gradient(90deg, rgba(163, 41, 32, 0.65), transparent); }

/* Emblème « garçon de café » */
.waiter {
  width: auto;
  height: clamp(168px, 28vh, 270px);
  display: block;
  filter: drop-shadow(0 10px 24px rgba(125, 28, 21, 0.18));
}

/* Wordmark cursif */
.wordmark {
  width: clamp(260px, 52vw, 470px);
  line-height: 0;
  margin-top: clamp(0.9rem, 2.2vh, 1.5rem);
}
.wordmark img { width: 100%; height: auto; display: block; }

/* Sous-titre « Café Parisien » */
.cafe-label {
  margin-top: clamp(0.8rem, 1.8vh, 1.15rem);
  font-size: 0.66rem;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--red);
  font-weight: 500;
}

/* Baseline — serif italique raffiné */
.hand-note {
  font-family: var(--font-hand);
  font-size: clamp(1.35rem, 3vw, 2.05rem);
  font-style: italic;
  font-weight: 500;
  line-height: 1.35;
  letter-spacing: 0.01em;
  color: var(--ink);
  margin-top: clamp(1rem, 2.4vh, 1.6rem);
}
.hand-note em { color: var(--red); font-style: italic; font-weight: 600; }

/* ---------- Compte à rebours ---------- */
.countdown { margin-top: clamp(1.5rem, 3.8vh, 2.4rem); }
.countdown__lead {
  font-size: 0.7rem;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--ink-dim);
  font-weight: 500;
}
.countdown__date {
  font-size: clamp(1.05rem, 2.4vw, 1.4rem);
  font-weight: 500;
  letter-spacing: 0.02em;
  margin-top: 0.35rem;
  color: var(--red);
}

.clock {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: clamp(0.5rem, 2vw, 1.4rem);
  margin-top: clamp(1rem, 2.4vh, 1.6rem);
}
.clock__unit {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: clamp(52px, 12vw, 78px);
}
.clock__num {
  font-size: clamp(2rem, 6.5vw, 3.6rem);
  font-weight: 400;
  line-height: 1;
  font-variant-numeric: tabular-nums;
  color: var(--ink);
  letter-spacing: -0.01em;
}
.clock__label {
  margin-top: 0.55rem;
  font-size: 0.58rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--red);
  font-weight: 500;
}
.clock__sep {
  font-size: clamp(1.4rem, 4vw, 2.4rem);
  font-weight: 400;
  color: var(--ink-faint);
  line-height: 1.1;
  align-self: flex-start;
  margin-top: 0.1em;
}

/* ===================== FOOTER ===================== */
.footer {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: end;
  gap: 1rem;
  padding-top: clamp(1.2rem, 2.4vh, 1.8rem);
  border-top: 1px solid rgba(163, 41, 32, 0.22);
}
.footer__cell { display: flex; flex-direction: column; gap: 0.4rem; font-style: normal; }
.footer__cell--center { text-align: center; align-items: center; }
.footer__cell--right { text-align: right; align-items: flex-end; }
.footer__k {
  font-size: 0.6rem;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--red);
  font-weight: 500;
}
.footer__v {
  font-size: 0.8rem;
  color: var(--ink);
  text-decoration: none;
  letter-spacing: 0.02em;
}
a.footer__v { transition: color 0.3s var(--ease); }
a.footer__v:hover { color: var(--red); text-decoration: underline; text-underline-offset: 3px; }

/* ===================== ANIMATIONS ===================== */
.reveal {
  opacity: 0;
  transform: translateY(18px);
  animation: reveal 1s var(--ease) forwards;
  animation-delay: var(--d, 0s);
}
@keyframes reveal {
  to { opacity: 1; transform: translateY(0); }
}
.waiter.reveal {
  transform: translateY(18px) scale(0.97);
  animation: emblem-in 1.3s var(--ease) forwards;
  animation-delay: var(--d, 0s);
}
@keyframes emblem-in {
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@media (prefers-reduced-motion: reduce) {
  .reveal, .waiter.reveal { animation: none; opacity: 1; transform: none; }
}

/* ===================== RESPONSIVE ===================== */
@media (max-width: 720px) {
  .topbar__side--left .kicker--muted, .topbar__side--left .dot { display: none; }
  .ghost-link { padding: 0.5rem 0.85rem; font-size: 0.62rem; letter-spacing: 0.1em; }

  .footer {
    grid-template-columns: 1fr;
    gap: 1.1rem;
    text-align: center;
  }
  .footer__cell,
  .footer__cell--right { align-items: center; text-align: center; }

  .clock__unit { min-width: 0; flex: 1; }
  .hand-note { font-size: clamp(1.4rem, 6vw, 1.9rem); }
}

@media (max-width: 380px) {
  .clock { gap: 0.3rem; }
  .clock__sep { display: none; }
}

@media (max-height: 740px) {
  .waiter { height: clamp(140px, 22vh, 210px); }
  .wordmark { width: clamp(240px, 46vw, 400px); }
  .countdown { margin-top: clamp(0.9rem, 2.5vh, 1.4rem); }
}
