/* Design tokens */
:root {
  --bg-invite: #f4f8f8;
  --bg-rsvp: #f9f8f3;
  --teal: #1a8a8a;
  --teal-light: #2aabaa;
  --teal-dark: #0d3d3d;
  --text: #1a1a1a;
  --text-muted: #5a5a5a;
  --white: #ffffff;
  --required: #8b3a3a;
  --green-check: #2d8a4e;
  --badge-bg: #eaf2eb;
  --badge-text: #1a6b3c;
  --google-border: #747775;
  --font-sans: "Roboto", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-serif: Georgia, "Times New Roman", serif;
  --max-width: 1100px;
  --radius: 12px;
  --radius-lg: 20px;
}

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

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

body {
  font-family: var(--font-sans);
  color: var(--text);
  line-height: 1.5;
  padding-left: env(safe-area-inset-left);
  padding-right: env(safe-area-inset-right);
}

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

a {
  color: inherit;
  text-decoration: none;
}

/* ── Invitation page ── */

.invite-page {
  min-height: 100vh;
  background: var(--bg-invite);
  position: relative;
  overflow-x: hidden;
}

.invite-bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}

.invite-bg__circles {
  position: absolute;
  top: -80px;
  right: -120px;
  width: 600px;
  height: 600px;
}

.invite-bg__circles circle {
  fill: none;
  stroke: rgba(42, 171, 170, 0.08);
  stroke-width: 1;
}

.invite-bg__hex {
  position: absolute;
  top: 40px;
  right: 60px;
  width: 200px;
  height: 220px;
  opacity: 0.12;
}

.invite-container {
  position: relative;
  z-index: 1;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 48px 32px 64px;
}

.invite-header {
  margin-bottom: 40px;
}

.invite-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 20px;
}

.invite-logo__icon {
  width: 32px;
  height: 36px;
  flex-shrink: 0;
}

.invite-logo__text {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--text);
}

.invite-eyebrow {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--teal);
  margin-bottom: 16px;
}

.invite-title {
  font-size: clamp(36px, 6vw, 56px);
  font-weight: 700;
  line-height: 1.1;
  margin-bottom: 20px;
}

.invite-title__accent {
  color: var(--teal-dark);
}

.invite-intro {
  font-size: 18px;
  color: var(--text-muted);
  max-width: 520px;
}

.invite-intro strong {
  color: var(--teal);
  font-weight: 600;
}

.invite-divider {
  border: none;
  border-top: 1px solid rgba(26, 138, 138, 0.2);
  margin: 36px 0;
}

.invite-details {
  margin-bottom: 48px;
}

.invite-details__grid {
  display: flex;
  flex-wrap: wrap;
  gap: 32px;
}

.invite-detail {
  display: flex;
  align-items: center;
  gap: 12px;
}

.invite-detail__icon {
  width: 28px;
  height: 28px;
  color: var(--teal);
  flex-shrink: 0;
}

.invite-detail__text {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.invite-features {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 28px;
  margin-bottom: 0;
}

.invite-feature__icon {
  width: 36px;
  height: 36px;
  color: var(--teal);
  margin-bottom: 14px;
}

.invite-feature__title {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--teal);
  margin-bottom: 8px;
  line-height: 1.35;
}

.invite-feature__desc {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.5;
}

.invite-cta {
  background: var(--teal-dark);
  border-radius: var(--radius-lg);
  padding: 36px 40px;
  display: flex;
  align-items: center;
  gap: 40px;
  position: relative;
  overflow: hidden;
}

.invite-cta--prompt {
  display: none;
}

.invite-cta--footer {
  margin-top: 48px;
  margin-bottom: 0;
}

.invite-cta--footer .invite-cta__scan-label {
  display: none;
}

.invite-cta__btn--footer {
  display: inline-block;
}

.invite-cta__wave {
  position: absolute;
  right: 0;
  top: 0;
  bottom: 0;
  width: 45%;
  opacity: 0.35;
  pointer-events: none;
}

