/* ─── Fonts (match landing page) ──────────────────── */
@import url('https://fonts.googleapis.com/css2?family=Jost:ital,wght@0,300;0,400;0,500;0,600;0,700;1,400&family=Source+Serif+4:ital,opsz,wght@0,8..60,300;0,8..60,400;0,8..60,600;1,8..60,400&display=swap');

/* ─── Design Tokens (mid-century palette) ─────────── */
:root {
  --color-cream:      #FAF7F2;
  --color-warm-white: #FFF9F0;
  --color-charcoal:   #2C2C2C;
  --color-ink:        #1A1A1A;
  --color-muted:      #6B6258;
  --color-teal:       #1B7B6E;
  --color-teal-dark:  #15625A;
  --color-teal-light: rgba(27, 123, 110, 0.08);
  --color-coral:      #E8654A;
  --color-mustard:    #D4A843;
  --color-mustard-light: rgba(212, 168, 67, 0.12);
  --color-sand:       #C9B896;
  --color-sage:       #8FA68A;
  --color-sage-light: rgba(143, 166, 138, 0.12);
  --color-terracotta: #C06B4E;
  --color-slate:      #4A5568;
  --color-error:      #C53030;
  --color-error-bg:   #FFF5F5;
  --color-border:     rgba(0, 0, 0, 0.08);

  --font-heading: 'Jost', 'Futura', 'Century Gothic', sans-serif;
  --font-body:    'Source Serif 4', 'Georgia', 'Palatino', serif;

  --size-xs:   0.8rem;
  --size-sm:   0.9rem;
  --size-base: 1.05rem;
  --size-md:   1.25rem;
  --size-lg:   1.6rem;
  --size-xl:   2.2rem;
  --size-2xl:  3rem;
  --size-hero: 4rem;
}

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-body);
  font-size: var(--size-base);
  line-height: 1.7;
  color: var(--color-charcoal);
  background-color: var(--color-cream);
}

a {
  color: var(--color-teal);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s ease;
}

a:hover {
  border-bottom-color: var(--color-teal);
}

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

/* ─── Typography ──────────────────────────────────── */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 500;
  line-height: 1.15;
  letter-spacing: -0.01em;
  color: var(--color-ink);
}

h1 {
  font-size: var(--size-hero);
  font-weight: 300;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

h2 {
  font-size: var(--size-2xl);
  font-weight: 400;
  letter-spacing: 0.02em;
}

h3 {
  font-size: var(--size-xl);
  font-weight: 500;
}

h4 {
  font-size: var(--size-lg);
  font-weight: 500;
}

p {
  max-width: 65ch;
  font-optical-sizing: auto;
}

.subheading {
  font-family: var(--font-heading);
  font-weight: 400;
  font-size: var(--size-sm);
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--color-teal);
}

/* ─── Layout ──────────────────────────────────────── */
.container {
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ─── Navigation ──────────────────────────────────── */
nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: 20px 0;
  background: rgba(250, 247, 242, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

nav .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  font-family: var(--font-heading);
  font-size: 1.3rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-ink);
  text-decoration: none;
  border-bottom: none;
}

.logo span {
  color: var(--color-teal);
}

.nav-links {
  display: flex;
  list-style: none;
  gap: 32px;
  align-items: center;
}

.nav-links a {
  font-family: var(--font-heading);
  font-size: var(--size-sm);
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-charcoal);
  border-bottom: none;
}

.nav-links a:hover {
  color: var(--color-teal);
}

/* ─── Buttons ─────────────────────────────────────── */
.btn {
  display: inline-block;
  font-family: var(--font-heading);
  font-size: var(--size-sm);
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  padding: 16px 40px;
  border: none;
  cursor: pointer;
  transition: all 0.25s ease;
  text-decoration: none;
  border-bottom: none;
}

.btn-primary {
  background: var(--color-teal);
  color: #fff;
}

.btn-primary:hover {
  background: var(--color-teal-dark);
  border-bottom: none;
  transform: translateY(-1px);
}

.btn-secondary {
  background: var(--color-warm-white);
  color: var(--color-charcoal);
  border: 1px solid var(--color-border);
}

.btn-secondary:hover {
  background: var(--color-cream);
  border-bottom: none;
}

.btn-outline {
  background: transparent;
  color: var(--color-charcoal);
  border: 1.5px solid var(--color-charcoal);
}

