:root {
  --cream: #f8f1e7;
  --paper: #fffdf9;
  --ink: #28372f;
  --muted: #6e766f;
  --orange: #e9683f;
  --orange-dark: #ca4d29;
  --yellow: #f4b942;
  --sage: #b8c6aa;
  --blue: #b8d4db;
  --line: rgba(40, 55, 47, 0.14);
  --shadow: 0 22px 70px rgba(63, 48, 31, 0.12);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--cream);
  font-family: Inter, Avenir, "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}

button,
input {
  font: inherit;
}

a {
  color: inherit;
}

.hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(320px, 0.85fr);
  min-height: 680px;
  overflow: hidden;
  background:
    radial-gradient(circle at 75% 16%, rgba(255,255,255,.48) 0 2px, transparent 3px),
    radial-gradient(circle at 91% 38%, rgba(255,255,255,.48) 0 2px, transparent 3px),
    #f0b653;
}

.hero::after {
  content: "";
  position: absolute;
  right: -8%;
  bottom: -27%;
  width: 58%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: #e76b44;
}

.hero-content {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  justify-content: center;
  max-width: 760px;
  padding: 84px clamp(32px, 7vw, 120px);
}

.eyebrow {
  margin: 0 0 14px;
  color: var(--orange-dark);
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .17em;
  text-transform: uppercase;
}

