/* =====================================================
   NEST — Apple-style design system
   ===================================================== */

:root {
  --bg: #fbfbfd;
  --bg-elev: #ffffff;
  --ink: #1d1d1f;
  --ink-soft: #6e6e73;
  --ink-faint: #a1a1a6;
  --line: rgba(0, 0, 0, 0.08);
  --line-soft: rgba(0, 0, 0, 0.04);
  --accent: #0071e3;
  --accent-hover: #0077ed;
  --warm: #f5f5f7;
  --gold: #b08968;
  --danger: #c0392b;
  --success: #52796f;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.04), 0 2px 8px rgba(0, 0, 0, 0.04);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.06), 0 12px 32px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.08), 0 24px 64px rgba(0, 0, 0, 0.08);
  --radius-sm: 10px;
  --radius-md: 18px;
  --radius-lg: 28px;
  --radius-xl: 40px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Helvetica Neue', sans-serif;
  font-weight: 400;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  letter-spacing: -0.01em;
}

/* Bootstrap reset overrides — Bootstrap uses its own font weights/colors */
.btn { letter-spacing: -0.01em; }

/* ============ NAVIGATION ============ */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1030;
  background: rgba(251, 251, 253, 0.72);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid var(--line-soft);
}

.nav-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 14px 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  font-family: 'Instrument Serif', serif;
  font-size: 26px;
  font-weight: 400;
  letter-spacing: -0.02em;
  color: var(--ink);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 6px;
}

.logo-dot {
  width: 7px;
  height: 7px;
  background: var(--ink);
  border-radius: 50%;
  margin-left: 2px;
  margin-top: 10px;
}

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

.nav-links a {
  color: var(--ink);
  text-decoration: none;
  font-size: 13px;
  font-weight: 400;
  opacity: 0.85;
  transition: opacity 0.2s ease;
}

.nav-links a:hover { opacity: 1; }

.nav-cta {
  display: flex;
  gap: 12px;
  align-items: center;
}

/* User avatar in nav */
.nav-user {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--ink);
  padding: 6px 14px 6px 6px;
  border-radius: 980px;
  border: 1px solid var(--line);
  transition: all 0.2s ease;
}
.nav-user:hover { background: var(--warm); }

.nav-user-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: linear-gradient(135deg, #d4c4b0 0%, #b08968 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-family: 'Instrument Serif', serif;
  font-size: 14px;
}

.nav-user-name {
  font-size: 13px;
  font-weight: 500;
}

/* Role toggle pill */
.role-toggle {
  display: inline-flex;
  background: var(--warm);
  border-radius: 980px;
  padding: 3px;
  border: 1px solid var(--line-soft);
}

