/* Arctic Adventure Tours, passenger list demo. Shared tokens and components.
   Tokens solved from the logo blue #1E559B for a dark page (brand.json).
   Status colours: orange = on board, no feedback yet; green = feedback in.
   Dark text (#06101e) on orange is 8.1:1, on green 11.7:1, on the button blue 9.2:1. */

:root {
  --paper: #091423;
  --surface: #152235;
  --surface-2: #1b2b42;
  --ink: #daeaff;
  --ink-2: #a4bad8;
  --muted: #798aa1;
  --accent: #528ad5;
  --accent-strong: #81b7ff;
  --rule: #323d4c;
  --rule-strong: #4a586a;
  --brand: #1e559b;
  --orange: #ff8a3d;
  --orange-deep: #e86f1f;
  --green: #4fe3a6;
  --green-deep: #2cc98a;
  --star: #ffd166;
  --on-status: #06101e;
  --font: "Manrope", system-ui, -apple-system, "Segoe UI", sans-serif;
  --radius: 18px;
  --radius-s: 12px;
  --ease: cubic-bezier(.2, .8, .2, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
  font-feature-settings: "tnum" 1;
}
img, video, svg { display: block; max-width: 100%; }
h1, h2, h3, h4, p { margin: 0; }
h1, h2, h3, h4 { font-weight: 800; letter-spacing: -.02em; line-height: 1.08; }
a { color: var(--accent-strong); text-decoration: none; }
button { font: inherit; color: inherit; }
button, a, label, select, input, textarea, summary, [role="button"], .aat-seat.is-on, .aat-seat.is-done { cursor: pointer; }
input[type="text"], input[type="tel"], input[type="password"], textarea { cursor: text; }
:focus-visible { outline: 3px solid var(--accent-strong); outline-offset: 2px; }
.aat-num { font-variant-numeric: tabular-nums; font-feature-settings: "tnum" 1; }
.aat-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Logo lockup: their mark, the name set in type beside it */
.aat-logo { display: inline-flex; align-items: center; gap: 12px; color: var(--ink); font-weight: 800; letter-spacing: -.01em; white-space: nowrap; }
.aat-logo img { width: 30px; height: auto; }
.aat-logo span { font-size: 17px; }

/* Buttons */
.aat-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 52px; padding: 0 24px; border-radius: 14px; border: 2px solid transparent;
  font-weight: 800; font-size: 17px; letter-spacing: -.01em; white-space: nowrap;
  transition: transform .15s var(--ease), background .15s, border-color .15s, opacity .15s, box-shadow .15s;
  text-decoration: none;
}
.aat-btn:active { transform: translateY(1px) scale(.99); }
.aat-btn:disabled, .aat-btn[aria-disabled="true"] { opacity: .38; cursor: not-allowed; }
.aat-btn-primary { background: var(--accent-strong); color: var(--on-status); }
.aat-btn-primary:not(:disabled):hover { background: #9ac6ff; box-shadow: 0 8px 28px -8px rgba(129, 183, 255, .6); }
.aat-btn-secondary { background: transparent; color: var(--ink); border-color: var(--rule-strong); }
.aat-btn-secondary:not(:disabled):hover { border-color: var(--accent-strong); }
.aat-btn-ghost { background: transparent; color: var(--ink-2); min-height: 40px; padding: 0 12px; font-weight: 700; font-size: 15px; }
.aat-btn-ghost:hover { color: var(--ink); }
.aat-btn-big { min-height: 62px; font-size: 19px; border-radius: 16px; width: 100%; }

/* Seat tiles, the thing the whole demo is about */
.aat-seats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.aat-seat {
  position: relative; aspect-ratio: 1; border-radius: var(--radius-s);
  border: 2px dashed var(--rule-strong); color: var(--muted);
  display: flex; align-items: center; justify-content: center; flex-direction: column;
  font-weight: 800; font-size: 14px; line-height: 1; user-select: none;
  transition: background .2s, border-color .2s, color .2s;
}
.aat-seat .aat-seat-n { font-size: 12px; font-weight: 700; color: var(--rule-strong); }
.aat-seat .aat-seat-i, .aat-seat .aat-seat-f, .aat-seat .aat-seat-s { display: none; }
.aat-seat.is-on, .aat-seat.is-done { border-style: solid; color: var(--on-status); }
.aat-seat.is-on { background: var(--orange); border-color: var(--orange); }
.aat-seat.is-done { background: var(--green); border-color: var(--green); }
.aat-seat.is-on .aat-seat-n, .aat-seat.is-done .aat-seat-n { display: none; }
.aat-seat.is-on .aat-seat-i, .aat-seat.is-on .aat-seat-f { display: block; }
.aat-seat.is-done .aat-seat-s { display: flex; align-items: center; gap: 3px; }
.aat-seat .aat-seat-i { font-size: 15px; letter-spacing: .01em; max-width: 92%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.aat-seat .aat-seat-f { position: absolute; right: 5px; bottom: 4px; font-size: 12px; line-height: 1; }
.aat-seat .aat-seat-s { font-size: 16px; }
.aat-seat .aat-seat-s svg { width: 15px; height: 15px; fill: var(--on-status); }
.aat-seat.is-me { box-shadow: 0 0 0 3px var(--paper), 0 0 0 6px var(--accent-strong), 0 0 22px 4px rgba(129, 183, 255, .45); z-index: 1; }
.aat-seat.is-me .aat-seat-i { font-size: 13px; }
.aat-seat.aat-pop { animation: aat-pop .55s var(--ease) both; }
.aat-seat.aat-flip { animation: aat-flip .6s var(--ease) both; }
.aat-seat.aat-flip::after {
  content: ""; position: absolute; inset: -4px; border-radius: inherit;
  border: 3px solid var(--green); animation: aat-burst .7s ease-out forwards; pointer-events: none;
}
@keyframes aat-pop {
  0% { transform: scale(.35); box-shadow: 0 0 0 0 rgba(255, 138, 61, .9); }
  60% { transform: scale(1.1); box-shadow: 0 0 0 10px rgba(255, 138, 61, 0); }
  100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(255, 138, 61, 0); }
}
.aat-seat.is-me.aat-pop { animation-name: aat-pop-me; }
@keyframes aat-pop-me {
  0% { transform: scale(.35); }
  60% { transform: scale(1.14); }
  100% { transform: scale(1); }
}
@keyframes aat-flip {
  0% { transform: scale(1) rotateY(0); }
  45% { transform: scale(1.08) rotateY(90deg); }
  100% { transform: scale(1) rotateY(0); }
}
@keyframes aat-burst {
  0% { transform: scale(.9); opacity: 1; }
  100% { transform: scale(1.7); opacity: 0; }
}

/* Phase dot and pill */
.aat-pill {
  display: inline-flex; align-items: center; gap: 9px; padding: 8px 16px 8px 12px; border-radius: 99px;
  background: var(--surface); border: 1px solid var(--rule); font-weight: 800; font-size: 15px; white-space: nowrap;
}
.aat-pill .aat-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--orange); box-shadow: 0 0 0 0 rgba(255, 138, 61, .6); animation: aat-pulse 2s infinite; }
.aat-pill.is-sea .aat-dot { background: var(--accent-strong); box-shadow: 0 0 0 0 rgba(129, 183, 255, .6); }
.aat-pill.is-back .aat-dot { background: var(--green); box-shadow: 0 0 0 0 rgba(79, 227, 166, .6); animation: none; }
@keyframes aat-pulse { 0% { box-shadow: 0 0 0 0 currentColor; } 70% { box-shadow: 0 0 0 8px rgba(0, 0, 0, 0); } 100% { box-shadow: 0 0 0 0 rgba(0, 0, 0, 0); } }

