:root {
  --green-dark: #1a3a2a;
  --green-mid: #2d5a3d;
  --green-light: #4a8a5e;
  --parchment: #f5ede0;
  --parchment-dark: #e8d9c5;
  --ink: #1c2b22;
  --ink-muted: #5c7060;
  --cream: #faf6f0;
  --gold: #c8933a;
  --gold-light: #e8b55a;
  --checked-bg: #e8f0eb;
  --checked-text: #8aab92;
  --radius: 12px;
  --shadow: 0 4px 24px rgba(26, 58, 42, 0.12);
}

/* ── AVIATION THEME ── */
/* Colors extracted from Mueller Jets logo SVG: #171b4d navy, #ed230d red */
/* Sans-serif font overrides for aviation theme */
[data-theme="aviation"] body {
  font-family: 'Barlow', sans-serif;
}

[data-theme="aviation"] .title {
  font-family: 'Barlow Condensed', sans-serif;
  letter-spacing: -0.01em;
}

[data-theme="aviation"] .badge,
[data-theme="aviation"] .back-btn,
[data-theme="aviation"] .reset-btn,
[data-theme="aviation"] .item-text,
[data-theme="aviation"] .item-number,
[data-theme="aviation"] .section-header,
[data-theme="aviation"] .progress-label,
[data-theme="aviation"] .trip-card__name,
[data-theme="aviation"] .trip-card__badge,
[data-theme="aviation"] .modal-title,
[data-theme="aviation"] .modal-body,
[data-theme="aviation"] .modal-btn,
[data-theme="aviation"] .theme-picker__label,
[data-theme="aviation"] .theme-swatch__name,
[data-theme="aviation"] .site-footer,
[data-theme="aviation"] .landing-subtitle {
  font-family: 'Barlow', sans-serif;
}

[data-theme="aviation"] .modal-title {
  font-family: 'Barlow Condensed', sans-serif;
}

[data-theme="aviation"] {
  --green-dark:     #171b4d;
  --green-mid:      #252b6e;
  --green-light:    #3a4299;
  --parchment:      #f0f0ff;
  --parchment-dark: #dcdcf0;
  --ink:            #0e1035;
  --ink-muted:      #5a5e9a;
  --cream:          #f6f6ff;
  --gold:           #ed230d;
  --gold-light:     #f54a38;
  --checked-bg:     #e8e8ff;
  --checked-text:   #9090c0;
}

[data-theme="aviation"] body {
  background-color: #171b4d;
  background-image:
    radial-gradient(ellipse at 20% 10%, rgba(237, 35, 13, 0.12) 0%, transparent 60%),
    radial-gradient(ellipse at 80% 90%, rgba(37, 43, 110, 0.4) 0%, transparent 60%);
}

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

html {
  font-size: 16px;
  -webkit-tap-highlight-color: transparent;
}

body {
  background-color: var(--green-dark);
  background-image:
    radial-gradient(ellipse at 20% 10%, rgba(74, 138, 94, 0.18) 0%, transparent 60%),
    radial-gradient(ellipse at 80% 90%, rgba(45, 90, 61, 0.25) 0%, transparent 60%);
  min-height: 100dvh;
  font-family: 'Zilla Slab', Georgia, serif;
  color: var(--ink);
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding: 24px 16px 40px;
}

.grain {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  opacity: 0.04;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
  background-repeat: repeat;
  background-size: 200px 200px;
}

.page {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 480px;
  background: var(--cream);
  border-radius: 20px;
  box-shadow:
    0 0 0 1px rgba(200, 147, 58, 0.2),
    0 8px 48px rgba(0, 0, 0, 0.35),
    0 2px 8px rgba(0, 0, 0, 0.2);
  overflow: hidden;
}

/* ── HEADER ── */
.site-header {
  background: var(--green-dark);
  background-image: linear-gradient(135deg, var(--green-dark) 0%, var(--green-mid) 100%);
  padding: 20px 20px 24px;
  position: relative;
}

.site-header::after {
  content: '';
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='40' height='40' viewBox='0 0 40 40' xmlns='http://www.w3.org/2000/svg'%3E%3Ccircle cx='20' cy='20' r='1' fill='rgba(255,255,255,0.15)'/%3E%3C/svg%3E") repeat;
  pointer-events: none;
}

.header-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.badge {
  font-family: 'Zilla Slab', serif;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.2em;
  color: var(--gold-light);
  text-transform: uppercase;
  border: 1px solid rgba(200, 147, 58, 0.4);
  padding: 3px 10px;
  border-radius: 4px;
}