.invite-cta__aside {
  flex-shrink: 0;
  position: relative;
  z-index: 1;
}

.invite-cta__scan-label {
  display: none;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.55);
  margin-bottom: 10px;
  text-align: center;
}

.invite-cta__qr {
  width: 120px;
  height: 120px;
  background: var(--white);
  border-radius: 8px;
  padding: 8px;
}

.invite-cta__qr-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 4px;
}

.invite-cta__content {
  flex: 1;
  position: relative;
  z-index: 1;
}

.invite-cta__heading {
  font-size: clamp(20px, 3vw, 28px);
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--white);
  margin-bottom: 8px;
}

.invite-cta__sub {
  font-size: 15px;
  color: rgba(255, 255, 255, 0.8);
  margin-bottom: 20px;
}

.invite-cta__btn {
  display: inline-block;
  background: var(--white);
  color: var(--teal-dark);
  font-size: 15px;
  font-weight: 600;
  padding: 14px 32px;
  border-radius: 8px;
  transition: background 0.2s, transform 0.15s;
}

.invite-cta__btn:hover {
  background: #e8f4f4;
  transform: translateY(-1px);
}

/* ── RSVP page (extends invitation style) ── */

.invite-container--rsvp {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 100vh;
  padding-top: 48px;
  padding-bottom: 48px;
}

.invite-container--rsvp .invite-header {
  margin-bottom: 0;
}

.invite-cta--rsvp {
  margin-top: 48px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 48px 40px;
}

.invite-cta--rsvp .invite-cta__content {
  display: flex;
  flex-direction: column;
  align-items: center;
  max-width: 420px;
  width: 100%;
  position: relative;
  z-index: 1;
}

.invite-cta--rsvp .invite-cta__heading {
  margin-bottom: 10px;
}

.invite-cta--rsvp .invite-cta__sub {
  margin-bottom: 28px;
}

.invite-cta--rsvp .invite-cta__sub .required {
  color: #f0a0a0;
  font-weight: 600;
}

.rsvp-check {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  border: 1.5px solid rgba(255, 255, 255, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
}

.rsvp-check svg {
  width: 22px;
  height: 22px;
  color: var(--white);
}

.google-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  background: var(--white);
  border: 1px solid var(--google-border);
  border-radius: 4px;
  padding: 10px 24px;
  min-width: 240px;
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 500;
  line-height: 20px;
  color: #1f1f1f;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08);
  cursor: pointer;
  transition: box-shadow 0.2s, background 0.2s;
}

.google-btn:hover {
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.12);
  background: #f8f8f8;
}

.google-btn__icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

.rsvp-ref {
  margin-top: 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.rsvp-ref__label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.5);
}

.rsvp-ref__id {
  font-size: 13px;
  font-weight: 500;
  font-family: "SF Mono", "Fira Code", "Consolas", monospace;
  color: rgba(255, 255, 255, 0.75);
  letter-spacing: 0.06em;
}

/* ── Responsive ── */