/* Chips and stars (shared by the guest page and the landing mockups) */
.aat-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.aat-chip {
  border: 2px solid var(--rule-strong); background: transparent; color: var(--ink);
  font-weight: 700; font-size: 15px; padding: 9px 14px; border-radius: 99px; line-height: 1.1;
  transition: background .15s, border-color .15s, color .15s, transform .1s;
}
.aat-chip:active { transform: scale(.97); }
.aat-chip.is-on { background: var(--accent-strong); border-color: var(--accent-strong); color: var(--on-status); }
.aat-stars { display: flex; gap: 6px; }
.aat-star { background: none; border: 0; padding: 4px; line-height: 0; }
.aat-star svg { width: 46px; height: 46px; fill: none; stroke: var(--rule-strong); stroke-width: 1.6; stroke-linejoin: round; transition: transform .15s var(--ease), fill .15s, stroke .15s; }
.aat-star.is-on svg { fill: var(--star); stroke: var(--star); }
.aat-star:active svg { transform: scale(.9); }
.aat-star.aat-pop svg { animation: aat-star-pop .35s var(--ease); }
@keyframes aat-star-pop { 50% { transform: scale(1.25); } }

/* Form fields */
.aat-field { display: flex; flex-direction: column; gap: 8px; margin-bottom: 18px; }
.aat-field > label, .aat-field > .aat-label { font-weight: 800; font-size: 16px; }
.aat-field small { color: var(--ink-2); font-size: 14px; line-height: 1.35; }
.aat-field .aat-err { display: none; color: var(--orange); font-weight: 700; font-size: 14px; }
.aat-field.is-bad .aat-err { display: block; }
.aat-field.is-bad input, .aat-field.is-bad select { border-color: var(--orange); }
.aat-input, .aat-select, .aat-textarea {
  width: 100%; background: var(--surface); color: var(--ink); border: 2px solid var(--rule-strong);
  border-radius: 14px; min-height: 54px; padding: 12px 16px; font: inherit; font-size: 17px; font-weight: 600;
  transition: border-color .15s; -webkit-appearance: none; appearance: none;
}
.aat-input::placeholder { color: var(--muted); font-weight: 500; }
.aat-input:focus, .aat-select:focus, .aat-textarea:focus { outline: none; border-color: var(--accent-strong); }
.aat-select {
  background-image: linear-gradient(45deg, transparent 50%, var(--ink-2) 50%), linear-gradient(135deg, var(--ink-2) 50%, transparent 50%);
  background-position: calc(100% - 20px) 50%, calc(100% - 14px) 50%; background-size: 6px 6px; background-repeat: no-repeat; padding-right: 36px;
}
.aat-textarea { min-height: 120px; resize: vertical; line-height: 1.4; }
.aat-check { display: flex; gap: 12px; align-items: flex-start; font-size: 15px; color: var(--ink-2); line-height: 1.35; }
.aat-check input { width: 24px; height: 24px; flex: none; margin: 0; accent-color: var(--accent-strong); }

