:root {
  --bg: #f5ede0;
  --ink: #222;
  --blush: #f6c5be;
  --hairline: rgba(34, 34, 34, 0.22);
  --hairline-soft: rgba(34, 34, 34, 0.35);
  --well: #fbf5ec;
  --rule: rgba(34, 34, 34, 0.3);
  /* high-contrast serif to echo the wordmark; Arial stays for UI and body */
  --display: "Didot", "Bodoni MT", "Playfair Display", "Hoefler Text", Garamond, Georgia, serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  background: var(--bg);
  color: var(--ink);
  font-family: Arial, Helvetica, sans-serif;
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}

/* ---------- corner link ---------- */

.cta-row {
  display: flex;
  gap: 20px;
  justify-content: center;
  flex-wrap: wrap;
}

/* uniform button width; padding absorbs the label-length difference */
.cta-row .button {
  width: 280px;
  padding-left: 0;
  padding-right: 0;
  text-align: center;
}

/* ---------- centered card ---------- */

main {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 72px 24px 32px;
}

.hero-logo {
  width: min(800px, 92vw);
  height: auto;
  display: block;
  margin-top: -36px;
  margin-bottom: 40px;
  /* the JPEG's cream isn't an exact match for the page background */
  mix-blend-mode: multiply;
}

.eyebrow {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.55em;
  margin-bottom: 22px;
  color: rgba(34, 34, 34, 0.65);
}

h1 {
  font-family: var(--display);
  font-size: clamp(22px, 2.8vw, 32px);
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.24em;
  line-height: 1.5;
  margin-bottom: 20px;
}

/* signature: titles open out like a port de bras on load */
.track-open {
  animation: track-open 1.4s cubic-bezier(0.19, 1, 0.22, 1) both;
}

.eyebrow.track-open { animation-delay: 0.15s; }

@keyframes track-open {
  from { letter-spacing: 0.02em; opacity: 0; }
  to   { opacity: 1; }
}

.lede {
  max-width: 72ch;
  margin-bottom: 36px;
  font-size: 16px;
}

.button-note {
  margin-top: 16px;
  font-size: 13px;
  color: rgba(34, 34, 34, 0.55);
}

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

.button {
  display: inline-block;
  font: inherit;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.35em;
  text-indent: 0.35em; /* optically recenters wide-tracked text */
  color: var(--ink);
  background: #f4dcd0;
  border: 1px solid #f4dcd0;
  padding: 16px 36px;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.25s ease, border-color 0.25s ease, transform 0.25s ease;
}

.button:hover {
  background: var(--blush);
  border-color: var(--blush);
  transform: translateY(-2px);
}

.button:active { transform: translateY(0); }

.button:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 4px;
}

.button:disabled {
  opacity: 0.5;
  cursor: default;
}

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

footer {
  padding: 24px;
  border-top: 1px solid var(--hairline);
}

.contact-row {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px 56px;
  font-size: 13.5px;
}

.contact-row svg {
  width: 15px;
  height: 15px;
  fill: none;
  stroke: rgba(34, 34, 34, 0.55);
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex-shrink: 0;
}

footer a {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color 0.25s ease, transform 0.25s ease;
}

footer a:hover {
  border-bottom-color: var(--blush);
}

footer a:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 3px;
}

/* ---------- modal ---------- */

dialog {
  border: 1px solid var(--hairline);
  background: var(--bg);
  color: var(--ink);
  padding: 42px 38px 34px;
  width: min(480px, calc(100vw - 32px));
  margin: auto;
  position: relative;
}

dialog::backdrop {
  background: rgba(34, 34, 34, 0.45);
}

dialog h2 {
  font-family: var(--display);
  font-size: 19px;
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.34em;
  text-align: center;
  margin-bottom: 8px;
}

dialog h2::after {
  content: "";
  display: block;
  width: 40px;
  height: 3px;
  background: var(--blush);
  margin: 18px auto 26px;
}

.field { margin-bottom: 28px; text-align: left; }

/* first/last name sit side by side, stacking on narrow screens */
.field-row {
  display: flex;
  gap: 20px;
}

.field-row .field { flex: 1; min-width: 0; }

label {
  display: block;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.35em;
  margin-bottom: 8px;
  color: rgba(34, 34, 34, 0.7);
}

input:not(.hp) {
  width: 100%;
  font: inherit;
  color: var(--ink);
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--hairline-soft);
  border-radius: 0;
  padding: 6px 2px 8px;
  transition: border-color 0.25s ease;
}

input:not(.hp):focus {
  outline: none;
  border-bottom: 1px solid var(--ink);
  box-shadow: 0 1px 0 var(--ink);
}

input:not(.hp):focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 4px;
}

.hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  opacity: 0;
}

dialog form .button {
  display: block;
  margin: 4px auto 0;
}

.form-status {
  min-height: 1.65em;
  margin-top: 18px;
  text-align: center;
  font-size: 14px;
}

.form-status.error { color: #a03d30; }

.form-status.success::before {
  content: "";
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--blush);
  margin-right: 10px;
  vertical-align: 1px;
}

.modal-close {
  position: absolute;
  top: 10px;
  right: 14px;
  font: inherit;
  font-size: 22px;
  line-height: 1;
  background: none;
  border: 0;
  color: rgba(34, 34, 34, 0.55);
  cursor: pointer;
  padding: 8px;
}

.modal-close:hover { color: var(--ink); }
.modal-close { transition: color 0.25s ease; }

.modal-close:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 2px;
}

