/* ==========================================================================
   HPI Gala 2026 — Registration Microsite Design System
   Aesthetic: Parker Palm Springs — warm, elegant, boutique hotel luxury
   ========================================================================== */

/* --------------------------------------------------------------------------
   0. FONTS
   Google Fonts: Playfair Display (headings) + Inter (body)
   -------------------------------------------------------------------------- */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600&family=Playfair+Display:ital,wght@0,400;0,700;1,400&display=swap');

/* --------------------------------------------------------------------------
   1. DESIGN TOKENS (Custom Properties)
   All values derive from the 8px baseline grid (0.5rem).
   No magic numbers — every spacing/sizing value maps to a token.
   -------------------------------------------------------------------------- */
:root {
  /* --- Color Palette --- */
  --color-ivory:        #FAF6F0;
  --color-white:        #FFFFFF;
  --color-olive:        #5C6B4F;
  --color-olive-dark:   #3D4A34;
  --color-gold:         #C9A96E;
  --color-gold-dark:    #B89B5E;
  --color-text:         #2C2C2C;
  --color-text-light:   #6B6B6B;
  --color-error:        #C04040;
  --color-success:      #4A7C59;
  --color-border:       rgba(0, 0, 0, 0.12);
  --color-border-hover: rgba(0, 0, 0, 0.24);
  --color-focus-glow:   rgba(201, 169, 110, 0.25);
  --color-overlay:      rgba(44, 44, 44, 0.55);

  /* --- Typography --- */
  --font-heading: 'Playfair Display', Georgia, serif;
  --font-body:    'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  /* Fluid type scale using clamp() — no magic numbers.
     Min viewport ~375px, max viewport ~1200px. */
  --text-xs:   clamp(0.75rem, 0.7rem + 0.25vw, 0.8125rem);   /* 12–13px */
  --text-sm:   clamp(0.8125rem, 0.75rem + 0.3vw, 0.875rem);   /* 13–14px */
  --text-base: clamp(0.875rem, 0.8rem + 0.35vw, 1rem);        /* 14–16px */
  --text-lg:   clamp(1rem, 0.9rem + 0.5vw, 1.125rem);         /* 16–18px */
  --text-xl:   clamp(1.25rem, 1rem + 1vw, 1.5rem);            /* 20–24px */
  --text-2xl:  clamp(1.5rem, 1.1rem + 1.8vw, 2rem);           /* 24–32px */
  --text-3xl:  clamp(2rem, 1.4rem + 2.8vw, 2.75rem);          /* 32–44px */
  --text-4xl:  clamp(2.5rem, 1.6rem + 4vw, 3.5rem);           /* 40–56px */
  --text-hero: clamp(2.75rem, 1.5rem + 5.5vw, 4.5rem);        /* 44–72px */

  /* --- Spacing (8px baseline grid) --- */
  --space-1:  0.5rem;    /* 8px */
  --space-2:  1rem;      /* 16px */
  --space-3:  1.5rem;    /* 24px */
  --space-4:  2rem;      /* 32px */
  --space-5:  2.5rem;    /* 40px */
  --space-6:  3rem;      /* 48px */
  --space-8:  4rem;      /* 64px */
  --space-10: 5rem;      /* 80px */
  --space-12: 6rem;      /* 96px */

  /* --- Surfaces --- */
  --radius-sm:   0.5rem;   /* 8px — inputs, small elements */
  --radius-md:   0.75rem;  /* 12px — cards, containers */
  --radius-full: 50%;      /* circles */

  --shadow-subtle: 0 0.125rem 1.25rem rgba(0, 0, 0, 0.06);
  --shadow-lifted: 0 0.5rem 2rem rgba(0, 0, 0, 0.1);

  /* --- Motion --- */
  --ease-out:  cubic-bezier(0.4, 0, 0.2, 1);
  --duration:  0.3s;
}

/* --------------------------------------------------------------------------
   2. MODERN CSS RESET
   Minimal, production-grade reset. No opinionated styling here.
   -------------------------------------------------------------------------- */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

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

body {
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: 1.6;
  color: var(--color-text);
  background-color: var(--color-ivory);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100vh;
}

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

input,
button,
textarea,
select {
  font: inherit;
  color: inherit;
}

a {
  color: var(--color-olive);
  text-decoration: none;
  transition: color var(--duration) var(--ease-out);
}

a:hover {
  color: var(--color-olive-dark);
}

ul,
ol {
  list-style: none;
}

/* --------------------------------------------------------------------------
   3. SITE HEADER
   Starts transparent over hero; gains .scrolled class via JS for opaque bg.
   -------------------------------------------------------------------------- */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: var(--space-2) var(--space-3);
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition:
    background-color var(--duration) var(--ease-out),
    box-shadow var(--duration) var(--ease-out);
}

.site-header.scrolled {
  background-color: rgba(250, 246, 240, 0.96);
  backdrop-filter: blur(0.5rem);
  -webkit-backdrop-filter: blur(0.5rem);
  box-shadow: 0 0.0625rem 0 var(--color-border);
}

