/* Moorings Halloween: the trailer for a horror film about free candy.
   Colours come from the header video's night: the sky, the limestone sign, candlelight, pumpkins,
   and the eyes in the hedge. Gloock does the title cards; Bricolage Grotesque is the neighbor talking. */

:root {
  --night: #0e121b;
  --dusk: #161c28;
  --rule: #2b3346;
  --limestone: #ece0c8;
  --text: #d2c9b8;
  --fog: #9aa0ad;
  --candle: #ffb44a;
  --pumpkin: #f07a1e;
  --eye: #ff3b2f;

  --title: "Gloock", "Georgia", serif;
  --voice: "Bricolage Grotesque", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mark: "Grenze Gotisch", "Gloock", Georgia, serif;
  --script: "Pinyon Script", "Gloock", Georgia, serif;

  --wrap: 1200px;
  --pad: clamp(20px, 5.5vw, 88px);
  --section: clamp(4.5rem, 10vw, 8.5rem);
  --banner-gap: clamp(3rem, 6vw, 5rem);
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; background: var(--night); }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

body {
  margin: 0;
  font-family: var(--voice);
  font-optical-sizing: auto;
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--text);
  background: var(--night);
  -webkit-font-smoothing: antialiased;
}

/* Film grain over everything, so the page and the video read as one reel. */
body::after {
  content: ""; position: fixed; inset: 0; z-index: 100; pointer-events: none; opacity: 0.07;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='180' height='180'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 1  0 0 0 0 1  0 0 0 0 1  0 0 0 0.9 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
}

img, video { display: block; max-width: 100%; height: auto; }
ul { margin: 0; padding: 0; list-style: none; }
p { margin: 0 0 1em; max-width: 62ch; }
a { color: inherit; }

h1, h2, h3 { color: var(--limestone); margin: 0 0 0.5em; text-wrap: balance; }
h1, h2 { font-family: var(--title); font-weight: 400; letter-spacing: -0.01em; }
h2 { font-size: clamp(2.3rem, 1.4rem + 3.4vw, 4.4rem); line-height: 1; }
h3 { font-family: var(--voice); font-weight: 650; font-size: clamp(1.25rem, 1.1rem + 0.5vw, 1.5rem); line-height: 1.2; letter-spacing: -0.01em; }

:focus-visible { outline: 2px solid var(--candle); outline-offset: 3px; }

.skip {
  position: absolute; left: 1rem; top: -4rem; z-index: 200;
  background: var(--pumpkin); color: var(--night); padding: 0.6rem 1rem; border-radius: 50px; font-weight: 650;
}
.skip:focus { top: 1rem; }

