/* SlowTravel.ai — Design System from DESIGN.md */

/* ═══════════════════════════════════════════════
   CSS Custom Properties
   ═══════════════════════════════════════════════ */

:root {
  /* Colors */
  --honey: #D4930D;
  --gold: #F5E6C8;
  --warm-tint: #FBF3E4;
  --terracotta: #C4654A;
  --cream: #FAF7F2;
  --white: #FFFFFF;
  --ink: #2C2418;
  --stone: #7A7062;
  --warm-gray: #B5ADA3;
  --olive: #5C7A3B;
  --warm-orange: #D4760D;
  --deep-rose: #B44B4B;
  --sky: #4B7B9B;

  /* Typography */
  --font-display: 'Fraunces', serif;
  --font-body: 'DM Sans', sans-serif;
  --font-mono: 'DM Mono', monospace;

  /* Spacing */
  --sp-2xs: 2px;
  --sp-xs: 4px;
  --sp-sm: 8px;
  --sp-md: 16px;
  --sp-lg: 24px;
  --sp-xl: 32px;
  --sp-2xl: 48px;
  --sp-3xl: 64px;

  /* Border radius */
  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-full: 9999px;

  /* Motion */
  --duration-micro: 100ms;
  --duration-short: 200ms;
  --duration-medium: 300ms;
}

/* ═══════════════════════════════════════════════
   Reset & Base
   ═══════════════════════════════════════════════ */

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

html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.5;
  color: var(--ink);
  background: var(--cream);
  min-height: 100vh;
}

a {
  color: var(--sky);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

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

/* Focus indicators — 3px honey outline */
:focus-visible {
  outline: 3px solid var(--honey);
  outline-offset: 2px;
}

/* ═══════════════════════════════════════════════
   Typography
   ═══════════════════════════════════════════════ */

.hero-title, h1.hotels-title, h1.research-title, h1.share-title, h1.hotel-detail-name {
  font-family: var(--font-display);
  font-size: 2.25rem;
  font-weight: 600;
  line-height: 1.3;
  color: var(--ink);
}

h1 {
  font-family: var(--font-display);
  font-size: 1.75rem;
  font-weight: 500;
  line-height: 1.3;
}

h2 {
  font-family: var(--font-body);
  font-size: 1.375rem;
  font-weight: 600;
  line-height: 1.3;
  margin-bottom: var(--sp-sm);
}

h3 {
  font-family: var(--font-body);
  font-size: 1.125rem;
  font-weight: 600;
}

.hero-subtitle {
  font-size: 1.125rem;
  color: var(--stone);
  margin-top: var(--sp-sm);
}

/* ═══════════════════════════════════════════════
   Buttons
   ═══════════════════════════════════════════════ */

.btn {
  display: inline-block;
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 600;
  padding: 14px 28px;
  border-radius: var(--radius-sm);
  border: none;
  cursor: pointer;
  text-align: center;
  text-decoration: none;
  transition: background var(--duration-micro) ease-out, transform var(--duration-micro) ease-out;
  min-height: 48px;
}

.btn:hover {
  text-decoration: none;
}

.btn-primary {
  background: var(--honey);
  color: var(--white);
}

.btn-primary:hover {
  background: #C08609;
}

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

.btn-secondary:hover {
  background: var(--warm-tint);
}

/* ═══════════════════════════════════════════════
   App Header (post-interview)
   ═══════════════════════════════════════════════ */

.app-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--sp-md) var(--sp-lg);
  background: var(--white);
  border-bottom: 1px solid var(--gold);
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-brand {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--ink);
}

.header-brand:hover {
  text-decoration: none;
}

.header-nav {
  display: flex;
  gap: var(--sp-lg);
}

.nav-link {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--stone);
  padding: var(--sp-sm) 0;
  min-height: 48px;
  display: flex;
  align-items: center;
}

.nav-link.active {
  color: var(--ink);
  border-bottom: 2px solid var(--honey);
}

/* ═══════════════════════════════════════════════
   Onboard Page
   ═══════════════════════════════════════════════ */

.onboard-page {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: var(--sp-xl);
}

.onboard-container {
  max-width: 480px;
  width: 100%;
}

.onboard-hero {
  text-align: center;
  margin-bottom: var(--sp-2xl);
}

.check-email-icon {
  font-size: 3rem;
  margin-bottom: var(--sp-md);
}