.hero .eyebrow {
  color: var(--ink);
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1,
h2 {
  font-family: "Playfair Display", Georgia, serif;
}

.hero h1 {
  max-width: 650px;
  margin-bottom: 26px;
  font-size: clamp(3.7rem, 6.5vw, 6.8rem);
  line-height: .92;
  letter-spacing: -.055em;
}

.hero h1 em {
  color: var(--paper);
  font-weight: 700;
}

.intro {
  max-width: 585px;
  margin-bottom: 38px;
  font-size: clamp(1.05rem, 1.5vw, 1.25rem);
  line-height: 1.7;
}

.date-card {
  display: flex;
  align-items: center;
  align-self: flex-start;
  gap: 20px;
  padding: 16px 22px 16px 16px;
  border: 1px solid rgba(40, 55, 47, .14);
  border-radius: 18px;
  background: rgba(255, 253, 249, .78);
  box-shadow: 0 12px 35px rgba(73, 46, 23, .1);
  backdrop-filter: blur(9px);
}

.calendar {
  display: grid;
  width: 64px;
  overflow: hidden;
  border-radius: 11px;
  background: var(--paper);
  text-align: center;
}

.calendar-month {
  padding: 4px;
  color: white;
  background: var(--orange);
  font-size: .68rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.calendar strong {
  padding: 5px;
  font-family: "Playfair Display", serif;
  font-size: 1.65rem;
}

.date-copy {
  display: grid;
  gap: 4px;
}

.date-copy span {
  color: var(--muted);
  font-size: .86rem;
}

.hero-art {
  position: relative;
  z-index: 2;
  display: grid;
  place-items: center;
}

.sun {
  position: absolute;
  top: 8%;
  right: 13%;
  width: 92px;
  height: 92px;
  border: 2px solid rgba(40,55,47,.55);
  border-radius: 50%;
}

.sun::before,
.sun::after {
  content: "";
  position: absolute;
  inset: -24px 44px;
  border-block: 14px solid rgba(40,55,47,.55);
}

.sun::after {
  transform: rotate(90deg);
}

.cake {
  position: relative;
  width: 300px;
  margin-top: 120px;
  transform: rotate(2deg);
  filter: drop-shadow(0 24px 20px rgba(67, 37, 24, .16));
}

.candle {
  position: absolute;
  z-index: 2;
  left: 143px;
  top: -81px;
  width: 17px;
  height: 75px;
  border: 2px solid var(--ink);
  background: repeating-linear-gradient(135deg, var(--paper) 0 8px, var(--orange) 8px 16px);
}

.candle i {
  position: absolute;
  left: -8px;
  top: -34px;
  width: 29px;
  height: 35px;
  border: 2px solid var(--ink);
  border-radius: 55% 45% 52% 48%;
  background: var(--yellow);
  transform: rotate(45deg);
}

.cake-top {
  position: relative;
  z-index: 1;
  height: 76px;
  border: 3px solid var(--ink);
  border-radius: 50%;
  background: var(--paper);
}

.cake-base {
  display: flex;
  justify-content: space-around;
  height: 185px;
  margin-top: -38px;
  padding: 70px 40px 0;
  border: 3px solid var(--ink);
  border-top: 0;
  border-radius: 0 0 40px 40px;
  background: #f7dfc0;
}

.cake-base span {
  width: 25px;
  height: 25px;
  border: 2px solid var(--ink);
  border-radius: 50%;
  background: var(--orange);
}

.plate {
  width: 350px;
  height: 28px;
  margin-left: -25px;
  border: 3px solid var(--ink);
  border-radius: 50%;
  background: var(--blue);
}

.confetti {
  position: absolute;
  z-index: 1;
  width: 13px;
  height: 48px;
  border-radius: 20px;
  background: var(--orange);
  transform: rotate(35deg);
}

.confetti-one {
  top: 13%;
  left: 46%;
}

.confetti-two {
  bottom: 14%;
  left: 43%;
  background: var(--paper);
  transform: rotate(-42deg);
}

.weather-section {
  padding: 110px clamp(24px, 8vw, 140px);
  background: var(--paper);
}

.section-heading {
  max-width: 720px;
  margin-bottom: 48px;
}

.section-heading h2,
.rsvp-copy h2 {
  margin-bottom: 0;
  font-size: clamp(2.5rem, 4.5vw, 4.4rem);
  line-height: 1.02;
  letter-spacing: -.035em;
}

.weather-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}

.weather-card {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 28px;
  min-height: 270px;
  padding: clamp(28px, 4vw, 52px);
  border: 1px solid var(--line);
  border-radius: 28px;
}

.rain-card {
  background: #e5eff0;
}

.sun-card {
  background: #f9e7ca;
}

.weather-icon {
  display: grid;
  place-items: center;
  width: 72px;
  height: 72px;
  border: 1px solid var(--ink);
  border-radius: 50%;
  font-size: 2rem;
}

.small-label {
  margin-bottom: 8px;
  color: var(--muted);
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.weather-card h3 {
  margin-bottom: 14px;
  font-family: "Playfair Display", serif;
  font-size: clamp(1.8rem, 2.5vw, 2.5rem);
}

.weather-card p:last-child {
  max-width: 480px;
  margin-bottom: 0;
  color: #526057;
  line-height: 1.7;
}

.rsvp-section {
  display: grid;
  grid-template-columns: minmax(0, .8fr) minmax(500px, 1.2fr);
  gap: clamp(50px, 9vw, 150px);
  padding: 110px clamp(24px, 8vw, 140px);
  background: var(--ink);
}

.rsvp-copy {
  align-self: center;
  color: var(--paper);
}

.rsvp-copy .eyebrow {
  color: var(--yellow);
}

.rsvp-copy > p:not(.eyebrow) {
  max-width: 500px;
  margin: 28px 0;
  color: #cbd1cc;
  font-size: 1.05rem;
  line-height: 1.7;
}

.deadline-note {
  display: flex;
  gap: 12px;
  max-width: 450px;
  padding-top: 22px;
  border-top: 1px solid rgba(255,255,255,.16);
  color: #aeb9b2;
  font-size: .88rem;
  line-height: 1.5;
}

.deadline-note span {
  color: var(--yellow);
}

.form-card {
  padding: clamp(28px, 5vw, 56px);
  border-radius: 30px;
  background: var(--paper);
  box-shadow: var(--shadow);
}

.form-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 30px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--line);
}

.form-heading span {
  font-family: "Playfair Display", serif;
  font-size: 1.5rem;
  font-weight: 700;
}

.form-heading p {
  margin: 0;
  color: var(--muted);
  font-size: .8rem;
}

label,
legend {
  display: block;
  margin-bottom: 10px;
  font-size: .88rem;
  font-weight: 700;
}

input[type="text"],
input[type="password"] {
  width: 100%;
  height: 56px;
  margin-bottom: 27px;
  padding: 0 17px;
  border: 1px solid var(--line);
  border-radius: 12px;
  outline: none;
  background: white;
  color: var(--ink);
  transition: border .2s, box-shadow .2s;
}

input[type="text"]:focus,
input[type="password"]:focus {
  border-color: var(--orange);
  box-shadow: 0 0 0 4px rgba(233, 104, 63, .12);
}

fieldset {
  display: grid;
  gap: 10px;
  margin: 0 0 28px;
  padding: 0;
  border: 0;
}

