/* ==========================================================================
   MarchMallows — site styles

   Pastel, taken off the capsule art: the logo's candy letters (pink, cream,
   lavender, sky) over a bright sky, with plum for text and outlines. No white
   ground anywhere: every section is its own pastel, like the letters.
   ========================================================================== */

@font-face {
  font-family: 'Fredoka';
  src: url('../fonts/Fredoka.ttf') format('truetype');
  font-weight: 300 700;
  font-display: swap;
}
@font-face {
  font-family: 'Noto Sans';
  src: url('../fonts/NotoSans-Regular.ttf') format('truetype');
  font-weight: 400;
  font-display: swap;
}

:root {
  /* the logo letters */
  --pink:     #ffc9dd;
  --cream:    #fff1d2;
  --lavender: #dccbff;
  --sky:      #bfe0ff;
  --mint:     #c5f2dc;

  /* section grounds, a step lighter than the letters */
  --g-sky:      #e2f1ff;
  --g-pink:     #ffe6ef;
  --g-butter:   #fff6df;
  --g-mint:     #e1f8ec;
  --g-lavender: #ede4ff;

  --plum:   #3a1f3d;
  --muted:  #6f5871;
  --accent: #e0457b;   /* links and the pink in the headline */

  --shell: 1120px;
  --radius: 24px;
}

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

html { scroll-behavior: smooth; scroll-padding-top: 76px; }

body {
  margin: 0;
  background: var(--g-lavender);
  color: var(--plum);
  font-family: 'Noto Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

img, video { max-width: 100%; height: auto; display: block; }

h1, h2, h3 {
  font-family: 'Fredoka', 'Noto Sans', system-ui, sans-serif;
  font-weight: 700; line-height: 1.1; margin: 0 0 .6rem;
}
p { margin: 0 0 1rem; }
a { color: var(--accent); }

.shell { width: 100%; max-width: var(--shell); margin-inline: auto; padding-inline: 1.25rem; }
.shell.narrow { max-width: 820px; }
.center-text { text-align: center; max-width: 40rem; margin: 2.5rem auto 0; }

.visually-hidden {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}
.skip { position: absolute; left: -999px; top: 0; background: var(--plum); color: #fff; padding: .5rem 1rem; z-index: 100; }
.skip:focus { left: 0; }

/* --------------------------------------------------------------------- nav */

.nav {
  position: sticky; top: 0; z-index: 50;
  background: rgba(237, 228, 255, .9);
  backdrop-filter: blur(10px);
  border-bottom: 3px solid var(--plum);
}
.nav-inner { display: flex; align-items: center; gap: 1.25rem; height: 64px; }
.nav-mark {
  display: flex; align-items: center; gap: .5rem;
  font-family: 'Fredoka', sans-serif; font-weight: 700; font-size: 1.3rem;
  color: var(--plum); text-decoration: none;
}
.nav-mark img { width: 32px; height: 32px; border-radius: 8px; }
.nav-links { display: flex; gap: 1.25rem; list-style: none; margin: 0 0 0 auto; padding: 0; }
.nav-links a {
  font-family: 'Fredoka', sans-serif; font-weight: 600;
  color: var(--muted); text-decoration: none; white-space: nowrap;
}
.nav-links a:hover { color: var(--plum); }

@media (max-width: 760px) {
  .nav-links { display: none; }
  .nav-inner .btn { margin-left: auto; }
}

/* ----------------------------------------------------------------- buttons */

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: .8rem 1.7rem; border-radius: 999px;
  font-family: 'Fredoka', sans-serif; font-weight: 700; font-size: 1.15rem;
  text-decoration: none; color: var(--plum);
  border: 3px solid var(--plum); box-shadow: 0 5px 0 var(--plum);
  transition: transform .12s ease, box-shadow .12s ease;
  cursor: pointer;
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 7px 0 var(--plum); }
.btn:active { transform: translateY(4px); box-shadow: 0 1px 0 var(--plum); }
.btn-primary { background: var(--pink); }
.btn-ghost { background: var(--mint); }
.btn-small { padding: .3rem 1.1rem; font-size: 1rem; border-width: 2px; box-shadow: 0 3px 0 var(--plum); }
.btn:disabled { opacity: .6; cursor: wait; }

/* -------------------------------------------------------------------- hero */

/* A banner like the Master of Chaos site: the capsule fills the width with
   its logo on top, and fades into the page where the text sits. The capsule
   is 1488x1057, so the padding keeps the text below the logo at any width. */
.hero {
  position: relative; overflow: hidden;
  text-align: center;
  padding: min(57vw, 800px) 0 4.5rem;
  background: var(--g-lavender);
}
.hero-bg {
  position: absolute; inset: 0 0 auto 0;
  aspect-ratio: 1488 / 1057; max-height: 100%;
  background: url('../img/capsule.jpg') center top / cover no-repeat;
}
.hero-bg::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(to bottom,
    rgba(237, 228, 255, 0) 0%, rgba(237, 228, 255, 0) 58%,
    rgba(237, 228, 255, .85) 80%, var(--g-lavender) 96%);
}
.hero-inner { position: relative; }
.hero-tag {
  font-family: 'Fredoka', sans-serif; font-weight: 700;
  font-size: clamp(2rem, 5vw, 3.2rem); line-height: 1.1;
  margin: 0 0 .75rem;
  text-shadow: 0 3px 0 #fff;
}
.hero-blurb { color: var(--plum); font-size: 1.12rem; max-width: 38rem; margin-inline: auto; }
.hero-cta { display: flex; flex-wrap: wrap; justify-content: center; gap: 1rem; margin: 1.25rem 0 1rem; }