.btn-outline:hover {
  background: var(--color-charcoal);
  color: var(--color-cream);
  border-bottom-color: var(--color-charcoal);
}

.btn-sm {
  padding: 10px 24px;
  font-size: 0.75rem;
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none !important;
}

/* ─── Page Header ─────────────────────────────────── */
.page-header {
  padding: 130px 0 48px;
  text-align: center;
}

.page-header .subheading {
  margin-bottom: 16px;
}

.page-header h1 {
  font-size: var(--size-2xl);
  margin-bottom: 12px;
}

.page-header p {
  color: var(--color-muted);
  font-size: var(--size-md);
  font-style: italic;
  margin: 0 auto;
}

.page-divider {
  width: 48px;
  height: 2px;
  background: var(--color-mustard);
  margin: 20px auto 0;
}

/* ─── Form Styles ─────────────────────────────────── */
.form-container {
  max-width: 600px;
  margin: 0 auto 80px;
  padding: 0 24px;
}

.form-card {
  background: var(--color-warm-white);
  border: 1px solid var(--color-border);
  padding: 48px;
}

.form-group {
  margin-bottom: 32px;
}

.form-group:last-of-type {
  margin-bottom: 36px;
}

.form-label {
  display: block;
  font-family: var(--font-heading);
  font-size: var(--size-xs);
  text-transform: uppercase;
  letter-spacing: 0.15em;
  font-weight: 500;
  color: var(--color-ink);
  margin-bottom: 10px;
}

.form-label-hint {
  font-family: var(--font-body);
  font-size: var(--size-sm);
  color: var(--color-muted);
  text-transform: none;
  letter-spacing: 0;
  font-weight: 400;
  font-style: italic;
  display: block;
  margin-top: 4px;
}

.form-input {
  width: 100%;
  padding: 14px 18px;
  font-family: var(--font-body);
  font-size: var(--size-base);
  border: 1.5px solid rgba(0, 0, 0, 0.12);
  background: var(--color-cream);
  color: var(--color-ink);
  transition: all 0.2s ease;
  outline: none;
}

.form-input:focus {
  border-color: var(--color-teal);
  box-shadow: 0 0 0 3px var(--color-teal-light);
  background: #fff;
}

.form-input::placeholder {
  color: var(--color-sand);
  font-style: italic;
}

.date-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.budget-input-wrapper {
  position: relative;
}

.budget-input-wrapper .currency {
  position: absolute;
  left: 18px;
  top: 50%;
  transform: translateY(-50%);
  font-size: var(--size-base);
  font-weight: 600;
  color: var(--color-muted);
  font-family: var(--font-heading);
}

.budget-input-wrapper .form-input {
  padding-left: 36px;
}

/* ─── Interest Chips ──────────────────────────────── */
.chips-container {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 18px;
  border: 1.5px solid rgba(0, 0, 0, 0.12);
  background: var(--color-cream);
  font-family: var(--font-heading);
  font-size: var(--size-sm);
  font-weight: 400;
  letter-spacing: 0.04em;
  color: var(--color-muted);
  cursor: pointer;
  transition: all 0.2s ease;
  user-select: none;
}

.chip:hover {
  border-color: var(--color-teal);
  color: var(--color-teal);
}

.chip.active {
  background: var(--color-teal);
  border-color: var(--color-teal);
  color: #fff;
}

.chip-emoji {
  font-size: 1.1rem;
}

/* ─── Loading State ───────────────────────────────── */
.loading-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(250, 247, 242, 0.96);
  backdrop-filter: blur(8px);
  z-index: 1000;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 24px;
}

.loading-overlay.active {
  display: flex;
}

