/* KindStay — shared styles
   Aesthetic: editorial hospitality. Warm bone background, forest green ink,
   muted terracotta accent. Serif display + clean geometric body. */

:root {
  /* Forest theme (default) — rose-powder neutrals + amber + saturated forest */
  --bone: #faf5f2;
  --bone-2: #f0e6df;
  --paper: #fdfbf9;
  --ink: #1a2a1f;
  --ink-2: #2d3a2e;
  --moss: #3d5a2e;
  --moss-2: #5a7a45;
  --clay: #b8622a;
  --clay-2: #c17f4a;
  --line: #e8ddd2;
  --muted: #6b6258;

  --bg: var(--bone);
  --fg: var(--ink);
  --accent: var(--moss);
  --accent-2: var(--clay);

  --serif: "Cormorant Garamond", "EB Garamond", Georgia, serif;
  --sans: "Geist", "Inter Tight", -apple-system, BlinkMacSystemFont, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, Menlo, monospace;

  --maxw: 1180px;
  --gutter: clamp(20px, 3vw, 40px);
}

[data-theme="stone"] {
  --bone: #ece8e0;
  --bone-2: #ddd6c8;
  --paper: #f4f1e9;
  --ink: #2a2722;
  --moss: #5a5b48;
  --clay: #a87854;
  --line: #cfc8b8;
  --muted: #6f6a5d;
  --bg: var(--bone);
  --fg: var(--ink);
  --accent: var(--moss);
  --accent-2: var(--clay);
}

[data-theme="dusk"] {
  --bone: #1c1f1c;
  --bone-2: #262a25;
  --paper: #15181a;
  --ink: #f0ebe0;
  --moss: #b6c6a6;
  --clay: #e09b75;
  --line: #2f342e;
  --muted: #9a9a8c;
  --bg: var(--bone);
  --fg: var(--ink);
  --accent: var(--moss);
  --accent-2: var(--clay);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { background: var(--paper); color: var(--fg); -webkit-font-smoothing: antialiased; margin: 0; }
body {
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.55;
  font-feature-settings: "ss01", "cv11";
}

a { color: inherit; text-decoration: none; }
img, svg { display: block; max-width: 100%; }
button { font: inherit; cursor: pointer; border: 0; background: 0; color: inherit; }

::selection { background: var(--accent); color: var(--bg); }

/* Typography */
.display, h1.display, h2.display {
  font-family: var(--serif);
  font-weight: 400;
  letter-spacing: -0.02em;
  line-height: 0.95;
  font-feature-settings: "ss01";
}
.eyebrow {
  font-family: var(--sans);
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-weight: 500;
  color: var(--muted);
}
.eyebrow .dot {
  display: inline-block;
  width: 6px; height: 6px;
  background: var(--accent);
  border-radius: 999px;
  margin-right: 10px;
  vertical-align: middle;
  transform: translateY(-1px);
}

.lead {
  font-family: var(--serif);
  font-size: clamp(20px, 2.4vw, 28px);
  line-height: 1.35;
  font-style: italic;
  color: var(--ink-2, var(--ink));
}

.body-lg { font-size: 17px; line-height: 1.6; max-width: 62ch; }
.body { font-size: 15px; line-height: 1.6; max-width: 62ch; color: var(--muted); }

/* Layout */
.wrap { max-width: var(--maxw); margin: 0 auto; padding-left: var(--gutter); padding-right: var(--gutter); }
.full-wrap { padding-left: var(--gutter); padding-right: var(--gutter); }

section { padding: 80px 0; }

/* Nav */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(14px);
  background: color-mix(in srgb, var(--bg) 78%, transparent);
  border-bottom: 1px solid color-mix(in srgb, var(--line) 70%, transparent);
}
@media (max-width: 820px) {
  body.menu-open .nav { z-index: 100; backdrop-filter: none; -webkit-backdrop-filter: none; background: var(--bg); }
}
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px var(--gutter);
  max-width: var(--maxw);
  margin: 0 auto;
}
.brand {
  display: flex;
  align-items: baseline;
  gap: 10px;
  font-family: var(--serif);
  font-size: 22px;
  letter-spacing: -0.01em;
}
.brand .mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 32px;
  align-self: center;
}
.brand .mark img { height: 32px; width: auto; display: block; }
.brand-logo {
  display: inline-flex;
  align-items: center;
  padding: 18px 32px 18px 0;
  margin-right: 24px;
  gap: 0;
}
.brand-logo img {
  height: 44px;
  width: auto;
  display: block;
}
.brand .sub {
  font-family: var(--sans);
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
  align-self: center;
  margin-left: 6px;
}
.nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
  list-style: none;
}
.nav-links a {
  font-size: 14px;
  font-weight: 500;
  position: relative;
  padding: 6px 0;
}
.nav-links a.active::after,
.nav-links a:hover::after {
  content: "";
  position: absolute;
  left: 0; right: 0;
  bottom: -2px;
  height: 1px;
  background: var(--accent);
}
.nav-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: 999px;
  background: var(--accent);
  color: var(--bg);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.02em;
  transition: transform 0.15s ease;
}
.nav-cta:hover { transform: translateY(-1px); }
.nav-cta::after { content: "→"; }
.menu-btn { display: none; }

