:root {
  color-scheme: light;
  --amber: #f59e0b;
  --amber-deep: #b45309;
  --amber-soft: #fef3c7;
  --teal: #0f766e;
  --ink: #1f2937;
  --muted: #596273;
  --surface: rgba(255, 255, 255, 0.94);
  --canvas: #fafafa;
  --border: #e5e7eb;
  --focus: #0369a1;
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  background: var(--canvas);
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 18% 15%, rgba(245, 158, 11, 0.18), transparent 34rem),
    radial-gradient(circle at 82% 88%, rgba(20, 184, 166, 0.14), transparent 30rem),
    var(--canvas);
}

.skip-link {
  position: fixed;
  z-index: 10;
  top: 0.75rem;
  left: 0.75rem;
  padding: 0.75rem 1rem;
  color: #fff;
  background: var(--ink);
  border-radius: 0.65rem;
  transform: translateY(-160%);
}

.skip-link:focus {
  transform: translateY(0);
}

.page-shell {
  display: grid;
  min-height: 100vh;
  place-items: center;
  padding: 1rem;
}

.invite-card {
  width: min(100%, 31rem);
  padding: 1.5rem;
  text-align: center;
  background: var(--surface);
  border: 1px solid rgba(229, 231, 235, 0.88);
  border-radius: 1.75rem;
  box-shadow: 0 1.25rem 4rem rgba(31, 41, 55, 0.11);
  backdrop-filter: blur(12px);
}

.brand {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.65rem;
  font-size: 1.2rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.brand-mark {
  width: 2.65rem;
  height: 2.65rem;
}

.invite-visual {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 7.5rem;
  margin: 1.5rem auto 0.9rem;
}

.person {
  position: relative;
  display: block;
  width: 3.25rem;
  height: 3.25rem;
  border: 0.28rem solid #fff;
  border-radius: 50%;
  box-shadow: 0 0.55rem 1.5rem rgba(31, 41, 55, 0.16);
}

.person::before {
  position: absolute;
  top: 0.7rem;
  left: 50%;
  width: 0.85rem;
  height: 0.85rem;
  content: "";
  background: #fff;
  border-radius: 50%;
  transform: translateX(-50%);
}

.person::after {
  position: absolute;
  bottom: 0.55rem;
  left: 50%;
  width: 1.65rem;
  height: 0.85rem;
  content: "";
  background: #fff;
  border-radius: 1rem 1rem 0.7rem 0.7rem;
  transform: translateX(-50%);
}

.person-left {
  background: var(--amber);
}

.person-right {
  background: var(--teal);
}

.route {
  display: flex;
  width: 6.4rem;
  align-items: center;
  justify-content: space-evenly;
}

.route i {
  display: block;
  width: 0.45rem;
  height: 0.45rem;
  background: var(--amber-deep);
  border-radius: 50%;
  opacity: 0.68;
}

.eyebrow {
  margin: 0 0 0.55rem;
  color: var(--amber-deep);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.13em;
}

h1 {
  max-width: 25rem;
  margin: 0 auto;
  font-size: clamp(1.75rem, 7vw, 2.35rem);
  line-height: 1.12;
  letter-spacing: -0.04em;
}

.lead {
  max-width: 25rem;
  margin: 1rem auto 1.4rem;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.55;
}

.primary-action {
  display: flex;
  min-height: 3.25rem;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  width: 100%;
  padding: 0.8rem 1.15rem;
  color: #241600;
  font-size: 1rem;
  font-weight: 800;
  text-decoration: none;
  background: var(--amber);
  border: 2px solid transparent;
  border-radius: 1rem;
  box-shadow: 0 0.55rem 1.25rem rgba(180, 83, 9, 0.2);
}

.primary-action:hover {
  background: #f7ae25;
}

.primary-action:focus-visible,
.skip-link:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}

.primary-action svg {
  fill: currentColor;
}

.primary-action[aria-disabled="true"] {
  color: #6b7280;
  background: #e5e7eb;
  box-shadow: none;
  cursor: not-allowed;
}

.fallback,
.invalid-state {
  margin-top: 1rem;
  padding: 1rem;
  text-align: left;
  background: var(--amber-soft);
  border-radius: 1rem;
}

.fallback h2,
.invalid-state strong {
  display: block;
  margin: 0 0 0.35rem;
  font-size: 0.98rem;
}

.fallback p,
.invalid-state span {
  display: block;
  margin: 0;
  color: #684116;
  font-size: 0.9rem;
  line-height: 1.5;
}

.invalid-state {
  color: #991b1b;
  background: #fee2e2;
}

.invalid-state span {
  color: #7f1d1d;
}

.privacy-note {
  margin: 1.1rem 0 0;
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.5;
}

@media (min-width: 40rem) {
  .page-shell {
    padding: 2rem;
  }

  .invite-card {
    padding: 2rem 2.25rem;
  }
}

@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;
    --ink: #f9fafb;
    --muted: #cbd5e1;
    --surface: rgba(30, 30, 30, 0.94);
    --canvas: #121212;
    --border: #374151;
    --amber-soft: #422006;
    --focus: #38bdf8;
  }

  .invite-card {
    border-color: rgba(55, 65, 81, 0.9);
  }

  .fallback p {
    color: #fde68a;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}