.loading-spinner {
  width: 48px;
  height: 48px;
  border: 3px solid rgba(27, 123, 110, 0.15);
  border-top: 3px solid var(--color-teal);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

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

.loading-text {
  font-family: var(--font-heading);
  font-size: var(--size-xl);
  font-weight: 400;
  letter-spacing: 0.02em;
  color: var(--color-ink);
}

.loading-subtext {
  color: var(--color-muted);
  font-size: var(--size-base);
  text-align: center;
  max-width: 400px;
  font-style: italic;
}

.loading-facts {
  font-family: var(--font-heading);
  color: var(--color-teal);
  font-size: var(--size-sm);
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  animation: fadeInOut 3s ease-in-out infinite;
}

@keyframes fadeInOut {
  0%, 100% { opacity: 0.4; }
  50% { opacity: 1; }
}

/* ─── Error State ─────────────────────────────────── */
.error-message {
  background: var(--color-error-bg);
  border: 1px solid var(--color-error);
  padding: 14px 18px;
  color: var(--color-error);
  font-size: var(--size-sm);
  margin-bottom: 24px;
  display: none;
}

.error-message.visible {
  display: block;
}

/* ─── Result Page ─────────────────────────────────── */
.result-header {
  padding: 120px 0 48px;
  text-align: center;
  background:
    radial-gradient(ellipse at 20% 80%, rgba(27, 123, 110, 0.04) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 20%, rgba(232, 101, 74, 0.03) 0%, transparent 50%),
    var(--color-warm-white);
  border-bottom: 1px solid var(--color-border);
}

.result-destination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-bottom: 8px;
}

.result-destination h1 {
  font-size: var(--size-2xl);
}

.result-meta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 24px;
  margin-top: 16px;
  flex-wrap: wrap;
}

.result-meta-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-heading);
  font-size: var(--size-sm);
  color: var(--color-muted);
  letter-spacing: 0.04em;
}

.result-meta-item .icon {
  font-size: 1.1rem;
}

.result-summary {
  max-width: 600px;
  margin: 24px auto 0;
  font-size: var(--size-base);
  color: var(--color-muted);
  font-style: italic;
  line-height: 1.7;
  text-align: center;
}

/* ─── Budget Banner ───────────────────────────────── */
.budget-banner {
  background: var(--color-warm-white);
  border: 1px solid var(--color-border);
  padding: 28px 36px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  margin: -28px auto 40px;
  max-width: 800px;
  position: relative;
  z-index: 10;
}

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

.budget-item-label {
  font-family: var(--font-heading);
  font-size: var(--size-xs);
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--color-muted);
  margin-bottom: 6px;
}

.budget-item-value {
  font-family: var(--font-heading);
  font-size: var(--size-lg);
  font-weight: 500;
  letter-spacing: 0.02em;
}

.budget-item-value.under { color: var(--color-teal); }
.budget-item-value.over { color: var(--color-coral); }
.budget-item-value.neutral { color: var(--color-ink); }

/* ─── Hotel Card ──────────────────────────────────── */
.hotel-card {
  background: var(--color-warm-white);
  border: 1px solid var(--color-border);
  padding: 32px;
  margin-bottom: 40px;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 24px;
  align-items: center;
}

.hotel-icon {
  width: 72px;
  height: 72px;
  background: var(--color-mustard-light);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
}

.hotel-info h3 {
  font-size: var(--size-lg);
  margin-bottom: 4px;
}

.hotel-location {
  font-family: var(--font-heading);
  font-size: var(--size-sm);
  color: var(--color-muted);
  letter-spacing: 0.04em;
  margin-bottom: 8px;
}

.hotel-description {
  font-size: var(--size-sm);
  color: var(--color-muted);
  line-height: 1.6;
}

.hotel-price {
  display: inline-block;
  background: var(--color-teal-light);
  padding: 6px 14px;
  font-family: var(--font-heading);
  font-weight: 500;
  font-size: var(--size-sm);
  color: var(--color-teal);
  letter-spacing: 0.04em;
  margin-top: 10px;
}

/* ─── Day Cards ───────────────────────────────────── */
.days-container {
  margin-bottom: 48px;
}

.day-card {
  background: var(--color-warm-white);
  border: 1px solid var(--color-border);
  padding: 32px;
  margin-bottom: 24px;
}

.day-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--color-border);
}

.day-number {
  display: flex;
  align-items: center;
  gap: 14px;
}

.day-badge {
  width: 48px;
  height: 48px;
  background: var(--color-teal);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: var(--size-md);
  letter-spacing: 0.02em;
}

.day-title h3 {
  font-size: var(--size-md);
  font-weight: 500;
  letter-spacing: 0.04em;
  margin-bottom: 2px;
}

.day-date {
  font-family: var(--font-body);
  font-size: var(--size-sm);
  color: var(--color-muted);
  font-style: italic;
}

.day-cost {
  font-family: var(--font-heading);
  font-weight: 500;
  font-size: var(--size-md);
  color: var(--color-teal);
  letter-spacing: 0.02em;
}

.day-section {
  margin-bottom: 24px;
}