/* Nav submenu (dropdown under Local guide) */
.nav-links .has-sub { position: relative; }
.nav-links .has-sub > a { display: inline-flex; align-items: center; gap: 4px; }
.nav-links .has-sub > a .caret {
  font-size: 9px;
  opacity: 0.55;
  transition: transform 0.2s ease, opacity 0.2s ease;
  transform: translateY(1px);
}
.nav-links .has-sub.is-open > a .caret,
.nav-links .has-sub:hover > a .caret { opacity: 1; transform: translateY(1px) rotate(-180deg); }

.nav-sub {
  position: absolute;
  top: 100%;
  left: -8px;
  margin: 0;
  padding: 8px;
  min-width: 240px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: 0 18px 40px -16px rgba(20, 18, 14, 0.18), 0 4px 12px -4px rgba(20, 18, 14, 0.08);
  list-style: none;
  display: grid;
  gap: 1px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px);
  transition: opacity 0.18s ease, transform 0.18s ease, visibility 0.18s;
  z-index: 51;
}
.nav-links .has-sub:hover > .nav-sub,
.nav-links .has-sub.is-open > .nav-sub,
.nav-links .has-sub:focus-within > .nav-sub {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.nav-sub::before {
  content: "";
  position: absolute;
  top: -8px;
  left: 0;
  right: 0;
  height: 8px;
}
.nav-sub li { margin: 0; }
.nav-sub a {
  display: grid;
  grid-template-columns: 28px 1fr;
  align-items: baseline;
  gap: 6px;
  padding: 9px 12px;
  border-radius: 6px;
  font-family: var(--sans);
  font-size: 13.5px;
  font-weight: 500;
  letter-spacing: 0;
  color: var(--ink);
  transition: background 0.15s ease, color 0.15s ease;
}
.nav-sub a:hover,
.nav-sub a:focus-visible {
  background: color-mix(in srgb, var(--accent) 8%, transparent);
  color: var(--accent);
  outline: none;
}
.nav-sub a:hover::after,
.nav-sub a:focus-visible::after { display: none; }
.nav-sub .sub-num {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 400;
  font-size: 13px;
  color: var(--accent);
  letter-spacing: 0.01em;
}
.nav-sub a:first-child { /* "Map" item without numeral */ }
.nav-sub a:not(:has(.sub-num)) { grid-template-columns: 1fr; }

@media (max-width: 820px) {
  .nav-links, .nav-cta { display: none; }
  .menu-btn {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 10px;
    z-index: 60;
    position: relative;
  }
  .menu-btn span {
    width: 22px; height: 1px; background: var(--fg);
    transition: transform 0.25s ease, opacity 0.2s ease;
    transform-origin: center;
  }

  /* Mobile menu — full overlay panel that drops from below the nav */
  body.menu-open { overflow: hidden; }
  body.menu-open .menu-btn span:nth-child(1) { transform: translateY(5px) rotate(45deg); }
  body.menu-open .menu-btn span:nth-child(2) { opacity: 0; }
  body.menu-open .menu-btn span:nth-child(3) { transform: translateY(-5px) rotate(-45deg); }

  body.menu-open .nav-links {
    display: flex;
    position: fixed;
    top: var(--nav-h, 72px);
    left: 0; right: 0; bottom: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 24px 28px 40px;
    background: var(--bg);
    overflow-y: auto;
    list-style: none;
    z-index: 99;
    animation: navSlideDown 0.25s ease-out;
  }
  @keyframes navSlideDown {
    from { opacity: 0; transform: translateY(-8px); }
    to   { opacity: 1; transform: translateY(0); }
  }
  body.menu-open .nav-links > li {
    border-bottom: 1px solid var(--line);
  }
  body.menu-open .nav-links > li > a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 0;
    font-family: var(--serif);
    font-size: 22px;
    font-weight: 400;
    letter-spacing: -0.005em;
    color: var(--ink);
  }
  body.menu-open .nav-links > li > a.active { color: var(--accent); }
  body.menu-open .nav-links > li > a::after { display: none !important; }
  body.menu-open .nav-links .has-sub > a .caret {
    font-size: 12px;
    opacity: 0.55;
  }
  body.menu-open .nav-links .has-sub.is-open > a .caret {
    transform: rotate(-180deg);
  }
  body.menu-open .nav-sub {
    position: static;
    top: auto; left: auto;
    margin: 0 0 16px;
    padding: 4px 12px 12px;
    min-width: 0;
    width: 100%;
    background: transparent;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    display: none;
    opacity: 1;
    visibility: visible;
    transform: none;
    grid-template-columns: 1fr;
    z-index: auto;
  }
  body.menu-open .nav-links .has-sub.is-open > .nav-sub {
    display: grid;
  }
  body.menu-open .nav-sub a {
    grid-template-columns: 28px 1fr;
    padding: 12px 0;
    font-size: 15px;
    color: var(--ink-2);
  }
  body.menu-open .nav-sub a:hover,
  body.menu-open .nav-sub a:focus-visible {
    background: transparent;
    color: var(--accent);
  }
  body.menu-open .nav-cta {
    display: inline-flex;
    align-self: flex-start;
    margin-top: 16px;
  }
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 24px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.01em;
  transition: all 0.18s ease;
  cursor: pointer;
}
.btn-primary {
  background: var(--accent);
  color: var(--bg);
}
.btn-primary:hover { background: var(--ink); transform: translateY(-1px); }
.btn-ghost {
  background: transparent;
  color: var(--fg);
  border: 1px solid var(--line);
}
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }
.btn-arrow::after { content: "→"; transition: transform 0.2s; }
.btn-arrow:hover::after { transform: translateX(3px); }