/* ---------- kiosk signup page (/mailinglist) ----------
   Filled at an event table on a shared phone or tablet: large targets,
   nothing smaller than 16px (iOS zooms below that), and a confirmation
   that clears itself for the next family in line. */

.page-form {
  justify-content: flex-start;
  padding: 40px 24px 40px;
}

.hero-logo--sm {
  width: min(360px, 70vw);
  margin-top: 0;
  margin-bottom: 20px;
}

.kiosk h1 { margin-bottom: 12px; }
.kiosk .lede { margin-bottom: 0; font-size: 15px; }

.form-card {
  width: min(520px, calc(100vw - 32px));
  border: 1px solid var(--hairline);
  padding: 36px 36px 30px;
  margin-top: 28px;
  text-align: left;
}

.kiosk .field,
dialog .field { margin-bottom: 20px; }

.kiosk label,
.kiosk fieldset.ages legend,
dialog label {
  display: block;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  margin-bottom: 7px;
  color: rgba(34, 34, 34, 0.7);
}

/* a tinted well reads as tappable where a hairline underline does not */
.kiosk input:not(.hp),
dialog input:not(.hp) {
  font-size: 17px;
  min-height: 54px;
  background: var(--well);
  border: 1px solid transparent;
  border-bottom: 1px solid var(--rule);
  padding: 10px 14px;
}

.kiosk input:not(.hp):focus,
dialog input:not(.hp):focus {
  border-bottom: 1px solid var(--ink);
  box-shadow: none;
  background: #fff;
}

.kiosk input:not(.hp):focus-visible,
dialog input:not(.hp):focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 2px;
}

.optional {
  text-transform: none;
  letter-spacing: 0.04em;
  color: rgba(34, 34, 34, 0.62);
}

fieldset.ages {
  border: 0;
  padding: 0;
  margin-bottom: 26px;
}

.age-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
}

.age-row .age-input { width: 110px; flex-shrink: 0; }

.button--lg {
  display: block;
  width: 100%;
  padding: 20px 24px;
  font-size: 13px;
  margin: 6px 0 0;
}

.link-button {
  font: inherit;
  font-size: 14px;
  letter-spacing: 0.04em;
  background: none;
  border: 0;
  padding: 10px 2px;
  min-height: 44px;
  color: rgba(34, 34, 34, 0.7);
  cursor: pointer;
  border-bottom: 1px solid transparent;
  transition: color 0.25s ease, border-color 0.25s ease;
}

.link-button:hover {
  color: var(--ink);
  border-bottom-color: var(--blush);
}

.link-button:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 3px;
}

.link-button[hidden] { display: none; }

.remove-age { flex-shrink: 0; }

.kiosk .form-status,
dialog .form-status { font-size: 15px; margin-top: 12px; }

.kiosk .button-note a {
  color: rgba(34, 34, 34, 0.55);
  text-decoration: none;
  border-bottom: 1px solid transparent;
}

.kiosk .button-note a:hover { border-bottom-color: var(--blush); }

/* ---------- confirmation ---------- */

.confirm { text-align: center; padding: 12px 0 4px; }

.confirm-mark {
  width: 46px;
  height: 46px;
  margin: 0 auto 22px;
  border-radius: 50%;
  background: var(--blush);
  position: relative;
}

.confirm-mark::after {
  content: "";
  position: absolute;
  top: 14px;
  left: 16px;
  width: 12px;
  height: 20px;
  border: solid var(--ink);
  border-width: 0 1.5px 1.5px 0;
  transform: rotate(45deg);
}

.confirm-title {
  font-family: var(--display);
  font-size: 20px;
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.22em;
  line-height: 1.5;
  margin-bottom: 10px;
}

/* inside the dialog, beat the generic `dialog h2` rule and drop its blush rule
   — the check mark above already does that job */
dialog .confirm-title {
  font-size: 20px;
  letter-spacing: 0.22em;
  margin-bottom: 10px;
}

dialog .confirm-title::after { content: none; }

.confirm-note {
  font-size: 15px;
  color: rgba(34, 34, 34, 0.6);
  margin-bottom: 28px;
}

/* the studio's blush rule, depleting toward the next blank form */
.confirm-timer {
  height: 3px;
  background: var(--hairline);
  margin-top: 22px;
}

.confirm-timer span {
  display: block;
  height: 100%;
  background: var(--blush);
  transform-origin: left center;
  animation: deplete 8s linear both;
}

@keyframes deplete {
  from { transform: scaleX(1); }
  to   { transform: scaleX(0); }
}

/* ---------- responsive ---------- */

@media (max-width: 560px) {
  main { padding-top: 48px; }
  .form-card { padding: 28px 20px 24px; margin-top: 22px; }
  .field-row { flex-direction: column; gap: 0; }
  /* keep the first fields above the fold on a phone at the sign-up table */
  .page-form { padding-top: 22px; }
  .hero-logo--sm { width: min(230px, 58vw); margin-bottom: 12px; }
  .kiosk h1 { font-size: 16px; letter-spacing: 0.22em; margin-bottom: 8px; }
  .kiosk .lede { font-size: 14px; }
  .hero-logo { margin-bottom: 32px; }
  .cta-row { flex-direction: column; gap: 14px; width: 100%; max-width: 320px; }
  .cta-row .button { width: 100%; }
  .contact-row { gap: 12px 24px; font-size: 12.5px; }
}

/* ---------- reduced motion / static QA ---------- */

@media (prefers-reduced-motion: reduce) {
  .track-open { animation: none; }
  .button:hover { transform: none; }
  .confirm-timer span { animation: none; transform: scaleX(1); }
}

html.static .track-open { animation: none; }
html.static .confirm-timer span { animation: none; }
