/* ================================================================
 * Hallmark · component: contest-form · genre: editorial · theme: vibrant-inclusive
 * Theme axes: light paper (>85%) · inclusive-sans display · saturated crimson accent
 * states: default · hover · focus-visible · active · disabled · loading · error · success
 * contrast: pass (46–50)
 *
 * Palette derived from Material 3 scheme-vibrant (#C12845 source)
 * Type: Inclusive Sans (Fontsource) — neo-grotesque, accessibility-first
 * Light mode — punchy, saturated, energetic
 * ================================================================ */

/* --- View Transitions API (smooth cross-fade between MPA pages) --- */
@view-transition {
  navigation: auto;
}

/* --- Font Faces: Inclusive Sans (Fontsource CDN) --- */
/* normal, variable weight 300–700 */
@font-face {
  font-family: 'Inclusive Sans Variable';
  font-style: normal;
  font-display: swap;
  font-weight: 300 700;
  src: url(https://cdn.jsdelivr.net/fontsource/fonts/inclusive-sans:vf@latest/latin-wght-normal.woff2) format('woff2-variations');
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;
}

/* italic, variable weight 300–700 */
@font-face {
  font-family: 'Inclusive Sans Variable';
  font-style: italic;
  font-display: swap;
  font-weight: 300 700;
  src: url(https://cdn.jsdelivr.net/fontsource/fonts/inclusive-sans:vf@latest/latin-wght-italic.woff2) format('woff2-variations');
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;
}

/* --- Design Tokens --- */
:root {
  /* ---- Colour ---- */
  --color-paper:       oklch(99% 0.004 30);
  --color-surface:     oklch(97% 0.007 28);
  --color-surface-2:   oklch(94% 0.012 28);
  --color-surface-3:   oklch(90% 0.018 28);
  --color-primary:     oklch(50% 0.14 25);
  --color-primary-hover: oklch(44% 0.16 25);
  --color-primary-active: oklch(38% 0.18 25);
  --color-primary-container: oklch(90% 0.04 25);
  --color-on-primary:  oklch(99% 0 0);
  --color-secondary:   oklch(55% 0.07 30);
  --color-secondary-container: oklch(91% 0.025 30);
  --color-tertiary:    oklch(58% 0.09 45);
  --color-tertiary-container: oklch(92% 0.03 45);
  --color-on-background: oklch(18% 0.012 30);
  --color-on-surface:  oklch(28% 0.01 30);
  --color-on-surface-muted: oklch(52% 0.015 30);
  --color-outline:     oklch(70% 0.015 30);
  --color-outline-strong: oklch(58% 0.02 30);
  --color-error:       oklch(58% 0.16 25);
  --color-error-container: oklch(93% 0.05 25);
  --color-success:     oklch(52% 0.12 145);
  --color-success-container: oklch(91% 0.04 145);
  --color-focus-ring:  oklch(50% 0.14 25 / 0.28);
  --color-error-bg: oklch(99% 0.015 25);
  --color-error-focus-ring: oklch(58% 0.16 25 / 0.2);
  --color-active-bg: oklch(99% 0.006 28);
  --color-selected-bg: oklch(92% 0.045 25);
  --color-selected-divider: oklch(50% 0.14 25 / 0.2);
  --color-shine: oklch(100% 0 0 / 0.12);
  --color-remove-border: oklch(58% 0.16 25 / 0.25);
  --color-subtle-shade: oklch(0% 0 0 / 0.05);
  --color-card-shadow: oklch(0% 0 0 / 0.08);
  --color-gold: oklch(72% 0.16 75);
  --color-gold-light: oklch(90% 0.06 75);
  --color-silver: oklch(72% 0.03 30);
  --color-silver-light: oklch(90% 0.02 30);

  /* ---- Typography ---- */
  --font-display: 'Inclusive Sans Variable', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --font-body:    'Inclusive Sans Variable', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --font-mono:    'SF Mono', 'Fira Code', 'Cascadia Code', 'JetBrains Mono', Consolas, monospace;

  --text-xs: clamp(0.6875rem, 0.65rem + 0.15vw, 0.75rem);
  --text-sm: clamp(0.8125rem, 0.8rem + 0.1vw, 0.875rem);
  --text-base: clamp(0.9375rem, 0.9rem + 0.15vw, 1rem);
  --text-lg: clamp(1.125rem, 1.05rem + 0.3vw, 1.25rem);
  --text-xl: clamp(1.375rem, 1.25rem + 0.5vw, 1.625rem);
  --text-display: clamp(1.75rem, 1.5rem + 1vw, 2.125rem);

  --leading-tight: 1.2;
  --leading-normal: 1.5;
  --leading-relaxed: 1.65;

  --weight-regular: 400;
  --weight-medium: 500;
  --weight-semibold: 600;
  --weight-bold: 700;

  /* ---- Spacing (4pt scale) ---- */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.25rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;
  --space-16: 4rem;

  /* ---- Radii ---- */
  --radius-sm: 0.375rem;
  --radius-md: 0.5rem;
  --radius-lg: 0.75rem;
  --radius-xl: 1rem;
  --radius-full: 9999px;

  /* ---- Shadows ---- */
  --shadow-sm:   0 1px 3px oklch(0% 0 0 / 0.06), 0 1px 2px oklch(0% 0 0 / 0.03);
  --shadow-md:   0 3px 10px oklch(0% 0 0 / 0.08), 0 1.5px 4px oklch(0% 0 0 / 0.05);
  --shadow-lg:   0 6px 20px oklch(0% 0 0 / 0.10), 0 2px 6px oklch(0% 0 0 / 0.05);
  --shadow-xl:   0 10px 40px oklch(0% 0 0 / 0.12), 0 4px 10px oklch(0% 0 0 / 0.06);

  /* ---- Motion ---- */
  --ease-out:    cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in:     cubic-bezier(0.4, 0, 0.68, 0.06);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
  --dur-fast:    100ms;
  --dur-normal:  180ms;
  --dur-slow:    300ms;
  --dur-reveal:  450ms;

  /* ---- Rules ---- */
  --border-width: 1.5px;
  --border-width-focus: 2px;
  --focus-ring-width: 3px;
  --measure: 60ch;
}

/* ---- Reduced Motion ---- */
@media (prefers-reduced-motion: reduce) {
  :root {
    --dur-fast: 0ms;
    --dur-normal: 0ms;
    --dur-slow: 120ms;
    --dur-reveal: 120ms;
  }
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 120ms !important;
    transition-property: opacity, color, background-color, border-color !important;
  }
}

/* ================================================================
   Reset & Base
   ================================================================ */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  overflow-x: clip;
}

body {
  overflow-x: clip;
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: var(--leading-normal);
  font-weight: var(--weight-regular);
  color: var(--color-on-background);
  background: var(--color-paper);
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding: var(--space-10) var(--space-4);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ================================================================
   Container / Form Card
   ================================================================ */
.container {
  width: 100%;
  max-width: 600px;
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xl);
  padding: var(--space-10) var(--space-8);
  border: 1px solid var(--color-subtle-shade);
  transition: box-shadow var(--dur-normal) var(--ease-out);
}

@media (min-width: 768px) {
  .container {
    max-width: 700px;
    padding: var(--space-10) var(--space-8);
  }
}

@media (max-width: 480px) {
  .container {
    padding: var(--space-6) var(--space-5);
  }
  body {
    padding: var(--space-4) var(--space-3);
  }
}

/* ================================================================
   Header
   ================================================================ */
h1 {
  font-family: var(--font-display);
  font-size: var(--text-display);
  font-weight: var(--weight-bold);
  line-height: var(--leading-tight);
  color: var(--color-on-background);
  margin-bottom: var(--space-1);
  letter-spacing: -0.025em;
}

