:root {
  --bg: #f5f7fb;
  --bg-elevated: #ffffff;
  --bg-soft: #eef2f8;
  --text: #0d1526;
  --text-muted: #58647a;
  --border: rgba(16, 24, 40, 0.08);
  --accent: #3276ff;
  --accent-2: #53d4ff;
  --accent-text: #ffffff;
  --shadow: 0 20px 60px rgba(16, 24, 40, 0.08);
  --hero-glow: radial-gradient(circle at top right, rgba(83, 212, 255, 0.18), transparent 35%);
  --radius-xl: 24px;
  --radius-lg: 18px;
  --radius-md: 14px;
  --container: 1180px;
}

:root[data-theme="dark"] {
  --bg: #0b1020;
  --bg-elevated: #12192d;
  --bg-soft: #0f1628;
  --text: #e9eefb;
  --text-muted: #a6b1c6;
  --border: rgba(255, 255, 255, 0.08);
  --accent: #4d84ff;
  --accent-2: #66e0ff;
  --accent-text: #ffffff;
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.35);
  --hero-glow: radial-gradient(circle at top right, rgba(102, 224, 255, 0.18), transparent 35%);
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background:
    var(--hero-glow),
    linear-gradient(180deg, var(--bg) 0%, var(--bg) 100%);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.5;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

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

input,
select,
textarea {
  width: 100%;
  min-height: 52px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  color: var(--text);
  padding: 0.9rem 1rem;
  font-size: 16px;
  outline: none;
}

textarea {
  min-height: 120px;
  resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(77, 132, 255, 0.12);
}

button {
  cursor: pointer;
}

.site-shell {
  min-height: 100vh;
}

.container {
  width: min(var(--container), calc(100% - 2rem));
  margin: 0 auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  backdrop-filter: blur(14px);
  background: color-mix(in srgb, var(--bg) 78%, transparent);
  border-bottom: 1px solid var(--border);
}

.nav-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 76px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.brand-mark {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: white;
  box-shadow: var(--shadow);
}

.brand-text {
  font-size: 1.05rem;
}

.desktop-nav {
  display: none;
  gap: 0.5rem;
}

.nav-link,
.mobile-nav-link {
  color: var(--text-muted);
  padding: 0.8rem 1rem;
  border-radius: 12px;
  transition: 0.2s ease;
}

.nav-link:hover,
.mobile-nav-link:hover,
.nav-link.is-active,
.mobile-nav-link.is-active {
  color: var(--text);
  background: var(--bg-soft);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.7rem;
}

.theme-toggle,
.nav-toggle {
  min-height: 46px;
  min-width: 46px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--bg-elevated);
  color: var(--text);
}

.theme-toggle {
  padding: 0 0.95rem;
}

.nav-toggle {
  display: inline-flex;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
  padding: 0.75rem;
}

.nav-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
}

.mobile-menu {
  border-top: 1px solid var(--border);
  background: var(--bg);
}

.mobile-menu-inner {
  display: grid;
  gap: 0.5rem;
  padding: 1rem 0 1.2rem;
}

.btn {
  min-height: 52px;
  border: 0;
  border-radius: 14px;
  padding: 0.95rem 1.25rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  transition: transform 0.15s ease, opacity 0.15s ease;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn-primary {
  color: var(--accent-text);
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  box-shadow: var(--shadow);
}

.btn-secondary {
  background: var(--bg-elevated);
  color: var(--text);
  border: 1px solid var(--border);
}

.btn-ghost {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
}

.btn-block {
  width: 100%;
}

.btn-header {
  display: none;
}

.site-main {
  padding: 1rem 0 4rem;
}

.hero {
  padding: 2rem 0 1.5rem;
}

.hero-grid {
  display: grid;
  gap: 1.2rem;
  align-items: center;
}

.hero-card,
.panel,
.card,
.info-card {
  background: color-mix(in srgb, var(--bg-elevated) 92%, transparent);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow);
}

