/* ==========================================================================
   Casita — Design system + styles
   ========================================================================== */

:root {
  --bg: #F6F1E7;
  --bg-alt: #ECE3D3;
  --ink: #2A2521;
  --muted: #6E6355;
  --clay: #B85C38;
  --clay-deep: #9A4A2C;
  --navy: #22344C;
  --walnut: #6B4A2E;
  --gold: #C7A25B;
  --line: rgba(42, 37, 33, .12);
  --white: #FCF9F3;

  --font-head: "Fraunces", Georgia, serif;
  --font-body: "Karla", system-ui, sans-serif;

  --r: 14px;
  --shadow: 0 10px 30px rgba(42, 37, 33, .10);
  --shadow-lg: 0 20px 50px rgba(42, 37, 33, .16);
  --content-max: 1180px;
}

/* ---------- Reset / base ---------- */
*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.65;
  overflow-x: hidden;
}

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

h1, h2, h3, h4 {
  font-family: var(--font-head);
  color: var(--ink);
  margin: 0 0 .5em;
}

p { margin: 0 0 1em; }

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

ul { margin: 0; padding: 0; list-style: none; }

button { font-family: inherit; }

/* ---------- Focus ---------- */
:focus-visible {
  outline: 2px solid var(--clay);
  outline-offset: 2px;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--white);
  color: var(--ink);
  padding: .75em 1.25em;
  z-index: 200;
  border-radius: 0 0 var(--r) 0;
}
.skip-link:focus {
  left: 0;
}

/* ---------- Layout helpers ---------- */
.wrap {
  max-width: var(--content-max);
  margin: 0 auto;
  padding: 0 24px;
}

.section {
  padding: clamp(56px, 9vw, 108px) 0;
}

.section-alt {
  background: var(--bg-alt);
}

.eyebrow {
  font-family: "Karla", sans-serif;
  font-weight: 700;
  font-size: .78rem;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--clay-deep);
  margin: 0 0 .9em;
}

.eyebrow-light {
  color: var(--gold);
}

.section-title {
  font-size: clamp(1.8rem, 3.5vw, 2.8rem);
  line-height: 1.15;
  max-width: 42ch;
  margin-bottom: .6em;
}

.lead {
  max-width: 68ch;
  color: var(--muted);
  font-size: 1.0625rem;
}

.muted { color: var(--muted); }

.muted-note {
  color: var(--muted);
  font-size: .95rem;
  margin-top: 1.5em;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5em;
  padding: .9em 1.7em;
  border-radius: var(--r);
  font-weight: 700;
  font-size: .95rem;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 180ms ease, background-color 180ms ease, color 180ms ease, border-color 180ms ease, opacity 180ms ease;
  white-space: nowrap;
}

.btn-primary {
  background: var(--clay);
  color: #FCF9F3;
  box-shadow: var(--shadow);
}
.btn-primary:hover {
  background: var(--clay-deep);
  transform: translateY(-1px);
}

.btn-outline {
  background: transparent;
  color: var(--ink);
  border-color: var(--line);
}
.btn-outline:hover {
  border-color: var(--ink);
  transform: translateY(-1px);
}

.btn-outline-light {
  color: #FCF9F3;
  border-color: rgba(252, 249, 243, .5);
}
.btn-outline-light:hover {
  border-color: #FCF9F3;
  background: rgba(252, 249, 243, .08);
}

.btn-small {
  padding: .6em 1.2em;
  font-size: .85rem;
}

.btn-full {
  width: 100%;
}

.btn:disabled {
  opacity: .65;
  cursor: not-allowed;
  transform: none;
}

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: transparent;
  transition: background-color 200ms ease, box-shadow 200ms ease;
}

.site-header.is-scrolled {
  background: color-mix(in srgb, var(--bg) 92%, transparent);
  backdrop-filter: blur(6px);
  box-shadow: 0 2px 16px rgba(42, 37, 33, .08);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 18px;
  padding-bottom: 18px;
}

.wordmark {
  font-family: "Fraunces", serif;
  font-size: 1.4rem;
  font-weight: 600;
  color: var(--ink);
}