h1 .trophy {
  font-size: 0.8em;
  display: inline-block;
  margin-right: var(--space-1);
}

.subtitle {
  font-size: var(--text-sm);
  color: var(--color-on-surface-muted);
  margin-bottom: var(--space-8);
  line-height: var(--leading-relaxed);
  max-width: var(--measure);
}

/* ================================================================
   Form Groups
   ================================================================ */
.form-group {
  margin-bottom: var(--space-6);
}

.form-group > label,
.form-group > .field-label {
  display: block;
  font-size: var(--text-sm);
  font-weight: var(--weight-semibold);
  color: var(--color-on-surface);
  margin-bottom: var(--space-2);
  letter-spacing: 0.01em;
}

.required {
  color: var(--color-error);
  margin-left: 2px;
  font-weight: var(--weight-bold);
}

.field-hint {
  font-size: var(--text-xs);
  color: var(--color-on-surface-muted);
  margin-bottom: var(--space-3);
  line-height: var(--leading-normal);
}

/* ================================================================
   Text Inputs
   ================================================================ */
input[type='text'],
input[type='email'],
input[type='tel'] {
  width: 100%;
  padding: var(--space-3) var(--space-4);
  font-size: var(--text-base);
  font-family: var(--font-body);
  font-weight: var(--weight-regular);
  line-height: var(--leading-normal);
  color: var(--color-on-background);
  background: var(--color-paper);
  border: var(--border-width) solid var(--color-outline);
  border-radius: var(--radius-sm);
  outline: none;
  transition:
    border-color var(--dur-fast) var(--ease-out),
    box-shadow var(--dur-fast) var(--ease-out),
    background var(--dur-fast) var(--ease-out);
  -webkit-appearance: none;
  appearance: none;
}

input[type='text']::placeholder,
input[type='email']::placeholder,
input[type='tel']::placeholder {
  color: var(--color-outline-strong);
  opacity: 0.65;
}

input[type='text']:hover,
input[type='email']:hover,
input[type='tel']:hover {
  border-color: var(--color-outline-strong);
}

input[type='text']:focus-visible,
input[type='email']:focus-visible,
input[type='tel']:focus-visible {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 var(--focus-ring-width) var(--color-focus-ring);
  background: var(--color-paper);
}

input[type='text']:active,
input[type='email']:active,
input[type='tel']:active {
  border-color: var(--color-primary);
  background: var(--color-active-bg);
}

/* Error */
input[type='text'].input-error,
input[type='email'].input-error,
input[type='tel'].input-error {
  border-color: var(--color-error);
  background: var(--color-error-bg);
  box-shadow: inset 3px 0 0 var(--color-error);
}

input[type='text'].input-error:focus-visible,
input[type='email'].input-error:focus-visible,
input[type='tel'].input-error:focus-visible {
  border-color: var(--color-error);
  box-shadow: inset 3px 0 0 var(--color-error),
              0 0 0 var(--focus-ring-width) var(--color-error-focus-ring);
}

input[type='text'].input-error:hover,
input[type='email'].input-error:hover,
input[type='tel'].input-error:hover {
  border-color: var(--color-error);
}

/* Disabled */
input[type='text']:disabled,
input[type='email']:disabled,
input[type='tel']:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  background: var(--color-surface-2);
  border-style: dashed;
}

/* ================================================================
   Error Messages
   ================================================================ */
.error-message {
  font-size: var(--text-xs);
  color: var(--color-error);
  margin-top: var(--space-1);
  display: flex;
  align-items: center;
  gap: var(--space-1);
  line-height: var(--leading-tight);
  font-weight: var(--weight-medium);

  /* Always reserve space to prevent layout shift */
  /* min-height accommodates ~2 lines of error text at --text-xs */
  min-height: 2.5em;
  visibility: hidden;
  opacity: 0;
  transform: translateY(-3px);
  transition:
    visibility 0s var(--dur-normal) var(--ease-out),
    opacity var(--dur-normal) var(--ease-out),
    transform var(--dur-normal) var(--ease-out);
}

.error-message.error-visible {
  visibility: visible;
  opacity: 1;
  transform: translateY(0);
  transition-delay: 0s;
}

.error-message::before {
  content: '\2716';
  font-size: 0.8em;
  flex-shrink: 0;
}