.reset-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.15);
  color: rgba(255,255,255,0.7);
  font-family: 'Zilla Slab', serif;
  font-size: 13px;
  padding: 7px 14px;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
  -webkit-tap-highlight-color: transparent;
}

.reset-btn:hover {
  background: rgba(255,255,255,0.14);
  color: rgba(255,255,255,0.95);
  border-color: rgba(255,255,255,0.3);
}

.reset-btn:active {
  background: rgba(255,255,255,0.06);
}

.title {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: clamp(16px, 7vw, 48px);
  font-weight: 700;
  color: var(--parchment);
  line-height: 1.05;
  letter-spacing: -0.02em;
  margin-bottom: 16px;
  position: relative;
  z-index: 1;
  white-space: nowrap;
}

.progress-row {
  display: flex;
  align-items: center;
  gap: 12px;
  position: relative;
  z-index: 1;
}

.progress-bar-track {
  flex: 1;
  height: 4px;
  background: rgba(255,255,255,0.15);
  border-radius: 2px;
  overflow: hidden;
}

.progress-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--gold), var(--gold-light));
  border-radius: 2px;
  width: 0%;
  transition: width 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.progress-label {
  font-family: 'Zilla Slab', serif;
  font-size: 13px;
  color: var(--gold-light);
  font-weight: 600;
  min-width: 48px;
  text-align: right;
}

/* ── CHECKLIST ── */
main {
  padding: 8px 0;
}

.checklist {
  list-style: none;
}

.checklist-item {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 0 20px;
  min-height: 60px;
  cursor: pointer;
  border-bottom: 1px solid var(--parchment-dark);
  transition: background 0.15s;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  animation: slideIn 0.35s cubic-bezier(0.2, 0, 0, 1) both;
}

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

.checklist-item:active {
  background: var(--parchment-dark);
}

@keyframes slideIn {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

.item-number {
  display: none;
}

.item-text {
  flex: 1;
  font-size: 16px;
  font-weight: 400;
  color: var(--ink);
  line-height: 1.35;
  transition: color 0.25s, text-decoration-color 0.25s;
  text-decoration: line-through;
  text-decoration-color: transparent;
}

.check-box {
  order: -1;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  border: 2px solid var(--parchment-dark);
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: border-color 0.2s, background 0.2s;
  position: relative;
  overflow: hidden;
}

.check-box i {
  opacity: 0;
  font-size: 11px;
  color: #fff;
  transform: scale(0.5) rotate(-10deg);
  transition: opacity 0.2s, transform 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.6);
}

/* Checked state */
.checklist-item.is-checked .check-box {
  background: var(--green-mid);
  border-color: var(--green-mid);
}

.checklist-item.is-checked .check-box::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at center, rgba(255,255,255,0.2) 0%, transparent 70%);
  animation: stamp 0.3s ease-out forwards;
}

@keyframes stamp {
  0%   { transform: scale(2); opacity: 0.6; }
  100% { transform: scale(1); opacity: 0; }
}

.checklist-item.is-checked .check-box i {
  opacity: 1;
  transform: scale(1) rotate(0deg);
}

.checklist-item.is-checked .item-text {
  color: var(--checked-text);
  text-decoration-color: var(--checked-text);
}

.checklist-item.is-checked .item-number {
  color: var(--checked-text);
}

/* ── HEADER LOGO ── */
.header-logo-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}

.header-logo {
  display: none;
  width: 80px;
  height: 80px;
  object-fit: contain;
  flex-shrink: 0;
}

[data-theme="aviation"] .header-logo {
  display: block;
}

[data-theme="aviation"] .badge {
  display: none;
}

/* ── BACK BUTTON ── */
.back-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.15);
  color: rgba(255,255,255,0.7);
  font-family: 'Zilla Slab', serif;
  font-size: 13px;
  padding: 7px 14px;
  border-radius: 8px;
  text-decoration: none;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
}

.back-btn:hover {
  background: rgba(255,255,255,0.14);
  color: rgba(255,255,255,0.95);
  border-color: rgba(255,255,255,0.3);
}

/* ── LANDING PAGE ── */
.trip-grid {
  display: flex;
  flex-direction: column;
}

.trip-card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 0 20px;
  min-height: 64px;
  text-decoration: none;
  color: var(--ink);
  border-bottom: 1px solid var(--parchment-dark);
  transition: background 0.15s;
  position: relative;
  animation: slideIn 0.35s cubic-bezier(0.2, 0, 0, 1) both;
}

