/* Tokens follow the website's Market Intelligence palette (stone + brand teal). */

@font-face {
  font-family: 'Neufile Grotesk';
  src: url('/fonts/neufile-grotesk-medium.latin.woff2') format('woff2');
  font-weight: 100 549;
  font-display: swap;
}

@font-face {
  font-family: 'Neufile Grotesk';
  src: url('/fonts/neufile-grotesk-semibold.latin.woff2') format('woff2');
  font-weight: 550 900;
  font-display: swap;
}

@font-face {
  font-family: Inter;
  src: url('/fonts/inter-latin-400-normal.woff2') format('woff2');
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: Inter;
  src: url('/fonts/inter-latin-500-normal.woff2') format('woff2');
  font-weight: 500;
  font-display: swap;
}

@font-face {
  font-family: Inter;
  src: url('/fonts/inter-latin-600-normal.woff2') format('woff2');
  font-weight: 600;
  font-display: swap;
}

:root {
  --brand: #00806c;
  --brand-hover: #006e5d;
  --brand-2: #254844;
  --accent: #b45309;
  --accent-hover: #92400e;
  --bg: #fafaf9;
  --bg-deep: #f5f5f4;
  --card: #ffffff;
  --text: #1c1917;
  --muted: #57534e;
  --faint: #a8a29e;
  --line: #e7e5e4;
  --band-bg: #254844;
  --band-text: #fafaf9;
  --band-muted: #c9d6d3;
  --decline: #b91c1c;
  --font-sans: Inter, system-ui, -apple-system, 'Segoe UI', Arial, sans-serif;
  --font-heading: 'Neufile Grotesk', Inter, system-ui, sans-serif;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #1c1917;
    --bg-deep: #171412;
    --card: #24201e;
    --text: #fafaf9;
    --muted: #a8a29e;
    --faint: #78716c;
    --line: #3a3532;
    --band-bg: #1f3d3a;
    --band-muted: #b4c7c3;
    --decline: #f87171;
    color-scheme: dark;
  }
}

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 17px / 1.6 var(--font-sans);
  -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3 {
  font-family: var(--font-heading);
  font-weight: 600;
}

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

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

.wrap {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 24px;
}

.narrow {
  max-width: 720px;
}

.muted {
  color: var(--muted);
}

/* Header and footer */

.lockup {
  display: inline-flex;
  align-items: center;
  gap: 12px;
}

.lockup svg {
  flex: none;
}

.lockup .name {
  display: block;
  font: 600 16px / 1.1 var(--font-heading);
  letter-spacing: 0.04em;
}

.lockup .claim {
  display: block;
  font-size: 12px;
  line-height: 1.3;
  color: var(--muted);
  margin-top: 2px;
}

.home {
  color: inherit;
  text-decoration: none;
}

header.top {
  position: sticky;
  top: 0;
  z-index: 20;
  background: color-mix(in srgb, var(--bg) 92%, transparent);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}

header.top .wrap,
footer .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-top: 16px;
  padding-bottom: 16px;
}

.top-right {
  display: flex;
  align-items: center;
  gap: 18px;
}

.top-right .tag {
  color: var(--muted);
  font-size: 14px;
}

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

footer a {
  color: var(--muted);
  font-size: 14px;
  text-decoration: none;
}

/* Buttons */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font: 600 16px / 1 var(--font-sans);
  padding: 15px 22px;
  border-radius: 8px;
  border: 1px solid var(--brand);
  background: var(--brand);
  color: #fff;
  text-decoration: none;
  cursor: pointer;
  white-space: nowrap;
}

.btn:hover {
  background: var(--brand-hover);
  border-color: var(--brand-hover);
}

.btn.sm {
  padding: 11px 16px;
  font-size: 15px;
}

.btn.accent {
  background: var(--accent);
  border-color: var(--accent);
}

.btn.accent:hover {
  background: var(--accent-hover);
  border-color: var(--accent-hover);
}

.btn.ghost {
  background: transparent;
  color: var(--text);
  border-color: var(--line);
}

.btn.ghost:hover {
  border-color: var(--muted);
}

.btn:disabled {
  opacity: 0.45;
  cursor: default;
}

/* Hero */

.hero {
  padding: 32px 0 56px;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
  gap: 28px 56px;
  align-items: center;
}