@keyframes fadeSlideIn {
  from {
    opacity: 0;
    transform: translateY(-3px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ================================================================
   File Upload Area
   ================================================================ */
.file-upload-area {
  position: relative;
  border: 2px dashed var(--color-outline);
  border-radius: var(--radius-md);
  padding: var(--space-6) var(--space-4);
  text-align: center;
  cursor: pointer;
  transition:
    border-color var(--dur-fast) var(--ease-out),
    background var(--dur-fast) var(--ease-out),
    box-shadow var(--dur-fast) var(--ease-out),
    transform var(--dur-fast) var(--ease-out);
  background: var(--color-paper);
}

.file-upload-area:hover {
  border-color: var(--color-primary);
  background: var(--color-primary-container);
  box-shadow: var(--shadow-sm);
  transform: translateY(-2px);
  border-style: solid;
}

.file-upload-area:active {
  transform: translateY(0);
  transition-duration: var(--dur-fast);
}

.file-upload-area.has-error {
  border-color: var(--color-error);
  background: var(--color-error-bg);
}

.file-upload-area.dragover {
  border-color: var(--color-primary);
  background: var(--color-primary-container);
  box-shadow: 0 0 0 var(--focus-ring-width) var(--color-focus-ring);
  border-style: solid;
  transform: scale(1.01);
}

.file-upload-area input[type='file'] {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.file-upload-icon {
  font-size: 2.5rem;
  margin-bottom: var(--space-2);
  display: block;
  line-height: 1;
  opacity: 0.6;
  transition: transform var(--dur-fast) var(--ease-out), opacity var(--dur-fast) var(--ease-out);
}

.file-upload-area:hover .file-upload-icon {
  opacity: 1;
  transform: scale(1.15) rotate(-3deg);
}

.file-upload-text {
  font-size: var(--text-sm);
  color: var(--color-on-surface-muted);
  line-height: var(--leading-normal);
}

.file-upload-text strong {
  color: var(--color-primary);
  font-weight: var(--weight-semibold);
}

.file-upload-hint {
  font-size: var(--text-xs);
  color: var(--color-outline-strong);
  margin-top: var(--space-1);
  opacity: 0.75;
}

/* File Preview */
.file-preview {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  margin-top: var(--space-3);
  padding: var(--space-3);
  background: var(--color-surface-2);
  border-radius: var(--radius-sm);
  border: var(--border-width) solid var(--color-outline);
  animation: fadeSlideIn var(--dur-fast) var(--ease-out);
}

.file-preview img {
  width: 60px;
  height: 60px;
  object-fit: cover;
  border-radius: var(--radius-sm);
  border: 1px solid var(--color-outline);
  flex-shrink: 0;
}

.file-preview .file-info {
  flex: 1;
  min-width: 0;
}

.file-preview .file-name {
  font-size: var(--text-sm);
  font-weight: var(--weight-medium);
  color: var(--color-on-background);
  word-break: break-all;
  line-height: var(--leading-tight);
}

.file-preview .file-size {
  font-size: var(--text-xs);
  color: var(--color-on-surface-muted);
  margin-top: var(--space-1);
}

.file-preview .remove-btn {
  background: none;
  border: 1.5px solid transparent;
  color: var(--color-on-surface-muted);
  cursor: pointer;
  font-size: 1.375rem;
  padding: var(--space-1);
  line-height: 1;
  border-radius: var(--radius-sm);
  transition: color var(--dur-fast) var(--ease-out), background var(--dur-fast) var(--ease-out),
    border-color var(--dur-fast) var(--ease-out);
  flex-shrink: 0;
  width: 2rem;
  height: 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.file-preview .remove-btn:hover {
  color: var(--color-error);
  background: var(--color-error-container);
  border-color: var(--color-remove-border);
}

/* ================================================================
   Custom Checkbox
   ================================================================ */
.checkbox-wrapper {
  display: flex;
  align-items: flex-start;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius-sm);
  background: var(--color-paper);
  border: var(--border-width) solid var(--color-outline);
  transition:
    background var(--dur-fast) var(--ease-out),
    border-color var(--dur-fast) var(--ease-out),
    box-shadow var(--dur-fast) var(--ease-out);
}

.checkbox-wrapper:hover {
  background: var(--color-surface-2);
  border-color: var(--color-outline-strong);
  box-shadow: var(--shadow-sm);
}

.checkbox-visual {
  position: relative;
  flex-shrink: 0;
  width: 1.375rem;
  height: 1.375rem;
}

.checkbox-text-label {
  cursor: pointer;
  flex: 1;
  min-width: 0;
}

.checkbox-input {
  position: absolute;
  opacity: 0;
  inset: 0;
  width: 100%;
  height: 100%;
  cursor: pointer;
  z-index: 1;
}

.checkbox-custom {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  border: 2px solid var(--color-outline-strong);
  border-radius: var(--radius-sm);
  background: var(--color-paper);
  transition:
    border-color var(--dur-fast) var(--ease-out),
    background var(--dur-fast) var(--ease-out),
    box-shadow var(--dur-fast) var(--ease-out);
  pointer-events: none;
}

.checkbox-input:focus-visible + .checkbox-custom {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 var(--focus-ring-width) var(--color-focus-ring);
}

.checkbox-input:checked + .checkbox-custom {
  background: var(--color-primary);
  border-color: var(--color-primary);
  transform: scale(1);
}

.checkbox-input:checked + .checkbox-custom::after {
  content: '';
  display: block;
  width: 0.375rem;
  height: 0.625rem;
  border: solid var(--color-on-primary);
  border-width: 0 2.5px 2.5px 0;
  transform: rotate(45deg) translateY(-1px);
}

.checkbox-text {
  font-size: var(--text-sm);
  font-weight: var(--weight-regular);
  color: var(--color-on-surface);
  user-select: none;
  line-height: var(--leading-normal);
}

.checkbox-text strong {
  font-weight: var(--weight-semibold);
  color: var(--color-on-background);
}

/* ================================================================
   Item Grid
   ================================================================ */
.item-group {
  margin-bottom: var(--space-5);
}

.item-group:last-child {
  margin-bottom: 0;
}

.item-group-title {
  font-size: var(--text-xs);
  font-weight: var(--weight-bold);
  color: var(--color-on-surface-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: var(--space-2);
  padding-bottom: var(--space-1);
  border-bottom: 2px solid var(--color-tertiary);
}

.item-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: var(--space-2);
  align-items: start;
}

.item-card {
  border: var(--border-width) solid var(--color-outline);
  border-radius: var(--radius-sm);
  padding: var(--space-3) var(--space-2);
  cursor: pointer;
  transition:
    all var(--dur-fast) var(--ease-out);
  user-select: none;
  text-align: center;
  background: var(--color-paper);
  outline: none;
  position: relative;
}

.item-card:hover {
  border-color: var(--color-primary);
  background: var(--color-primary-container);
  box-shadow: var(--shadow-sm);
  transform: translateY(-2px);
}

.item-card:focus-visible {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 var(--focus-ring-width) var(--color-focus-ring);
}

.item-card:active {
  transform: translateY(0);
  transition-duration: var(--dur-fast);
}

.item-card.selected {
  border-color: var(--color-primary);
  background: var(--color-selected-bg);
  box-shadow: var(--shadow-sm);
  border-width: 2px;
}

.item-card.selected::before {
  content: '\2713';
  position: absolute;
  top: var(--space-1);
  right: var(--space-1);
  font-size: 0.7rem;
  width: 1.125rem;
  height: 1.125rem;
  background: var(--color-primary);
  color: var(--color-on-primary);
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: var(--weight-bold);
  line-height: 1;
}

.item-card-label {
  font-size: var(--text-sm);
  font-weight: var(--weight-medium);
  color: var(--color-on-surface);
  line-height: var(--leading-tight);
  transition: color var(--dur-fast) var(--ease-out);
}

.item-card.selected .item-card-label {
  color: var(--color-primary);
  font-weight: var(--weight-bold);
}

/* Quantity stepper */
.item-card-qty {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  margin-top: var(--space-2);
  padding-top: var(--space-2);
  border-top: 1.5px solid var(--color-selected-divider);
  animation: fadeSlideIn var(--dur-fast) var(--ease-out);
}

.qty-btn {
  width: 1.625rem;
  height: 1.625rem;
  border: 1.5px solid var(--color-primary);
  border-radius: var(--radius-sm);
  background: var(--color-paper);
  color: var(--color-primary);
  font-size: var(--text-base);
  font-weight: var(--weight-bold);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition:
    background var(--dur-fast) var(--ease-out),
    color var(--dur-fast) var(--ease-out),
    transform var(--dur-fast) var(--ease-out);
  line-height: 1;
  padding: 0;
  -webkit-user-select: none;
  user-select: none;
}

.qty-btn:hover {
  background: var(--color-primary);
  color: var(--color-on-primary);
  transform: scale(1.1);
}

.qty-btn:active {
  transform: scale(0.85);
}

.qty-btn:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
}

.qty-value {
  font-size: var(--text-base);
  font-weight: var(--weight-bold);
  color: var(--color-primary);
  min-width: 1.75rem;
  text-align: center;
  font-variant-numeric: tabular-nums;
}

/* Summary */
.item-summary {
  font-size: var(--text-sm);
  color: var(--color-on-surface);
  margin-top: var(--space-3);
  padding: var(--space-3) var(--space-4);
  background: var(--color-surface-2);
  border-radius: var(--radius-sm);
  line-height: var(--leading-normal);
  border-left: 4px solid var(--color-primary);
  font-weight: var(--weight-medium);
}

.item-summary-count {
  font-weight: var(--weight-bold);
  color: var(--color-primary);
}

.item-summary-detail {
  color: var(--color-on-surface-muted);
  font-weight: var(--weight-regular);
}

/* ================================================================
   Submit Button
   ================================================================ */
.submit-btn {
  width: 100%;
  padding: var(--space-4) var(--space-6);
  font-size: var(--text-base);
  font-weight: var(--weight-bold);
  font-family: var(--font-body);
  line-height: var(--leading-tight);
  color: var(--color-on-primary);
  background: linear-gradient(135deg, var(--color-primary), oklch(48% 0.15 28));
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition:
    background var(--dur-fast) var(--ease-out),
    box-shadow var(--dur-fast) var(--ease-out),
    transform var(--dur-fast) var(--ease-out),
    opacity var(--dur-fast) var(--ease-out);
  margin-top: var(--space-3);
  position: relative;
  overflow: hidden;
  -webkit-user-select: none;
  user-select: none;
  letter-spacing: 0.02em;
}

.submit-btn::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    135deg,
    var(--color-shine) 0%,
    transparent 50%
  );
  pointer-events: none;
}

.submit-btn:hover:not(:disabled) {
  background: linear-gradient(135deg, var(--color-primary-hover), oklch(42% 0.17 28));
  box-shadow: var(--shadow-lg);
  transform: translateY(-2px);
}

.submit-btn:active:not(:disabled) {
  background: linear-gradient(135deg, var(--color-primary-active), oklch(36% 0.19 28));
  transform: translateY(0);
  box-shadow: var(--shadow-sm);
  transition-duration: var(--dur-fast);
}

.submit-btn:focus-visible {
  outline: none;
  box-shadow:
    0 0 0 var(--focus-ring-width) var(--color-focus-ring),
    var(--shadow-md);
}

.submit-btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
  background: var(--color-outline-strong);
}