.site-header__logo {
  font-family: var(--font-heading);
  font-size: var(--text-lg);
  font-weight: 700;
  color: var(--color-white);
  letter-spacing: 0.02em;
  transition: color var(--duration) var(--ease-out);
}

.site-header.scrolled .site-header__logo {
  color: var(--color-text);
}

/* --------------------------------------------------------------------------
   4. HERO
   Full viewport landing area. Background image with gradient overlay.
   Content centered vertically and horizontally.
   -------------------------------------------------------------------------- */
.hero {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  min-height: 100dvh;
  /* Fallback gradient until hero image is provided */
  background: linear-gradient(135deg, #3D4A34 0%, #5C6B4F 40%, #7A8B6A 100%);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  overflow: hidden;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    rgba(44, 44, 44, 0.7) 0%,
    rgba(44, 44, 44, 0.35) 40%,
    rgba(44, 44, 44, 0.1) 100%
  );
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 1;
  text-align: center;
  padding: var(--space-3);
  max-width: 48rem;
}

.hero-title {
  font-family: var(--font-heading);
  font-size: var(--text-hero);
  font-weight: 700;
  color: var(--color-white);
  line-height: 1.1;
  margin-bottom: var(--space-2);
  letter-spacing: -0.01em;
}

.hero-subtitle {
  font-size: var(--text-xl);
  color: rgba(255, 255, 255, 0.85);
  font-weight: 400;
  line-height: 1.4;
  margin-bottom: var(--space-6);
}

/* Attendance choice — two large CTAs on the hero */
.attendance-choice {
  display: flex;
  gap: var(--space-2);
  justify-content: center;
  flex-wrap: wrap;
}

.attendance-choice .btn {
  min-width: 12rem;
  font-size: var(--text-lg);
  padding: var(--space-2) var(--space-4);
}

/* --------------------------------------------------------------------------
   5. LAYOUT — Container & Form Container
   720px max keeps forms comfortably readable (roughly 65 chars per line).
   -------------------------------------------------------------------------- */
.container {
  width: 100%;
  max-width: 45rem; /* 720px */
  margin-inline: auto;
  padding-inline: var(--space-3);
}

.form-container {
  padding-top: var(--space-8);
  padding-bottom: var(--space-12);
}

/* --------------------------------------------------------------------------
   6. PROGRESS BAR
   Horizontal step indicator — circles connected by lines.
   On mobile (< 768px), degrades to "Step N of 7" text.
   -------------------------------------------------------------------------- */
.progress-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: var(--space-8); /* Increased margin to fit labels */
  padding: var(--space-3) 0;
}

.progress-step {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: var(--radius-full);
  border: 0.125rem solid var(--color-border);
  background: var(--color-white);
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--color-text-light);
  flex-shrink: 0;
  transition:
    background-color var(--duration) var(--ease-out),
    border-color var(--duration) var(--ease-out),
    color var(--duration) var(--ease-out);
}

.progress-step.active {
  border-color: var(--color-gold);
  background: var(--color-gold);
  color: var(--color-white);
  box-shadow: 0 0 0 0.25rem var(--color-focus-glow);
}

.progress-step.completed {
  border-color: var(--color-olive);
  background: var(--color-olive);
  color: var(--color-white);
}

/* Checkmark icon for completed steps — replaces the number */
.progress-step.completed::after {
  content: '✓';
  font-size: var(--text-sm);
  line-height: 1;
}

/* Hide the step number text when completed */
.progress-step.completed .progress-dot {
  font-size: 0;
  opacity: 0;
}

.progress-label {
  position: absolute;
  top: 100%;
  margin-top: 0.5rem;
  font-size: 0.65rem;
  font-weight: 500;
  color: var(--color-text-light);
  white-space: nowrap;
  letter-spacing: 0.02em;
}

.progress-step.active .progress-label,
.progress-step.completed .progress-label {
  color: var(--color-text);
  font-weight: 600;
}

.progress-line {
  flex: 1;
  height: 0.125rem;
  max-width: 3rem;
  background: var(--color-border);
  transition: background-color var(--duration) var(--ease-out);
}

.progress-line.completed {
  background: var(--color-olive);
}

/* Mobile: show compact step indicator */
.progress-bar__mobile {
  display: none;
  text-align: center;
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--color-text-light);
  margin-bottom: var(--space-4);
}

.progress-bar__mobile strong {
  color: var(--color-gold-dark);
  font-weight: 600;
}

@media (max-width: 47.9375rem) { /* < 768px */
  .progress-bar {
    display: none;
  }

  .progress-bar__mobile {
    display: block;
  }
}

/* --------------------------------------------------------------------------
   7. FORM ELEMENTS
   Clean, generous inputs. No bordered card wrappers — whitespace structures.
   -------------------------------------------------------------------------- */

/* --- Form Group: label + input wrapper --- */
.form-group {
  margin-bottom: var(--space-3);
}