.wrap { max-width: calc(var(--wrap) + 2 * var(--pad)); margin-inline: auto; padding-inline: var(--pad); }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Buttons and links */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  font: 650 1rem/1 var(--voice); padding: 1rem 1.55rem; border-radius: 50px; border: 1px solid transparent;
  text-decoration: none; cursor: pointer;
  transition: background-color 150ms ease, border-color 150ms ease, color 150ms ease;
}
.btn-fill { background: var(--pumpkin); color: #170b02; }
.btn-fill:hover { background: var(--candle); }
.btn-line { background: transparent; color: var(--limestone); border-color: rgba(236, 224, 200, 0.4); }
.btn-line:hover { border-color: var(--candle); color: var(--candle); }
.btn:disabled { opacity: 0.55; cursor: wait; }

main a:not(.btn):not(.sponsor), .updates-mail a { text-decoration-color: rgba(255, 180, 74, 0.5); text-underline-offset: 3px; }
main a:not(.btn):not(.sponsor):hover { color: var(--candle); }

/* Header: the looping video */
.hero { position: relative; isolation: isolate; }
.hero-media {
  position: relative; overflow: hidden;
  height: clamp(520px, 88svh, 62vw);
  background: #07090e url("/images/moorings-hero-poster.jpg") center / cover no-repeat;
}
.hero-video { width: 100%; height: 100%; object-fit: cover; object-position: 50% 50%; }
.hero-media::before,
.hero-media::after { content: ""; position: absolute; inset: 0; pointer-events: none; }
.hero-media::before { background: linear-gradient(to bottom, rgba(14, 18, 27, 0.75) 0%, rgba(14, 18, 27, 0) 20%); }
.hero-media::after {
  background: linear-gradient(to top, var(--night) 0%, rgba(14, 18, 27, 0.9) 12%, rgba(14, 18, 27, 0.3) 30%, rgba(14, 18, 27, 0) 46%);
}

.top {
  position: absolute; top: 0; left: 0; right: 0; z-index: 3;
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: clamp(16px, 2.4vw, 30px) var(--pad);
  font: 600 1rem/1 var(--voice); color: var(--limestone);
  text-shadow: 0 1px 14px rgba(0, 0, 0, 0.7);
}
/* Logo: an echo of the real entrance sign (script "The" over serif capitals), with a gothic "Halloween". */
.brand { display: inline-grid; justify-items: start; text-decoration: none; line-height: 1; --s: 1; }
.brand-the { font: 400 calc(1.55rem * var(--s))/1 var(--script); color: var(--candle); margin: 0 0 calc(-0.42rem * var(--s)) calc(0.3rem * var(--s)); }
.brand-moor { font: 400 calc(1.75rem * var(--s))/1 var(--title); color: var(--limestone); letter-spacing: 0.07em; }
.brand-hal { font: 600 calc(1rem * var(--s))/1 var(--mark); color: var(--candle); letter-spacing: 0.1em; margin: calc(0.2rem * var(--s)) 0 0 calc(0.1rem * var(--s)); }
.top .brand:hover .brand-moor { color: var(--candle); }
.top-links { display: flex; gap: clamp(1.1rem, 3vw, 2.25rem); }
.top a { text-decoration: none; }
.top-links a { border-bottom: 1px solid transparent; padding-bottom: 3px; }
.top-links a:hover { color: var(--candle); }
.top-links a:hover { border-bottom-color: var(--candle); }

.hero-copy { position: relative; z-index: 2; max-width: calc(var(--wrap) + 2 * var(--pad)); margin: -9svh auto 0; padding-inline: var(--pad); }
.hero-lead { color: var(--candle); font-weight: 600; margin-bottom: 0.6rem; }
.hero h1 { font-size: clamp(3rem, 1.4rem + 6vw, 6.5rem); line-height: 0.95; margin-bottom: 1.1rem; max-width: 11ch; }
.hero-text { font-size: 1.15rem; color: var(--text); margin-bottom: 0; max-width: 40rem; }
.hero-text-2 { display: block; margin-top: 0.4em; }
.hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 0.75rem; margin-top: 1.75rem; }
.hero-when { flex-basis: 100%; color: var(--fog); font-size: 0.95rem; margin: 0.6rem 0 0; }

/* Desktop: the whole header, text included, fits the first screen. The video takes whatever
   height the copy leaves, so the sign and pumpkins always sit above the headline. */
@media (min-width: 721px) {
  .hero { display: flex; flex-direction: column; height: 100svh; min-height: 600px; max-height: 1280px; }
  .hero-media { flex: 1 1 auto; height: auto; min-height: 280px; }
  .hero-video { object-position: 50% 42%; }
  .hero-copy { flex: 0 0 auto; width: 100%; margin-top: -3.5rem; padding-bottom: clamp(1.75rem, 4.5svh, 3.25rem); }
  .hero-lead { margin-bottom: 0.45rem; }
  .hero h1 { max-width: none; font-size: clamp(3rem, min(5.6vw, 10svh), 6.5rem); line-height: 1; margin-bottom: clamp(0.6rem, 1.6svh, 1rem); }
  .hero-text { max-width: 50rem; font-size: 1.1rem; }
  .hero-text-2 { display: inline; margin: 0; }
  .hero-actions { margin-top: clamp(1rem, 2.6svh, 1.6rem); gap: 0.75rem 1rem; }
  .hero-when { flex-basis: auto; margin: 0 0 0 0.75rem; }
}