.trip-card:nth-child(2) { animation-delay: 30ms; }

.trip-card:last-child {
  border-bottom: none;
}

.trip-card:active {
  background: var(--parchment-dark);
}

.trip-card__name {
  font-family: 'Zilla Slab', serif;
  font-size: 16px;
  font-weight: 600;
  color: var(--ink);
  flex: 1;
}

.trip-card__badge {
  font-family: 'Zilla Slab', serif;
  font-size: 12px;
  font-weight: 600;
  color: var(--ink-muted);
  background: var(--parchment-dark);
  padding: 4px 10px;
  border-radius: 20px;
  flex-shrink: 0;
}

.trip-card--complete .trip-card__badge {
  background: rgba(45, 90, 61, 0.12);
  color: var(--green-mid);
}

.trip-card__arrow {
  color: var(--parchment-dark);
  font-size: 13px;
  flex-shrink: 0;
}

/* ── THEME PICKER ── */
.theme-picker {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 12px 20px;
  border-top: 1px solid var(--parchment-dark);
  background: var(--cream);
}

.theme-picker__label {
  font-family: 'Zilla Slab', serif;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-muted);
}

.theme-picker__swatches {
  display: flex;
  gap: 8px;
}

.theme-swatch {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px 5px 8px;
  border-radius: 20px;
  border: 1.5px solid var(--parchment-dark);
  background: transparent;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
  font-family: 'Zilla Slab', serif;
  -webkit-tap-highlight-color: transparent;
}

.theme-swatch.is-active {
  border-color: var(--green-mid);
  background: rgba(var(--green-mid), 0.06);
}

.theme-swatch__dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  flex-shrink: 0;
  box-shadow: 0 0 0 1.5px rgba(0,0,0,0.15);
}

.theme-swatch__name {
  font-size: 12px;
  font-weight: 600;
  color: var(--ink);
}

.theme-swatch.is-active .theme-swatch__name {
  color: var(--green-mid);
}

/* ── FOOTER ── */
.site-footer {
  background: var(--parchment-dark);
  padding: 12px 20px;
  text-align: center;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--ink-muted);
  border-top: 1px solid rgba(0,0,0,0.07);
}

/* ── MODAL ── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(10, 20, 14, 0.7);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  z-index: 100;
  animation: fadeIn 0.2s ease;
}

.modal-overlay[hidden] {
  display: none;
}

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

.modal {
  background: var(--cream);
  border-radius: 16px;
  padding: 28px 24px 24px;
  max-width: 320px;
  width: 100%;
  box-shadow: 0 20px 60px rgba(0,0,0,0.4);
  animation: modalIn 0.25s cubic-bezier(0.2, 0, 0, 1.2);
}

@keyframes modalIn {
  from { opacity: 0; transform: scale(0.92) translateY(8px); }
  to   { opacity: 1; transform: scale(1) translateY(0); }
}

.modal-title {
  font-family: 'Playfair Display', serif;
  font-size: 22px;
  color: var(--ink);
  margin-bottom: 10px;
}

.modal-body {
  font-size: 15px;
  color: var(--ink-muted);
  line-height: 1.5;
  margin-bottom: 24px;
}

.modal-actions {
  display: flex;
  gap: 10px;
}

.modal-btn {
  flex: 1;
  padding: 13px;
  border-radius: 10px;
  font-family: 'Zilla Slab', serif;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s, transform 0.1s;
  border: none;
}

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

.modal-btn--cancel {
  background: var(--parchment-dark);
  color: var(--ink-muted);
}

.modal-btn--cancel:hover {
  background: #ddd0bc;
}

.modal-btn--confirm {
  background: var(--green-mid);
  color: #fff;
}

.modal-btn--confirm:hover {
  background: var(--green-dark);
}

/* ── SECTION HEADERS ── */
.section-header {
  padding: 10px 20px 6px;
  font-family: 'Zilla Slab', serif;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-muted);
  background: var(--parchment-dark);
  border-bottom: 1px solid var(--parchment-dark);
  list-style: none;
}

/* ── COMPLETE STATE ── */
.all-complete-banner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 16px 20px;
  background: linear-gradient(90deg, rgba(45,90,61,0.08), rgba(45,90,61,0.12), rgba(45,90,61,0.08));
  margin: 0;
  font-size: 14px;
  font-weight: 600;
  color: var(--green-mid);
  letter-spacing: 0.03em;
  animation: slideIn 0.4s cubic-bezier(0.2, 0, 0, 1);
  border-top: 1px solid rgba(45,90,61,0.15);
}