/* --- Labels --- */
.form-label {
  display: block;
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--color-text);
  margin-bottom: var(--space-1);
  letter-spacing: 0.01em;
}

.form-label--required::after {
  content: ' *';
  color: var(--color-error);
  font-weight: 400;
}

/* --- Text Inputs, Selects, Textareas --- */
.form-input,
.form-select,
.form-textarea {
  display: block;
  width: 100%;
  padding: var(--space-2);
  font-size: var(--text-base);
  line-height: 1.5;
  color: var(--color-text);
  background-color: var(--color-white);
  border: 0.0625rem solid var(--color-border);
  border-radius: var(--radius-sm);
  transition:
    border-color var(--duration) var(--ease-out),
    box-shadow var(--duration) var(--ease-out);
  appearance: none;
  -webkit-appearance: none;
}

.form-input::placeholder,
.form-textarea::placeholder {
  color: var(--color-text-light);
  opacity: 0.6;
}

/* Focus state — gold border + subtle glow */
.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  outline: none;
  border-color: var(--color-gold);
  box-shadow: 0 0 0 0.1875rem var(--color-focus-glow);
}

/* Error state */
.form-input.is-error,
.form-select.is-error,
.form-textarea.is-error {
  border-color: var(--color-error);
}

.form-input.is-error:focus,
.form-select.is-error:focus,
.form-textarea.is-error:focus {
  box-shadow: 0 0 0 0.1875rem rgba(192, 64, 64, 0.15);
}

/* Filled / valid state — subtle olive indicator */
.form-input.is-filled,
.form-select.is-filled,
.form-textarea.is-filled {
  border-color: rgba(92, 107, 79, 0.3);
}

/* Select arrow */
.form-select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' fill='none'%3E%3Cpath d='M1 1.5l5 5 5-5' stroke='%236B6B6B' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right var(--space-2) center;
  padding-right: var(--space-5);
}

/* Textarea */
.form-textarea {
  min-height: 7rem;
  resize: vertical;
}

/* --- Error & Hint Text --- */
.form-error {
  display: block;
  font-size: var(--text-xs);
  color: var(--color-error);
  margin-top: 0.25rem;
  line-height: 1.4;
}

.form-hint {
  display: block;
  font-size: var(--text-xs);
  color: var(--color-text-light);
  margin-top: 0.25rem;
  line-height: 1.4;
}

/* --------------------------------------------------------------------------
   8. CUSTOM RADIOS & CHECKBOXES
   Fully custom — native inputs are visually hidden but remain accessible.
   -------------------------------------------------------------------------- */

/* --- Radio Group --- */
.form-radio-group,
.form-checkbox-group {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
}

.form-radio,
.form-checkbox {
  display: flex;
  align-items: center;
  gap: var(--space-1);
  cursor: pointer;
  padding: 0.375rem 0;
  font-size: var(--text-base);
  line-height: 1.4;
  transition: color var(--duration) var(--ease-out);
}

.form-radio:hover,
.form-checkbox:hover {
  color: var(--color-olive-dark);
}

/* Hide native inputs — positioned over custom indicator for a11y click area */
.form-radio input,
.form-checkbox input {
  position: absolute;
  width: 0.0625rem;
  height: 0.0625rem;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}

/* Custom radio circle */
.form-radio__indicator {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 1.25rem;
  height: 1.25rem;
  border-radius: var(--radius-full);
  border: 0.125rem solid var(--color-border-hover);
  flex-shrink: 0;
  transition:
    border-color var(--duration) var(--ease-out),
    background-color var(--duration) var(--ease-out);
}

.form-radio__indicator::after {
  content: '';
  width: 0.5rem;
  height: 0.5rem;
  border-radius: var(--radius-full);
  background: transparent;
  transition: background-color var(--duration) var(--ease-out);
}

/* Radio selected state */
.form-radio input:checked + .form-radio__indicator {
  border-color: var(--color-olive);
}

.form-radio input:checked + .form-radio__indicator::after {
  background: var(--color-olive);
}

/* Radio focus-visible */
.form-radio input:focus-visible + .form-radio__indicator {
  box-shadow: 0 0 0 0.1875rem var(--color-focus-glow);
}

/* Custom checkbox square */
.form-checkbox__indicator {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 1.25rem;
  height: 1.25rem;
  border-radius: 0.25rem;
  border: 0.125rem solid var(--color-border-hover);
  flex-shrink: 0;
  transition:
    border-color var(--duration) var(--ease-out),
    background-color var(--duration) var(--ease-out);
}

/* Checkmark — drawn with border trick */
.form-checkbox__indicator::after {
  content: '';
  width: 0.375rem;
  height: 0.625rem;
  border: solid var(--color-white);
  border-width: 0 0.125rem 0.125rem 0;
  transform: rotate(45deg) translateY(-0.0625rem);
  opacity: 0;
  transition: opacity var(--duration) var(--ease-out);
}

/* Checkbox selected state */
.form-checkbox input:checked + .form-checkbox__indicator {
  background-color: var(--color-olive);
  border-color: var(--color-olive);
}