.submit-btn.submitting {
  background: linear-gradient(135deg, var(--color-primary-hover), oklch(44% 0.16 28));
  cursor: wait;
  opacity: 0.9;
}

.submit-btn.submitting::before {
  content: '';
  display: inline-block;
  width: 1rem;
  height: 1rem;
  border: 2px solid var(--color-on-primary);
  border-top-color: transparent;
  border-radius: var(--radius-full);
  animation: spin 0.5s linear infinite;
  margin-right: var(--space-2);
  vertical-align: middle;
  position: relative;
  top: -1px;
}

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

/* ================================================================
   Submit Error Banner
   ================================================================ */
.submit-error {
  background: var(--color-error-container);
  border: 1.5px solid var(--color-error);
  border-radius: var(--radius-sm);
  padding: var(--space-3) var(--space-4);
  font-size: var(--text-sm);
  color: var(--color-error);
  margin-bottom: var(--space-5);
  line-height: var(--leading-normal);
  font-weight: var(--weight-medium);
  animation: fadeSlideIn var(--dur-slow) var(--ease-out);
}

/* ================================================================
   Success State
   ================================================================ */
.success-state {
  text-align: center;
  padding: var(--space-12) var(--space-4);
}

.success-state .success-icon {
  width: 4.5rem;
  height: 4.5rem;
  line-height: 4.5rem;
  font-size: 2.25rem;
  background: var(--color-success-container);
  color: var(--color-success);
  border-radius: var(--radius-full);
  margin: 0 auto var(--space-4);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 0 4px var(--color-paper), 0 0 0 6px var(--color-success-container);
  animation: successPop 0.4s var(--ease-out);
}

@keyframes successPop {
  0% { transform: scale(0); opacity: 0; }
  50% { transform: scale(1.2); }
  100% { transform: scale(1); opacity: 1; }
}

.success-state h2 {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: var(--weight-bold);
  color: var(--color-success);
  margin-bottom: var(--space-2);
  line-height: var(--leading-tight);
}

.success-state p {
  font-size: var(--text-base);
  color: var(--color-on-surface-muted);
  margin-bottom: var(--space-6);
  line-height: var(--leading-relaxed);
  max-width: 30ch;
  margin-left: auto;
  margin-right: auto;
}

.success-state .reset-btn {
  padding: var(--space-3) var(--space-6);
  font-size: var(--text-sm);
  font-weight: var(--weight-semibold);
  font-family: var(--font-body);
  color: var(--color-primary);
  background: var(--color-primary-container);
  border: 1.5px solid var(--color-primary);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition:
    background var(--dur-fast) var(--ease-out),
    color var(--dur-fast) var(--ease-out),
    box-shadow var(--dur-fast) var(--ease-out),
    transform var(--dur-fast) var(--ease-out);
}

.success-state .reset-btn:hover {
  background: var(--color-primary);
  color: var(--color-on-primary);
  box-shadow: var(--shadow-sm);
  transform: translateY(-1px);
}

.success-state .reset-btn:active {
  transform: translateY(0);
}

.success-state .reset-btn:focus-visible {
  outline: none;
  box-shadow: 0 0 0 var(--focus-ring-width) var(--color-focus-ring);
}

/* ================================================================
   Utility
   ================================================================ */
[x-cloak] {
  display: none !important;
}

/* ================================================================
   8-State Demo Section (preview wrapper — not for production)
   ================================================================ */
.state-demo {
  margin-top: var(--space-12);
  padding-top: var(--space-8);
  border-top: 2px solid var(--color-tertiary);
}

.state-demo h3 {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: var(--weight-bold);
  color: var(--color-on-background);
  margin-bottom: var(--space-6);
  letter-spacing: -0.02em;
}

.state-demo-grid {
  display: grid;
  grid-template-columns: 8rem 1fr;
  gap: var(--space-2) var(--space-4);
  align-items: center;
  font-size: var(--text-sm);
  color: var(--color-on-surface-muted);
}

.state-demo-grid .demo-label {
  font-weight: var(--weight-semibold);
  color: var(--color-on-surface);
  text-align: right;
  font-size: var(--text-xs);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.state-demo-grid .demo-cell {
  display: flex;
  gap: var(--space-2);
  align-items: center;
  flex-wrap: wrap;
}

/* Demo-specific: force states via classes */
.btn-demo {
  width: 100%;
  padding: var(--space-3) var(--space-5);
  font-size: var(--text-sm);
  font-weight: var(--weight-bold);
  font-family: var(--font-body);
  color: var(--color-on-primary);
  background: linear-gradient(135deg, var(--color-primary), oklch(48% 0.15 28));
  border: none;
  border-radius: var(--radius-sm);
  cursor: default;
  transition: none;
  position: relative;
  overflow: hidden;
  letter-spacing: 0.02em;
}

.btn-demo::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, var(--color-shine) 0%, transparent 50%);
  pointer-events: none;
}

.btn-demo.is-hover {
  background: linear-gradient(135deg, var(--color-primary-hover), oklch(42% 0.17 28));
  box-shadow: var(--shadow-lg);
  transform: translateY(-2px);
}

.btn-demo.is-focus {
  box-shadow: 0 0 0 var(--focus-ring-width) var(--color-focus-ring), var(--shadow-md);
}

.btn-demo.is-active {
  background: linear-gradient(135deg, var(--color-primary-active), oklch(36% 0.19 28));
  transform: translateY(0);
  box-shadow: var(--shadow-sm);
}

.btn-demo.is-disabled {
  opacity: 0.35;
  cursor: not-allowed;
  box-shadow: none;
  background: var(--color-outline-strong);
  transform: none;
}

.btn-demo.is-loading {
  background: linear-gradient(135deg, var(--color-primary-hover), oklch(44% 0.16 28));
  cursor: wait;
  opacity: 0.9;
}

.btn-demo.is-loading::before {
  content: '';
  display: inline-block;
  width: 0.875rem;
  height: 0.875rem;
  border: 2px solid var(--color-on-primary);
  border-top-color: transparent;
  border-radius: var(--radius-full);
  animation: spin 0.5s linear infinite;
  margin-right: var(--space-2);
  vertical-align: middle;
}

.btn-demo.is-error {
  background: linear-gradient(135deg, var(--color-error), oklch(50% 0.18 25));
}

.btn-demo.is-success {
  background: linear-gradient(135deg, var(--color-success), oklch(48% 0.13 145));
}

/* Input demo states */
.input-demo {
  width: 100%;
  padding: var(--space-2) var(--space-3);
  font-size: var(--text-sm);
  font-family: var(--font-body);
  color: var(--color-on-background);
  background: var(--color-paper);
  border: var(--border-width) solid var(--color-outline);
  border-radius: var(--radius-sm);
  outline: none;
}

.input-demo.is-hover {
  border-color: var(--color-outline-strong);
}

.input-demo.is-focus {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 var(--focus-ring-width) var(--color-focus-ring);
}

.input-demo.is-active {
  border-color: var(--color-primary);
  background: var(--color-active-bg);
}

.input-demo.is-disabled {
  opacity: 0.4;
  cursor: not-allowed;
  background: var(--color-surface-2);
  border-style: dashed;
}

.input-demo.is-error-demo {
  border-color: var(--color-error);
  background: var(--color-error-bg);
  border-left-width: 3px;
}