/* Footer */
.footer {
  background: var(--ink);
  color: var(--bone);
  padding: clamp(60px, 8vw, 100px) 0 30px;
  margin-top: 80px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 48px;
  padding-bottom: 60px;
  border-bottom: 1px solid color-mix(in srgb, var(--bone) 14%, transparent);
}
.footer h4 {
  font-family: var(--sans);
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: color-mix(in srgb, var(--bone) 55%, transparent);
  font-weight: 500;
  margin-bottom: 18px;
}
.footer ul { list-style: none; display: grid; gap: 10px; }
.footer ul a { font-size: 14px; opacity: 0.9; }
.footer ul a:hover { color: var(--clay-2, var(--clay)); }
.footer .brand-block .display {
  font-size: 36px;
  margin-bottom: 16px;
  color: var(--bone);
}
.footer-badge {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  margin-top: 22px;
  padding: 14px 18px;
  border: 1px solid color-mix(in srgb, var(--bone) 18%, transparent);
  background: color-mix(in srgb, var(--bone) 5%, transparent);
  color: var(--bone);
  text-decoration: none;
  transition: background 0.2s, border-color 0.2s;
  max-width: 360px;
}
.footer-badge:hover { background: color-mix(in srgb, var(--bone) 10%, transparent); border-color: color-mix(in srgb, var(--bone) 32%, transparent); }
.footer-badge-score {
  font-family: var(--serif);
  font-size: 22px;
  font-weight: 500;
  color: var(--clay-2, var(--clay));
  line-height: 1;
  display: inline-flex;
  align-items: baseline;
  gap: 2px;
  letter-spacing: 0.06em;
}
.footer-badge-out { font-size: 13px; font-style: italic; color: color-mix(in srgb, var(--bone) 55%, transparent); }
.footer-badge-text { display: flex; flex-direction: column; gap: 2px; line-height: 1.3; }
.footer-badge-text strong { font-family: var(--serif); font-size: 15px; font-weight: 500; letter-spacing: -0.005em; color: var(--bone); }
.footer-badge-text span { font-size: 12px; opacity: 0.65; }
.footer-badge svg { width: 14px; height: 14px; opacity: 0.5; margin-left: auto; flex: none; }
.footer .brand-block p {
  font-size: 14px;
  opacity: 0.7;
  max-width: 30ch;
  line-height: 1.6;
}
.footer-bottom {
  padding-top: 30px;
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  opacity: 0.5;
  letter-spacing: 0.05em;
}
@media (max-width: 820px) {
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 40px; }
  .footer-bottom { flex-direction: column; gap: 8px; }
}

