/* ── Design tokens ───────────────────────────────────────────── */
:root {
  --bg: #f8f5f0;
  --bg-alt: #f0ece4;
  --fg: #1a1a1a;
  --fg-muted: #6b6560;
  --accent: #ff5722;
  --accent-hover: #e64a19;
  --surface: #ffffff;
  --border: #e0dbd3;
  --radius: 12px;
  --font-display: 'Fraunces', Georgia, serif;
  --font-body: 'DM Sans', system-ui, sans-serif;
  --shadow: 0 4px 24px rgba(0,0,0,0.08);
  --shadow-lg: 0 16px 48px rgba(0,0,0,0.14);
}

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

html { scroll-behavior: smooth; font-size: 16px; }

body {
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-body);
  font-weight: 400;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

/* ── Typography helpers ──────────────────────────────────────── */
.section-label {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 1rem;
}

.section-headline {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 3.5vw, 2.6rem);
  font-weight: 700;
  line-height: 1.12;
  color: var(--fg);
  margin-bottom: 0.75rem;
  letter-spacing: -0.02em;
}

.section-sub {
  font-size: 1.05rem;
  color: var(--fg-muted);
  margin-bottom: 2.5rem;
  max-width: 52ch;
}

/* ── Buttons ─────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.9rem;
  padding: 0.7rem 1.4rem;
  border-radius: 8px;
  cursor: pointer;
  text-decoration: none;
  border: none;
  transition: background 0.15s, transform 0.1s, box-shadow 0.15s;
}
.btn:active { transform: scale(0.98); }

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

.btn-ghost {
  background: transparent;
  color: var(--fg-muted);
  border: 1.5px solid var(--border);
}
.btn-ghost:hover { border-color: var(--fg-muted); color: var(--fg); }

.btn-sm { font-size: 0.8rem; padding: 0.5rem 1rem; }
.btn-lg { font-size: 1rem; padding: 0.9rem 2rem; }
.btn-full { width: 100%; justify-content: center; }

.btn-link {
  background: none;
  border: none;
  color: var(--accent);
  font-size: 0.875rem;
  cursor: pointer;
  padding: 0;
  font-family: var(--font-body);
}

/* ── Nav ─────────────────────────────────────────────────────── */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(248,245,240,0.9);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 60px;
}

.nav-logo {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--fg);
  text-decoration: none;
  letter-spacing: -0.02em;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.nav-links a {
  text-decoration: none;
  color: var(--fg-muted);
  font-size: 0.875rem;
  font-weight: 500;
}
.nav-links a:hover { color: var(--fg); }

/* ── Hero ────────────────────────────────────────────────────── */
.hero {
  padding: 5rem 0 4rem;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
  min-height: 80vh;
}

.hero-eyebrow {
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 1.25rem;
}

.hero-headline {
  font-family: var(--font-display);
  font-size: clamp(2.6rem, 5vw, 4rem);
  font-weight: 700;
  line-height: 1.05;
  color: var(--fg);
  margin-bottom: 1.25rem;
  letter-spacing: -0.025em;
}

.hero-headline em {
  font-style: italic;
  color: var(--accent);
}

.hero-lede {
  font-size: 1.1rem;
  color: var(--fg-muted);
  line-height: 1.7;
  margin-bottom: 1rem;
  max-width: 44ch;
}

.hero-tagline {
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--fg-muted);
  margin-bottom: 2rem;
}

.hero-actions {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

/* ── Hero chat preview (static mock) ────────────────────────── */
.hero-visual { position: relative; }

.chat-preview-card {
  background: var(--surface);
  border-radius: 18px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  max-width: 420px;
  margin: 0 auto;
}

.chat-preview-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--border);
  background: var(--bg-alt);
}

.chat-preview-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.9rem;
  flex-shrink: 0;
}

.chat-preview-name {
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--fg);
}

.chat-preview-status {
  font-size: 0.72rem;
  color: #22a559;
  font-weight: 500;
}

.chat-preview-messages {
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  min-height: 180px;
}

.msg {
  max-width: 80%;
  padding: 0.6rem 0.9rem;
  border-radius: 12px;
  font-size: 0.875rem;
  line-height: 1.5;
}

.msg-otto {
  background: var(--bg-alt);
  color: var(--fg);
  border-radius: 4px 12px 12px 12px;
  align-self: flex-start;
}

.msg-user {
  background: var(--accent);
  color: #fff;
  border-radius: 12px 12px 4px 12px;
  align-self: flex-end;
}

.chat-preview-input {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1rem;
  border-top: 1px solid var(--border);
  background: var(--bg-alt);
  color: var(--fg-muted);
  font-size: 0.82rem;
}

.chat-send-btn {
  width: 28px;
  height: 28px;
  background: var(--accent);
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  flex-shrink: 0;
}