.hero-card {
  padding: 1.4rem;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.45rem 0.8rem;
  border-radius: 999px;
  background: var(--bg-soft);
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 1rem;
}

.hero h1,
.section-head h2,
.page-head h1 {
  margin: 0 0 0.8rem;
  line-height: 1.05;
  letter-spacing: -0.04em;
}

.hero h1 {
  font-size: clamp(2.2rem, 7vw, 4.7rem);
}

.hero p,
.section-head p,
.page-head p {
  color: var(--text-muted);
  font-size: 1.02rem;
  max-width: 62ch;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  margin-top: 1.1rem;
}

.hero-points {
  display: grid;
  gap: 0.8rem;
  margin-top: 1.25rem;
}

.hero-point {
  display: flex;
  gap: 0.8rem;
  align-items: flex-start;
  padding: 0.9rem 1rem;
  border-radius: 16px;
  background: var(--bg-soft);
}

.hero-point strong {
  display: block;
  margin-bottom: 0.2rem;
}

.section {
  padding: 1.25rem 0;
}

.section-head {
  margin-bottom: 1rem;
}

.grid {
  display: grid;
  gap: 1rem;
}

.grid-3 {
  grid-template-columns: 1fr;
}

.grid-4 {
  grid-template-columns: 1fr;
}

.card,
.info-card,
.panel {
  padding: 1.1rem;
}

.card h3,
.info-card h3 {
  margin-top: 0;
  margin-bottom: 0.5rem;
  letter-spacing: -0.02em;
}

.card p,
.info-card p {
  color: var(--text-muted);
}

.card-link {
  display: inline-flex;
  margin-top: 0.7rem;
  color: var(--accent);
  font-weight: 700;
}

.planner-shell {
  display: grid;
  gap: 1rem;
}

.form-grid {
  display: grid;
  gap: 0.9rem;
}

.form-row {
  display: grid;
  gap: 0.9rem;
}

.form-field label {
  display: inline-block;
  margin-bottom: 0.45rem;
  font-weight: 700;
}

.form-help {
  margin-top: 0.35rem;
  font-size: 0.92rem;
  color: var(--text-muted);
}

.result-placeholder {
  border: 1px dashed var(--border);
  border-radius: 18px;
  padding: 1rem;
  color: var(--text-muted);
  background: var(--bg-soft);
}

.kpis {
  display: grid;
  gap: 0.8rem;
  grid-template-columns: 1fr 1fr;
  margin-top: 1rem;
}

.kpi {
  padding: 1rem;
  border-radius: 18px;
  background: var(--bg-soft);
  border: 1px solid var(--border);
}

.kpi strong {
  display: block;
  font-size: 1.2rem;
  margin-bottom: 0.2rem;
}

.page-head {
  margin-bottom: 1rem;
}

.empty-state {
  text-align: center;
  padding: 2rem 1rem;
}

.site-footer {
  border-top: 1px solid var(--border);
  padding: 2rem 0 1.2rem;
  background: color-mix(in srgb, var(--bg) 92%, transparent);
}

.footer-grid {
  display: grid;
  gap: 1.5rem;
}

.footer-grid a {
  display: block;
  color: var(--text-muted);
  padding: 0.3rem 0;
}

.footer-title,
.footer-brand {
  font-weight: 800;
  margin-bottom: 0.6rem;
}

.footer-copy {
  color: var(--text-muted);
  max-width: 28ch;
}

.footer-bottom {
  margin-top: 1.2rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  justify-content: space-between;
  color: var(--text-muted);
}

.badge-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
}

.badge {
  padding: 0.55rem 0.8rem;
  border-radius: 999px;
  background: var(--bg-soft);
  color: var(--text-muted);
  border: 1px solid var(--border);
}

