:root {
  --sage: #747962; /* sampled from logo.jpg background */
  --forest: #343a2b;
  --ink: #2e3126;
  --cream: #f0e8d3;
  --parchment: #e9dfc6;
  --gold: #c3a469;

  --serif: "Cormorant Garamond", "Iowan Old Style", Georgia, serif;
}

* {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
}

body {
  margin: 0;
  height: 100dvh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  color: var(--cream);
  font-family: var(--serif);
  background:
    radial-gradient(140% 110% at 50% 50%, transparent 60%, rgba(26, 29, 19, 0.28)),
    var(--sage);
  -webkit-font-smoothing: antialiased;
}

/* Risograph-style paper grain over everything, logo included */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 5;
  opacity: 0.4;
  mix-blend-mode: soft-light;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='300'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ---------- Rolling cookie banner ---------- */

.banner {
  flex: none;
  position: relative;
  z-index: 2;
  overflow: hidden;
  background: var(--forest);
  border-bottom: 1px solid rgba(240, 232, 211, 0.22);
  padding: 0.55rem 0;
  color: var(--parchment);
}

.banner-track {
  display: flex;
  width: max-content;
  animation: roll 48s linear infinite;
}

.banner-group {
  display: flex;
  align-items: center;
}

.banner-group svg {
  flex: none;
  width: 22px;
  height: 22px;
  margin: 0 15px;
}

.banner-group svg.tiny {
  width: 9px;
  height: 9px;
  margin: 0 4px;
  opacity: 0.6;
}

.banner-group svg:nth-of-type(4n + 1) {
  transform: rotate(-9deg);
}

.banner-group svg:nth-of-type(4n + 3) {
  transform: rotate(7deg);
}

@keyframes roll {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(-50%);
  }
}

/* ---------- Full-screen sparkle sky ---------- */

.sky {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  color: var(--cream);
}

.sky .spark {
  position: absolute;
  opacity: var(--o, 0.7);
  animation: twinkle var(--dur, 4s) ease-in-out var(--delay, 0s) infinite;
}

@keyframes twinkle {
  0%,
  100% {
    opacity: var(--o, 0.7);
    transform: scale(1) rotate(var(--rot, 0deg));
  }
  50% {
    opacity: calc(var(--o, 0.7) * 0.25);
    transform: scale(0.82) rotate(var(--rot, 0deg));
  }
}

@media (prefers-reduced-motion: reduce) {
  .banner-track,
  .sky .spark {
    animation: none;
  }
}

/* ---------- Hero: logo + form ---------- */

main {
  flex: 1;
  min-height: 0;
  position: relative;
  z-index: 2;
  display: grid;
  place-items: center;
  padding: 0 1.25rem;
}

.hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  width: 100%;
}

.logo {
  display: block;
  width: min(80vw, 62dvh, 560px);
  height: auto;
  /* feather the square JPG edge into the matching page colour */
  -webkit-mask-image: radial-gradient(circle closest-side, #000 82%, transparent 100%);
  mask-image: radial-gradient(circle closest-side, #000 82%, transparent 100%);
}

/* ---------- Form ---------- */

#notify-form {
  width: 100%;
  margin-top: clamp(0.2rem, 1.5dvh, 1rem);
}

.field-row {
  display: flex;
  gap: 0.6rem;
  justify-content: center;
  flex-wrap: wrap;
  max-width: 27rem;
  margin: 0 auto;
}

#notify-form input {
  flex: 1 1 14rem;
  min-width: 0;
  font-family: var(--serif);
  font-size: 1.05rem;
  font-weight: 500;
  padding: 0.72rem 1rem;
  color: var(--ink);
  background: var(--parchment);
  border: 1.5px solid var(--ink);
  border-radius: 6px;
  box-shadow: inset 0 1px 3px rgba(46, 49, 38, 0.18);
}

#notify-form input::placeholder {
  color: rgba(46, 49, 38, 0.45);
  font-style: italic;
}

#notify-form input:focus-visible,
#notify-form button:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}

#notify-form button {
  font-family: var(--serif);
  font-size: 0.88rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-indent: 0.18em;
  text-transform: uppercase;
  color: var(--cream);
  background: var(--ink);
  border: 1.5px solid var(--ink);
  border-radius: 6px;
  padding: 0.72rem 1.35rem;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.15s ease;
}

#notify-form button:hover {
  background: #22251b;
  transform: translateY(-1px);
}

#notify-form button[disabled] {
  opacity: 0.6;
  cursor: wait;
  transform: none;
}

.form-note {
  margin: 0.7rem 0 0;
  min-height: 1.3em;
  font-size: 0.98rem;
  font-style: italic;
  font-weight: 500;
  color: rgba(240, 232, 211, 0.85);
}

.form-note.is-success {
  color: var(--cream);
  font-size: 1.05rem;
}

.form-note.is-error {
  color: #e8c9a8;
}

.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;
}

/* ---------- Short viewports: keep everything above the fold ---------- */

@media (max-height: 560px) {
  .banner {
    padding: 0.35rem 0;
  }

  .banner-group svg {
    width: 18px;
    height: 18px;
  }

  .logo {
    width: min(80vw, 54dvh, 560px);
  }
}