.form-checkbox input:checked + .form-checkbox__indicator::after {
  opacity: 1;
}

/* Checkbox focus-visible */
.form-checkbox input:focus-visible + .form-checkbox__indicator {
  box-shadow: 0 0 0 0.1875rem var(--color-focus-glow);
}

/* --------------------------------------------------------------------------
   9. BUTTONS
   All buttons follow the same base structure with variant modifiers.
   -------------------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-1);
  padding: 0.75rem var(--space-3);
  font-family: var(--font-body);
  font-size: var(--text-base);
  font-weight: 600;
  line-height: 1.25;
  border: 0.125rem solid transparent;
  border-radius: var(--radius-sm);
  cursor: pointer;
  text-align: center;
  white-space: nowrap;
  user-select: none;
  transition:
    background-color var(--duration) var(--ease-out),
    border-color var(--duration) var(--ease-out),
    color var(--duration) var(--ease-out),
    box-shadow var(--duration) var(--ease-out),
    transform var(--duration) var(--ease-out);
}

.btn:active {
  transform: scale(0.97);
}

.btn:disabled,
.btn[aria-disabled="true"] {
  opacity: 0.5;
  cursor: not-allowed;
  pointer-events: none;
}

/* --- Primary: olive green solid --- */
.btn-primary {
  background-color: var(--color-olive);
  color: var(--color-white);
  border-color: var(--color-olive);
  box-shadow: var(--shadow-subtle);
}

.btn-primary:hover {
  background-color: var(--color-olive-dark);
  border-color: var(--color-olive-dark);
}

.btn-primary:focus-visible {
  outline: none;
  box-shadow: 0 0 0 0.1875rem rgba(92, 107, 79, 0.35);
}

/* --- Secondary: outlined --- */
.btn-secondary {
  background-color: transparent;
  color: var(--color-olive);
  border-color: var(--color-olive);
}

.btn-secondary:hover {
  background-color: var(--color-olive);
  color: var(--color-white);
}

.btn-secondary:focus-visible {
  outline: none;
  box-shadow: 0 0 0 0.1875rem rgba(92, 107, 79, 0.35);
}

/* --- Gold: accent CTA --- */
.btn-gold {
  background-color: var(--color-gold);
  color: var(--color-white);
  border-color: var(--color-gold);
}

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

.btn-gold:focus-visible {
  outline: none;
  box-shadow: 0 0 0 0.1875rem var(--color-focus-glow);
}

/* --- Text: minimal button for back / cancel --- */
.btn-text {
  background: none;
  color: var(--color-text-light);
  border-color: transparent;
  padding-inline: var(--space-1);
}

.btn-text:hover {
  color: var(--color-olive);
}

.btn-text:focus-visible {
  outline: none;
  box-shadow: 0 0 0 0.1875rem var(--color-focus-glow);
  border-radius: var(--radius-sm);
}

/* --- Loading spinner state --- */
.btn-loading {
  position: relative;
  color: transparent !important;
  pointer-events: none;
}

.btn-loading::after {
  content: '';
  position: absolute;
  width: 1.125rem;
  height: 1.125rem;
  border: 0.125rem solid rgba(255, 255, 255, 0.3);
  border-top-color: var(--color-white);
  border-radius: var(--radius-full);
  animation: spin 0.6s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Button row — nav actions at bottom of each step */
.btn-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--space-2);
  margin-top: var(--space-5);
  padding-top: var(--space-3);
}

/* --------------------------------------------------------------------------
   10. STEP SECTIONS
   Multi-step form — only .active step is visible.
   Transitions: outgoing slides left + fades; incoming slides from right.
   -------------------------------------------------------------------------- */
.form-step {
  display: none;
}

.form-step.active {
  display: block;
  animation: slideInRight 0.4s var(--ease-out) both;
}

.form-step.exiting,
.form-step.step-exit {
  animation: slideOutLeft 0.3s var(--ease-out) both;
}

/* Alias for JS state machine animation triggers */
.form-step.step-enter {
  display: block;
  animation: slideInRight 0.4s var(--ease-out) both;
}

.step-title {
  font-family: var(--font-heading);
  font-size: var(--text-2xl);
  font-weight: 700;
  color: var(--color-text);
  line-height: 1.2;
  margin-bottom: var(--space-1);
}

.step-subtitle {
  font-size: var(--text-base);
  color: var(--color-text-light);
  line-height: 1.5;
  margin-bottom: var(--space-4);
}

/* --------------------------------------------------------------------------
   11. REVIEW PAGE
   No bordered boxes — flat layout with hairline separators per section.
   Clean label:value grid pairs.
   -------------------------------------------------------------------------- */
.review-section {
  padding-top: var(--space-3);
  margin-bottom: var(--space-4);
}

/* Hairline separator above each section (except the first) */
.review-section + .review-section {
  border-top: 0.0625rem solid var(--color-border);
}

.review-section__header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: var(--space-2);
}

