@font-face {
  font-family: "Kepler Std";
  src: url("../fonts/KeplerStd-LightDisplay.otf") format("opentype");
  font-weight: 300;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Neue Haas Grotesk";
  src: url("../fonts/NeueHaasGrotDisp-45Light.otf") format("opentype");
  font-weight: 300;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Neue Haas Grotesk";
  src: url("../fonts/NeueHaasGrotText-55Roman.otf") format("opentype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Neue Haas Grotesk";
  src: url("../fonts/NeueHaasGrotText-65Medium.otf") format("opentype");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Neue Haas Grotesk";
  src: url("../fonts/NeueHaasGrotText-75Bold.otf") format("opentype");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

:root {
  --paper: #f3f0eb;
  --ink: #0a0a0a;
  --mute: #6b6b6b;
  --chartreuse: #d2d07b;
  --hairline: #e5e5e5;
  --danger: #b42318;
  --display: "Kepler Std", "Bodoni Moda", "Didot", Georgia, serif;
  --sans: "Neue Haas Grotesk", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --space: clamp(1rem, 2vw, 2rem);
  --max: 1120px;
}

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

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-weight: 400;
  line-height: 1.45;
  min-height: 100vh;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: inherit;
}

.eyebrow {
  margin: 0 0 0.75rem;
  font-size: 0.75rem;
  font-weight: 300;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--mute);
}

.eyebrow a {
  text-decoration: none;
}

.meta-label {
  display: block;
  font-size: 0.6875rem;
  font-weight: 300;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--mute);
  margin-bottom: 0.35rem;
}

.meta-value {
  display: block;
  font-size: 1rem;
  font-weight: 500;
}

.meta-item + .meta-item {
  margin-top: 1.25rem;
}

.section-title {
  font-family: var(--display);
  font-weight: 300;
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  margin: 0 0 1.5rem;
}

.btn {
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  border: 1px solid var(--ink);
  background: transparent;
  color: var(--ink);
  font-family: var(--sans);
  font-size: 0.875rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  text-decoration: none;
  padding: 0.9rem 1.35rem;
  cursor: pointer;
  transition: background 160ms ease, color 160ms ease;
}

.btn-primary {
  background: var(--ink);
  color: var(--paper);
}

.btn-primary:hover,
.btn-primary:focus-visible {
  background: #222;
}

.btn-ghost {
  border-color: transparent;
  text-decoration: underline;
  text-underline-offset: 0.25em;
  padding-left: 0;
  padding-right: 0;
}

.btn-ghost:hover,
.btn-ghost:focus-visible {
  color: var(--mute);
}

.text-link {
  text-decoration: underline;
  text-underline-offset: 0.2em;
}

.mute,
.optional {
  color: var(--mute);
  font-weight: 400;
}

.flash-wrap {
  position: sticky;
  top: 0;
  z-index: 20;
  padding: 0.75rem var(--space);
  background: var(--paper);
  border-bottom: 1px solid var(--hairline);
}

.flash-error,
.form-error {
  color: var(--danger);
  margin: 0 0 1rem;
  padding: 0;
  list-style: disc;
}

/* —— Home / ticket hero —— */
.page-home {
  min-height: 100dvh;
}

.ticket-hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: auto minmax(0, 1fr);
  height: 100dvh;
  max-width: 1400px;
  margin: 0 auto;
  overflow: hidden;
}

.ticket-hero__copy {
  padding: clamp(1.5rem, 4vw, 3rem) var(--space) 1.25rem;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  animation: rise 700ms ease both;
}

.scroll-hint {
  position: absolute;
  left: 50%;
  bottom: 1.1rem;
  z-index: 2;
  margin: 0;
  transform: translateX(-50%);
  font-size: 0.6875rem;
  font-weight: 300;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--paper);
  text-shadow: 0 1px 8px rgb(0 0 0 / 45%);
}

.scroll-hint a {
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
}

.scroll-hint a::after {
  content: "";
  width: 5px;
  height: 5px;
  border-right: 1px solid currentColor;
  border-bottom: 1px solid currentColor;
  transform: rotate(45deg);
  opacity: 0.75;
}

.ticket-hero__details {
  display: none;
}

.display-date {
  font-family: var(--display);
  font-weight: 300;
  font-size: clamp(2.75rem, 9vw, 5.5rem);
  line-height: 0.95;
  margin: 0 0 0.35rem;
  letter-spacing: -0.02em;
}