.twenty {
  font: 600 clamp(9rem, 26vw, 21rem) / 0.78 var(--font-heading);
  letter-spacing: -0.06em;
  margin-left: -0.04em;
  color: var(--brand);
  background-image: radial-gradient(circle at center, var(--brand) 0 2.1px, transparent 2.4px);
  background-size: 7px 7px;
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  user-select: none;
}

.years {
  display: flex;
  justify-content: space-between;
  max-width: 34rem;
  margin-top: 18px;
  padding-top: 10px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 14px;
  font-variant-numeric: tabular-nums;
}

.kicker {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 14px;
  font: 500 clamp(1.1rem, 1.6vw, 1.3rem) / 1.3 var(--font-heading);
  color: var(--brand);
}

.kicker::before {
  content: '';
  width: 28px;
  height: 1.5px;
  background: var(--brand);
}

.hero h1 {
  font-size: clamp(2.1rem, 4.2vw, 3.3rem);
  line-height: 1.04;
  letter-spacing: -0.015em;
  margin: 0 0 14px;
}

.spin {
  font: 500 clamp(1.1rem, 1.6vw, 1.3rem) / 1.35 var(--font-heading);
  margin: 0 0 16px;
}

.spin span {
  display: block;
}

.lead {
  color: var(--muted);
  font-size: 16px;
  max-width: 36rem;
  margin: 0 0 22px;
}

.event {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 18px 24px;
  padding: 20px 22px;
  border: 1px solid var(--line);
  border-left: 3px solid var(--brand);
  border-radius: 10px;
  background: var(--card);
}

.event .day {
  font: 600 clamp(1.25rem, 2vw, 1.5rem) / 1.2 var(--font-heading);
  margin: 0 0 4px;
}

.event .meta {
  margin: 0;
  color: var(--muted);
  font-size: 15px;
}

.event .meta b {
  color: var(--text);
  font-weight: 500;
}

@media (prefers-reduced-motion: no-preference) {
  .twenty {
    animation: dots 1.4s cubic-bezier(0.2, 0.7, 0.2, 1) both;
  }

  @keyframes dots {
    from {
      background-size: 2px 2px;
      opacity: 0.2;
    }
    to {
      background-size: 7px 7px;
      opacity: 1;
    }
  }
}

/* Thank-you band */

.band {
  position: relative;
  overflow: hidden;
  padding: 56px 0;
  background: var(--band-bg);
  color: var(--band-text);
}

.band::after {
  content: '';
  position: absolute;
  right: -60px;
  top: -40px;
  width: 460px;
  height: 460px;
  pointer-events: none;
  background-image: radial-gradient(
    circle at center,
    rgb(0 128 108 / 0.9) 0 2px,
    transparent 2.3px
  );
  background-size: 9px 9px;
  mask-image: radial-gradient(circle at 70% 30%, #000 0, transparent 68%);
}

.band .wrap {
  position: relative;
  z-index: 1;
}

.band-grid,
.rsvp-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
  gap: 32px 56px;
  align-items: center;
}

.band-kicker {
  color: var(--band-muted);
  font-size: 15px;
  margin: 0 0 14px;
}

.band h2,
.section h2 {
  font-size: clamp(1.6rem, 2.8vw, 2.2rem);
  line-height: 1.1;
  letter-spacing: -0.01em;
  margin: 0 0 16px;
}

.band p {
  color: var(--band-muted);
  margin: 0 0 16px;
}

.band p strong {
  color: var(--band-text);
  font-weight: 500;
}

.preview {
  margin: 0;
}

.browser {
  border-radius: 10px;
  overflow: hidden;
  background: #fafaf9;
  border: 1px solid rgb(255 255 255 / 0.18);
  mask-image: linear-gradient(to bottom, #000 72%, transparent 100%);
}

.browser .bar {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 10px 14px;
  background: #f5f5f4;
  border-bottom: 1px solid #e7e5e4;
}

.browser .bar i {
  display: block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #d6d3d1;
}

.browser .bar span {
  flex: 1;
  text-align: center;
  font-size: 12px;
  color: #57534e;
  margin-right: 44px;
}

.browser img {
  display: block;
  width: 100%;
  height: auto;
}

/* Sections, RSVP */

.section {
  padding: 56px 0 64px;
}

.rsvp {
  scroll-margin-top: 80px;
}

.rsvp-grid {
  align-items: start;
}

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 24px 26px;
}