.check-email-note {
  font-size: 0.875rem;
  color: var(--warm-gray);
  margin-top: var(--sp-lg);
}

.onboard-form {
  background: var(--white);
  padding: var(--sp-xl);
  border-radius: var(--radius-md);
  box-shadow: 0 1px 3px rgba(44, 36, 24, 0.08);
}

.form-group {
  margin-bottom: var(--sp-md);
}

.form-group label {
  display: block;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--stone);
  margin-bottom: var(--sp-xs);
}

.form-group input {
  width: 100%;
  padding: 12px var(--sp-md);
  font-family: var(--font-body);
  font-size: 1rem;
  border: 1px solid var(--warm-gray);
  border-radius: var(--radius-sm);
  background: var(--white);
  color: var(--ink);
  min-height: 48px;
}

.form-group input:focus {
  border-color: var(--honey);
  outline: none;
  box-shadow: 0 0 0 3px rgba(212, 147, 13, 0.15);
}

.form-group input::placeholder {
  color: var(--warm-gray);
}

.error-message {
  color: var(--deep-rose);
  font-size: 0.875rem;
  margin-bottom: var(--sp-md);
  min-height: 1.2em;
}

.error-message:empty {
  display: none;
}

.onboard-form .btn {
  width: 100%;
  margin-top: var(--sp-sm);
}

.onboard-login-link {
  text-align: center;
  font-size: 0.875rem;
  color: var(--stone);
  margin-top: var(--sp-lg);
}

/* ═══════════════════════════════════════════════
   Interview Page
   ═══════════════════════════════════════════════ */

.interview-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.interview-layout {
  display: flex;
  flex: 1;
  max-width: 960px;
  width: 100%;
  margin: 0 auto;
  gap: var(--sp-lg);
}

.interview-container {
  max-width: 640px;
  width: 100%;
  padding: var(--sp-md);
  flex: 1;
  display: flex;
  flex-direction: column;
}

.interview-progress {
  display: flex;
  align-items: center;
  gap: var(--sp-sm);
  padding: var(--sp-md) 0;
}

.progress-bar-thin {
  flex: 1;
  height: 4px;
  background: var(--gold);
  border-radius: var(--radius-full);
  overflow: hidden;
}

.progress-bar-thin-fill {
  height: 100%;
  background: var(--honey);
  border-radius: var(--radius-full);
  transition: width var(--duration-medium) ease-out;
}

.progress-label {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--warm-gray);
  white-space: nowrap;
}

.chat-container {
  flex: 1;
  overflow-y: auto;
  padding: var(--sp-md) 0;
}

.chat-message {
  display: flex;
  gap: var(--sp-sm);
  margin-bottom: var(--sp-md);
  max-width: 85%;
}

.bee-message {
  align-self: flex-start;
}

.user-message {
  align-self: flex-end;
  margin-left: auto;
  flex-direction: row-reverse;
}

.bee-avatar {
  width: 44px;
  height: 44px;
  background: var(--gold);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  flex-shrink: 0;
  transform: scaleX(-1);
}

.bee-avatar-large {
  width: 56px;
  height: 56px;
  font-size: 1.75rem;
}

.bee-bubble {
  background: var(--gold);
  padding: var(--sp-md);
  border-radius: 4px var(--radius-md) var(--radius-md) var(--radius-md);
  font-size: 1rem;
  line-height: 1.6;
}

.user-bubble {
  background: var(--white);
  border: 1px solid var(--gold);
  padding: var(--sp-md);
  border-radius: var(--radius-md) 4px var(--radius-md) var(--radius-md);
  font-size: 1rem;
}

.chat-options {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-sm);
  padding: var(--sp-sm) 0;
  margin-left: 52px;
}

.chat-option-pill {
  font-family: var(--font-body);
  font-size: 0.875rem;
  font-weight: 500;
  padding: 10px var(--sp-md);
  border: 2px solid var(--honey);
  border-radius: var(--radius-full);
  background: var(--white);
  color: var(--ink);
  cursor: pointer;
  transition: background var(--duration-micro) ease-out, transform 150ms ease-out;
  min-height: 48px;
}

.chat-option-pill:hover {
  background: var(--warm-tint);
}

.chat-option-pill.selected {
  background: var(--honey);
  color: var(--white);
}

.chat-option-pill:disabled {
  opacity: 0.5;
  cursor: default;
}

.chat-skip {
  border-color: var(--warm-gray);
  color: var(--stone);
}