.input-demo.is-success-demo {
  border-color: var(--color-success);
}

/* ================================================================
   Phone Input Wrapper (visual prefix + masked suffix as one unit)
   ================================================================ */
.phone-input-wrapper {
  display: flex;
  align-items: center;
  width: 100%;
  background: var(--color-paper);
  border: var(--border-width) solid var(--color-outline);
  border-radius: var(--radius-sm);
  transition:
    border-color var(--dur-fast) var(--ease-out),
    box-shadow var(--dur-fast) var(--ease-out),
    background var(--dur-fast) var(--ease-out);
}

.phone-input-wrapper:hover {
  border-color: var(--color-outline-strong);
}

.phone-input-wrapper:focus-within {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 var(--focus-ring-width) var(--color-focus-ring);
  background: var(--color-paper);
}

.phone-input-wrapper:active {
  border-color: var(--color-primary);
  background: var(--color-active-bg);
}

/* Error state on the wrapper */
.phone-input-wrapper.input-error {
  border-color: var(--color-error);
  background: var(--color-error-bg);
  box-shadow: inset 3px 0 0 var(--color-error);
}

.phone-input-wrapper.input-error:focus-within {
  border-color: var(--color-error);
  box-shadow: inset 3px 0 0 var(--color-error),
              0 0 0 var(--focus-ring-width) var(--color-error-focus-ring);
}

.phone-input-wrapper.input-error:hover {
  border-color: var(--color-error);
}

/* The +60 1 prefix (truly uneditable — it's DOM text, not part of the input) */
.phone-prefix {
  flex-shrink: 0;
  padding: var(--space-3) 0 var(--space-3) var(--space-4);
  font-size: var(--text-base);
  font-family: var(--font-body);
  font-weight: var(--weight-regular);
  line-height: var(--leading-normal);
  color: var(--color-on-background);
  user-select: none;
  pointer-events: none;
}

/* The actual text input inside the wrapper — inherits border/shadow from wrapper */
.phone-input-wrapper input[type='tel'] {
  flex: 1;
  min-width: 0;
  padding: var(--space-3) var(--space-4) var(--space-3) var(--space-1);
  border: none;
  background: transparent;
  box-shadow: none;
  outline: none;
  border-radius: 0;
}

/* Drop the placeholder opacity a touch so it sits behind the prefix visually */
.phone-input-wrapper input[type='tel']::placeholder {
  opacity: 0.5;
}

/* ================================================================
   Full Page Layout (added for multi-page architecture)
   ================================================================ */

/* Adjust body to accommodate fixed bottom nav */
body {
  padding-bottom: 112px; /* space for floating bottom nav pill */
  min-height: 100vh;
}

/* Page wrapper for non-form pages */
.page {
  width: 100%;
  max-width: 600px;
  margin: 0 auto;
  padding: var(--space-6) var(--space-4);
}

/* ================================================================
   Bottom Navigation Bar
   ================================================================ */
.bottom-nav {
  position: fixed;
  bottom: calc(24px + env(safe-area-inset-bottom, 0px));
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: var(--space-2);
  width: calc(100% - 2 * var(--space-4));
  max-width: 600px;
  height: auto;
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius-full);
  /* White background with transparency for frosted glass */
  background: rgba(255, 255, 255, 0.80);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);

  /* Tinted border using faded #C12845 */
  border: 1px solid rgba(193, 40, 69, 0.15);

  /* Combined shadow: tinted outer glow + neutral depth */
  box-shadow:
    0 8px 32px rgba(193, 40, 69, 0.12),
    0 4px 24px oklch(0% 0 0 / 0.08),
    0 1px 4px oklch(0% 0 0 / 0.04);
  z-index: 100;

  /* Smooth morph between at-rest and floating pill states */
  transition:
    bottom var(--dur-slow) var(--ease-out),
    left var(--dur-slow) var(--ease-out),
    right var(--dur-slow) var(--ease-out),
    width var(--dur-slow) var(--ease-out),
    max-width var(--dur-slow) var(--ease-out),
    border-radius var(--dur-slow) var(--ease-out),
    transform var(--dur-slow) var(--ease-out),
    background var(--dur-slow) var(--ease-out),
    box-shadow var(--dur-slow) var(--ease-out),
    padding var(--dur-slow) var(--ease-out),
    backdrop-filter var(--dur-slow) var(--ease-out),
    border var(--dur-slow) var(--ease-out);
}

/* Fallback for browsers without backdrop-filter support */
@supports not (backdrop-filter: blur(1px)) {
  .bottom-nav,
  .bottom-nav--at-rest {
    background: #ffffff;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }
}

.nav-item {
  flex: 1 1 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  text-decoration: none;
  color: oklch(40% 0.01 30);
  min-width: 0;
  min-height: 44px;
  position: relative;
  transition:
    color var(--dur-fast) var(--ease-out),
    transform var(--dur-fast) var(--ease-out);
  -webkit-tap-highlight-color: transparent;
}

.nav-item:hover {
  color: var(--color-on-surface);
}

.nav-item:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
}

.nav-item.active {
  color: var(--color-primary);
  font-weight: var(--weight-semibold);
}

/* --- Pill-shaped active indicator --- */
.nav-item-inner {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: var(--radius-xl);
  transition:
    background var(--dur-fast) var(--ease-out),
    transform var(--dur-fast) var(--ease-out),
    box-shadow var(--dur-fast) var(--ease-out);
}

.nav-item:hover .nav-item-inner {
  background: var(--color-subtle-shade);
}

.nav-item:active .nav-item-inner {
  background: var(--color-surface-3);
}

.nav-item:active {
  transform: scale(0.96);
}

.nav-item.active .nav-item-inner {
  background: var(--color-primary-container);
  transform: translateY(-2px);
  box-shadow: 0 2px 8px var(--color-primary-container);
}

/* --- SVG icon size & outline/solid toggle --- */
.nav-icon {
  width: 24px;
  height: 24px;
  flex-shrink: 0;
  transition: color var(--dur-fast) var(--ease-out);
}

.nav-label {
  font-size: var(--text-xs);
  line-height: 1.1;
}

/* All breakpoints: pill stays centred and compact — no overrides needed */

/* --- Page-load entrance animation for bottom nav ---
   Uses opacity only — no transform in keyframes so it doesn't conflict
   with the at-rest state's `transform: none` or the floating state's
   `transform: translateX(-50%)`. */
.bottom-nav {
  animation: navFadeIn 0.3s var(--ease-out) 0.1s backwards;
}

@keyframes navFadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

/* --- Full-width "at rest" state — overrides the floating pill base --- */
.bottom-nav--at-rest {
  bottom: 0;
  left: 0;
  right: 0;
  transform: none;
  width: 100%;
  max-width: 100%;
  border-radius: 0;
  padding: var(--space-3) var(--space-4);
  border: none;
  border-top: 1px solid var(--color-outline);

  /* Slightly more opaque in full-width mode to maintain edge legibility */
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);

  /* Tinted top border */
  border-top: 1px solid rgba(193, 40, 69, 0.12);

  /* Tinted at-rest shadow */
  box-shadow:
    0 -4px 16px rgba(193, 40, 69, 0.08),
    0 -2px 8px oklch(0% 0 0 / 0.06),
    0 -1px 2px oklch(0% 0 0 / 0.04);
}

/* At-rest safe-area padding via nested padding */
.bottom-nav--at-rest {
  padding-bottom: calc(var(--space-3) + env(safe-area-inset-bottom, 0px));
}

/* ================================================================
   Page Fade-in (Alpine-driven, View-Transitions-API-friendly)
   ================================================================ */