.review-section__title {
  font-family: var(--font-heading);
  font-size: var(--text-lg);
  font-weight: 700;
  color: var(--color-text);
}

.review-edit-link {
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--color-gold-dark);
  transition: color var(--duration) var(--ease-out);
}

.review-edit-link:hover {
  color: var(--color-olive);
}

/* Label:value pairs — two-column grid */
.review-item {
  display: grid;
  grid-template-columns: 10rem 1fr;
  gap: var(--space-1);
  padding: 0.375rem 0;
  font-size: var(--text-base);
  line-height: 1.5;
}

.review-item__label {
  color: var(--color-text-light);
  font-weight: 500;
  font-size: var(--text-sm);
}

.review-item__value {
  color: var(--color-text);
}

@media (max-width: 47.9375rem) {
  .review-item {
    grid-template-columns: 1fr;
    gap: 0.125rem;
  }
}

/* --------------------------------------------------------------------------
   12. CONFIRMATION PAGE
   Centered success state with animated checkmark.
   -------------------------------------------------------------------------- */
.confirmation {
  text-align: center;
  padding: var(--space-10) var(--space-3);
  max-width: 32rem;
  margin-inline: auto;
}

.confirmation-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 5rem;
  height: 5rem;
  border-radius: var(--radius-full);
  background-color: var(--color-success);
  margin-bottom: var(--space-3);
  animation: fadeIn 0.5s var(--ease-out) both;
}

.confirmation-icon svg {
  width: 2.5rem;
  height: 2.5rem;
  stroke: var(--color-white);
  stroke-width: 2.5;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* SVG checkmark path-drawing animation */
.confirmation-icon svg .checkmark-path {
  stroke-dasharray: 30;
  stroke-dashoffset: 30;
  animation: checkmark 0.6s var(--ease-out) 0.3s forwards;
}

.confirmation-title {
  font-family: var(--font-heading);
  font-size: var(--text-2xl);
  font-weight: 700;
  color: var(--color-text);
  margin-bottom: var(--space-2);
}

.confirmation-subtitle {
  font-size: var(--text-base);
  color: var(--color-text-light);
  line-height: 1.6;
  margin-bottom: var(--space-5);
}

/* Event details summary — light, spacious, no box */
.confirmation-details {
  text-align: left;
  padding: var(--space-3);
  background: var(--color-white);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-subtle);
}

.confirmation-details__item {
  display: flex;
  justify-content: space-between;
  padding: 0.5rem 0;
  font-size: var(--text-base);
}

.confirmation-details__item + .confirmation-details__item {
  border-top: 0.0625rem solid var(--color-border);
}

.confirmation-details__label {
  color: var(--color-text-light);
  font-size: var(--text-sm);
}

.confirmation-details__value {
  font-weight: 500;
  text-align: right;
}

/* --------------------------------------------------------------------------
   13. DECLINE FORM
   Simplified, narrower layout for the decline path.
   -------------------------------------------------------------------------- */
.decline-form {
  max-width: 32rem;
  margin-inline: auto;
  padding-top: var(--space-6);
}

.decline-form .step-title {
  font-size: var(--text-xl);
}

/* --------------------------------------------------------------------------
   14. ANIMATIONS (Keyframes)
   -------------------------------------------------------------------------- */
@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translateX(1.875rem);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes slideOutLeft {
  from {
    opacity: 1;
    transform: translateX(0);
  }
  to {
    opacity: 0;
    transform: translateX(-1.875rem);
  }
}

@keyframes checkmark {
  to {
    stroke-dashoffset: 0;
  }
}

@keyframes shimmer {
  0% {
    background-position: -100% 0;
  }
  100% {
    background-position: 200% 0;
  }
}