/* Toast, the big one the camera has to catch */
.aat-toast {
  position: fixed; left: 50%; top: 84px; transform: translate(-50%, -30px); z-index: 50;
  display: flex; align-items: center; gap: 16px; padding: 18px 28px 18px 22px; border-radius: 20px;
  background: var(--ink); color: var(--paper); font-weight: 800; font-size: 24px; letter-spacing: -.01em; white-space: nowrap;
  box-shadow: 0 24px 60px -16px rgba(0, 0, 0, .7), 0 0 0 1px rgba(255, 255, 255, .15); opacity: 0; pointer-events: none;
  transition: transform .45s var(--ease), opacity .35s;
}
.aat-toast.is-in { transform: translate(-50%, 0); opacity: 1; }
.aat-toast .aat-toast-dot { width: 18px; height: 18px; border-radius: 50%; background: var(--orange); flex: none; }
.aat-toast.is-green .aat-toast-dot { background: var(--green); }
.aat-toast .aat-toast-stars { color: #b8860b; letter-spacing: 1px; }

/* Reduced motion: stills instead of video, no decorative animation */
.aat-still { display: none; }
@media (prefers-reduced-motion: reduce) {
  .aat-video { display: none !important; }
  .aat-still { display: block !important; }
  .aat-seat.aat-pop, .aat-seat.aat-flip, .aat-pill .aat-dot { animation: none !important; }
  * { scroll-behavior: auto !important; }
}

/* Star glyph helper */
.aat-star-glyph { display: inline-block; width: 1em; height: 1em; vertical-align: -.12em; fill: currentColor; }
