/* Vernissage invitation — static page */

:root {
  --bg: #f7f5f0;
  --surface: #ffffff;
  --ink: #1a1a1a;
  --ink-muted: #5c5c5c;
  --border: rgba(26, 26, 26, 0.12);
  --accent: #2c2c2c;
  --accent-hover: #000000;
  --error: #8b2942;
  --focus: #1a1a1a;
  --radius: 2px;
  --shadow: 0 24px 48px rgba(26, 26, 26, 0.06);
  --font-serif: "Cormorant Garamond", "Times New Roman", serif;
  --font-sans: "Source Sans 3", system-ui, sans-serif;
}

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

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

body {
  margin: 0;
  min-height: 100dvh;
  font-family: var(--font-sans);
  font-weight: 400;
  font-size: 1rem;
  line-height: 1.55;
  color: var(--ink);
  background: var(--bg);
  background-image: radial-gradient(
    ellipse 120% 80% at 50% -20%,
    rgba(255, 255, 255, 0.9),
    transparent
  );
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.shell {
  max-width: 36rem;
  margin: 0 auto;
  padding: clamp(2rem, 6vw, 4rem) clamp(1.25rem, 5vw, 2rem) 3rem;
}

.brand {
  text-align: center;
  margin-bottom: 2.5rem;
}

.brand__eyebrow {
  margin: 0 0 0.35rem;
  font-family: var(--font-sans);
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ink-muted);
}

.brand__title {
  margin: 0;
  font-family: var(--font-serif);
  font-weight: 400;
  font-size: clamp(2.25rem, 8vw, 3.25rem);
  line-height: 1.05;
  letter-spacing: 0.02em;
}

.panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: clamp(1.5rem, 5vw, 2.25rem);
}

.panel__heading {
  margin: 0 0 0.75rem;
  font-family: var(--font-serif);
  font-size: 1.625rem;
  font-weight: 600;
  line-height: 1.2;
}

.panel__lede {
  margin: 0 0 1.75rem;
  color: var(--ink-muted);
  font-size: 0.9375rem;
}

.form {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.field__label {
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink-muted);
}

.field__input {
  width: 100%;
  padding: 0.75rem 0.85rem;
  font-family: var(--font-sans);
  font-size: 1rem;
  color: var(--ink);
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.field__input:hover {
  border-color: rgba(26, 26, 26, 0.22);
}

.field__input:focus {
  outline: none;
  border-color: var(--focus);
  box-shadow: 0 0 0 3px rgba(26, 26, 26, 0.12);
}

.field__input[aria-invalid="true"] {
  border-color: var(--error);
}

.field__input[aria-invalid="true"]:focus {
  box-shadow: 0 0 0 3px rgba(139, 41, 66, 0.15);
}

.field__hint {
  margin: 0;
  font-size: 0.8125rem;
  color: var(--ink-muted);
}

.field__error {
  margin: 0;
  font-size: 0.8125rem;
  color: var(--error);
  min-height: 1.2em;
}

.field__error:empty {
  min-height: 0;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.85rem 1.35rem;
  font-family: var(--font-sans);
  font-size: 0.9375rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-decoration: none;
  border: 1px solid transparent;
  border-radius: var(--radius);
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.btn--primary {
  color: #fafafa;
  background: var(--accent);
  border-color: var(--accent);
}

.btn--primary:hover {
  background: var(--accent-hover);
  border-color: var(--accent-hover);
}

.btn--primary:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(26, 26, 26, 0.25);
}

.btn--download {
  width: 100%;
  margin-top: 0.25rem;
}

.btn--ghost {
  width: 100%;
  margin-top: 1.25rem;
  color: var(--ink-muted);
  background: transparent;
  border-color: var(--border);
  font-weight: 500;
}

.btn--ghost:hover {
  color: var(--ink);
  border-color: rgba(26, 26, 26, 0.25);
  background: rgba(26, 26, 26, 0.03);
}

.panel--invite {
  animation: fadeUp 0.45s ease forwards;
}

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.invite-card {
  text-align: center;
}

.invite-card__kicker {
  margin: 0 0 0.5rem;
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ink-muted);
}

.invite-card__greeting {
  margin: 0 0 1.5rem;
  font-family: var(--font-serif);
  font-size: clamp(1.5rem, 5vw, 1.85rem);
  font-weight: 400;
  font-style: italic;
  line-height: 1.35;
  color: var(--ink);
}

.invite-card__body {
  text-align: left;
  padding: 1.25rem 0 1.5rem;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  margin-bottom: 0.5rem;
}

.invite-card__summary {
  margin: 0 0 1rem;
  font-size: 0.9375rem;
  line-height: 1.65;
  color: var(--ink);
}

.invite-card__event {
  font-family: var(--font-serif);
  font-size: 1.125rem;
  font-weight: 600;
  font-style: normal;
}