.display-time {
  font-family: var(--display);
  font-weight: 300;
  font-size: clamp(2rem, 6vw, 3.5rem);
  margin: 0 0 1.5rem;
  line-height: 1;
}

.display-time__meridiem {
  font-size: 0.4em;
  letter-spacing: 0.08em;
  margin-left: 0.15em;
  top: -0.85em;
}

.invite-blurb {
  max-width: 28rem;
  margin: 0 0 1.75rem;
  color: var(--ink);
  font-size: 0.95rem;
}

.hero-actions {
  margin: 0;
}

.ticket-hero__visual {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 12px;
  align-items: stretch;
  min-height: 0;
  animation: fade 900ms ease both;
}

.ticket-photo {
  margin: 0;
  background: var(--hairline);
  overflow: hidden;
  min-height: 0;
  height: 100%;
}

.ticket-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.ticket-rail {
  background: var(--chartreuse);
  width: 12px;
  transform-origin: top;
  animation: rail 900ms ease both;
}

.ticket-stub {
  display: none;
}

.details {
  max-width: var(--max);
  margin: 0 auto;
  padding: clamp(1.5rem, 4vw, 3rem) var(--space);
  border-top: 1px solid var(--hairline);
}

.details-grid {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: 1fr;
}

.details-cta {
  margin-top: 2.5rem;
}

@media (min-width: 900px) {
  body.page-home {
    height: 100dvh;
    overflow: hidden;
  }

  .page-home main {
    height: 100dvh;
    overflow: hidden;
  }

  .ticket-hero {
    grid-template-columns: minmax(300px, 0.85fr) minmax(0, 1.35fr);
    grid-template-rows: 1fr;
    height: 100dvh;
    min-height: 0;
    max-width: none;
    overflow: hidden;
  }

  .ticket-hero__copy {
    height: 100dvh;
    justify-content: flex-start;
    padding: clamp(2rem, 4vw, 3.5rem);
    overflow: auto;
  }

  .scroll-hint {
    display: none;
  }

  .ticket-hero__intro {
    flex: 0 0 auto;
  }

  .ticket-hero__details {
    display: grid;
    gap: 1.1rem;
    margin-top: 1.75rem;
    flex: 0 0 auto;
    align-content: start;
  }

  .ticket-hero__details .meta-item + .meta-item {
    margin-top: 0;
  }

  .ticket-hero__details .meta-value {
    font-size: 0.95rem;
  }

  .invite-blurb {
    margin-bottom: 0;
  }

  .hero-actions {
    display: block;
    margin-top: 2rem;
    padding-top: 0;
    flex: 0 0 auto;
  }

  .ticket-hero__visual {
    grid-template-columns: minmax(0, 1fr) 14px minmax(110px, 0.22fr);
    height: 100dvh;
    min-height: 0;
  }

  .ticket-photo {
    min-height: 0;
    height: 100%;
  }

  .ticket-stub {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: 2rem 1rem;
    background: var(--paper);
  }

  .stub-mark {
    writing-mode: vertical-rl;
    transform: rotate(180deg);
    font-size: 0.7rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--mute);
    font-weight: 300;
    margin: 0;
  }

  .details--mobile {
    display: none;
  }
}

/* —— RSVP flow —— */
.flow,
.admin {
  max-width: 640px;
  margin: 0 auto;
  padding: clamp(1.5rem, 4vw, 3rem) var(--space) 4rem;
}

.admin {
  max-width: 880px;
}

.flow-header {
  margin-bottom: 1.75rem;
  animation: rise 500ms ease both;
}

.flow-title {
  font-family: var(--display);
  font-weight: 300;
  font-size: clamp(2.25rem, 7vw, 3.25rem);
  line-height: 1;
  margin: 0 0 0.75rem;
}

.flow-lede {
  margin: 0;
  color: var(--mute);
}

.panel {
  border-top: 1px solid var(--hairline);
  padding-top: 1.5rem;
  animation: rise 600ms ease both;
}

.confirm-header::before {
  content: "";
  display: block;
  width: 14px;
  height: 64px;
  background: var(--chartreuse);
  margin-bottom: 1.25rem;
}

.field {
  display: block;
  margin-bottom: 1.25rem;
}