.role-toggle button {
  border: none;
  background: transparent;
  font-family: inherit;
  font-size: 12px;
  font-weight: 500;
  color: var(--ink-soft);
  padding: 6px 14px;
  border-radius: 980px;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.role-toggle button.active {
  background: var(--bg-elev);
  color: var(--ink);
  box-shadow: var(--shadow-sm);
}

/* ============ BUTTONS ============ */
.btn-base {
  border: none;
  cursor: pointer;
  font-family: inherit;
  font-size: 14px;
  font-weight: 500;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  letter-spacing: -0.01em;
}

.btn-ghost {
  background: transparent;
  color: var(--ink);
  padding: 8px 16px;
  border: none;
  cursor: pointer;
  font-family: inherit;
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  transition: opacity 0.2s ease;
}
.btn-ghost:hover { color: var(--ink-soft); }

.btn-primary-nest {
  background: var(--ink);
  color: white;
  padding: 9px 20px;
  border-radius: 980px;
  border: none;
  cursor: pointer;
  font-family: inherit;
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}
.btn-primary-nest:hover {
  background: #2d2d2f;
  color: white;
  transform: translateY(-1px);
}

.btn-accent {
  background: var(--accent);
  color: white;
  padding: 14px 28px;
  border-radius: 980px;
  font-size: 15px;
  border: none;
  cursor: pointer;
  font-family: inherit;
  font-weight: 500;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}
.btn-accent:hover {
  background: var(--accent-hover);
  color: white;
  transform: translateY(-1px);
}

.btn-accent-small {
  background: var(--accent);
  color: white;
  padding: 9px 20px;
  border-radius: 980px;
  font-size: 13px;
  border: none;
  cursor: pointer;
  font-family: inherit;
  font-weight: 500;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}
.btn-accent-small:hover {
  background: var(--accent-hover);
  color: white;
  transform: translateY(-1px);
}

.btn-secondary-nest {
  background: var(--warm);
  color: var(--ink);
  padding: 9px 16px;
  border-radius: 980px;
  font-size: 13px;
  border: none;
  cursor: pointer;
  font-family: inherit;
  font-weight: 500;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}
.btn-secondary-nest:hover { background: #ebebef; }

.btn-ghost-small {
  background: transparent;
  color: var(--ink);
  padding: 8px 14px;
  border: 1px solid var(--line);
  border-radius: 980px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}
.btn-ghost-small:hover { background: var(--warm); }

.btn-danger {
  background: #c0392b;
  color: white;
  padding: 9px 20px;
  border-radius: 980px;
  border: none;
  cursor: pointer;
  font-family: inherit;
  font-size: 14px;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}
.btn-danger:hover { background: #a93226; }

/* ============ HERO ============ */
.hero {
  padding: 140px 32px 80px;
  max-width: 1200px;
  margin: 0 auto;
  text-align: center;
  position: relative;
}

.hero-eyebrow {
  display: inline-block;
  font-size: 13px;
  font-weight: 500;
  color: var(--ink-soft);
  padding: 6px 14px;
  background: var(--warm);
  border-radius: 980px;
  margin-bottom: 28px;
  letter-spacing: 0.02em;
}

.hero-eyebrow span {
  color: var(--accent);
  margin-right: 6px;
}

.hero h1 {
  font-family: 'Instrument Serif', serif;
  font-size: clamp(48px, 8vw, 96px);
  font-weight: 400;
  line-height: 1.02;
  letter-spacing: -0.03em;
  margin-bottom: 28px;
  color: var(--ink);
}

.hero h1 em {
  font-style: italic;
  color: var(--gold);
}

.hero p {
  font-size: 19px;
  color: var(--ink-soft);
  max-width: 580px;
  margin: 0 auto 48px;
  line-height: 1.5;
  font-weight: 400;
}

/* ============ SEARCH/REQUEST BAR ============ */
.search-bar {
  background: var(--bg-elev);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-md);
  padding: 8px;
  max-width: 880px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr auto;
  align-items: center;
  border: 1px solid var(--line-soft);
  transition: box-shadow 0.3s ease;
}

.search-bar:hover { box-shadow: var(--shadow-lg); }

.search-field {
  padding: 14px 24px;
  border-right: 1px solid var(--line);
  text-align: left;
  cursor: pointer;
  border-radius: var(--radius-xl);
  transition: background 0.2s ease;
}

.search-field:last-of-type { border-right: none; }
.search-field:hover { background: var(--warm); }

.search-label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--ink);
  margin-bottom: 4px;
}

.search-input {
  border: none;
  background: transparent;
  font-family: inherit;
  font-size: 14px;
  color: var(--ink);
  width: 100%;
  outline: none;
}

.search-input::placeholder { color: var(--ink-faint); }

.search-submit {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--ink);
  color: white;
  border: none;
  cursor: pointer;
  margin: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.search-submit:hover {
  background: var(--accent);
  transform: scale(1.05);
}

.search-submit svg { width: 18px; height: 18px; }

/* ============ PURPOSE FIELD ============ */
.purpose-field {
  max-width: 880px;
  margin: 14px auto 0;
  background: var(--bg-elev);
  border-radius: 980px;
  border: 1px solid var(--line-soft);
  padding: 14px 24px;
  display: flex;
  align-items: center;
  gap: 12px;
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.3s ease;
}

.purpose-field:hover { box-shadow: var(--shadow-md); }

.purpose-field svg {
  width: 16px;
  height: 16px;
  stroke: var(--ink-faint);
  flex-shrink: 0;
}

.purpose-field input {
  border: none;
  background: transparent;
  font-family: inherit;
  font-size: 14px;
  color: var(--ink);
  width: 100%;
  outline: none;
}

.purpose-field input::placeholder { color: var(--ink-faint); }

/* ============ TRUST STRIP ============ */
.trust-strip {
  margin-top: 56px;
  display: flex;
  justify-content: center;
  gap: 40px;
  color: var(--ink-faint);
  font-size: 13px;
  flex-wrap: wrap;
}

.trust-item { display: flex; align-items: center; gap: 8px; }
.trust-item svg { width: 14px; height: 14px; }

/* ============ SECTIONS ============ */
.section {
  max-width: 1200px;
  margin: 0 auto;
  padding: 96px 32px;
}

.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 48px;
  gap: 32px;
}

.section-head-text { max-width: 560px; }

.section-eyebrow {
  font-size: 12px;
  font-weight: 600;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 12px;
}

.section h2 {
  font-family: 'Instrument Serif', serif;
  font-size: clamp(36px, 5vw, 56px);
  font-weight: 400;
  line-height: 1.05;
  letter-spacing: -0.02em;
  color: var(--ink);
}