/* Shimmer utility — apply to gold accents for a subtle gleam */
.shimmer {
  background: linear-gradient(
    90deg,
    var(--color-gold) 0%,
    var(--color-gold-dark) 40%,
    rgba(255, 255, 255, 0.3) 50%,
    var(--color-gold-dark) 60%,
    var(--color-gold) 100%
  );
  background-size: 200% 100%;
  animation: shimmer 3s ease-in-out infinite;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* --------------------------------------------------------------------------
   15. REDUCED MOTION
   Respects user preference — all animations and transitions disabled.
   -------------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* --------------------------------------------------------------------------
   16. RESPONSIVE BREAKPOINTS
   Mobile-first: base styles are mobile; media queries add tablet/desktop.
   Tablet: ≥ 768px (48rem)
   Desktop: ≥ 1024px (64rem)
   -------------------------------------------------------------------------- */

/* --- Tablet and up --- */
@media (min-width: 48rem) {
  .form-container {
    padding-top: var(--space-10);
  }

  .btn-row {
    margin-top: var(--space-6);
  }

  .attendance-choice {
    flex-wrap: nowrap;
  }

  .attendance-choice .btn {
    min-width: 14rem;
  }
}

/* --- Desktop and up --- */
@media (min-width: 64rem) {
  .hero-title {
    letter-spacing: -0.02em;
  }

  .container {
    padding-inline: var(--space-4);
  }
}

/* --- Small mobile: ensure touch targets and stacked buttons --- */
@media (max-width: 29.9375rem) { /* < 480px */
  .btn-row {
    flex-direction: column-reverse;
    gap: var(--space-1);
  }

  .btn-row .btn {
    width: 100%;
  }

  .attendance-choice {
    flex-direction: column;
  }

  .attendance-choice .btn {
    width: 100%;
  }
}

/* Ensure generous touch targets on all interactive inputs */
.form-input,
.form-select {
  min-height: 3rem; /* 48px — meets WCAG touch target minimum */
}

/* --------------------------------------------------------------------------
   17. UTILITIES
   Minimal utility classes. These supplement, not replace, semantic styling.
   -------------------------------------------------------------------------- */

/* Screen reader only — accessible but visually hidden */
.sr-only {
  position: absolute;
  width: 0.0625rem;
  height: 0.0625rem;
  padding: 0;
  margin: -0.0625rem;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.hidden {
  display: none !important;
}

.text-center {
  text-align: center;
}

.text-right {
  text-align: right;
}

/* Margin-top utilities — 8px baseline increments */
.mt-1 { margin-top: var(--space-1); }
.mt-2 { margin-top: var(--space-2); }
.mt-3 { margin-top: var(--space-3); }
.mt-4 { margin-top: var(--space-4); }

/* Margin-bottom utilities */
.mb-1 { margin-bottom: var(--space-1); }
.mb-2 { margin-bottom: var(--space-2); }
.mb-3 { margin-bottom: var(--space-3); }
.mb-4 { margin-bottom: var(--space-4); }

/* --------------------------------------------------------------------------
   18. HONEYPOT
   Anti-bot field. Visually hidden via positioning (NOT display:none,
   which bots detect and skip). Tabindex -1 in HTML keeps it out of
   keyboard flow.
   -------------------------------------------------------------------------- */
.form-hp {
  position: absolute;
  left: -9999rem;
  top: -9999rem;
  width: 0.0625rem;
  height: 0.0625rem;
  overflow: hidden;
  opacity: 0;
}

/* --------------------------------------------------------------------------
   19. FOCUS MANAGEMENT
   Global focus-visible ring for keyboard navigation.
   Invisible for mouse/touch users.
   -------------------------------------------------------------------------- */
:focus:not(:focus-visible) {
  outline: none;
}

:focus-visible {
  outline: 0.125rem solid var(--color-gold);
  outline-offset: 0.125rem;
}

/* Override for inputs that have their own focus styling */
.form-input:focus-visible,
.form-select:focus-visible,
.form-textarea:focus-visible,
.btn:focus-visible {
  outline: none;
}

/* ==========================================================================
   20. MISSING CLASSES — HTML/JS BRIDGE
   Classes used in index.html that weren't in the original CSS build.
   ========================================================================== */

/* --- Header Inner Layout --- */
.header-inner {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  width: 100%;
}

.header-logo {
  text-decoration: none;
  display: flex;
  align-items: center;
}

.logo-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: var(--radius-full);
  background: var(--color-olive);
  color: var(--color-white);
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: var(--text-lg);
  transition: background-color var(--duration) var(--ease-out);
}

.site-header.scrolled .logo-mark {
  background: var(--color-olive-dark);
}

.header-title {
  font-family: var(--font-heading);
  font-size: var(--text-lg);
  font-weight: 700;
  color: var(--color-white);
  letter-spacing: 0.02em;
  transition: color var(--duration) var(--ease-out);
}

.site-header.scrolled .header-title {
  color: var(--color-text);
}

/* --- Hero Date Note --- */
.hero-date-note {
  font-size: var(--text-sm);
  color: rgba(255, 255, 255, 0.7);
  margin-bottom: var(--space-4);
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

/* --- Form Row (two-column layout) --- */
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-2);
}

@media (max-width: 48rem) {
  .form-row {
    grid-template-columns: 1fr;
    gap: 0;
  }
}

/* --- Fieldset Reset --- */
.form-fieldset {
  border: none;
  padding: 0;
  margin: 0;
}

.form-fieldset legend.form-label {
  float: none;
  width: 100%;
}

/* --- Form Actions (button row) --- */
.form-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2);
  padding-top: var(--space-4);
  margin-top: var(--space-4);
  border-top: 0.0625rem solid var(--color-border);
}

@media (max-width: 48rem) {
  .form-actions {
    flex-direction: column-reverse;
  }

  .form-actions .btn {
    width: 100%;
  }
}

/* --- Conditional Group (show/hide fields) --- */
.conditional-group {
  transition: opacity var(--duration) var(--ease-out);
}

/* --- Radio/Checkbox Mark Aliases --- */
/* HTML uses .radio-mark and .checkbox-mark; CSS defined .form-radio__indicator.
   Bridge the gap by duplicating the styles under the HTML class names. */