/* About: three photos with their headings, staggered */
.about { padding-top: var(--section); }
.about h2 { max-width: 12ch; }
.stills {
  display: grid; grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: clamp(1rem, 2.5vw, 2rem); row-gap: clamp(2rem, 4vw, 3rem);
  margin-top: clamp(2rem, 4vw, 3.25rem);
}
.still-a { grid-column: 1 / span 7; grid-row: 1; }
.still-b { grid-column: 9 / span 4; grid-row: 1 / span 2; margin-top: clamp(3rem, 8vw, 7rem); }
.still-c { grid-column: 3 / span 6; grid-row: 2; }
.still-frame { position: relative; margin: 0 0 1.1rem; overflow: hidden; background: #000; border-radius: 3px; }
.still-frame img { width: 100%; object-fit: cover; filter: saturate(0.9) contrast(1.05) brightness(0.9); }
/* Photos keep their own proportions: nothing is cropped off the top or bottom. */
.still-frame::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(ellipse at center, rgba(0, 0, 0, 0) 55%, rgba(0, 0, 0, 0.55) 100%);
}
.still h3 { margin: 0 0 0.5rem; }
.still p { color: var(--text); max-width: 46ch; }

/* Details: the countdown is one sentence */
.details {
  margin-top: var(--section);
  padding-block: var(--section);
  background:
    linear-gradient(rgba(14, 18, 27, 0.88), rgba(14, 18, 27, 0.94)),
    url("/images/pumpkins-night.jpg") center / cover no-repeat;
}
.details-inner { display: grid; grid-template-columns: minmax(0, 1fr); gap: clamp(2rem, 4vw, 3rem); }
.details-head h2 { max-width: 16ch; }
.details-lead { font-size: 1.15rem; }
.details-when { font: 650 clamp(1.2rem, 1rem + 0.8vw, 1.6rem)/1.3 var(--voice); color: var(--limestone); margin-bottom: 0.25rem; }
.details-where { color: var(--candle); font-weight: 600; }
.countdown {
  font-family: var(--title); color: var(--limestone);
  font-size: clamp(2.1rem, 1rem + 4.6vw, 5.4rem); line-height: 1.08; letter-spacing: -0.01em;
  max-width: 22ch; margin: 0; text-wrap: balance;
}
.cd-unit { white-space: nowrap; }
.cd-num { color: var(--candle); font-variant-numeric: tabular-nums lining-nums; }
.cd-label { color: var(--limestone); }
.cd-tail { color: var(--fog); }
.countdown-over h3 { font-family: var(--title); font-weight: 400; color: var(--candle); font-size: clamp(2rem, 1.3rem + 2.8vw, 3.6rem); line-height: 1.05; }

/* Map, banner tight underneath */
.map { padding-top: var(--section); }
.kicker { color: var(--candle); font-weight: 600; margin-bottom: 0.5rem; }
.map-lead { color: var(--fog); font-size: 1.15rem; }
.map-grid {
  display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr);
  gap: clamp(1.75rem, 4vw, 3.5rem); align-items: start; margin-top: clamp(1.75rem, 3vw, 2.5rem);
}
.map-frame { position: relative; background: var(--dusk); padding: 6px; border-radius: 4px; }
.map-frame iframe { display: block; width: 100%; height: clamp(500px, 46vw, 620px); border: 0; border-radius: 2px; background: #1b2130; }
.map-cover {
  position: absolute; inset: 6px; z-index: 2;
  display: flex; align-items: flex-end; justify-content: center; padding: 1rem;
  border: 0; background: transparent; cursor: pointer; font: inherit;
}
.map-cover span {
  font-weight: 650; font-size: 0.92rem; color: var(--limestone);
  background: rgba(14, 18, 27, 0.88); border-radius: 50px; padding: 0.6rem 1.05rem;
}
.map-cover:hover span { color: var(--candle); }
.map-frame.live .map-cover { display: none; }
.pro-tip { background: var(--dusk); padding: 1rem 1.1rem; border-radius: 4px; color: var(--limestone); }
.pro-tip strong { color: var(--candle); }
.checks { margin: 0 0 1.25rem; }
.checks li { position: relative; padding-left: 1.5rem; margin-bottom: 0.4rem; }
.checks li::before { content: ""; position: absolute; left: 0.15rem; top: 0.6em; width: 7px; height: 7px; border-radius: 50%; background: var(--pumpkin); }
.sponsor { display: block; max-width: 560px; margin: var(--banner-gap) auto 0; border-radius: 4px; overflow: hidden; transition: transform 200ms ease; }
.sponsor:hover { transform: translateY(-2px); }
.sponsor img { width: 100%; }

/* Join */
.join { padding-top: calc(var(--banner-gap) - 1.25rem - 8px); }
.join-inner { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); column-gap: clamp(2rem, 5vw, 5rem); align-items: end; }
.join .eyes { grid-column: 1 / -1; display: flex; margin-bottom: 1.25rem; }
.join h2 { margin: 0; }
.join-body p:last-of-type { margin-bottom: 1.4rem; }