.hero-signup {
  max-width: 36rem; margin: 1.75rem auto 0; padding: 1.2rem 1.4rem 1rem;
  display: grid; gap: .75rem; text-align: left;
  background: var(--cream); border: 3px solid var(--plum); border-radius: var(--radius);
  box-shadow: 8px 8px 0 var(--pink);
}
.hero-signup-title {
  margin: 0; text-align: center;
  font-family: 'Fredoka', sans-serif; font-weight: 700; font-size: 1.3rem;
}
.hero-signup-row { display: flex; gap: .75rem; }
.hero-signup-row input {
  flex: 1; min-width: 0; font: inherit; color: var(--plum);
  padding: .65rem 1rem; border-radius: 999px;
  border: 3px solid var(--plum); background: #fffdf8;
}
.hero-signup-row input:focus { outline: 3px solid var(--lavender); outline-offset: 1px; }
.hero-signup .consent { justify-content: center; }
.hero-signup .form-status { text-align: center; min-height: 0; }
.hero-signup .form-status:empty { display: none; }

@media (max-width: 520px) {
  .hero-signup-row { flex-direction: column; }
}
.hero-meta { color: var(--muted); font-size: .92rem; margin: 0; }

@media (max-width: 760px) {
  .hero { padding-top: 64vw; }
  .hero-bg { background-size: 100% auto; }
  .hero-bg::after {
    background: linear-gradient(to bottom,
      rgba(237, 228, 255, 0) 0%, rgba(237, 228, 255, 0) 70%, var(--g-lavender) 100%);
  }
}

/* ---------------------------------------------------------------- sections */

.section { padding: 5rem 0; border-top: 3px solid var(--plum); }
.section-sky      { background: var(--g-sky); }
.section-pink     { background: var(--g-pink); }
.section-butter   { background: var(--g-butter); }
.section-mint     { background: var(--g-mint); }
.section-lavender { background: var(--g-lavender); }

.section-head { max-width: 42rem; margin-bottom: 2.5rem; }
.section-head.center { margin-inline: auto; text-align: center; }
.section-head h2 { font-size: clamp(2rem, 4.5vw, 2.9rem); }
.section-head p { color: var(--muted); font-size: 1.08rem; }
.section-head h2.big { font-size: clamp(2.6rem, 6vw, 3.8rem); }
.subsection { margin-top: 1rem; }
.subsection h3 { font-size: clamp(1.7rem, 3.5vw, 2.3rem); }

.kicker {
  display: inline-block; margin-bottom: .7rem;
  padding: .1rem .9rem; border-radius: 999px;
  border: 2px solid var(--plum); background: var(--cream);
  font-family: 'Fredoka', sans-serif; font-weight: 600; font-size: .85rem;
  text-transform: uppercase; letter-spacing: .08em;
}

.lede { font-size: 1.14rem; }

/* ------------------------------------------------------------------- cards */

.card {
  border: 3px solid var(--plum); border-radius: var(--radius);
  padding: 1.75rem; background: var(--card, var(--cream));
  box-shadow: 8px 8px 0 var(--plum);
}
.card h3 { font-size: 1.8rem; }
.card p { color: var(--muted); }
.card-sky      { --card: var(--sky); }
.card-pink     { --card: var(--pink); }
.card-lavender { --card: var(--lavender); }
.card-mint     { --card: var(--mint); }
.card-cream    { --card: var(--cream); }
.card-sky p, .card-pink p, .card-lavender p, .card-mint p { color: var(--plum); }

.two-up, .clip-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 2rem; }
.three-up { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2rem; }
.two-up .btn { width: 100%; margin-top: .5rem; }
.card-pink .btn-primary { background: var(--cream); }

@media (max-width: 760px) {
  .two-up, .clip-grid, .three-up { grid-template-columns: 1fr; }
}
@media (min-width: 761px) and (max-width: 980px) {
  .three-up { grid-template-columns: 1fr; }
}

/* ------------------------------------------------------------ contact form */