.invite-card__note {
  margin: 0;
  font-size: 0.875rem;
  color: var(--ink-muted);
}

.pdf-viewer {
  margin: 0 0 1.25rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  background: #e8e6e1;
  min-height: min(70vh, 520px);
}

.pdf-viewer__frame {
  display: block;
  width: 100%;
  height: min(70vh, 520px);
  border: 0;
}

@media (min-width: 640px) {
  .pdf-viewer,
  .pdf-viewer__frame {
    min-height: 560px;
    height: 560px;
  }
}

@media (min-width: 480px) {
  .btn--download {
    width: auto;
    min-width: 16rem;
    margin-left: auto;
    margin-right: auto;
    display: flex;
  }
}

/* --- Splash (couverture) --- */

[hidden] {
  display: none !important;
}

.splash {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: max(1rem, env(safe-area-inset-top)) 1rem
    max(1rem, env(safe-area-inset-bottom));
  overflow-x: hidden;
  overflow-y: auto;
  background: radial-gradient(
    circle at 50% 35%,
    #1e4a6e 0%,
    #0d1b2a 50%,
    #050a10 100%
  );
  transition: opacity 0.45s ease, transform 0.45s ease;
}

.splash.splash--exit {
  z-index: 0;
}

.splash--exit {
  opacity: 0;
  transform: translateY(12px);
  pointer-events: none;
}

#main-content:not([hidden]) {
  position: relative;
  z-index: 2;
}

.splash__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  max-width: 28rem;
  min-height: 0;
  flex-shrink: 0;
}

.splash__art {
  position: relative;
  width: 100%;
  max-width: min(92vw, 420px);
  perspective: 1100px;
  overflow: visible;
}

.splash__art::after {
  content: "";
  position: absolute;
  inset: -6%;
  z-index: -1;
  border-radius: 4px;
  background: radial-gradient(
    ellipse at center,
    rgba(56, 189, 248, 0.28),
    transparent 70%
  );
  animation: splashGlow 4s ease-in-out infinite;
  pointer-events: none;
}

.splash__book-float {
  transform-style: preserve-3d;
  width: 100%;
  display: flex;
  justify-content: center;
  animation: bookFloat 6.5s ease-in-out 0.85s infinite;
  will-change: transform;
}

.splash__book-enter {
  animation: splashEnter 0.85s ease forwards;
  display: flex;
  justify-content: center;
  width: 100%;
}

.splash__art img {
  display: block;
  width: auto;
  max-width: min(92vw, 420px);
  max-height: min(58dvh, 520px);
  height: auto;
  object-fit: contain;
  margin-inline: auto;
  border-radius: 2px;
  box-shadow:
    0 4px 6px rgba(0, 0, 0, 0.2),
    0 28px 56px rgba(0, 0, 0, 0.45);
}

.btn--splash {
  margin-top: 1.75rem;
  width: 100%;
  max-width: 20rem;
  padding: 0.9rem 1.25rem;
  font-weight: 600;
  color: #0d1b2a;
  background: linear-gradient(180deg, #f0d060 0%, #d4a826 100%);
  border: 1px solid rgba(212, 168, 38, 0.85);
  box-shadow: 0 4px 20px rgba(240, 208, 96, 0.25);
}

.btn--splash:hover {
  color: #050a10;
  background: linear-gradient(180deg, #f5dc78 0%, #e0b82e 100%);
  border-color: #c99a1a;
}

.btn--splash:focus-visible {
  outline: none;
  box-shadow:
    0 0 0 3px rgba(56, 189, 248, 0.45),
    0 4px 20px rgba(240, 208, 96, 0.25);
}

@keyframes splashEnter {
  from {
    opacity: 0;
    transform: translateY(22px) scale(0.97);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes splashGlow {
  0%,
  100% {
    opacity: 0.4;
    transform: scale(1);
  }
  50% {
    opacity: 0.88;
    transform: scale(1.06);
  }
}

@keyframes bookFloat {
  0%,
  100% {
    transform: translateY(0) rotateY(-5deg) rotateX(3deg);
  }
  25% {
    transform: translateY(-12px) rotateY(3deg) rotateX(-1deg);
  }
  50% {
    transform: translateY(-8px) rotateY(7deg) rotateX(-3deg);
  }
  75% {
    transform: translateY(-14px) rotateY(-2deg) rotateX(2deg);
  }
}

@media (prefers-reduced-motion: reduce) {
  .splash {
    transition: opacity 0.2s ease;
  }

  .splash--exit {
    transform: none;
  }

  .splash__book-float {
    animation: none;
    transform: none;
    will-change: auto;
  }

  .splash__book-enter {
    animation: none;
    opacity: 1;
    transform: none;
  }

  .splash__art::after {
    animation: none;
    opacity: 0.5;
    transform: none;
  }
}