.chat-suggestion {
  font-family: var(--font-body);
  font-size: 0.8125rem;
  font-weight: 400;
  padding: 6px 14px;
  border: 1px solid var(--warm-gray);
  border-radius: var(--radius-full);
  background: var(--white);
  color: var(--stone);
  cursor: pointer;
  transition: border-color var(--duration-micro) ease-out;
  min-height: 36px;
}

.chat-suggestion:hover {
  border-color: var(--honey);
  color: var(--ink);
}

.chat-confirm {
  background: var(--honey);
  color: var(--white);
  border-color: var(--honey);
}

.chat-text-input {
  display: flex;
  gap: var(--sp-sm);
  width: 100%;
}

.chat-text-input input {
  flex: 1;
  padding: 12px var(--sp-md);
  font-family: var(--font-body);
  font-size: 1rem;
  border: 2px solid var(--honey);
  border-radius: var(--radius-full);
  background: var(--white);
  color: var(--ink);
  min-height: 48px;
}

.chat-text-input input:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(212, 147, 13, 0.15);
}

.chat-text-input button {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: none;
  background: var(--honey);
  color: var(--white);
  font-size: 1.25rem;
  cursor: pointer;
}

.typing-bubble {
  min-width: 48px;
  text-align: center;
}

.typing-dots {
  font-size: 1.5rem;
  letter-spacing: 3px;
  animation: typing-pulse 1s ease-in-out infinite;
  color: var(--stone);
}

@keyframes typing-pulse {
  0%, 100% { opacity: 0.3; }
  50% { opacity: 1; }
}

.chat-error {
  background: rgba(180, 75, 75, 0.1);
  border: 1px solid var(--deep-rose);
  border-radius: var(--radius-sm);
  padding: var(--sp-md);
  color: var(--deep-rose);
  margin-left: 52px;
}

.chat-loading {
  text-align: center;
  padding: var(--sp-2xl);
  color: var(--stone);
}

.chat-loading .bee-avatar {
  margin: 0 auto var(--sp-md);
}

/* ═══════════════════════════════════════════════
   Research Progress
   ═══════════════════════════════════════════════ */

.research-page {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: var(--sp-xl);
}

.research-container {
  max-width: 480px;
  width: 100%;
  text-align: center;
}

.research-title {
  margin-bottom: var(--sp-2xl);
}

.bee-progress {
  padding: var(--sp-xl) 0;
}

.progress-bar-track {
  height: 12px;
  background: var(--gold);
  border-radius: var(--radius-full);
  overflow: visible;
  position: relative;
}

.progress-bar-fill {
  height: 100%;
  background: var(--honey);
  border-radius: var(--radius-full);
  transition: width var(--duration-medium) ease-out;
  position: relative;
  min-width: 24px;
}

.bee-icon {
  position: absolute;
  right: -8px;
  top: -10px;
  font-size: 1.5rem;
  transform: scaleX(-1);
  animation: bee-bounce 1s ease-in-out infinite;
}

@keyframes bee-bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-3px); }
}

/* ═══════════════════════════════════════════════
   Notepad Panel
   ═══════════════════════════════════════════════ */

.notepad-panel {
  width: 240px;
  flex-shrink: 0;
  position: sticky;
  top: var(--sp-lg);
  align-self: flex-start;
  max-height: calc(100vh - var(--sp-2xl));
  overflow-y: auto;
  padding: var(--sp-md);
  background: var(--cream);
  border-left: 2px solid var(--sand);
  opacity: 0.4;
  transition: opacity 0.4s ease;
}

.notepad-panel.has-notes {
  opacity: 1;
}

.notepad-header {
  display: flex;
  align-items: center;
  gap: var(--sp-xs);
  margin-bottom: var(--sp-md);
  padding-bottom: var(--sp-sm);
  border-bottom: 1px solid var(--sand);
}

.notepad-icon {
  font-size: 1rem;
}

.notepad-title {
  font-family: var(--font-display);
  font-size: 0.875rem;
  color: var(--espresso);
  font-weight: 600;
}

.notepad-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.notepad-item {
  font-size: 0.8rem;
  color: var(--stone);
  line-height: 1.4;
  padding: var(--sp-xs) 0;
  border-bottom: 1px solid var(--sand);
  position: relative;
  padding-left: var(--sp-md);
}

.notepad-item::before {
  content: "•";
  position: absolute;
  left: 2px;
  color: var(--gold);
  font-weight: bold;
}