/* The eyes in the dark */
.eyes { display: inline-flex; gap: 12px; }
.eyes i {
  width: 16px; height: 8px; border-radius: 50%;
  background: radial-gradient(ellipse at center, #ffd2c4 0%, var(--eye) 45%, #8a120c 100%);
  box-shadow: 0 0 10px 2px rgba(255, 59, 47, 0.55);
  animation: blink 7.3s infinite;
}
@keyframes blink {
  0%, 93%, 100% { transform: scaleY(1); }
  95% { transform: scaleY(0.08); }
  97% { transform: scaleY(1); }
}

/* Reviews: movie-poster blurbs */
.quotes { padding-top: var(--section); }
.quotes h2 { max-width: 20ch; }
.blurbs {
  display: grid; grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: clamp(1rem, 2.5vw, 2rem); row-gap: clamp(2rem, 4vw, 3rem); margin-top: clamp(2rem, 4vw, 3.25rem);
}
.blurb blockquote { margin: 0 0 0.9rem; }
.blurb-stars { color: var(--candle); letter-spacing: 0.18em; margin-bottom: 0.7rem; }
.star-off { color: var(--rule); }
.blurb-title { font: 650 1rem/1.3 var(--voice); color: var(--fog); margin-bottom: 0.35rem; }
.blurb blockquote p:last-child { font-family: var(--title); color: var(--limestone); line-height: 1.12; margin: 0; }
.blurb blockquote p:last-child::before { content: open-quote; }
.blurb blockquote p:last-child::after { content: close-quote; }
.blurb-by { color: var(--fog); font-size: 0.95rem; margin: 0; }
.blurb-a { grid-column: 1 / span 7; }
.blurb-a blockquote p:last-child { font-size: clamp(2rem, 1.2rem + 2.6vw, 3.4rem); }
.blurb-b { grid-column: 8 / span 5; align-self: end; }
.blurb-b blockquote p:last-child { font-size: clamp(1.6rem, 1.1rem + 1.6vw, 2.4rem); }
.blurb-c { grid-column: 4 / span 6; }
.blurb-c blockquote p:last-child { font-size: clamp(1.6rem, 1.1rem + 1.6vw, 2.4rem); }

/* FAQ */
.faq { padding-top: var(--section); display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.7fr); gap: clamp(1.5rem, 5vw, 5rem); align-items: start; }
.faq h2 { max-width: 9ch; position: sticky; top: 2rem; }
.faq-list details { border-top: 1px solid var(--rule); }
.faq-list details:last-child { border-bottom: 1px solid var(--rule); }
.faq-list summary {
  position: relative; list-style: none; cursor: pointer;
  font: 650 clamp(1.1rem, 1rem + 0.4vw, 1.3rem)/1.3 var(--voice); color: var(--limestone);
  padding: 1.15rem 2.75rem 1.15rem 0;
}
.faq-list summary::-webkit-details-marker { display: none; }
.faq-list summary::after {
  content: "+"; position: absolute; right: 0; top: 50%; transform: translateY(-52%);
  font: 400 1.9rem/1 var(--title); color: var(--candle); transition: transform 200ms ease;
}
.faq-list details[open] summary::after { transform: translateY(-52%) rotate(45deg); }
.faq-list summary:hover { color: var(--candle); }
.faq-list details p { padding-bottom: 1.3rem; margin: 0; }