.radio-option {
  display: grid;
  grid-template-columns: 22px 1fr;
  gap: 13px;
  align-items: center;
  margin: 0;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 13px;
  cursor: pointer;
  transition: border .2s, background .2s, transform .2s;
}

.radio-option:hover {
  transform: translateY(-1px);
  border-color: rgba(233,104,63,.45);
}

.radio-option:has(input:checked) {
  border-color: var(--orange);
  background: rgba(233,104,63,.06);
}

.radio-option input {
  position: absolute;
  opacity: 0;
}

.radio-control {
  width: 21px;
  height: 21px;
  border: 1px solid #9b9f9b;
  border-radius: 50%;
  box-shadow: inset 0 0 0 5px var(--paper);
}

.radio-option input:checked + .radio-control {
  border-color: var(--orange);
  background: var(--orange);
}

.radio-option strong,
.radio-option small {
  display: block;
}

.radio-option small {
  margin-top: 3px;
  color: var(--muted);
  font-weight: 400;
}

.primary-button,
.secondary-button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  min-height: 54px;
  border: 0;
  border-radius: 12px;
  cursor: pointer;
  font-weight: 700;
  text-decoration: none;
  transition: transform .2s, background .2s, opacity .2s;
}

.primary-button {
  width: 100%;
  padding: 0 20px;
  color: white;
  background: var(--orange);
}

.primary-button:hover {
  background: var(--orange-dark);
  transform: translateY(-1px);
}

.primary-button:disabled {
  cursor: wait;
  opacity: .7;
}

.privacy-note {
  margin: 14px 0 0;
  color: var(--muted);
  font-size: .75rem;
  text-align: center;
}

.error-message {
  margin-bottom: 22px;
  padding: 13px 15px;
  border: 1px solid rgba(180, 48, 38, .25);
  border-radius: 10px;
  color: #8e332b;
  background: #fff0ed;
  font-size: .9rem;
}

.success-message {
  display: grid;
  place-items: center;
  min-height: 460px;
  text-align: center;
}

.success-mark {
  display: grid;
  place-items: center;
  width: 72px;
  height: 72px;
  margin-bottom: 24px;
  border-radius: 50%;
  color: white;
  background: var(--orange);
  font-size: 2rem;
}

.success-message h2 {
  margin-bottom: 14px;
  font-family: "Playfair Display", serif;
  font-size: 3rem;
}

.success-message p:not(.eyebrow) {
  max-width: 400px;
  color: var(--muted);
  line-height: 1.65;
}

.text-link {
  color: var(--orange-dark);
  font-weight: 700;
  text-underline-offset: 4px;
}

.site-footer {
  display: flex;
  justify-content: space-between;
  padding: 28px clamp(24px, 8vw, 140px);
  color: #929a94;
  background: var(--ink);
  font-size: .78rem;
  letter-spacing: .05em;
}

.site-footer p {
  margin: 0;
}

.admin-page {
  min-height: 100vh;
  background:
    radial-gradient(circle at 8% 8%, rgba(244,185,66,.18), transparent 28rem),
    var(--cream);
}

.admin-shell {
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
  padding: 70px 0;
}

.login-shell {
  display: grid;
  place-items: center;
  min-height: 100vh;
}

.back-link {
  position: absolute;
  top: 32px;
  left: 32px;
  color: var(--muted);
  font-size: .9rem;
  text-decoration: none;
}

.login-card {
  width: min(470px, 100%);
  padding: clamp(32px, 6vw, 56px);
  border: 1px solid var(--line);
  border-radius: 28px;
  background: var(--paper);
  box-shadow: var(--shadow);
}

.login-card h1 {
  margin-bottom: 12px;
  font-size: 2.8rem;
}

.login-card > p:not(.eyebrow) {
  margin-bottom: 30px;
  color: var(--muted);
  line-height: 1.6;
}

.admin-symbol {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  margin-bottom: 28px;
  border-radius: 50%;
  color: var(--ink);
  background: var(--yellow);
}

.button-link {
  margin-top: 30px;
}

.admin-header {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 30px;
  margin-bottom: 40px;
}

.admin-header h1 {
  margin-bottom: 7px;
  font-size: clamp(3rem, 6vw, 5rem);
}

.admin-header p:last-child {
  margin-bottom: 0;
  color: var(--muted);
}

.secondary-button {
  padding: 0 24px;
  border: 1px solid var(--line);
  background: var(--paper);
}

.secondary-button:hover {
  border-color: var(--orange);
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 26px;
}

.stat-card {
  position: relative;
  overflow: hidden;
  padding: 25px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--paper);
}