.contact-form { display: grid; gap: 1rem; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.field { display: grid; gap: .3rem; }
.field label { font-family: 'Fredoka', sans-serif; font-weight: 600; }
.field input, .field select, .field textarea {
  width: 100%; font: inherit; color: var(--plum);
  padding: .65rem .9rem; border-radius: 14px;
  border: 2px solid var(--plum); background: #fffdf8;
}
.field textarea { resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus {
  outline: 3px solid var(--lavender); outline-offset: 1px;
}
.contact-form .btn { justify-self: start; }
.form-status { margin: 0; font-weight: 600; min-height: 1.5em; }
.form-status.ok   { color: #1f7a4d; }
.form-status.warn { color: #b3264f; }

.signup-form { display: grid; gap: .8rem; margin-top: 1rem; }
.signup-form .form-status { text-align: center; }
.consent { display: flex; gap: .6rem; align-items: flex-start; font-size: .95rem; cursor: pointer; }
.consent input { margin-top: .3rem; width: 1.1rem; height: 1.1rem; accent-color: var(--plum); flex: none; }

/* Honeypot: off screen for people, still in the form for bots. */
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

@media (max-width: 600px) { .field-row { grid-template-columns: 1fr; } }

/* ----------------------------------------------------------------- trailer */

.trailer-frame {
  position: relative; max-width: 960px; margin: 0 auto;
  aspect-ratio: 16 / 9; overflow: hidden;
  border: 4px solid var(--plum); border-radius: var(--radius);
  box-shadow: 12px 12px 0 var(--lavender);
  background: var(--plum);
}
.trailer-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.trailer-play {
  position: absolute; inset: 0; width: 100%; height: 100%;
  padding: 0; border: 0; background: none; cursor: pointer;
}
.trailer-play img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s ease; }
.trailer-play:hover img { transform: scale(1.015); }
.trailer-play:focus-visible { outline: 3px solid var(--accent); outline-offset: -6px; }
.trailer-play-icon {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
  width: 96px; height: 96px; border-radius: 50%;
  background: var(--pink); border: 4px solid var(--plum); box-shadow: 0 6px 0 var(--plum);
}
.trailer-play-icon::after {
  content: ''; position: absolute; left: 38px; top: 26px;
  border-style: solid; border-width: 20px 0 20px 30px;
  border-color: transparent transparent transparent var(--plum);
}
.trailer-play.is-soon { cursor: default; }
.trailer-play.is-soon img { filter: saturate(.6) blur(2px); transform: none; }
.trailer-play.is-soon .trailer-play-icon { display: none; }
.trailer-soon {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
  padding: .5rem 1.5rem; border-radius: 999px; white-space: nowrap;
  background: var(--cream); border: 3px solid var(--plum); box-shadow: 0 5px 0 var(--plum);
  font-family: 'Fredoka', sans-serif; font-weight: 700; font-size: clamp(1.1rem, 3vw, 1.6rem);
  color: var(--plum);
}

/* ------------------------------------------------------------------- clips */

.clip {
  margin: 0; overflow: hidden;
  border: 3px solid var(--plum); border-radius: var(--radius);
  background: var(--cream); box-shadow: 8px 8px 0 var(--plum);
}
.clip video { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; background: var(--plum); border-bottom: 3px solid var(--plum); }
.clip figcaption { padding: .9rem 1.2rem 1.1rem; color: var(--muted); }
.clip figcaption b {
  display: flex; align-items: center; gap: .5rem;
  font-family: 'Fredoka', sans-serif; font-weight: 700; font-size: 1.35rem; color: var(--plum);
}
.step {
  display: inline-grid; place-items: center; width: 1.8rem; height: 1.8rem;
  border-radius: 50%; border: 2px solid var(--plum); background: var(--pink); font-size: 1rem;
}
.clip + .clip .step { background: var(--sky); }
.clip-wide { max-width: 820px; margin: 0 auto 2.5rem; }
.clip-wide video { border-bottom: 0; }

/* --------------------------------------------------------------------- dev */

.dev { display: flex; gap: 2rem; align-items: center; }
.dev img { width: 240px; flex: none; border-radius: 16px; border: 3px solid var(--plum); }
.dev h2 { font-size: 2rem; }

@media (max-width: 600px) { .dev { flex-direction: column; align-items: flex-start; } }

/* ------------------------------------------------------------------ footer */

.footer { background: var(--plum); color: #eadcf0; padding: 2.5rem 0; font-size: .92rem; }
.footer strong { color: #fff; font-family: 'Fredoka', sans-serif; font-size: 1.2rem; }
.footer-inner { display: flex; flex-wrap: wrap; gap: 1.5rem; justify-content: space-between; align-items: center; }
.footer-links { display: flex; gap: 1.25rem; }
.footer-links a { color: var(--pink); }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .btn, .trailer-play img { transition: none; }
}