.day-section:last-child {
  margin-bottom: 0;
}

.day-section-title {
  font-family: var(--font-heading);
  font-size: var(--size-xs);
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--color-muted);
  font-weight: 500;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* ─── Meal / Activity Items ───────────────────────── */
.item-grid {
  display: grid;
  gap: 8px;
}

.item-card {
  display: grid;
  grid-template-columns: 48px 1fr auto;
  gap: 14px;
  align-items: start;
  padding: 16px;
  background: var(--color-cream);
  border: 1px solid transparent;
  transition: all 0.2s ease;
}

.item-card:hover {
  border-color: var(--color-border);
  background: #fff;
}

.item-icon {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
}

.item-icon.meal { background: var(--color-mustard-light); }
.item-icon.activity { background: var(--color-sage-light); }

.item-name {
  font-family: var(--font-heading);
  font-weight: 500;
  font-size: var(--size-base);
  letter-spacing: 0.02em;
  margin-bottom: 2px;
}

.item-detail {
  font-size: var(--size-sm);
  color: var(--color-muted);
  line-height: 1.5;
}

.item-tip {
  font-size: var(--size-xs);
  color: var(--color-teal);
  font-style: italic;
  margin-top: 4px;
}

.item-cost {
  font-family: var(--font-heading);
  font-weight: 500;
  font-size: var(--size-base);
  color: var(--color-ink);
  white-space: nowrap;
  letter-spacing: 0.02em;
}

/* ─── Travel Tips ─────────────────────────────────── */
.tips-section {
  background: var(--color-warm-white);
  border: 1px solid var(--color-border);
  padding: 32px;
  margin-bottom: 40px;
}

.tips-section h3 {
  font-size: var(--size-lg);
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.tips-list {
  list-style: none;
  display: grid;
  gap: 10px;
}

.tips-list li {
  display: flex;
  align-items: start;
  gap: 12px;
  font-size: var(--size-sm);
  color: var(--color-muted);
  line-height: 1.6;
}

.tips-list li::before {
  content: '\2726';
  color: var(--color-mustard);
  font-size: var(--size-sm);
  margin-top: 2px;
  flex-shrink: 0;
}

/* ─── Actions Bar ─────────────────────────────────── */
.actions-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 40px 0 80px;
  flex-wrap: wrap;
}

/* ─── Footer ──────────────────────────────────────── */
footer {
  background: var(--color-ink);
  color: rgba(250, 247, 242, 0.5);
  padding: 48px 0;
  text-align: center;
}

.footer-logo {
  font-family: var(--font-heading);
  font-size: 1.1rem;
  font-weight: 500;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: rgba(250, 247, 242, 0.7);
  margin-bottom: 16px;
}

footer p {
  font-size: var(--size-xs);
  margin: 0 auto;
  line-height: 1.6;
}

footer a {
  color: rgba(250, 247, 242, 0.6);
  border-bottom: none;
}

footer a:hover {
  color: var(--color-cream);
}

/* ─── Responsive ──────────────────────────────────── */
@media (max-width: 900px) {
  :root {
    --size-hero: 2.5rem;
    --size-2xl: 2rem;
    --size-xl: 1.6rem;
    --size-lg: 1.3rem;
  }

  nav .nav-links {
    display: none;
  }

  .container {
    padding: 0 20px;
  }

  .form-card {
    padding: 28px;
  }

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

  .budget-banner {
    grid-template-columns: repeat(2, 1fr);
    margin: -16px 16px 28px;
    padding: 20px;
  }

  .hotel-card {
    grid-template-columns: 1fr;
  }

  .item-card {
    grid-template-columns: 40px 1fr;
  }

  .item-cost {
    grid-column: 1 / -1;
    text-align: right;
  }

  .actions-bar {
    flex-direction: column;
    padding: 24px;
  }

  .btn {
    width: 100%;
    max-width: 300px;
    text-align: center;
  }
}

@media (max-width: 480px) {
  .budget-banner {
    grid-template-columns: 1fr 1fr;
    gap: 16px;
  }
}

/* ─── Print ───────────────────────────────────────── */
@media print {
  nav, .actions-bar, footer { display: none !important; }
  .result-header { padding-top: 20px !important; }
  .day-card { break-inside: avoid; }
  body { background: white !important; }
  .budget-banner { border: 1px solid #ccc; }
}
