:root {
  --snow: #fafafa;
  --ink: #0d0d0d;
  --ink-2: #4d4d4d;
  --ink-3: #6b6b6b;
  --hair: rgba(13, 13, 13, 0.28);
  --wine: #511020;
  --wine-deep: #1e060c;
  --font: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --gutter: clamp(20px, 4vw, 56px);
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }

html, body { margin: 0; }

body {
  position: relative;
  min-height: 100vh;
  min-height: 100dvh;
  display: grid;
  grid-template-rows: auto 1fr auto;
  background: var(--snow);
  color: var(--ink);
  font-family: var(--font);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

a { color: inherit; }

p { margin: 0; }

/* ── Paysage ─────────────────────────────── */

.scene {
  position: fixed;
  inset: 0;
  z-index: -1;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 30% 50%;
  animation: settle 2.8s ease-out both;
}

@keyframes settle { from { opacity: 0; } }

/* ── En-tête ─────────────────────────────── */

.top { padding: clamp(20px, 4vh, 40px) var(--gutter); }

.logo {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  font-size: 15px;
  font-weight: 500;
  letter-spacing: 0.42em;
  text-decoration: none;
}

.logo img { display: block; width: 38px; height: 38px; }

.kanji {
  position: absolute;
  top: clamp(20px, 4vh, 40px);
  right: var(--gutter);
  font-family: 'Noto Serif JP', 'Yu Mincho', 'Hiragino Mincho ProN', serif;
  font-size: clamp(26px, 2.6vw, 36px);
  font-weight: 300;
  line-height: 1;
  letter-spacing: 0.24em;
  writing-mode: vertical-rl;
  user-select: none;
  animation: appear 1.6s 0.5s ease-out both;
}

/* ── Drop ────────────────────────────────── */

.drop {
  align-self: end;
  justify-self: end;
  width: min(440px, 100%);
  margin-right: clamp(0px, 6vw, 112px);
  padding: 24px var(--gutter);
  animation: appear 1.6s 0.5s ease-out both;
}

@keyframes appear { from { opacity: 0; } }

.eyebrow {
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ink-3);
}

.title {
  margin: 10px 0 0;
  font-size: clamp(24px, 2.4vw, 30px);
  font-weight: 300;
  letter-spacing: 0.14em;
  line-height: 1.2;
  text-transform: uppercase;
  overflow-wrap: anywhere;
}

.subtitle {
  margin-top: 12px;
  max-width: 38ch;
  font-size: 14px;
  line-height: 1.6;
  color: var(--ink-2);
}

.subtitle:empty { display: none; }

body[data-state='live'] .subtitle { display: none; }

/* ── Compte à rebours ────────────────────── */

.countdown {
  display: flex;
  gap: clamp(20px, 2.6vw, 34px);
  margin-top: 26px;
}

.countdown[hidden] { display: none; }

.unit { display: flex; flex-direction: column; gap: 8px; }

.num {
  font-size: clamp(38px, 3.6vw, 48px);
  font-weight: 200;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.lbl {
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-3);
}

.drop-date {
  margin-top: 16px;
  font-size: 12px;
  letter-spacing: 0.02em;
  color: var(--ink-3);
}

.drop-date:empty { display: none; }

/* ── Inscription ─────────────────────────── */

.notify { margin-top: 30px; }

.notify-label {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.notify-row {
  display: flex;
  align-items: flex-end;
  gap: 12px;
  border-bottom: 1px solid var(--hair);
  padding-bottom: 6px;
  transition: border-color 0.3s;
}

.notify-row:focus-within { border-color: var(--ink); }

.notify input[type='email'] {
  flex: 1;
  min-width: 0;
  border: 0;
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-size: 16px;
  font-weight: 300;
  padding: 8px 0;
  outline: none;
}

.notify input::placeholder { color: var(--ink-3); }

.notify .hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }

.notify button {
  border: 0;
  padding: 11px 18px;
  background: var(--wine);
  color: #fff;
  font: inherit;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.3s;
}

.notify button:hover { background: var(--wine-deep); }
.notify button:disabled { opacity: 0.6; cursor: wait; }
.notify button:focus-visible { outline: 1px solid var(--wine-deep); outline-offset: 3px; }

.notify-msg { min-height: 1.5em; margin-top: 10px; font-size: 13px; color: var(--ink-2); }
.notify-msg.error { color: var(--wine); }
.notify-consent { font-size: 11px; line-height: 1.5; color: var(--ink-3); }

/* ── Pied de page ────────────────────────── */

.foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 24px;
  padding: 18px var(--gutter);
  font-size: 12px;
  color: var(--ink-3);
}

.socials { display: flex; gap: 20px; }
.socials a { text-decoration: none; transition: color 0.3s; }
.socials a:hover { color: var(--ink); }

.foot > a { text-decoration: none; transition: color 0.3s; }
.foot > a:hover { color: var(--ink); }
.admin-link, .admin-link[hidden] + a { margin-left: auto; }
.socials a:focus-visible, .foot > a:focus-visible, .logo:focus-visible { outline: 1px solid var(--ink); outline-offset: 4px; }

/* ── Écrans en hauteur : le paysage en haut, le texte sur la neige ── */

@media (max-aspect-ratio: 1/1) {
  .scene {
    position: absolute;
    bottom: auto;
    height: 58%;
    min-height: 340px;
    object-position: 26% 50%;
    -webkit-mask-image: linear-gradient(to bottom, #000 72%, transparent);
    mask-image: linear-gradient(to bottom, #000 72%, transparent);
  }

  .drop { justify-self: stretch; width: auto; margin-right: 0; }
  .countdown { justify-content: space-between; max-width: 340px; }
}

@media (prefers-reduced-motion: reduce) {
  .scene, .drop, .kanji { animation: none; }
}