.field input,
.field textarea,
.member-row input[type="text"] {
  width: 100%;
  border: 0;
  border-bottom: 1px solid var(--ink);
  border-radius: 0;
  background: transparent;
  font: inherit;
  font-size: 1.05rem;
  padding: 0.65rem 0;
  color: var(--ink);
}

.field input:focus,
.field textarea:focus,
.member-row input[type="text"]:focus {
  outline: none;
  border-bottom-color: var(--chartreuse);
  box-shadow: 0 1px 0 var(--chartreuse);
}

.party-list {
  display: grid;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.party-card {
  border: 1px solid var(--hairline);
  padding: 1.25rem;
  margin: 0;
}

.party-card__name {
  font-family: var(--display);
  font-weight: 300;
  font-size: 1.75rem;
  margin: 0 0 0.5rem;
}

.party-card__members {
  margin: 0 0 1.25rem;
  color: var(--mute);
}

.escape-form {
  margin-top: 0.5rem;
}

.empty-note {
  color: var(--mute);
}

.member-fields {
  border: 0;
  padding: 0;
  margin: 0 0 1.5rem;
}

.member-row {
  display: block;
  margin-bottom: 0.75rem;
}

.check,
.radio {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.95rem;
  cursor: pointer;
}

.attendance-list {
  list-style: none;
  padding: 0;
  margin: 0 0 1.5rem;
}

.attendance-row {
  display: grid;
  gap: 0.75rem;
  padding: 1rem 0;
  border-bottom: 1px solid var(--hairline);
}

.attendance-name {
  font-weight: 500;
}

.radio-group {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 1.5rem;
}

.radio-group.stacked {
  flex-direction: column;
  margin-bottom: 1.25rem;
}

.decline-fast {
  margin: 0 0 1rem;
}

.plus-one-details {
  margin-bottom: 1rem;
}

.confirm-list {
  list-style: none;
  padding: 0;
  margin: 0 0 1.25rem;
}

.confirm-list li {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.65rem 0;
  border-bottom: 1px solid var(--hairline);
}

.confirm-message {
  margin: 0.35rem 0 1rem;
}

.flow-footer {
  margin-top: 2rem;
}

/* —— Admin —— */
.admin-header {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1rem;
  align-items: flex-end;
  margin-bottom: 1.5rem;
}

.summary-strip {
  border-top: 1px solid var(--hairline);
  border-bottom: 1px solid var(--hairline);
  padding: 1.25rem 0;
  margin-bottom: 2rem;
}

.summary-line {
  font-size: clamp(1.15rem, 3vw, 1.5rem);
  margin: 0;
}

.summary-sub {
  margin: 0.35rem 0 0;
  color: var(--mute);
}

.admin-section {
  margin-bottom: 2.5rem;
}

.nag-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.nag-list li {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: flex-start;
  padding: 1rem 0;
  border-bottom: 1px solid var(--hairline);
}

.nag-members {
  margin: 0.25rem 0 0;
  color: var(--mute);
  font-size: 0.95rem;
}

.tag {
  display: inline-block;
  margin-left: 0.4rem;
  font-size: 0.65rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--mute);
  border: 1px solid var(--hairline);
  padding: 0.1rem 0.35rem;
  vertical-align: middle;
}

.party-table {
  border-top: 1px solid var(--hairline);
}

.party-row {
  border-bottom: 1px solid var(--hairline);
}

.party-row > summary {
  list-style: none;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.35rem 1rem;
  padding: 1rem 0;
  cursor: pointer;
}

.party-row > summary::-webkit-details-marker {
  display: none;
}

.party-row__name {
  font-weight: 500;
}

.party-row__date {
  grid-column: 2;
  grid-row: 1 / span 2;
  color: var(--mute);
  font-size: 0.9rem;
  align-self: center;
}

.status {
  font-size: 0.85rem;
  color: var(--mute);
}

.status-coming {
  color: var(--ink);
}

.party-row__detail {
  padding: 0 0 1.25rem;
}

@media (min-width: 700px) {
  .attendance-row {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
  }

  .party-row > summary {
    grid-template-columns: 1fr auto auto;
    align-items: center;
  }

  .party-row__date {
    grid-column: auto;
    grid-row: auto;
  }
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes fade {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes rail {
  from {
    transform: scaleY(0);
  }
  to {
    transform: scaleY(1);
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}