.radio-mark {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 1.25rem;
  height: 1.25rem;
  border-radius: var(--radius-full);
  border: 0.125rem solid var(--color-border-hover);
  flex-shrink: 0;
  transition:
    border-color var(--duration) var(--ease-out),
    background-color var(--duration) var(--ease-out);
}

.radio-mark::after {
  content: '';
  width: 0.5rem;
  height: 0.5rem;
  border-radius: var(--radius-full);
  background: transparent;
  transition: background-color var(--duration) var(--ease-out);
}

.form-radio input:checked + .radio-mark {
  border-color: var(--color-olive);
}

.form-radio input:checked + .radio-mark::after {
  background: var(--color-olive);
}

.form-radio input:focus-visible + .radio-mark {
  box-shadow: 0 0 0 0.1875rem var(--color-focus-glow);
}

.checkbox-mark {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 1.25rem;
  height: 1.25rem;
  border-radius: 0.25rem;
  border: 0.125rem solid var(--color-border-hover);
  flex-shrink: 0;
  transition:
    border-color var(--duration) var(--ease-out),
    background-color var(--duration) var(--ease-out);
}

.checkbox-mark::after {
  content: '';
  width: 0.375rem;
  height: 0.625rem;
  border: solid var(--color-white);
  border-width: 0 0.125rem 0.125rem 0;
  transform: rotate(45deg) translateY(-0.0625rem);
  opacity: 0;
  transition: opacity var(--duration) var(--ease-out);
}

.form-checkbox input:checked + .checkbox-mark {
  background-color: var(--color-olive);
  border-color: var(--color-olive);
}

.form-checkbox input:checked + .checkbox-mark::after {
  opacity: 1;
}

.form-checkbox input:focus-visible + .checkbox-mark {
  box-shadow: 0 0 0 0.1875rem var(--color-focus-glow);
}

/* --- Stacked Radio Group (for Travel Preference) --- */
.form-radio-group--stacked .form-radio {
  align-items: flex-start;
  padding: var(--space-2);
  border: 0.0625rem solid var(--color-border);
  border-radius: var(--radius-sm);
  transition: border-color var(--duration) var(--ease-out);
}

.form-radio-group--stacked .form-radio:hover {
  border-color: var(--color-border-hover);
}

.form-radio-group--stacked .form-radio input:checked ~ .radio-content {
  color: var(--color-olive-dark);
}

.radio-content {
  display: flex;
  flex-direction: column;
  gap: 0.125rem;
}

.radio-content .form-hint {
  margin-top: 0;
}

/* --- Required / Optional Markers --- */
.required {
  color: var(--color-error);
  font-weight: 600;
}

.optional {
  color: var(--color-text-light);
  font-weight: 400;
  font-size: var(--text-sm);
}

/* --- Button Variants --- */
.btn-lg {
  padding: var(--space-2) var(--space-4);
  font-size: var(--text-lg);
}

.btn-retry {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.5rem var(--space-2);
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-weight: 600;
  border: none;
  border-radius: var(--radius-sm);
  background: var(--color-olive);
  color: var(--color-white);
  cursor: pointer;
  transition: background-color var(--duration) var(--ease-out);
  margin-top: var(--space-1);
}

.btn-retry:hover {
  background: var(--color-olive-dark);
}

.btn-text-content {
  /* Wrapper for text inside buttons with spinners */
}

.btn-spinner {
  display: inline-block;
  width: 1.25rem;
  height: 1.25rem;
  border: 0.125rem solid rgba(255, 255, 255, 0.3);
  border-top-color: var(--color-white);
  border-radius: var(--radius-full);
  animation: spin 0.6s linear infinite;
}

/* --- Loading Overlay --- */
.loading-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(250, 246, 240, 0.92);
  backdrop-filter: blur(0.25rem);
  -webkit-backdrop-filter: blur(0.25rem);
}

.loading-content {
  text-align: center;
}

.loading-spinner {
  width: 3rem;
  height: 3rem;
  border: 0.1875rem solid var(--color-border);
  border-top-color: var(--color-olive);
  border-radius: var(--radius-full);
  animation: spin 0.8s linear infinite;
  margin: 0 auto var(--space-2);
}

.loading-text {
  font-family: var(--font-heading);
  font-size: var(--text-lg);
  color: var(--color-text);
}

/* --- API Status Messages --- */
.api-status {
  position: fixed;
  bottom: var(--space-3);
  left: 50%;
  transform: translateX(-50%);
  z-index: 1001;
  max-width: 30rem;
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lifted);
  animation: fadeIn 0.3s var(--ease-out);
}

.api-status--error {
  background: #FEF2F2;
  border: 0.0625rem solid var(--color-error);
  color: var(--color-error);
}

.api-status--success {
  background: #F0FFF4;
  border: 0.0625rem solid var(--color-success);
  color: var(--color-success);
}

.api-status--info {
  background: var(--color-white);
  border: 0.0625rem solid var(--color-gold);
  color: var(--color-text);
}

/* --- Review List (dl/dt/dd structure from JS) --- */
.review-list {
  display: grid;
  gap: 0;
}