@media (max-width: 900px) {
  .invite-features {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .invite-container {
    padding: 28px 20px 40px;
    padding-bottom: calc(40px + env(safe-area-inset-bottom));
  }

  .invite-header {
    margin-bottom: 28px;
  }

  .invite-title {
    font-size: clamp(32px, 9vw, 42px);
    margin-bottom: 14px;
  }

  .invite-intro {
    font-size: 16px;
    line-height: 1.6;
  }

  .invite-divider {
    margin: 24px 0;
  }

  .invite-details {
    margin-bottom: 20px;
  }

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

  .invite-detail {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    padding: 12px;
    background: rgba(255, 255, 255, 0.72);
    border: 1px solid rgba(26, 138, 138, 0.14);
    border-radius: var(--radius);
  }

  .invite-detail__icon {
    width: 22px;
    height: 22px;
  }

  .invite-detail__text {
    font-size: 11px;
    line-height: 1.35;
  }

  .invite-features {
    grid-template-columns: 1fr;
    gap: 12px;
    margin-bottom: 0;
  }

  .invite-feature {
    display: grid;
    grid-template-columns: 40px 1fr;
    grid-template-rows: auto auto;
    column-gap: 14px;
    row-gap: 4px;
    align-items: start;
    padding: 16px;
    background: rgba(255, 255, 255, 0.55);
    border: 1px solid rgba(26, 138, 138, 0.1);
    border-radius: var(--radius);
  }

  .invite-feature__icon {
    width: 32px;
    height: 32px;
    margin-bottom: 0;
    grid-row: 1 / span 2;
    align-self: center;
  }

  .invite-feature__title {
    font-size: 11px;
    margin-bottom: 0;
  }

  .invite-feature__desc {
    font-size: 13px;
    grid-column: 2;
  }

  .invite-cta--prompt {
    display: flex;
    margin-bottom: 28px;
    flex-direction: column;
    align-items: stretch;
    text-align: center;
    padding: 24px 20px;
    gap: 0;
  }

  .invite-cta--prompt .invite-cta__sub {
    margin-bottom: 18px;
  }

  .invite-cta__btn--footer {
    display: none;
  }

  .invite-cta--footer {
    margin-top: 28px;
    flex-direction: column;
    align-items: stretch;
    text-align: center;
    padding: 24px 20px;
    gap: 0;
  }

  .invite-cta--footer .invite-cta__heading,
  .invite-cta--footer .invite-cta__sub {
    display: none;
  }

  .invite-cta--footer .invite-cta__sub {
    margin-bottom: 0;
  }

  .invite-cta--footer .invite-cta__scan-label {
    display: block;
  }

  .invite-cta__content {
    order: 1;
  }

  .invite-cta--footer .invite-cta__aside {
    order: 2;
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    display: flex;
    flex-direction: column;
    align-items: center;
  }

  .invite-cta__scan-label {
    display: block;
  }

  .invite-cta__heading {
    font-size: 18px;
    letter-spacing: 0.03em;
    margin-bottom: 8px;
  }

  .invite-cta__sub {
    font-size: 14px;
    line-height: 1.55;
    margin-bottom: 18px;
  }

  .invite-cta__btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 48px;
    padding: 16px 24px;
    font-size: 16px;
  }

  .google-btn {
    width: 100%;
    max-width: none;
    min-height: 48px;
    border-radius: 8px;
    padding: 12px 24px;
  }

  .invite-cta__qr {
    width: 96px;
    height: 96px;
  }

  .invite-cta__wave {
    width: 100%;
    opacity: 0.15;
  }

  .invite-bg__circles {
    width: 420px;
    height: 420px;
    top: -60px;
    right: -160px;
  }

  .invite-bg__hex {
    right: -30px;
    top: 20px;
    width: 110px;
    height: 120px;
    opacity: 0.07;
  }

  .invite-container--rsvp {
    justify-content: flex-start;
    min-height: auto;
    padding-top: 24px;
    padding-bottom: calc(32px + env(safe-area-inset-bottom));
  }

  .invite-container--rsvp .invite-header {
    margin-bottom: 0;
  }

  .invite-cta--rsvp {
    margin-top: 28px;
    padding: 28px 20px;
  }

  .invite-cta--rsvp .invite-cta__sub {
    font-size: 14px;
    line-height: 1.55;
    margin-bottom: 22px;
  }

  .invite-cta--rsvp .google-btn {
    max-width: none;
  }

  .rsvp-ref {
    margin-top: 20px;
  }
}

@media (max-width: 380px) {
  .invite-details__grid {
    grid-template-columns: 1fr;
  }

  .invite-detail {
    flex-direction: row;
    align-items: center;
  }

  .invite-detail__text {
    font-size: 12px;
  }
}
