/* MooshFest 2027 — Save the Date */

:root {
  --purple: #8B2AA8;
  --plum: #2B1546;
  --cream: #F5EEDF;
  --paper: #FFFBF0;
  --green: #45E33A;
  --yellow: #FFDE1A;

  --font-caps: 'Archivo Narrow', 'Arial Narrow', sans-serif;
  --font-serif: 'Newsreader', Georgia, serif;
  --font-mono: 'Courier Prime', 'Courier New', monospace;
}

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

body {
  margin: 0;
  background: var(--plum);
}

a {
  color: var(--yellow);
}

a:hover,
a:focus-visible {
  color: var(--green);
}

/* Page shell */
.std {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--purple);
  color: var(--cream);
  font-family: var(--font-mono);
  font-size: 17px;
  line-height: 1.5;
}

.std__swooshes {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.std__swooshes path {
  fill: none;
  stroke: #FFFFFF;
  stroke-opacity: 0.1;
  stroke-width: 64;
}

/* Hovering UFO, upper right
   Outer layer drifts side to side and tilts; inner layer bobs up and down.
   The two run on different timings so the path never looks like a loop. */
.std__ufo {
  position: absolute;
  top: clamp(40px, 8vh, 96px);
  right: clamp(24px, 9vw, 160px);
  width: clamp(150px, 20vw, 280px);
  z-index: 1;
  pointer-events: none;
  animation: std-ufo-drift 9s ease-in-out infinite;
}

.std__ufo-bob {
  animation: std-ufo-bob 2.6s ease-in-out infinite;
}

.std__ufo img {
  display: block;
  width: 100%;
  height: auto;
  filter: drop-shadow(0 18px 24px rgba(43, 21, 70, 0.45));
}

@keyframes std-ufo-bob {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-18px); }
}

@keyframes std-ufo-drift {
  0%   { transform: translateX(0) rotate(0deg); }
  25%  { transform: translateX(28px) rotate(5deg); }
  50%  { transform: translateX(0) rotate(0deg); }
  75%  { transform: translateX(-28px) rotate(-5deg); }
  100% { transform: translateX(0) rotate(0deg); }
}

@keyframes std-ufo-drift-small {
  0%   { transform: translateX(0) rotate(0deg); }
  25%  { transform: translateX(12px) rotate(5deg); }
  50%  { transform: translateX(0) rotate(0deg); }
  75%  { transform: translateX(-12px) rotate(-5deg); }
  100% { transform: translateX(0) rotate(0deg); }
}

/* Main block */
.std__main {
  position: relative;
  flex: 1 0 auto;
  width: 100%;
  max-width: 1240px;
  margin: 0 auto;
  padding: 72px 24px 48px;
  display: flex;
  align-items: center;
}

.std__content {
  width: 100%;
  max-width: 760px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 20px;
}

.std__logo {
  margin: 0;
  line-height: 0;
}

.std__logo img {
  width: min(480px, 86vw);
  height: auto;
}

.std__headline {
  margin: 0;
  font-family: var(--font-caps);
  font-weight: 700;
  font-size: clamp(2.6rem, 6vw, 4.3rem);
  line-height: 0.9;
  text-transform: uppercase;
  color: var(--green);
}

/* Typewriter headline (driven by save-the-date.js) */
.tw-word {
  white-space: nowrap;
}

.tw-char {
  visibility: hidden;
}

.tw-char.is-typed {
  visibility: visible;
}

/* Zero-width caret, so moving it never shifts the letters */
.tw-caret {
  position: relative;
  display: inline-block;
  width: 0;
}

.tw-caret::after {
  content: "";
  position: absolute;
  left: 0.04em;
  bottom: -0.02em;
  width: 0.09em;
  height: 0.82em;
  background: currentColor;
  animation: tw-blink 1s steps(1) infinite;
}

/* Solid while typing, blinks once it's finished */
.std__headline:not(.tw-done) .tw-caret::after {
  animation: none;
}

@keyframes tw-blink {
  50% { opacity: 0; }
}

.std__subhead {
  margin: 0;
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 800;
  font-size: clamp(1.7rem, 3.4vw, 2.6rem);
  line-height: 1.05;
  letter-spacing: -0.02em;
}

.std__dates {
  margin: 8px 0 0;
  padding: 10px 20px;
  background: var(--yellow);
  color: var(--plum);
  font-family: var(--font-caps);
  font-weight: 700;
  font-size: clamp(1.6rem, 3.6vw, 2.5rem);
  line-height: 1.1;
  text-transform: uppercase;
  transform: rotate(-2deg);
  box-shadow: 6px 6px 0 var(--plum);
}