.section-head p {
  color: var(--ink-soft);
  font-size: 16px;
  max-width: 380px;
  text-align: right;
}

/* ============ REQUEST SUMMARY ============ */
.request-summary {
  background: var(--bg-elev);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-lg);
  padding: 24px 28px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 32px;
  gap: 24px;
  box-shadow: var(--shadow-sm);
}

.request-route {
  display: flex;
  align-items: center;
  gap: 14px;
  font-family: 'Instrument Serif', serif;
  font-size: 28px;
  letter-spacing: -0.02em;
  margin-bottom: 6px;
  line-height: 1;
}

.request-route svg {
  width: 18px;
  height: 18px;
  stroke: var(--gold);
}

.request-meta {
  color: var(--ink-soft);
  font-size: 14px;
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}

.dot-sep { color: var(--ink-faint); }

.request-summary-right {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.offer-count {
  background: var(--warm);
  padding: 8px 16px;
  border-radius: 980px;
  font-size: 13px;
  color: var(--ink);
}

.offer-count strong {
  color: var(--accent);
  font-weight: 600;
}

/* ============ OFFER CARDS ============ */
.offers-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(380px, 1fr));
  gap: 20px;
}

.offer-card {
  background: var(--bg-elev);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-lg);
  padding: 24px;
  display: flex;
  flex-direction: column;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.offer-card:hover {
  box-shadow: var(--shadow-md);
  border-color: var(--line);
  transform: translateY(-2px);
}

.offer-header {
  display: flex;
  align-items: center;
  gap: 14px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line-soft);
  margin-bottom: 18px;
}

.host-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Instrument Serif', serif;
  font-size: 22px;
  color: white;
  flex-shrink: 0;
}