.review-section h4 {
  font-family: var(--font-heading);
  font-size: var(--text-lg);
  font-weight: 700;
  color: var(--color-text);
  margin-bottom: var(--space-2);
}

.review-item {
  display: grid;
  grid-template-columns: 10rem 1fr;
  gap: var(--space-1);
  padding: 0.5rem 0;
  border-bottom: 0.0625rem solid rgba(0, 0, 0, 0.06);
}

.review-item dt {
  font-size: var(--text-sm);
  color: var(--color-text-light);
  font-weight: 500;
}

.review-item dd {
  font-size: var(--text-base);
  color: var(--color-text);
}

@media (max-width: 48rem) {
  .review-item {
    grid-template-columns: 1fr;
    gap: 0.125rem;
  }
}

/* --- Event Schedule (Confirmation Page) --- */
.event-schedule {
  margin: var(--space-3) 0;
}

.schedule-item {
  display: grid;
  grid-template-columns: 3.5rem 1fr;
  gap: var(--space-1) var(--space-2);
  padding: var(--space-2) 0;
  border-bottom: 0.0625rem solid rgba(0, 0, 0, 0.06);
}

.schedule-item:last-child {
  border-bottom: none;
}

.schedule-date {
  font-family: var(--font-heading);
  font-weight: 700;
  color: var(--color-olive);
  font-size: var(--text-base);
}

.schedule-event {
  font-weight: 600;
  color: var(--color-text);
  grid-column: 2;
}

.schedule-location {
  font-size: var(--text-sm);
  color: var(--color-text-light);
  grid-column: 2;
}

/* --- Confirmation Variants --- */
.confirmation-subtitle {
  font-size: var(--text-lg);
  color: var(--color-text-light);
  margin-bottom: var(--space-4);
}

.confirmation-note {
  font-size: var(--text-sm);
  color: var(--color-text-light);
  margin-top: var(--space-3);
  line-height: 1.6;
}

.confirmation-contact {
  font-size: var(--text-sm);
  color: var(--color-text-light);
  margin-top: var(--space-2);
}

.confirmation-contact a {
  color: var(--color-olive);
  text-decoration: underline;
  text-underline-offset: 0.125rem;
}

.confirmation-contact a:hover {
  color: var(--color-olive-dark);
}

.confirmation-icon--muted svg .checkmark-circle {
  stroke: var(--color-text-light);
}

.confirmation-icon--muted svg .checkmark-check {
  stroke: var(--color-text-light);
}

/* --- SVG Checkmark Animation --- */
.checkmark-svg {
  width: 4rem;
  height: 4rem;
}

.checkmark-circle {
  stroke: var(--color-success);
  stroke-width: 2;
  stroke-dasharray: 166;
  stroke-dashoffset: 166;
  animation: checkmarkCircle 0.6s var(--ease-out) forwards;
}

.checkmark-check {
  stroke: var(--color-success);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 48;
  stroke-dashoffset: 48;
  animation: checkmarkCheck 0.3s 0.5s var(--ease-out) forwards;
}

@keyframes checkmarkCircle {
  to { stroke-dashoffset: 0; }
}

@keyframes checkmarkCheck {
  to { stroke-dashoffset: 0; }
}

/* --- Site Footer --- */
.site-footer {
  background: var(--color-olive-dark);
  color: rgba(255, 255, 255, 0.75);
  padding: var(--space-4) var(--space-3);
  text-align: center;
  font-size: var(--text-sm);
}

.footer-inner {
  max-width: 45rem;
  margin-inline: auto;
}

.footer-inner p {
  margin-bottom: 0.25rem;
}

.site-footer a {
  color: var(--color-gold);
  text-decoration: none;
  transition: color var(--duration) var(--ease-out);
}

.site-footer a:hover {
  color: var(--color-white);
}

.footer-venue {
  font-style: italic;
}

/* --- Form Main wrapper --- */
.form-main {
  padding-top: var(--space-8);
  padding-bottom: var(--space-6);
  min-height: 80vh;
}

/* --- Validation Error State (from validation.js) --- */
.field-error {
  border-color: var(--color-error) !important;
}

.field-error:focus {
  box-shadow: 0 0 0 0.1875rem rgba(192, 64, 64, 0.2) !important;
}

/* --------------------------------------------------------------------------
   21. PRINT STYLES
   Clean, ink-friendly output for the confirmation page.
   -------------------------------------------------------------------------- */
@media print {
  .site-header,
  .progress-bar,
  .progress-bar__mobile,
  .btn-row,
  .form-actions,
  .review-edit-link,
  .site-footer {
    display: none !important;
  }

  body {
    background: white;
    color: black;
    font-size: 12pt;
  }

  .hero {
    min-height: auto;
    padding: 2rem 0;
  }

  .hero-overlay {
    display: none;
  }

  .hero-title,
  .hero-subtitle {
    color: black;
  }

  .confirmation-details {
    box-shadow: none;
    border: 0.0625rem solid #ccc;
  }
}