/* Hide notepad on mobile — show below chat instead */
@media (max-width: 768px) {
  .interview-layout {
    flex-direction: column;
  }

  .notepad-panel {
    width: 100%;
    position: relative;
    top: 0;
    max-height: none;
    border-left: none;
    border-top: 2px solid var(--sand);
    order: -1;
    padding: var(--sp-sm) var(--sp-md);
  }

  .notepad-list {
    display: flex;
    flex-wrap: wrap;
    gap: var(--sp-xs);
  }

  .notepad-item {
    border-bottom: none;
    padding: var(--sp-xs) var(--sp-sm) var(--sp-xs) var(--sp-md);
    background: var(--sand);
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .bee-icon { animation: none; }
  .fade-in { animation: none; opacity: 1; }
  .progress-bar-fill { transition: none; }
}

.stage-text {
  font-size: 0.875rem;
  color: var(--stone);
  margin-top: var(--sp-md);
}

.research-error-msg {
  color: var(--stone);
  font-size: 1.125rem;
  margin: var(--sp-lg) 0 var(--sp-xl);
}

.research-actions {
  display: flex;
  gap: var(--sp-md);
  justify-content: center;
}

/* ═══════════════════════════════════════════════
   Hotels List
   ═══════════════════════════════════════════════ */

.hotels-page {
  padding: var(--sp-lg);
}

.hotels-container {
  max-width: 800px;
  margin: 0 auto;
}

.hotels-header {
  margin-bottom: var(--sp-xl);
}

.hotels-subtitle {
  color: var(--stone);
  font-size: 0.875rem;
  margin-top: var(--sp-xs);
}

.hotel-cards {
  display: flex;
  flex-direction: column;
  gap: var(--sp-md);
}

.hotel-card {
  display: block;
  background: var(--white);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(44, 36, 24, 0.08);
  transition: box-shadow var(--duration-short) ease-out;
  text-decoration: none;
  color: var(--ink);
}

.hotel-card:hover {
  box-shadow: 0 4px 12px rgba(44, 36, 24, 0.12);
  text-decoration: none;
}

.hotel-card-image img {
  width: 100%;
  height: 200px;
  object-fit: cover;
}

.hotel-card-body {
  padding: var(--sp-md);
}

.match-bar {
  height: 6px;
  background: var(--gold);
  border-radius: var(--radius-full);
  margin-bottom: var(--sp-sm);
  overflow: hidden;
}

.match-bar-large {
  height: 8px;
  margin-bottom: var(--sp-md);
}

.match-fill {
  height: 100%;
  background: var(--olive);
  border-radius: var(--radius-full);
}

.hotel-name {
  font-family: var(--font-display);
  font-size: 1.75rem;
  font-weight: 500;
  margin-bottom: var(--sp-xs);
}

.hotel-meta {
  font-size: 0.875rem;
  color: var(--stone);
  margin-bottom: var(--sp-sm);
}

.hotel-reason {
  font-size: 0.875rem;
  color: var(--ink);
  border-left: 3px solid var(--honey);
  padding-left: var(--sp-sm);
  margin-top: var(--sp-sm);
}

.reaction-badge {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 500;
  padding: 2px 8px;
  border-radius: var(--radius-full);
  margin-top: var(--sp-sm);
}

.reaction-yes { background: rgba(92, 122, 59, 0.15); color: var(--olive); }
.reaction-maybe { background: rgba(212, 118, 13, 0.15); color: var(--warm-orange); }
.reaction-no { background: rgba(180, 75, 75, 0.1); color: var(--deep-rose); }

.hotels-actions {
  margin-top: var(--sp-xl);
  text-align: center;
}

.hotels-empty {
  text-align: center;
  padding: var(--sp-3xl) 0;
}

.hotels-empty p {
  color: var(--stone);
  margin: var(--sp-md) 0 var(--sp-xl);
  max-width: 400px;
  margin-left: auto;
  margin-right: auto;
}

.hotels-empty .hotels-actions {
  display: flex;
  gap: var(--sp-md);
  justify-content: center;
}

.share-result {
  text-align: center;
  margin-top: var(--sp-md);
  font-size: 0.875rem;
}

/* ═══════════════════════════════════════════════
   Hotel Detail
   ═══════════════════════════════════════════════ */

.hotel-detail-page {
  padding: var(--sp-lg);
}

.hotel-detail-container {
  max-width: 640px;
  margin: 0 auto;
}

.back-link {
  font-size: 0.875rem;
  color: var(--stone);
  display: inline-block;
  margin-bottom: var(--sp-lg);
}

.hotel-detail-hero {
  margin-bottom: var(--sp-xl);
}

.hotel-detail-name {
  margin-bottom: var(--sp-xs);
}

.hotel-detail-meta {
  color: var(--stone);
  font-size: 0.875rem;
}

.hotel-detail-section {
  margin-bottom: var(--sp-xl);
}

.match-reasons {
  list-style: none;
  padding: 0;
}

.match-reasons li {
  padding: var(--sp-sm) 0;
  border-left: 3px solid var(--honey);
  padding-left: var(--sp-md);
  margin-bottom: var(--sp-sm);
  font-size: 0.9375rem;
}

.match-reasons li.flag {
  border-left-color: var(--warm-orange);
}

.amenity-tags {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-sm);
}