/* Avatar gradients - applied via JS based on index */
.avatar-grad-1 { background: linear-gradient(135deg, #d4c4b0 0%, #b08968 100%); }
.avatar-grad-2 { background: linear-gradient(135deg, #c9d6df 0%, #52796f 100%); }
.avatar-grad-3 { background: linear-gradient(135deg, #f4e1d2 0%, #d4a574 100%); }
.avatar-grad-4 { background: linear-gradient(135deg, #e0d4c9 0%, #8a7967 100%); }
.avatar-grad-5 { background: linear-gradient(135deg, #c4b5d4 0%, #6b5b95 100%); }

.host-info { flex: 1; }

.host-name {
  font-size: 15px;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 4px;
  letter-spacing: -0.01em;
}

.host-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  font-weight: 500;
  color: var(--ink-soft);
  letter-spacing: 0.01em;
}

.badge-dot {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--ink-faint);
  color: white;
  font-size: 9px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.host-badge-super .badge-dot { background: #d4a574; }
.host-badge-reliable .badge-dot { background: #52796f; }
.host-badge-recommended .badge-dot { background: #5a7d9a; }
.host-badge-new .badge-dot { background: var(--ink-faint); }

.offer-time {
  font-size: 12px;
  color: var(--ink-faint);
  flex-shrink: 0;
}

.offer-place { margin-bottom: 18px; }

.offer-place-type {
  font-size: 17px;
  font-weight: 600;
  color: var(--ink);
  letter-spacing: -0.015em;
  margin-bottom: 4px;
}

.offer-place-loc {
  font-size: 13px;
  color: var(--ink-soft);
}

.offer-rules {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px 16px;
  margin-bottom: 18px;
  padding: 16px;
  background: var(--warm);
  border-radius: var(--radius-md);
}

.rule-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
  color: var(--ink-soft);
}

.rule-item svg {
  width: 14px;
  height: 14px;
  stroke: var(--ink-soft);
  flex-shrink: 0;
}

.offer-note {
  font-size: 13px;
  color: var(--ink-soft);
  line-height: 1.55;
  padding: 14px 16px;
  border-left: 2px solid var(--gold);
  background: rgba(176, 137, 104, 0.04);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  font-style: italic;
  margin-bottom: 20px;
}

.offer-actions {
  display: flex;
  gap: 8px;
  margin-top: auto;
  justify-content: flex-end;
  flex-wrap: wrap;
}

/* ============ EMPTY STATE ============ */
.empty-state {
  text-align: center;
  padding: 64px 32px;
  background: var(--bg-elev);
  border: 1px dashed var(--line);
  border-radius: var(--radius-lg);
  color: var(--ink-soft);
}

.empty-state h3 {
  font-family: 'Instrument Serif', serif;
  font-size: 28px;
  font-weight: 400;
  color: var(--ink);
  margin-bottom: 8px;
}

.empty-state p { font-size: 14px; }

/* ============ HOW IT WORKS ============ */
.how {
  background: linear-gradient(180deg, var(--bg) 0%, #f3f3f5 100%);
  margin-top: 40px;
}

.how-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
  margin-top: 48px;
}

.step {
  background: var(--bg-elev);
  padding: 36px 32px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--line-soft);
  transition: all 0.3s ease;
}

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

.step-number {
  font-family: 'Instrument Serif', serif;
  font-style: italic;
  font-size: 44px;
  color: var(--gold);
  line-height: 1;
  margin-bottom: 24px;
}

.step h3 {
  font-size: 19px;
  font-weight: 600;
  margin-bottom: 10px;
  letter-spacing: -0.015em;
}

.step p {
  color: var(--ink-soft);
  font-size: 14px;
  line-height: 1.55;
}

/* ============ REPUTATION ============ */
.reputation { text-align: center; }

.badges-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  margin-top: 48px;
}

.badge-card {
  padding: 32px 20px;
  background: var(--bg-elev);
  border-radius: var(--radius-md);
  border: 1px solid var(--line-soft);
  transition: all 0.3s ease;
}

.badge-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

.badge-icon {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  margin: 0 auto 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Instrument Serif', serif;
  font-size: 22px;
  color: white;
}

.badge-card:nth-child(1) .badge-icon { background: var(--ink-faint); }
.badge-card:nth-child(2) .badge-icon { background: #5a7d9a; }
.badge-card:nth-child(3) .badge-icon { background: #52796f; }
.badge-card:nth-child(4) .badge-icon { background: var(--gold); }

.badge-name {
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 6px;
}

.badge-range {
  font-size: 13px;
  color: var(--ink-soft);
}

/* ============ FOOTER ============ */
footer {
  border-top: 1px solid var(--line);
  padding: 56px 32px 32px;
  background: var(--bg);
}

.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 48px;
  margin-bottom: 40px;
}

.footer-brand .logo { margin-bottom: 14px; }
.footer-brand p { color: var(--ink-soft); font-size: 13px; max-width: 280px; }

.footer-col h4 {
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 16px;
}

.footer-col ul { list-style: none; }
.footer-col li { margin-bottom: 10px; }
.footer-col a {
  color: var(--ink-soft);
  font-size: 13px;
  text-decoration: none;
  transition: color 0.2s ease;
}
.footer-col a:hover { color: var(--ink); }

.footer-bottom {
  max-width: 1200px;
  margin: 0 auto;
  padding-top: 24px;
  border-top: 1px solid var(--line-soft);
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: var(--ink-faint);
}

/* ============ ANIMATIONS ============ */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

.hero > * {
  animation: fadeUp 0.8s cubic-bezier(0.4, 0, 0.2, 1) backwards;
}
.hero-eyebrow { animation-delay: 0.05s; }
.hero h1 { animation-delay: 0.15s; }
.hero p { animation-delay: 0.25s; }
.search-bar { animation: fadeUp 0.8s cubic-bezier(0.4, 0, 0.2, 1) 0.35s backwards; }
.purpose-field { animation: fadeUp 0.8s cubic-bezier(0.4, 0, 0.2, 1) 0.4s backwards; }
.trust-strip { animation: fadeUp 0.8s cubic-bezier(0.4, 0, 0.2, 1) 0.45s backwards; }

/* ============ TOAST / NOTIFICATIONS ============ */
.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 2000;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.toast {
  background: var(--ink);
  color: white;
  padding: 12px 18px;
  border-radius: var(--radius-md);
  font-size: 13px;
  box-shadow: var(--shadow-lg);
  animation: fadeUp 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  max-width: 320px;
}

.toast.success { background: var(--success); }
.toast.error { background: var(--danger); }

/* ============ RESPONSIVE ============ */
@media (max-width: 860px) {
  .nav-links { display: none; }
  .search-bar { grid-template-columns: 1fr; padding: 16px; }
  .search-field { border-right: none; border-bottom: 1px solid var(--line); }
  .search-field:last-of-type { border-bottom: none; }
  .search-submit { width: 100%; border-radius: var(--radius-md); height: 48px; }
  .how-grid, .badges-row { grid-template-columns: 1fr; }
  .footer-inner { grid-template-columns: 1fr 1fr; }
  .section-head { flex-direction: column; align-items: flex-start; }
  .section-head p { text-align: left; }
  .trust-strip { flex-direction: column; gap: 12px; }
  .request-summary { flex-direction: column; align-items: flex-start; }
  .request-route { font-size: 22px; }
  .offers-grid { grid-template-columns: 1fr; }
  .offer-rules { grid-template-columns: 1fr; }
  .offer-actions { flex-wrap: wrap; }
  .nav-inner { padding: 12px 20px; }
  .section { padding: 64px 20px; }
  .hero { padding: 120px 20px 60px; }
}