.wordmark .muted {
  font-size: .95rem;
  font-weight: 400;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 28px;
}

.main-nav a:not(.btn) {
  color: var(--ink);
  font-weight: 500;
  font-size: .95rem;
  position: relative;
  transition: color 180ms ease;
}
.main-nav a:not(.btn):hover {
  color: var(--clay-deep);
}

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  background: none;
  border: none;
  cursor: pointer;
}
.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--ink);
  margin: 0 auto;
  transition: transform 180ms ease, opacity 180ms ease;
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  min-height: 92vh;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
  margin-top: -84px;
  padding-top: 84px;
}

.hero-bg {
  position: absolute;
  inset: 0;
  z-index: -1;
}
.hero-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(34, 26, 20, .82) 0%, rgba(34, 26, 20, .55) 35%, rgba(34, 26, 20, .15) 65%, rgba(34, 26, 20, .35) 100%),
              linear-gradient(90deg, rgba(34, 26, 20, .55) 0%, rgba(34, 26, 20, 0) 55%);
}

.hero-content {
  position: relative;
  padding-bottom: clamp(48px, 8vw, 96px);
  color: #FCF9F3;
  max-width: 760px;
}

.hero-content h1 {
  color: #FCF9F3;
  font-size: clamp(2.4rem, 6vw, 4.2rem);
  line-height: 1.05;
  margin-bottom: .35em;
}

.hero-sub {
  font-size: 1.15rem;
  max-width: 52ch;
  color: rgba(252, 249, 243, .92);
}

.pill-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 1.4em 0;
}

.pill {
  background: rgba(252, 249, 243, .12);
  border: 1px solid rgba(252, 249, 243, .35);
  color: #FCF9F3;
  padding: .45em 1em;
  border-radius: 999px;
  font-size: .85rem;
  font-weight: 500;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 1.6em;
}

/* ---------- Stats strip ---------- */
.stats-strip {
  background: var(--navy);
  color: #FCF9F3;
  padding: clamp(40px, 6vw, 64px) 0;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  text-align: center;
}

.stat-num {
  font-family: "Fraunces", serif;
  font-size: clamp(1.8rem, 3.2vw, 2.6rem);
  margin-bottom: .15em;
  color: #FCF9F3;
}

.stat-label {
  color: rgba(252, 249, 243, .75);
  font-size: .9rem;
  margin: 0;
}

/* ---------- Specs row (The Space) ---------- */
.specs-row {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-top: 2em;
}

.spec-item {
  display: flex;
  align-items: center;
  gap: .6em;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: .8em 1.2em;
  font-weight: 500;
  box-shadow: var(--shadow);
}

.spec-icon {
  display: inline-flex;
  color: var(--walnut);
  width: 22px;
  height: 22px;
}
.spec-icon svg { width: 100%; height: 100%; }

/* ---------- Cards (Who it's for / Reviews) ---------- */
.card-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  margin-top: 2em;
}

.card-grid-3 {
  grid-template-columns: repeat(3, 1fr);
}

.card {
  background: var(--white);
  border-radius: var(--r);
  padding: 28px;
  box-shadow: var(--shadow);
  transition: transform 200ms ease, box-shadow 200ms ease;
}
.card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
}

.card-icon {
  display: inline-flex;
  width: 34px;
  height: 34px;
  color: var(--clay-deep);
  margin-bottom: .6em;
}
.card-icon svg { width: 100%; height: 100%; }

.card h3 {
  font-size: 1.15rem;
  margin-bottom: .4em;
}

.card p {
  color: var(--muted);
  margin: 0;
  font-size: .98rem;
}

.card .bullet-list {
  margin: 0;
}
.card .bullet-list li {
  color: var(--muted);
  font-size: .98rem;
  margin-bottom: .5em;
}
.card .bullet-list li:last-child {
  margin-bottom: 0;
}

/* ---------- Amenities ---------- */
.amenity-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-top: 2em;
}