/* Page header (non-home pages) */
.page-head {
  padding: clamp(80px, 10vw, 140px) 0 clamp(40px, 5vw, 60px);
  border-bottom: 1px solid var(--line);
}
.page-head .display {
  font-size: clamp(56px, 9vw, 120px);
  margin-top: 16px;
}
.page-head .lead { margin-top: 24px; max-width: 50ch; }

/* Page card — shared shell wrapping main content on every page.
   A bone-toned card centered on the paper background. */
.page-card {
  display: block;
  background: var(--bone);
  border: 0;
  max-width: var(--maxw);
  width: calc(100% - 2 * var(--gutter));
  margin: 0 auto;
  overflow: visible;
  position: relative;
  z-index: 1;
}
.page-card > section,
.page-card > .page-head {
  margin: 0 !important;
  padding-left: 0;
  padding-right: 0;
}
.page-card > section { padding: clamp(64px, 8vw, 96px) 0; }
.page-card > .page-head {
  padding: clamp(72px, 9vw, 120px) 0 clamp(40px, 5vw, 60px);
  border-bottom: 1px solid var(--line);
  background: transparent;
}
.page-card > .page-head + section,
.page-card > section + section { border-top: 1px solid var(--line); }
.page-card > .page-head + section { border-top: 0; }
@media (max-width: 720px) {
  .page-card { width: calc(100% - 24px); margin: 24px auto; }
}

/* Reusable bits */
.divider { height: 1px; background: var(--line); margin: 80px 0; }
.tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}
.kicker {
  font-family: var(--serif);
  font-style: italic;
  font-size: 18px;
  color: var(--accent);
}

/* Footer testimonial — replaces the old badge */
.footer-testimonials-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: color-mix(in srgb, var(--bone) 14%, transparent);
  border: 1px solid color-mix(in srgb, var(--bone) 14%, transparent);
  margin-bottom: clamp(40px, 5vw, 60px);
}
.footer-testimonial {
  display: grid;
  gap: 12px;
  padding: 24px 26px 26px;
  background: var(--ink);
  color: var(--bone);
  min-height: 100%;
}
.footer-testimonial .ft-stars {
  color: var(--clay-2, var(--clay));
  letter-spacing: 3px;
  font-size: 13px;
  line-height: 1;
}
.footer-testimonial .ft-quote {
  position: static;
  inset: auto;
  margin: 0;
  font-family: var(--serif);
  font-size: 15px;
  line-height: 1.5;
  font-style: italic;
  color: var(--bone);
  opacity: 0.95;
  pointer-events: auto;
}
.footer-testimonial .ft-quote cite {
  display: block;
  font-family: var(--sans);
  font-style: normal;
  font-size: 11.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: color-mix(in srgb, var(--bone) 55%, transparent);
  margin-top: 10px;
  font-weight: 500;
}
.footer-testimonials-foot {
  display: flex;
  justify-content: flex-end;
  margin: -22px 0 clamp(40px, 5vw, 60px);
}
.footer-testimonials-foot .ft-link {
  font-family: var(--sans);
  font-size: 11.5px;
  letter-spacing: 0.06em;
  color: var(--clay-2, var(--clay));
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.footer-testimonials-foot .ft-link:hover { color: var(--bone); }
.footer-testimonials-foot .ft-link::after { content: "→"; transition: transform 0.2s; }
.footer-testimonials-foot .ft-link:hover::after { transform: translateX(3px); }
@media (max-width: 820px) {
  .footer-testimonials-row { grid-template-columns: 1fr; }
}

/* Reveal animation (subtle) */
.reveal {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.reveal.in {
  opacity: 1;
  transform: none;
}