/* ── Section: How it works ───────────────────────────────────── */
.how-it-works {
  padding: 5rem 0;
  background: var(--bg-alt);
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.5rem;
}

.service-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.75rem;
  transition: box-shadow 0.2s, transform 0.2s;
}

.service-card:hover {
  box-shadow: var(--shadow);
  transform: translateY(-2px);
}

.service-icon {
  font-size: 1.75rem;
  margin-bottom: 1rem;
}

.service-card h3 {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--fg);
  margin-bottom: 0.5rem;
}

.service-card p {
  font-size: 0.9rem;
  color: var(--fg-muted);
  line-height: 1.6;
}

/* ── Section: Demo ───────────────────────────────────────────── */
.demo-section {
  padding: 5rem 0;
}

.demo-layout {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 2rem;
  align-items: start;
}

.demo-chat-wrapper {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.btn-book-demo {
  align-self: flex-start;
}

/* ── Chat widget (live) ──────────────────────────────────────── */
.chat-widget {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.cw-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--border);
  background: var(--bg-alt);
}

.cw-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.9rem;
  flex-shrink: 0;
}

.cw-name {
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--fg);
}

.cw-status {
  font-size: 0.72rem;
  color: #22a559;
  font-weight: 500;
}

.cw-messages {
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  min-height: 240px;
  max-height: 360px;
  overflow-y: auto;
  scroll-behavior: smooth;
}

.cw-msg {
  max-width: 82%;
  padding: 0.65rem 0.9rem;
  border-radius: 12px;
  font-size: 0.875rem;
  line-height: 1.5;
  animation: fadeIn 0.2s ease;
}

.cw-msg--otto {
  background: var(--bg-alt);
  color: var(--fg);
  border-radius: 4px 12px 12px 12px;
  align-self: flex-start;
}

.cw-msg--user {
  background: var(--accent);
  color: #fff;
  border-radius: 12px 12px 4px 12px;
  align-self: flex-end;
}

/* Typing indicator */
.cw-typing {
  display: flex;
  gap: 4px;
  align-items: center;
  padding: 0.75rem 1rem;
}

.cw-typing span {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--fg-muted);
  animation: bounce 1.2s infinite;
}
.cw-typing span:nth-child(2) { animation-delay: 0.2s; }
.cw-typing span:nth-child(3) { animation-delay: 0.4s; }

@keyframes bounce {
  0%, 80%, 100% { transform: translateY(0); }
  40% { transform: translateY(-6px); }
}

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

.cw-input-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1rem;
  border-top: 1px solid var(--border);
}

.cw-input {
  flex: 1;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  padding: 0.55rem 0.9rem;
  font-family: var(--font-body);
  font-size: 0.875rem;
  background: var(--bg);
  color: var(--fg);
  outline: none;
  transition: border-color 0.15s;
}
.cw-input:focus { border-color: var(--accent); }
.cw-input:disabled { opacity: 0.5; }

.cw-send {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  border: none;
  cursor: pointer;
  font-size: 0.875rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background 0.15s;
}
.cw-send:hover { background: var(--accent-hover); }
.cw-send:disabled { opacity: 0.5; cursor: not-allowed; }

/* ── Demo info card ──────────────────────────────────────────── */
.demo-info-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  position: sticky;
  top: 80px;
}

.demo-info-card h4 {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--fg);
  margin-bottom: 1rem;
}

.demo-info-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.demo-info-list li {
  font-size: 0.875rem;
  color: var(--fg-muted);
}

.demo-divider {
  border: none;
  border-top: 1px solid var(--border);
  margin: 1rem 0;
}

.demo-hours, .demo-location {
  font-size: 0.82rem;
  color: var(--fg-muted);
  margin-bottom: 0.4rem;
}

/* ── Manifesto ───────────────────────────────────────────────── */
.manifesto {
  padding: 5rem 0;
  background: var(--fg);
  color: #fff;
}

.manifesto-inner {
  max-width: 780px;
  margin: 0 auto;
  padding: 0 2rem;
  text-align: center;
}

.manifesto .section-label {
  color: #ff8a65;
}

.manifesto blockquote {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 3vw, 2.2rem);
  font-weight: 600;
  line-height: 1.25;
  color: #fff;
  margin-bottom: 1.5rem;
  font-style: italic;
}

.manifesto p {
  font-size: 1rem;
  color: #c8c4bf;
  line-height: 1.7;
  margin-bottom: 3rem;
}

.manifesto-stats {
  display: flex;
  justify-content: center;
  gap: 3rem;
  flex-wrap: wrap;
}

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

.stat-number {
  font-family: var(--font-display);
  font-size: 2.2rem;
  font-weight: 700;
  color: var(--accent);
  line-height: 1;
  margin-bottom: 0.3rem;
}