@keyframes pageFadeIn {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.page-main--loaded {
  animation: pageFadeIn var(--dur-slow) var(--ease-out);
}

/* ================================================================
   Hero Section
   ================================================================ */
.hero {
  text-align: center;
  padding: var(--space-8) 0;
  margin: 0 auto;
}

.hero-image {
  max-width: 100%;
  height: auto;
  border-radius: var(--radius-lg);
  margin-bottom: var(--space-6);
  box-shadow: var(--shadow-lg);
}

.hero-content {
  text-align: center;
  padding: 0 var(--space-4);
}

.hero-title {
  font-family: var(--font-display);
  font-size: var(--text-display);
  font-weight: var(--weight-bold);
  line-height: var(--leading-tight);
  color: var(--color-on-background);
  margin-bottom: var(--space-3);
}

.hero-subtitle {
  font-size: var(--text-base);
  color: var(--color-on-surface-muted);
  margin-bottom: var(--space-6);
  line-height: var(--leading-relaxed);
  max-width: var(--measure);
  margin-left: auto;
  margin-right: auto;
}

/* Desktop: full-width hero image with text below */
@media (min-width: 768px) {
  .hero {
    display: flex;
    flex-direction: column;
    gap: var(--space-8);
    max-width: 1200px;
    padding: var(--space-12) var(--space-6);
  }

  .hero-image {
    width: 100%;
    max-width: 100%;
  }

  .hero-content {
    text-align: center;
    padding: 0;
  }

  .hero-title {
    font-size: clamp(1.75rem, 3vw, 2.5rem);
  }


}

.hero-cta {
  display: inline-block;
  padding: var(--space-4) var(--space-8);
  font-size: var(--text-base);
  font-weight: var(--weight-bold);
  font-family: var(--font-body);
  color: var(--color-on-primary);
  background: linear-gradient(135deg, var(--color-primary), oklch(48% 0.15 28));
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  text-decoration: none;
  transition: background var(--dur-fast) var(--ease-out), box-shadow var(--dur-fast) var(--ease-out), transform var(--dur-fast) var(--ease-out);
  letter-spacing: 0.02em;
}

.hero-cta:hover {
  background: linear-gradient(135deg, var(--color-primary-hover), oklch(42% 0.17 28));
  box-shadow: var(--shadow-lg);
  transform: translateY(-2px);
}

.hero-cta:active {
  background: linear-gradient(135deg, var(--color-primary-active), oklch(36% 0.19 28));
  transform: translateY(0);
}

.hero-cta:focus-visible {
  outline: none;
  box-shadow: 0 0 0 var(--focus-ring-width) var(--color-focus-ring), var(--shadow-md);
}

/* ================================================================
   Placeholder Section (for pages awaiting content)
   ================================================================ */
.placeholder-section {
  padding: var(--space-12) var(--space-4);
  text-align: center;
  color: var(--color-on-surface-muted);
  font-size: var(--text-sm);
  border: 2px dashed var(--color-outline);
  border-radius: var(--radius-md);
  margin: var(--space-6) 0;
}

/* ================================================================
   T&C PDF Download Link
   ================================================================ */
.tnc-pdf-note {
  margin-top: var(--space-8);
  padding-top: var(--space-4);
  border-top: 1px solid var(--color-outline);
  font-size: var(--text-sm);
  text-align: center;
}

.tnc-pdf-note a {
  color: var(--color-primary);
  text-decoration: underline;
  font-weight: var(--weight-medium);
}

.tnc-pdf-note a:hover {
  color: var(--color-primary-hover);
}

/* ================================================================
   T&C Content Styles
   ================================================================ */
.tnc-content {
  margin: var(--space-6) 0;
}

.tnc-clause {
  margin-bottom: var(--space-8);
  padding-bottom: var(--space-6);
  border-bottom: 1px solid var(--color-subtle-shade);
}

.tnc-clause:last-child {
  border-bottom: none;
}

.tnc-clause-heading {
  font-family: var(--font-display);
  font-size: var(--text-base);
  font-weight: var(--weight-bold);
  color: var(--color-on-background);
  margin-bottom: var(--space-3);
  line-height: var(--leading-tight);
}

.tnc-clause p,
.tnc-clause li {
  font-size: var(--text-sm);
  line-height: var(--leading-relaxed);
  color: var(--color-on-surface);
}

.tnc-clause p {
  margin-bottom: var(--space-3);
}

/* Week list for clause 1 */
.tnc-week-list {
  list-style: none;
  padding: 0;
  margin: var(--space-3) 0 var(--space-2);
}

.tnc-week-list li {
  padding: var(--space-1) 0;
  padding-left: var(--space-2);
  border-left: 3px solid var(--color-primary);
  margin-bottom: var(--space-1);
}

.tnc-week-label {
  font-weight: var(--weight-semibold);
  color: var(--color-primary);
}

/* Numbered sub-lists (clause 3, 4) */
.tnc-sub-list {
  list-style: decimal;
  padding-left: var(--space-5);
  margin: var(--space-3) 0;
}

.tnc-sub-list li {
  margin-bottom: var(--space-3);
  padding-left: var(--space-1);
}

.tnc-inner-list {
  list-style: lower-alpha;
  padding-left: var(--space-5);
  margin: var(--space-2) 0;
}

.tnc-inner-list li {
  margin-bottom: var(--space-1);
}

/* Sub-clauses within clause 4 */
.tnc-sub-clause {
  margin-bottom: var(--space-5);
}

.tnc-sub-heading {
  font-family: var(--font-display);
  font-size: var(--text-sm);
  font-weight: var(--weight-semibold);
  color: var(--color-on-background);
  margin-bottom: var(--space-2);
  line-height: var(--leading-tight);
}

/* Alphabetical list for clause 5 (prizes) */
.tnc-alpha-list {
  list-style: lower-alpha;
  padding-left: var(--space-5);
  margin: var(--space-3) 0;
}

.tnc-alpha-list li {
  margin-bottom: var(--space-3);
  padding-left: var(--space-1);
  font-size: var(--text-sm);
  line-height: var(--leading-relaxed);
  color: var(--color-on-surface);
}

.tnc-alpha-list li strong {
  color: var(--color-on-background);
}

/* ================================================================
   Sticky Top Bar with Shrink-on-Scroll Logo
   ================================================================ */
.top-bar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 64px;
  padding: var(--space-2) var(--space-4);
  background: var(--color-paper);
  border-bottom: 1px solid var(--color-subtle-shade);
  box-shadow: 0 1px 4px var(--color-card-shadow);
  z-index: 90;
  transition: height var(--dur-slow) var(--ease-out),
              box-shadow var(--dur-slow) var(--ease-out);
}

.top-bar--compact {
  height: 48px;
  box-shadow: 0 2px 8px var(--color-card-shadow);
}

.top-bar-logo {
  height: 40px;
  width: auto;
  transition: height var(--dur-slow) var(--ease-out);
}

.top-bar--compact .top-bar-logo {
  height: 26px;
}

/* Top padding on content wrappers to accommodate fixed top bar */
.landing-content,
.page {
  padding-top: 64px;
}

@media (max-width: 480px) {
  .top-bar {
    height: 56px;
  }
  .top-bar--compact {
    height: 44px;
  }
  .top-bar-logo {
    height: 34px;
  }
  .top-bar--compact .top-bar-logo {
    height: 22px;
  }
  .landing-content,
  .page {
    padding-top: 56px;
  }
}

/* ================================================================
   Section Titles (shared across landing sections)
   ================================================================ */
.section-title {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: var(--weight-bold);
  line-height: var(--leading-tight);
  color: var(--color-on-background);
  margin-bottom: var(--space-2);
  text-align: center;
}