.stat-card::before {
  content: "";
  position: absolute;
  right: -20px;
  bottom: -30px;
  width: 88px;
  height: 88px;
  border-radius: 50%;
  opacity: .25;
  background: var(--sage);
}

.stat-card.yes::before { background: #75aa81; }
.stat-card.no::before { background: var(--orange); }
.stat-card.maybe::before { background: var(--yellow); }

.stat-card span {
  display: block;
  margin-bottom: 13px;
  color: var(--muted);
  font-size: .82rem;
  font-weight: 600;
}

.stat-card strong {
  font-family: "Playfair Display", serif;
  font-size: 2.8rem;
}

.responses-card {
  padding: clamp(24px, 4vw, 42px);
  border: 1px solid var(--line);
  border-radius: 24px;
  background: var(--paper);
  box-shadow: 0 15px 50px rgba(63,48,31,.07);
}

.table-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 28px;
}

.table-heading h2 {
  margin: 0;
  font-size: 2rem;
}

.table-wrap {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
}

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

th {
  color: var(--muted);
  font-size: .73rem;
  letter-spacing: .08em;
  text-transform: uppercase;
}

td {
  font-size: .9rem;
}

td:last-child {
  color: var(--muted);
}

.answer-badge {
  display: inline-block;
  padding: 7px 10px;
  border-radius: 20px;
  font-size: .77rem;
  font-weight: 700;
}

.answer-badge.yes {
  color: #2f6b42;
  background: #e3f2e7;
}

.answer-badge.no {
  color: #93422e;
  background: #fae8e2;
}

.answer-badge.maybe {
  color: #806019;
  background: #faf0cf;
}

.empty-state {
  padding: 70px 20px;
  color: var(--muted);
  text-align: center;
}

.empty-state span {
  font-size: 2.5rem;
}

.empty-state h3 {
  margin: 18px 0 8px;
  color: var(--ink);
  font-family: "Playfair Display", serif;
  font-size: 1.7rem;
}

@media (max-width: 900px) {
  .hero {
    grid-template-columns: 1fr;
  }

  .hero-content {
    padding-bottom: 20px;
  }

  .hero-art {
    min-height: 430px;
  }

  .hero::after {
    width: 85%;
    right: -15%;
    bottom: -17%;
  }

  .cake {
    margin-top: 30px;
  }

  .weather-grid,
  .rsvp-section {
    grid-template-columns: 1fr;
  }

  .rsvp-section {
    gap: 55px;
  }

  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 600px) {
  .hero {
    min-height: auto;
  }

  .hero-content {
    padding: 64px 24px 20px;
  }

  .hero h1 {
    font-size: clamp(3.2rem, 16vw, 4.5rem);
  }

  .date-card {
    align-items: center;
    width: 100%;
  }

  .hero-art {
    min-height: 350px;
    transform: scale(.8);
  }

  .weather-section,
  .rsvp-section {
    padding-block: 80px;
  }

  .weather-card {
    grid-template-columns: 1fr;
  }

  .form-heading,
  .site-footer,
  .admin-header,
  .table-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .site-footer {
    gap: 10px;
  }

  .admin-shell {
    width: min(100% - 28px, 1180px);
    padding: 45px 0;
  }

  .login-shell {
    padding-top: 90px;
  }

  .back-link {
    left: 20px;
  }

  .stats-grid {
    gap: 10px;
  }

  .stat-card {
    padding: 19px;
  }

  .stat-card strong {
    font-size: 2.2rem;
  }

  table,
  thead,
  tbody,
  tr,
  th,
  td {
    display: block;
  }

  thead {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
  }

  tr {
    padding: 16px 0;
    border-bottom: 1px solid var(--line);
  }

  td {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    padding: 7px 0;
    border: 0;
    text-align: right;
  }

  td::before {
    content: attr(data-label);
    color: var(--muted);
    font-size: .76rem;
    font-weight: 700;
    text-transform: uppercase;
  }
}

@media (prefers-reduced-motion: no-preference) {
  .cake {
    animation: cake-float 4s ease-in-out infinite;
  }

  .sun {
    animation: sun-turn 18s linear infinite;
  }

  @keyframes cake-float {
    0%, 100% { transform: rotate(2deg) translateY(0); }
    50% { transform: rotate(1deg) translateY(-10px); }
  }

  @keyframes sun-turn {
    to { transform: rotate(360deg); }
  }
}