.amenity-tag {
  font-size: 0.75rem;
  font-weight: 500;
  padding: 4px 12px;
  background: var(--warm-tint);
  border-radius: var(--radius-full);
  color: var(--ink);
}

/* Gut check */
.gut-check-section {
  background: var(--warm-tint);
  padding: var(--sp-lg);
  border-radius: var(--radius-md);
}

.gut-check-buttons {
  display: flex;
  gap: var(--sp-sm);
  flex-wrap: wrap;
  position: relative;
}

.gut-btn {
  font-family: var(--font-body);
  font-size: 0.875rem;
  font-weight: 500;
  padding: 12px var(--sp-lg);
  border: 2px solid var(--warm-gray);
  border-radius: var(--radius-sm);
  background: var(--white);
  cursor: pointer;
  min-height: 48px;
  transition: transform 150ms ease-out;
}

.gut-btn:hover {
  border-color: var(--honey);
}

.gut-btn.active {
  background: var(--honey);
  border-color: var(--honey);
  color: var(--white);
}

.gut-toast {
  font-size: 0.75rem;
  color: var(--olive);
  font-weight: 600;
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  animation: toast-fade 1.5s ease-out forwards;
}

@keyframes toast-fade {
  0% { opacity: 1; }
  70% { opacity: 1; }
  100% { opacity: 0; }
}

/* Booking handoff */
.booking-handoff {
  text-align: center;
  padding: var(--sp-2xl) 0;
  border-top: 1px solid var(--gold);
  margin-top: var(--sp-xl);
}

.btn-book {
  font-size: 1.125rem;
  padding: 16px 36px;
}

.booking-reassurance {
  font-size: 0.875rem;
  color: var(--stone);
  margin-top: var(--sp-sm);
}

/* ═══════════════════════════════════════════════
   Share Page
   ═══════════════════════════════════════════════ */

.share-page {
  padding: var(--sp-lg);
}

.share-container {
  max-width: 800px;
  margin: 0 auto;
}

.share-header {
  text-align: center;
  margin-bottom: var(--sp-xl);
}

.share-subtitle {
  color: var(--stone);
  margin-top: var(--sp-xs);
}

.share-footer {
  text-align: center;
  padding: var(--sp-2xl) 0;
  border-top: 1px solid var(--gold);
  margin-top: var(--sp-xl);
}

.share-footer p {
  color: var(--stone);
  margin-bottom: var(--sp-md);
}

.share-powered {
  font-size: 0.75rem;
  color: var(--warm-gray);
  margin-top: var(--sp-xl);
}

/* ═══════════════════════════════════════════════
   Animations
   ═══════════════════════════════════════════════ */

.fade-in {
  animation: fadeInUp var(--duration-short) ease-out;
}

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

/* ═══════════════════════════════════════════════
   Responsive — Mobile First
   ═══════════════════════════════════════════════ */

@media (max-width: 640px) {
  .hero-title, h1.hotels-title, h1.research-title, h1.share-title, h1.hotel-detail-name {
    font-size: 1.75rem;
  }

  .onboard-container {
    padding: 0 var(--sp-md);
  }

  .onboard-form {
    padding: var(--sp-lg);
  }

  .hotel-card-image img {
    height: 160px;
  }

  .chat-message {
    max-width: 95%;
  }

  .chat-options {
    margin-left: 0;
  }

  .gut-check-buttons {
    flex-direction: column;
  }

  .app-header {
    padding: var(--sp-sm) var(--sp-md);
  }

  .header-brand {
    font-size: 1rem;
  }
}