.amenity-item {
  background: var(--bg-alt);
  border-radius: var(--r);
  padding: .9em 1.1em;
  font-size: .95rem;
  font-weight: 500;
  position: relative;
  padding-left: 2em;
}
.amenity-item::before {
  content: "";
  position: absolute;
  left: 1.1em;
  top: 50%;
  transform: translateY(-50%);
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--clay);
}

/* ---------- Gallery ---------- */
.gallery-grid {
  margin-top: 2em;
  column-count: 4;
  column-gap: 16px;
}

.gallery-tile {
  break-inside: avoid;
  margin-bottom: 16px;
  border-radius: var(--r);
  overflow: hidden;
  cursor: pointer;
  border: none;
  padding: 0;
  display: block;
  width: 100%;
  background: var(--bg-alt);
  box-shadow: var(--shadow);
  transition: transform 200ms ease, box-shadow 200ms ease;
}
.gallery-tile:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
}
.gallery-tile img {
  width: 100%;
  height: auto;
  display: block;
}

/* ---------- Lightbox ---------- */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 300;
  background: rgba(20, 16, 13, .92);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px;
}
.lightbox[hidden] { display: none; }

.lightbox-figure {
  max-width: 90vw;
  max-height: 88vh;
  margin: 0;
  text-align: center;
}
.lightbox-figure img {
  max-width: 90vw;
  max-height: 78vh;
  border-radius: var(--r);
  box-shadow: var(--shadow-lg);
  margin: 0 auto;
}
.lightbox-figure figcaption {
  color: #FCF9F3;
  margin-top: 14px;
  font-size: .9rem;
}

.lightbox-close,
.lightbox-nav {
  position: absolute;
  background: rgba(252, 249, 243, .1);
  color: #FCF9F3;
  border: 1px solid rgba(252, 249, 243, .3);
  border-radius: 50%;
  width: 46px;
  height: 46px;
  font-size: 1.4rem;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background-color 180ms ease, transform 180ms ease;
}
.lightbox-close:hover,
.lightbox-nav:hover {
  background: rgba(252, 249, 243, .22);
}

.lightbox-close {
  top: 24px;
  right: 24px;
}
.lightbox-prev {
  left: 24px;
  top: 50%;
  transform: translateY(-50%);
}
.lightbox-next {
  right: 24px;
  top: 50%;
  transform: translateY(-50%);
}

/* ---------- Location ---------- */
.location-grid {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 48px;
  align-items: start;
}

.bullet-list {
  margin: 1.2em 0;
}
.bullet-list li {
  position: relative;
  padding-left: 1.6em;
  margin-bottom: .7em;
}
.bullet-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: .55em;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--clay);
}

.location-map iframe {
  border-radius: var(--r);
  box-shadow: var(--shadow);
  display: block;
}

/* ---------- Reviews ---------- */
.reviews-headline {
  font-family: "Fraunces", serif;
  font-size: 1.4rem;
  margin-top: -.3em;
}
.stars {
  color: var(--gold);
}

.reviews-link {
  margin-top: 2em;
}
.reviews-link a {
  font-weight: 700;
}

/* ---------- FAQ ---------- */
.faq-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 2em;
}

.faq-item {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--r);
  overflow: hidden;
}

.faq-item summary {
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1em;
  padding: 1.1em 1.4em;
  font-family: var(--font-head);
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--ink);
}
.faq-item summary::-webkit-details-marker {
  display: none;
}
.faq-item summary::after {
  content: "+";
  flex-shrink: 0;
  font-family: var(--font-body);
  font-size: 1.4rem;
  font-weight: 400;
  color: var(--clay-deep);
}
.faq-item[open] summary::after {
  content: "\2212";
}
.faq-item[open] summary {
  border-bottom: 1px solid var(--line);
}

.faq-item p {
  color: var(--muted);
  margin: 0;
  padding: 1.1em 1.4em;
}

/* ---------- Inquire ---------- */
.inquire-grid {
  display: grid;
  grid-template-columns: .85fr 1.15fr;
  gap: 40px;
  align-items: start;
  margin-top: 2em;
}