.section-subtitle {
  font-size: var(--text-sm);
  color: var(--color-on-surface-muted);
  text-align: center;
  margin-bottom: var(--space-6);
  max-width: var(--measure);
  margin-left: auto;
  margin-right: auto;
}

/* ================================================================
   Image Loading & Fallbacks
   ================================================================ */
img {
  color: transparent; /* hide alt text flash while loading */
}

/* ---- Landing page background ---- */
body:has(.landing-content) {
  background: var(--color-paper);
}

/* ================================================================
   Prize Gallery — Unified Card System
   ================================================================ */
.prizes-section {
  /*
   * Trip.com-style full-viewport breakout.
   * The section spans 100vw with a gradient that blends the body background
   * into the prize-section pink and back out, avoiding hard colour seams.
   * See docs/tripdotcom-gradient-implementation.md
   */
  width: 100vw;
  margin-left: calc(50% - 50vw);
  padding: var(--space-10) var(--space-4);
  background: linear-gradient(
    var(--color-paper) 0px,
    #f8dcdd 180px,
    #f8dcdd calc(100% - 180px),
    var(--color-paper) 100%
  );
}

/* Constrain child content width */
.prizes-section > * {
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

@media (min-width: 900px) {
  .prizes-section > * {
    max-width: 900px;
  }
}

/* --- Base Card --- */
.prize-card {
  background: rgb(255, 255, 255);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: rgba(18, 24, 38, 0.1) 0px 8px 24px 0px;
  transition: box-shadow var(--dur-normal) var(--ease-out), transform var(--dur-normal) var(--ease-out);
  animation: pageFadeIn var(--dur-slow) var(--ease-out) both;
}

.prize-card:hover {
  box-shadow: rgba(18, 24, 38, 0.14) 0px 12px 32px 0px;
  transform: translateY(-4px);
}

/* --- Grand Prize — full-width hero card --- */
.prize-card--grand {
  margin-bottom: var(--space-6);
  border-radius: 12px;
  box-shadow: rgba(18, 24, 38, 0.12) 0px 10px 30px 0px;
  animation-duration: var(--dur-reveal);
  animation-delay: 0.05s;
}

.prize-card--grand:hover {
  box-shadow: rgba(18, 24, 38, 0.16) 0px 16px 40px 0px;
  transform: translateY(-5px);
}

.prize-card--grand .prize-card__media {
  aspect-ratio: 16 / 9;
}

.prize-card--grand .prize-card__body {
  padding: var(--space-5) var(--space-5) var(--space-6);
}

.prize-card--grand .prize-card__title {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  margin-bottom: var(--space-2);
}

.prize-card--grand .prize-card__description {
  font-size: var(--text-base);
  max-width: var(--measure);
}

.prize-card--grand .prize-card__value {
  font-size: var(--text-sm);
  padding: var(--space-2) var(--space-5);
}

/* --- 1st Prize — elevated with silver border --- */
.prize-card--first {
  box-shadow: rgba(18, 24, 38, 0.1) 0px 8px 24px 0px;
}

.prize-card--first:hover {
  box-shadow: rgba(18, 24, 38, 0.14) 0px 12px 32px 0px;
  transform: translateY(-4px);
}

/* --- Media Container --- */
.prize-card__media {
  position: relative;
  width: 100%;
  aspect-ratio: 1;
  overflow: hidden;
  background: rgb(255, 255, 255);
}

@media (min-width: 900px) {
  .prize-card--first .prize-card__media {
    aspect-ratio: 4 / 3;
  }
}

/* --- Image --- */
.prize-card__image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* --- Badge (decorative — aria-hidden) --- */
.prize-card__badge {
  position: absolute;
  top: var(--space-3);
  left: var(--space-3);
  background: oklch(0% 0 0 / 0.45);
  color: white;
  padding: var(--space-1) var(--space-3);
  border-radius: var(--radius-full);
  font-size: var(--text-xs);
  font-weight: var(--weight-semibold);
  backdrop-filter: blur(4px);
  line-height: 1;
}

.prize-card__badge--grand {
  background: linear-gradient(135deg, var(--color-gold), oklch(65% 0.18 75));
  color: oklch(20% 0.04 75);
  padding: var(--space-2) var(--space-4);
  font-size: var(--text-sm);
  font-weight: var(--weight-bold);
  letter-spacing: 0.02em;
  box-shadow: 0 2px 8px oklch(0% 0 0 / 0.2);
}

/* --- Body --- */
.prize-card__body {
  padding: var(--space-3);
}

/* --- Category (semantic tier name) --- */
.prize-card__category {
  font-size: var(--text-xs);
  font-weight: var(--weight-semibold);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-primary);
  margin-bottom: var(--space-1);
  line-height: var(--leading-tight);
}

/* --- Title --- */
.prize-card__title {
  font-size: var(--text-sm);
  font-weight: var(--weight-semibold);
  color: var(--color-on-background);
  margin-bottom: var(--space-1);
  line-height: var(--leading-tight);
}

/* --- Description --- */
.prize-card__description {
  font-size: var(--text-xs);
  color: var(--color-on-surface-muted);
  line-height: var(--leading-normal);
  margin-bottom: var(--space-2);
}

/* --- Value Pill --- */
.prize-card__value {
  display: inline-block;
  background: var(--color-primary);
  color: var(--color-on-primary);
  font-size: var(--text-xs);
  font-weight: var(--weight-bold);
  padding: var(--space-1) var(--space-4);
  border-radius: var(--radius-full);
  line-height: var(--leading-tight);
}

/* --- Subgrid (1st, Consolation, Weekly) --- */
.prize-subgrid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-4);
}

@media (min-width: 600px) {
  .prize-subgrid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (min-width: 900px) {
  .prize-subgrid {
    display: flex;
    gap: var(--space-4);
  }

  .prize-subgrid > .prize-card {
    flex: 1;
  }

  .prize-subgrid > .prize-card--first {
    flex: 1.5;
  }
}

/* --- Staggered entrance: Grand is card 1, subgrid cards 2-4 --- */
.prize-subgrid > .prize-card:nth-child(1) { animation-delay: 0.1s; }
.prize-subgrid > .prize-card:nth-child(2) { animation-delay: 0.15s; }
.prize-subgrid > .prize-card:nth-child(3) { animation-delay: 0.2s; }

/* ================================================================
   Key Dates
   ================================================================ */
.dates-section {
  padding: var(--space-8) var(--space-4);
  max-width: 600px;
  margin: 0 auto;
}

.dates-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.date-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--space-3) var(--space-4);
  background: var(--color-surface-2);
  border-radius: var(--radius-sm);
  border-left: 4px solid var(--color-primary);
}

.date-label {
  font-size: var(--text-sm);
  font-weight: var(--weight-medium);
  color: var(--color-on-surface-muted);
}

.date-value {
  font-size: var(--text-sm);
  font-weight: var(--weight-semibold);
  color: var(--color-on-background);
}

/* ================================================================
   Mechanics / Steps
   ================================================================ */
.mechanics-section {
  padding: var(--space-8) var(--space-4);
  max-width: 600px;
  margin: 0 auto;
}