.field {
  margin-bottom: 16px;
}

.field label,
.field .label {
  display: block;
  font-size: 14px;
  font-weight: 500;
  margin-bottom: 7px;
}

.opt {
  color: var(--faint);
  font-weight: 400;
}

input[type='text'],
input[type='email'],
input[type='number'],
select,
textarea {
  width: 100%;
  font: 400 16px / 1.4 var(--font-sans);
  color: var(--text);
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 13px;
}

input:focus,
select:focus,
textarea:focus {
  outline: 2px solid var(--brand);
  outline-offset: 0;
  border-color: transparent;
}

textarea {
  min-height: 72px;
  resize: vertical;
}

.choice {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.choice input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.field .choice label {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  padding: 11px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--bg);
  font-size: 15px;
  cursor: pointer;
}

.choice label::before {
  content: '';
  flex: none;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 1.5px solid var(--faint);
}

.choice input:checked + label {
  border-color: var(--brand);
  background: color-mix(in srgb, var(--brand) 7%, var(--card));
}

.choice input:checked + label::before {
  border: 5px solid var(--brand);
}

.choice input:focus-visible + label {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
}

/* Companions only matter for a yes; hidden without JS via :has(). */
form:has(#att-no:checked) .when-accepted {
  display: none;
}

.done .mark {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--brand);
  margin-bottom: 20px;
}

.done h3 {
  font-size: 1.6rem;
  line-height: 1.15;
  margin: 0 0 10px;
}

.done p {
  color: var(--muted);
  margin: 0 0 22px;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}

@media (max-width: 860px) {
  .hero-grid,
  .band-grid,
  .rsvp-grid {
    grid-template-columns: 1fr;
  }

  .twenty {
    font-size: clamp(7rem, 40vw, 12rem);
  }

  .band,
  .section {
    padding: 44px 0;
  }

  .card {
    padding: 20px;
  }
}

@media (max-width: 600px) {
  .wrap {
    padding: 0 16px;
  }

  .top-right .tag,
  .lockup .claim {
    display: none;
  }

  .event {
    grid-template-columns: 1fr;
  }

  .event .btn {
    width: 100%;
  }

  .choice {
    grid-template-columns: 1fr;
  }
}

/* Admin */

.admin {
  padding-top: 32px;
  padding-bottom: 64px;
  font-size: 15px;
}

.admin h1 {
  font-size: 1.8rem;
  margin: 0 0 4px;
}

.admin h2 {
  font-size: 1.2rem;
  margin: 0 0 12px;
}

.notice {
  padding: 12px 16px;
  margin: 20px 0;
  border: 1px solid var(--line);
  border-left: 3px solid var(--brand);
  border-radius: 8px;
  background: var(--card);
}

.stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin: 24px 0;
}

.stat {
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--card);
}

.stat .v {
  font: 600 2rem / 1 var(--font-heading);
}

.stat .v.teal {
  color: var(--brand);
}

.stat .k {
  margin-top: 6px;
  color: var(--muted);
  font-size: 13px;
}

.admin-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.admin-grid form {
  display: grid;
  gap: 10px;
}

.inline {
  display: inline;
}

.tbl-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--card);
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

th,
td {
  padding: 10px 14px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

th {
  font-weight: 500;
  color: var(--muted);
  background: var(--bg-deep);
  white-space: nowrap;
}

tr:last-child td {
  border-bottom: 0;
}

td.n {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.pill {
  display: inline-block;
  padding: 2px 8px;
  border: 1px solid var(--line);
  border-radius: 6px;
  font-size: 12px;
  font-weight: 500;
  white-space: nowrap;
}

.pill.accepted {
  color: var(--brand);
  border-color: color-mix(in srgb, var(--brand) 40%, transparent);
}

.pill.declined {
  color: var(--decline);
}

.row-actions {
  display: flex;
  gap: 6px;
  white-space: nowrap;
}

.row-actions .btn {
  padding: 6px 10px;
  font-size: 13px;
}

@media (max-width: 860px) {
  .stats,
  .admin-grid {
    grid-template-columns: 1fr 1fr;
  }

  .admin-grid {
    grid-template-columns: 1fr;
  }
}