.terms-card {
  background: var(--bg-alt);
  border-radius: var(--r);
  padding: 32px;
  position: sticky;
  top: 100px;
}

.terms-list li {
  position: relative;
  padding-left: 1.6em;
  margin-bottom: .8em;
  font-weight: 500;
}
.terms-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: .55em;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--clay-deep);
}

.terms-airbnb {
  margin-top: 1.6em;
  padding-top: 1.4em;
  border-top: 1px solid var(--line);
  font-size: .95rem;
  color: var(--muted);
}
.terms-airbnb a {
  font-weight: 700;
}

.form-card {
  background: var(--white);
  border-radius: var(--r);
  padding: 32px;
  box-shadow: var(--shadow);
}

.form-row {
  margin-bottom: 18px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-row label {
  font-weight: 700;
  font-size: .88rem;
}

.form-row input,
.form-row select,
.form-row textarea {
  font-family: "Karla", sans-serif;
  font-size: 1rem;
  padding: .8em 1em;
  border: 1px solid var(--line);
  border-radius: calc(var(--r) - 4px);
  background: var(--white);
  color: var(--ink);
  transition: border-color 180ms ease;
}
.form-row input:focus,
.form-row select:focus,
.form-row textarea:focus {
  border-color: var(--clay);
}

.form-row textarea {
  resize: vertical;
}

.form-error {
  background: rgba(184, 92, 56, .1);
  color: var(--clay-deep);
  border-radius: calc(var(--r) - 4px);
  padding: .8em 1em;
  font-size: .92rem;
  margin-bottom: 16px;
}

.form-success {
  text-align: center;
  padding: 24px 8px;
}
.form-success h3 {
  font-size: 1.4rem;
}
.form-success p {
  color: var(--muted);
  max-width: 46ch;
  margin: 0 auto;
}

/* ---------- Footer ---------- */
.site-footer {
  background: var(--navy);
  color: rgba(252, 249, 243, .85);
  padding: 56px 0 32px;
}

.footer-inner {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 32px 48px;
}

.wordmark-footer {
  font-size: 1.3rem;
  color: #FCF9F3;
  margin-bottom: .3em;
}

.footer-brand p:last-child {
  margin: 0;
  color: rgba(252, 249, 243, .7);
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  align-content: flex-start;
}
.footer-links a {
  color: rgba(252, 249, 243, .85);
  font-size: .95rem;
}
.footer-links a:hover {
  color: #FCF9F3;
}

.footer-legal {
  grid-column: 1 / -1;
  border-top: 1px solid rgba(252, 249, 243, .15);
  padding-top: 24px;
  font-size: .88rem;
  color: rgba(252, 249, 243, .65);
}
.footer-legal p { margin: 0 0 .4em; }
.small-print { color: rgba(252, 249, 243, .5); }

/* ==========================================================================
   Responsive
   ========================================================================== */

@media (max-width: 900px) {
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 32px 24px;
  }

  .card-grid,
  .card-grid-3 {
    grid-template-columns: repeat(2, 1fr);
  }

  .amenity-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .gallery-grid {
    column-count: 3;
  }

  .location-grid {
    grid-template-columns: 1fr;
  }

  .inquire-grid {
    grid-template-columns: 1fr;
  }

  .terms-card {
    position: static;
  }
}

@media (max-width: 700px) {
  .main-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--white);
    flex-direction: column;
    align-items: flex-start;
    padding: 20px 24px 28px;
    box-shadow: var(--shadow-lg);
    gap: 18px;
    display: none;
  }
  .main-nav.is-open {
    display: flex;
  }
  .main-nav .btn {
    width: 100%;
  }

  .nav-toggle {
    display: flex;
  }

  .gallery-grid {
    column-count: 2;
  }

  .lightbox-nav {
    width: 38px;
    height: 38px;
  }
}

@media (max-width: 560px) {
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .card-grid,
  .card-grid-3,
  .amenity-grid {
    grid-template-columns: 1fr;
  }

  .gallery-grid {
    column-count: 1;
  }

  .footer-inner {
    grid-template-columns: 1fr;
  }
}