.steps {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

.step {
  display: flex;
  gap: var(--space-4);
  align-items: flex-start;
}

.step-number {
  flex-shrink: 0;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: var(--radius-full);
  background: linear-gradient(135deg, var(--color-primary), oklch(48% 0.15 28));
  color: var(--color-on-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--text-base);
  font-weight: var(--weight-bold);
  line-height: 1;
}

.step-content {
  flex: 1;
  min-width: 0;
  padding-top: var(--space-1);
}

.step-title {
  font-size: var(--text-base);
  font-weight: var(--weight-semibold);
  color: var(--color-on-background);
  margin-bottom: var(--space-1);
  line-height: var(--leading-tight);
}

.step-text {
  font-size: var(--text-sm);
  color: var(--color-on-surface-muted);
  line-height: var(--leading-relaxed);
}

/* ================================================================
   Bottom CTA Section
   ================================================================ */
.bottom-cta-section {
  text-align: center;
  padding: var(--space-10) var(--space-4);
  max-width: 600px;
  margin: 0 auto;
}

.bottom-cta-section .section-title {
  margin-bottom: var(--space-2);
}

.bottom-cta-section .section-subtitle {
  margin-bottom: var(--space-6);
}

/* ================================================================
   Store Links (BOH Shopee / Lazada)
   ================================================================ */
.store-links-section {
  text-align: center;
  padding: var(--space-10) var(--space-4);
  max-width: 600px;
  margin: 0 auto;
}

.store-links-section .section-title {
  margin-bottom: var(--space-2);
}

.store-links-section .section-subtitle {
  margin-bottom: var(--space-6);
}

.store-links {
  display: flex;
  gap: var(--space-4);
  justify-content: center;
  flex-wrap: wrap;
}

.store-link {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-6);
  font-size: var(--text-base);
  font-weight: var(--weight-bold);
  font-family: var(--font-body);
  color: var(--color-on-primary);
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  text-decoration: none;
  transition: background var(--dur-fast) var(--ease-out),
              box-shadow var(--dur-fast) var(--ease-out),
              transform var(--dur-fast) var(--ease-out);
  letter-spacing: 0.02em;
}

.store-link--shopee {
  background: linear-gradient(135deg, #ee4d2d, #d7321c);
}

.store-link--shopee:hover {
  background: linear-gradient(135deg, #d7321c, #c02a17);
  box-shadow: var(--shadow-lg);
  transform: translateY(-2px);
}

.store-link--lazada {
  background: linear-gradient(135deg, #0f146d, #191e8a);
}

.store-link--lazada:hover {
  background: linear-gradient(135deg, #191e8a, #2328a0);
  box-shadow: var(--shadow-lg);
  transform: translateY(-2px);
}

.store-link:active {
  transform: translateY(0);
}

.store-link:focus-visible {
  outline: none;
  box-shadow: 0 0 0 var(--focus-ring-width) var(--color-focus-ring), var(--shadow-md);
}

.store-link-icon {
  font-size: var(--text-lg);
}

/* ================================================================
   Landing page content wrapper
   ================================================================ */
.landing-content {
  width: 100%;
}

/* ================================================================
   Winners Page
   ================================================================ */
.winners-section {
  margin-bottom: var(--space-8);
}

.winners-section-title {
  text-align: left;
  font-size: var(--text-lg);
  margin-bottom: var(--space-2);
}

.winners-note {
  font-size: var(--text-sm);
  color: var(--color-on-surface-muted);
  margin-bottom: var(--space-4);
  line-height: var(--leading-relaxed);
}

.winner-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.winner-card {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-4);
  background: var(--color-surface-2);
  border-radius: var(--radius-sm);
  border-left: 4px solid var(--color-primary);
  transition: box-shadow var(--dur-fast) var(--ease-out), transform var(--dur-fast) var(--ease-out);
}

.winner-card:hover {
  box-shadow: var(--shadow-sm);
  transform: translateX(2px);
}

.winner-card--empty {
  border-left-color: var(--color-outline);
  opacity: 0.6;
}

.winner-avatar-placeholder {
  flex-shrink: 0;
  width: 3rem;
  height: 3rem;
  border-radius: var(--radius-full);
  background: linear-gradient(135deg, var(--color-primary), oklch(48% 0.15 28));
  display: flex;
  align-items: center;
  justify-content: center;
}

.winner-avatar-placeholder--empty {
  background: var(--color-surface-3);
}

.winner-initials {
  color: var(--color-on-primary);
  font-size: var(--text-xs);
  font-weight: var(--weight-bold);
}

.winner-details {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.winner-week {
  font-size: var(--text-sm);
  font-weight: var(--weight-semibold);
  color: var(--color-on-background);
}

.winner-date {
  font-size: var(--text-xs);
  color: var(--color-on-surface-muted);
}

.winner-prize {
  font-size: var(--text-xs);
  color: var(--color-primary);
  font-weight: var(--weight-medium);
}

.winner-name {
  font-size: var(--text-xs);
  color: var(--color-on-surface-muted);
}

.winner-status {
  font-size: var(--text-xs);
  color: var(--color-on-surface-muted);
  font-style: italic;
}

/* Grand Prize Placeholder */
.grand-prize-placeholder {
  text-align: center;
  padding: var(--space-8) var(--space-4);
  background: var(--color-surface-2);
  border-radius: var(--radius-md);
  border: 2px dashed var(--color-outline);
}

.grand-prize-icon {
  font-size: 3rem;
  display: block;
  margin-bottom: var(--space-3);
}

.grand-prize-text {
  font-size: var(--text-base);
  color: var(--color-on-surface-muted);
  font-weight: var(--weight-medium);
}

/* Winners CTA */
.winners-cta {
  text-align: center;
  padding: var(--space-8) 0;
  border-top: 1px solid var(--color-outline);
  margin-top: var(--space-4);
}

.winners-cta p {
  font-size: var(--text-base);
  color: var(--color-on-surface);
  margin-bottom: var(--space-4);
}

/* ================================================================
   Countdown Bottom Navigation Bar (redesign)
   ================================================================ */
/* Override full-pill radius to a rounded-rectangle for the countdown variant */
.bottom-nav--countdown {
  border-radius: var(--radius-xl);
}

.bottom-nav--countdown.bottom-nav--at-rest {
  border-radius: 0;
}

/* Inner layout: left content + right CTA */
.countdown-bar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  gap: var(--space-3);
}

/* Left side: countdown / fallback text */
.countdown-bar-left {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.countdown-bar-text {
  color: #C12845;
  font-size: var(--text-sm);
  font-weight: var(--weight-semibold);
  line-height: 1.2;
}

.countdown-bar-text--timer {
  font-size: var(--text-base);
  font-weight: var(--weight-bold);
}

.countdown-bar-text--fallback {
  font-size: var(--text-sm);
  font-weight: var(--weight-medium);
}

/* Small label below the timer (active phase only) */
.countdown-bar-label {
  font-size: var(--text-xs);
  color: var(--color-on-surface-muted);
  line-height: 1.2;
}

.countdown-bar-date {
  color: #C12845;
}

/* Timer group (countdown + label) */
.countdown-bar-timer-group {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

/* CTA Button */
.countdown-bar-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  padding: var(--space-2) var(--space-4);
  background: #C12845;
  color: #ffffff;
  font-size: var(--text-sm);
  font-weight: var(--weight-semibold);
  line-height: 1.2;
  text-decoration: none;
  border: none;
  border-radius: var(--radius-md);
  white-space: nowrap;
  min-height: 36px;
  transition:
    background var(--dur-fast) var(--ease-out),
    opacity var(--dur-fast) var(--ease-out);
}

.countdown-bar-btn:hover {
  background: var(--color-primary-hover);
}

.countdown-bar-btn:active {
  background: var(--color-primary-active);
}

.countdown-bar-btn:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
}

/* Disabled state for pre/post contest */
.countdown-bar-btn--disabled {
  background: var(--color-surface-3);
  color: var(--color-on-surface-muted);
  cursor: default;
  pointer-events: none;
}

/* Override bottom-nav padding for tighter spacing */
.bottom-nav--countdown {
  padding: var(--space-2) var(--space-3);
}

.bottom-nav--countdown.bottom-nav--at-rest {
  padding: var(--space-3) var(--space-4);
  padding-bottom: calc(var(--space-3) + env(safe-area-inset-bottom, 0px));
}