.stat-label {
  font-size: 0.8rem;
  color: #9a9590;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

/* ── Closing CTA ─────────────────────────────────────────────── */
.closing {
  padding: 5rem 0;
  background: var(--bg-alt);
}

.closing-inner {
  max-width: 680px;
  margin: 0 auto;
  padding: 0 2rem;
  text-align: center;
}

.closing-inner h2 {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 3.5vw, 2.6rem);
  font-weight: 700;
  line-height: 1.15;
  color: var(--fg);
  margin-bottom: 1rem;
  letter-spacing: -0.02em;
}

.closing-inner p {
  color: var(--fg-muted);
  margin-bottom: 2rem;
  line-height: 1.7;
}

.closing-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: center;
  margin-bottom: 2rem;
}

.tag {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 100px;
  padding: 0.3rem 0.85rem;
  font-size: 0.78rem;
  color: var(--fg-muted);
  font-weight: 500;
}

/* ── Footer ──────────────────────────────────────────────────── */
.footer {
  border-top: 1px solid var(--border);
  padding: 2rem 0;
}

.footer-inner {
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.footer-logo {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--fg);
}

.footer-tagline {
  font-size: 0.8rem;
  color: var(--fg-muted);
}

.footer-copy {
  font-size: 0.78rem;
  color: var(--fg-muted);
}

/* ── Booking modal ───────────────────────────────────────────── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(26,26,26,0.55);
  backdrop-filter: blur(4px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.modal {
  background: var(--surface);
  border-radius: 16px;
  box-shadow: var(--shadow-lg);
  width: 100%;
  max-width: 460px;
  max-height: 90vh;
  overflow-y: auto;
  padding: 2rem;
  position: relative;
  animation: slideUp 0.2s ease;
}

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

.modal-close {
  position: absolute;
  top: 1.25rem;
  right: 1.25rem;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: 50%;
  width: 30px;
  height: 30px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  color: var(--fg-muted);
  transition: background 0.15s;
}
.modal-close:hover { background: var(--border); }

.modal-title {
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--fg);
  margin-bottom: 1.5rem;
}

.form-group {
  margin-bottom: 1.1rem;
}

.form-group label {
  display: block;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--fg);
  margin-bottom: 0.35rem;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  padding: 0.6rem 0.85rem;
  font-family: var(--font-body);
  font-size: 0.875rem;
  background: var(--bg);
  color: var(--fg);
  outline: none;
  transition: border-color 0.15s;
  appearance: none;
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus { border-color: var(--accent); }

.form-group textarea {
  min-height: 80px;
  resize: vertical;
}

.modal-error {
  background: #fff0ed;
  border: 1px solid #ff8a65;
  border-radius: 8px;
  padding: 0.6rem 0.9rem;
  color: #c62828;
  font-size: 0.82rem;
  margin-bottom: 1rem;
}

/* Slots */
.slots-back { margin-bottom: 1rem; }

.slots-heading {
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--fg);
  margin-bottom: 1rem;
}

.slots-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.slots-empty {
  color: var(--fg-muted);
  font-size: 0.875rem;
  grid-column: 1 / -1;
}

.slot-btn {
  background: var(--bg-alt);
  border: 1.5px solid var(--border);
  border-radius: 8px;
  padding: 0.6rem 0;
  font-family: var(--font-body);
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--fg);
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
  text-align: center;
}
.slot-btn:hover { border-color: var(--accent); }
.slot-btn--selected {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

/* Booking success */
.booking-success {
  text-align: center;
  padding: 1rem 0;
}

.booking-success-icon {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: #e8f5e9;
  color: #2e7d32;
  font-size: 1.5rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1rem;
}

.booking-success h4 {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--fg);
  margin-bottom: 0.5rem;
}

.booking-success p {
  color: var(--fg-muted);
  font-size: 0.9rem;
  margin-bottom: 0.25rem;
}

.booking-success-sub {
  color: var(--fg-muted);
  font-size: 0.8rem;
  margin-bottom: 1.5rem \!important;
}

/* ── Responsive ──────────────────────────────────────────────── */
@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; gap: 2rem; min-height: auto; }
  .hero { padding: 3rem 0 2.5rem; }
  .hero-visual { order: -1; }
  .chat-preview-card { max-width: 100%; }
  .demo-layout { grid-template-columns: 1fr; }
  .demo-info { order: -1; }
  .demo-info-card { position: static; }
  .manifesto-stats { gap: 2rem; }
}

@media (max-width: 600px) {
  .nav-links a:not(.btn) { display: none; }
  .slots-grid { grid-template-columns: repeat(2, 1fr); }
  .closing-inner h2 { font-size: 1.6rem; }
}