/* Newsletter */
.updates { padding-block: var(--section); display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(1.5rem, 5vw, 5rem); align-items: end; }
.updates h2 { max-width: 12ch; }
.updates-head p { margin: 0; }
.signup { display: grid; gap: 0.75rem; }
.signup-row { display: flex; gap: 0.6rem; }
.signup input {
  flex: 1; min-width: 0; font: inherit; color: var(--limestone);
  padding: 0.95rem 1.3rem; border-radius: 50px; border: 1px solid var(--rule); background: var(--dusk);
}
.signup input::placeholder { color: var(--fog); opacity: 0.8; }
.signup input:focus { outline: none; border-color: var(--candle); }
.updates-mail { margin: 1rem 0 0; color: var(--fog); font-size: 0.95rem; }
.updates-mail a { color: var(--limestone); }

/* 404 */
.lost { padding-block: 8rem 6rem; }
.lost h1 { font-size: clamp(2.6rem, 1.6rem + 4vw, 4.5rem); line-height: 1; margin: 1.25rem 0 1rem; }

/* Footer */
.foot { border-top: 1px solid var(--rule); color: var(--fog); font-size: 0.9rem; }
.foot-inner { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; padding-block: 2rem 2.5rem; }
.foot p { margin: 0; max-width: none; }
.foot-name { --s: 0.85; }

/* Forms shared */
.honeypot { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.turnstile:empty { display: none; }
.form-status { margin: 0; font-size: 0.95rem; font-weight: 600; }
.form-status:empty { display: none; }
.form-status.is-ok { color: #b9e2b0; }
.form-status.is-error { color: #ffa898; }

/* Contact dialog */
.contact {
  width: min(540px, calc(100vw - 2rem)); padding: 0; border: 0; border-radius: 6px;
  background: var(--dusk); color: var(--text);
}
.contact::backdrop { background: rgba(5, 7, 11, 0.82); }
.contact form { display: grid; gap: 1rem; padding: clamp(1.5rem, 4vw, 2.25rem); }
.contact h2 { font-size: clamp(2rem, 1.6rem + 1.5vw, 2.7rem); margin: 0; }
.contact-hint { color: var(--fog); margin: 0; }
.contact label { display: grid; gap: 0.4rem; font-weight: 600; font-size: 0.95rem; color: var(--limestone); }
.contact input, .contact textarea {
  font: inherit; font-weight: 400; color: var(--limestone); width: 100%;
  padding: 0.75rem 0.9rem; border: 1px solid var(--rule); border-radius: 4px; background: var(--night);
}
.contact input:focus, .contact textarea:focus { outline: none; border-color: var(--candle); }
.contact textarea { resize: vertical; }
.contact-actions { display: flex; justify-content: flex-end; gap: 0.6rem; margin-top: 0.25rem; }

/* Tablets */
@media (max-width: 960px) {
  .stills, .blurbs { grid-template-columns: minmax(0, 1fr); }
  .still-a, .still-b, .still-c, .blurb-a, .blurb-b, .blurb-c { grid-column: 1; grid-row: auto; margin-top: 0; }
  .map-grid, .join-inner, .faq, .updates { grid-template-columns: minmax(0, 1fr); }
  .faq h2 { position: static; max-width: none; }
  .join h2 { margin-bottom: 1rem; }
}

/* Phones */
@media (max-width: 720px) {
  .hero-media { height: auto; aspect-ratio: 1 / 1; background-image: url("/images/moorings-hero-poster-square.jpg"); }
  .hero-media::after { background: linear-gradient(to top, var(--night) 0%, rgba(14, 18, 27, 0.8) 9%, rgba(14, 18, 27, 0) 26%); }
  .hero-copy { margin-top: -2rem; }
  .hero h1 { font-size: clamp(2.8rem, 1.4rem + 7vw, 3.9rem); }
  .top { font-size: 0.95rem; }
  .top .brand { --s: 0.8; }
  .details { padding-block: 3.5rem 3rem; }
  .map { padding-top: 2.75rem; }
  .map-frame { margin-inline: calc(-1 * var(--pad)); border-radius: 0; padding: 0; }
  .map-cover { inset: 0; }
  .map-frame iframe { height: clamp(520px, 80svh, 680px); border-radius: 0; }
  .sponsor { max-width: none; }
}

@media (max-width: 480px) {
  .signup-row { flex-direction: column; }
  .hero-actions .btn { flex: 1 1 auto; }
  .contact-actions .btn { flex: 1; }
  .top-links a:first-child { display: none; }
}