@media (min-width: 760px) {
  .hero {
    padding-top: 2.2rem;
  }

  .hero-card {
    padding: 1.8rem;
  }

  .form-row.two {
    grid-template-columns: 1fr 1fr;
  }

  .grid-3 {
    grid-template-columns: repeat(3, 1fr);
  }

  .grid-4 {
    grid-template-columns: repeat(2, 1fr);
  }

  .footer-grid {
    grid-template-columns: 2fr 1fr 1fr 1fr;
  }

  .btn-header {
    display: inline-flex;
  }

  .nav-toggle {
    display: none;
  }

  .desktop-nav {
    display: flex;
  }

  .mobile-menu {
    display: none !important;
  }
}

@media (min-width: 1024px) {
  .hero-grid {
    grid-template-columns: 1.1fr 0.9fr;
  }

  .planner-shell {
    grid-template-columns: 1.05fr 0.95fr;
  }

  .grid-4 {
    grid-template-columns: repeat(4, 1fr);
  }

  .site-main {
    padding-bottom: 5rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  * {
    scroll-behavior: auto !important;
    transition: none !important;
  }
}
.print-only {
  display: none;
}

@media print {
  .site-header,
  .site-footer,
  .nav-toggle,
  .desktop-nav,
  .header-actions,
  form,
  #copyItineraryBtn,
  #printItineraryBtn,
  .btn,
  .mobile-menu {
    display: none !important;
  }

  body {
    background: #fff !important;
    color: #000 !important;
  }

  .site-main {
    padding: 0 !important;
  }

  .container {
    width: 100% !important;
    max-width: 100% !important;
  }

  .planner-shell {
    display: block !important;
  }

  .panel,
  .card {
    box-shadow: none !important;
    border: 1px solid #ccc !important;
    background: #fff !important;
    color: #000 !important;
    break-inside: avoid;
    page-break-inside: avoid;
  }

  #printableItinerary {
    display: block !important;
  }

  a {
    color: #000 !important;
    text-decoration: none !important;
  }
}
.result-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
}

.btn-action-copy,
.btn-action-print {
  position: relative;
  min-height: 56px;
  padding: 1rem 1.25rem;
  border-radius: 16px;
  font-weight: 800;
  letter-spacing: -0.01em;
  border: 1px solid transparent;
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.16);
}

.btn-action-copy {
  color: #ffffff;
  background:
    linear-gradient(135deg, #2563eb 0%, #38bdf8 100%);
}

.btn-action-copy:hover,
.btn-action-copy:focus-visible {
  transform: translateY(-2px) scale(1.01);
  box-shadow: 0 18px 40px rgba(37, 99, 235, 0.35);
}

.btn-action-print {
  color: #ffffff;
  background:
    linear-gradient(135deg, #7c3aed 0%, #ec4899 100%);
}

.btn-action-print:hover,
.btn-action-print:focus-visible {
  transform: translateY(-2px) scale(1.01);
  box-shadow: 0 18px 40px rgba(124, 58, 237, 0.35);
}

.btn-action-copy span,
.btn-action-print span {
  position: relative;
  z-index: 2;
}

.btn-action-copy::before,
.btn-action-print::before {
  content: "";
  position: absolute;
  inset: 1px;
  border-radius: 15px;
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.18),
    rgba(255, 255, 255, 0.04)
  );
  pointer-events: none;
}

.btn-action-copy:active,
.btn-action-print:active {
  transform: translateY(0) scale(0.99);
}

@media (max-width: 640px) {
  .result-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .btn-action-copy,
  .btn-action-print {
    width: 100%;
    justify-content: center;
  }
}
.btn-action-copy,
.btn-action-print {
  animation: softPopIn 0.45s ease;
}

@keyframes softPopIn {
  0% {
    opacity: 0;
    transform: translateY(8px) scale(0.98);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}
.card ul li + li {
  margin-top: 0.45rem;
}

@media (min-width: 760px) {
  .card[style*="grid-column: span 2;"] {
    grid-column: span 2;
  }
}