.std__calendar {
  padding: 10px 0;
  font-weight: 700;
  font-size: 16px;
}

/* Signup form */
.std__form {
  width: 100%;
  max-width: 34rem;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.std__form label {
  width: 100%;
  font-size: 15px;
}

.std__form input {
  flex: 1 1 230px;
  min-height: 56px;
  padding: 0 18px;
  border: 3px solid var(--plum);
  border-radius: 0;
  background: var(--paper);
  color: var(--plum);
  font-family: inherit;
  font-size: 17px;
}

.std__form input:focus {
  outline: 3px solid var(--yellow);
  outline-offset: 2px;
}

.std__form button {
  flex: 0 0 auto;
  min-height: 56px;
  padding: 0 24px;
  border: 3px solid var(--plum);
  border-radius: 0;
  background: var(--green);
  color: var(--plum);
  font-family: var(--font-caps);
  font-weight: 700;
  font-size: 19px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  box-shadow: 5px 5px 0 var(--plum);
  cursor: pointer;
  transition: transform 0.1s, box-shadow 0.1s;
}

.std__form button:hover {
  transform: translate(2px, 2px);
  box-shadow: 3px 3px 0 var(--plum);
}

.std__form button:active {
  transform: translate(5px, 5px);
  box-shadow: 0 0 0 var(--plum);
}

.std__form button:disabled {
  cursor: wait;
  opacity: 0.85;
  transform: none;
  box-shadow: 5px 5px 0 var(--plum);
}

/* Signup result message */
.std__form-status {
  width: 100%;
  margin: 4px 0 0;
  font-size: 15px;
}

.std__form-status:empty {
  display: none;
}

.std__form-status[data-state="error"] {
  align-self: flex-start;
  width: auto;
  padding: 8px 12px;
  background: var(--paper);
  color: var(--plum);
  font-weight: 700;
  box-shadow: 4px 4px 0 var(--plum);
}

/* After a successful signup, the input and button make way for a yellow note */
.std__form.is-subscribed input,
.std__form.is-subscribed button,
.std__form.is-subscribed label {
  display: none;
}

.std__form-status[data-state="success"] {
  margin: 0;
  padding: 14px 18px;
  background: var(--yellow);
  color: var(--plum);
  font-weight: 700;
  font-size: 17px;
  transform: rotate(-1deg);
  box-shadow: 5px 5px 0 var(--plum);
}

/* Mailchimp's anti-bot field: off-screen, never seen by people */
.std__honeypot {
  position: absolute;
  left: -5000px;
}

/* Round stamp, bottom-right on wide screens */
.std__stamp {
  position: absolute;
  right: 40px;
  bottom: 24px;
  width: 136px;
  height: 136px;
  transform: rotate(-12deg);
}

.std__stamp-ring {
  font-family: var(--font-caps);
  font-weight: 700;
  font-size: 12px;
  letter-spacing: 2px;
  fill: var(--plum);
}

.std__stamp-label {
  font-family: var(--font-caps);
  font-weight: 700;
  font-size: 24px;
  fill: var(--plum);
}

/* Footer links */
.std__footer {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 4px 28px;
  padding: 0 24px 20px;
  font-size: 14px;
}

.std__footer a {
  padding: 12px 0;
}

/* Scrolling ticker */
.std__ticker {
  position: relative;
  display: flex;
  width: max-content;
  padding: 12px 0;
  background: var(--yellow);
  color: var(--plum);
  font-family: var(--font-caps);
  font-weight: 700;
  font-size: 22px;
  text-transform: uppercase;
  white-space: nowrap;
  animation: std-ticker 120s linear infinite; /* 6 copies, slides 3: slow enough to read */
}

/* Full-width yellow band behind the moving text */
.std__ticker::before {
  content: "";
  position: absolute;
  inset: 0 -100vw;
  background: var(--yellow);
  z-index: -1;
}

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

@media (prefers-reduced-motion: reduce) {
  .std__ticker,
  .std__ufo,
  .std__ufo-bob {
    animation: none;
  }
}

/* Tablets and phones */
@media (max-width: 900px) {
  .std__main {
    padding-top: 40px;
    padding-bottom: 40px;
  }

  .std__stamp {
    position: static;
    align-self: flex-end;
    width: 104px;
    height: 104px;
    margin-top: -12px;
  }

  .std__main {
    flex-direction: column;
    align-items: stretch;
  }

  /* Smaller UFO tucked into the top corner, clear of the logo */
  .std__ufo {
    top: 10px;
    right: 22px;
    width: 92px;
    animation-name: std-ufo-drift-small;
  }

  .std__main {
    padding-top: 72px;
  }
}

/* ---------- Year One video (below the save-the-date screen) ---------- */

.yo {
  position: relative;
  overflow: hidden;
  padding: 96px 24px 112px;
  background: var(--plum);
  color: var(--cream);
  font-family: var(--font-mono);
}

.yo__swoosh {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.yo__swoosh path {
  fill: none;
  stroke: var(--purple);
  stroke-opacity: 0.4;
  stroke-width: 64;
}

.yo__inner {
  position: relative;
  max-width: 1160px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 56px 72px;
}

.yo__copy {
  flex: 1 1 440px;
  min-width: 0;
  max-width: 560px;
}

.yo__kicker {
  margin: 0 0 16px;
  font-size: 13px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  opacity: 0.85;
}

.yo__title {
  margin: 0 0 20px;
  font-family: var(--font-caps);
  font-weight: 700;
  font-size: clamp(2.8rem, 7vw, 5.2rem);
  line-height: 0.9;
  text-transform: uppercase;
  color: var(--green);
}

.yo__lede {
  margin: 0 0 16px;
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 800;
  font-size: clamp(1.4rem, 2.6vw, 2rem);
  line-height: 1.15;
  letter-spacing: -0.01em;
}

.yo__body {
  margin: 0 0 32px;
}

.yo__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px 28px;
}

.yo__btn {
  display: inline-flex;
  align-items: center;
  min-height: 56px;
  padding: 0 22px;
  border: 3px solid var(--plum);
  background: var(--yellow);
  color: var(--plum);
  font-family: var(--font-caps);
  font-weight: 700;
  font-size: 19px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  text-decoration: none;
  box-shadow: 5px 5px 0 var(--purple);
  transition: transform 0.1s, box-shadow 0.1s;
}

.yo__btn:hover,
.yo__btn:focus-visible {
  color: var(--plum);
  transform: translate(2px, 2px);
  box-shadow: 3px 3px 0 var(--purple);
}

.yo__link {
  padding: 10px 0;
  font-weight: 700;
}

/* The video sits in a taped, tilted frame sized for vertical phone footage */
.yo__frame {
  position: relative;
  flex: 0 1 380px;
  min-width: 260px;
  margin: 0 auto;
  padding: 12px 12px 48px;
  background: #FFFFFF;
  transform: rotate(2deg);
  box-shadow: 12px 12px 0 var(--purple);
}

.yo__frame::before {
  content: "";
  position: absolute;
  top: -14px;
  left: 50%;
  z-index: 2;
  width: 120px;
  height: 32px;
  margin-left: -60px;
  background: #F3E9B5;
  transform: rotate(-3deg);
}

.yo__frame figcaption {
  position: absolute;
  left: 16px;
  bottom: 14px;
  color: var(--plum);
  font-size: 14px;
}

.yo__video-wrap {
  position: relative;
  aspect-ratio: 9 / 16;
  background: #000;
}

.yo__video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.yo__controls {
  position: absolute;
  left: 10px;
  right: 10px;
  bottom: 10px;
  display: flex;
  justify-content: space-between;
  gap: 10px;
}

.yo__ctrl {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 44px;
  min-height: 44px;
  padding: 0 12px;
  border: 2px solid var(--plum);
  background: var(--yellow);
  color: var(--plum);
  font-family: var(--font-caps);
  font-weight: 700;
  font-size: 15px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  box-shadow: 3px 3px 0 var(--plum);
  cursor: pointer;
}

.yo__ctrl--play {
  justify-content: center;
  padding: 0;
  background: var(--cream);
}

.yo__ctrl:focus-visible {
  outline: 3px solid var(--green);
  outline-offset: 2px;
}

/* Play/pause icon swap */
.yo__icon-pause { display: none; }
.yo.is-playing .yo__icon-play { display: none; }
.yo.is-playing .yo__icon-pause { display: block; }

/* Sound icon: waves when on, an X when muted */
.yo__wave { display: none; }
.yo.has-sound .yo__wave { display: block; }
.yo.has-sound .yo__mute { display: none; }
.yo.has-sound .yo__ctrl--sound { background: var(--green); }

@media (max-width: 640px) {
  .yo { padding: 72px 20px 88px; }
  .yo__frame { transform: none; flex-basis: 100%; max-width: 360px; }
}

@media (prefers-reduced-motion: reduce) {
  .yo__btn { transition: none; }
}
