/* ==========================================================================
   Carlsbad Trailer Park — design tokens
   Palette pulled from the park's own logo (cream, deep navy, coastal teal)
   plus two working accents: sage (available) and clay (occupied).
   ========================================================================== */

:root {
  --cream:        #F5EFE1;
  --cream-deep:   #EDE3CC;
  --navy:         #1E3A4C;
  --navy-deep:    #142A38;
  --teal:         #4C8C8A;
  --teal-deep:    #366867;
  --sand:         #D9C7A3;
  --sage:         #7C9473;
  --sage-deep:    #5E7454;
  --clay:         #B96A47;
  --clay-deep:    #96502F;
  --ink:          #2B2620;
  --ink-soft:     #5C5647;
  --paper:        #FBF8F1;
  --line:         #C9BC9E;

  --display: "Fraunces", "Iowan Old Style", serif;
  --label:   "Big Shoulders Display", "Archivo", sans-serif;
  --body:    "Karla", "Helvetica Neue", sans-serif;
  --mono:    "IBM Plex Mono", ui-monospace, monospace;

  --radius: 6px;
  --radius-lg: 14px;
  --shadow: 0 10px 24px -14px rgba(30, 58, 76, 0.35);
  --shadow-lift: 0 18px 34px -14px rgba(30, 58, 76, 0.45);
}

* { box-sizing: border-box; }
button { font-family: inherit; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: var(--body);
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

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

a { color: inherit; }

h1, h2, h3, h4 {
  font-family: var(--display);
  color: var(--navy);
  margin: 0 0 0.4em;
  font-weight: 600;
  letter-spacing: -0.01em;
}

h1 { font-size: clamp(2.4rem, 5vw, 3.6rem); line-height: 1.05; }
h2 { font-size: clamp(1.7rem, 3vw, 2.3rem); line-height: 1.15; }
h3 { font-size: 1.3rem; }

p { margin: 0 0 1em; color: var(--ink-soft); max-width: 62ch; }

.eyebrow {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--teal-deep);
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
  margin-bottom: 0.9em;
}

.eyebrow::before {
  content: "";
  width: 22px;
  height: 1px;
  background: var(--teal-deep);
  display: inline-block;
}

/* ---------- layout shells ---------- */

.wrap {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 28px;
}

section { padding: 74px 0; }
.section-tight { padding: 44px 0; }

/* ---------- road-dash divider (signature wayfinding motif) ---------- */

.road-divider {
  height: 30px;
  margin: 0 auto;
  max-width: 1120px;
  position: relative;
  display: flex;
  align-items: center;
}

.road-divider::before {
  content: "";
  flex: 1;
  height: 6px;
  border-radius: 3px;
  background: repeating-linear-gradient(
    to right,
    var(--navy) 0 26px,
    transparent 26px 46px
  );
  opacity: 0.55;
}

.road-divider .compass {
  flex-shrink: 0;
  margin: 0 18px;
  width: 26px;
  height: 26px;
  opacity: 0.7;
}

/* ---------- header / nav ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(245, 239, 225, 0.92);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--line);
}

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

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

.brand img {
  height: 50px;
  width: 50px;
  border-radius: 50%;
  border: 1px solid var(--line);
  object-fit: cover;
}

.brand-name {
  font-family: var(--display);
  font-weight: 600;
  color: var(--navy);
  font-size: 1.15rem;
  line-height: 1.1;
}

.brand-name small {
  display: block;
  font-family: var(--mono);
  font-size: 0.6rem;
  letter-spacing: 0.14em;
  color: var(--teal-deep);
  text-transform: uppercase;
  font-weight: 400;
}

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

nav.main-nav a {
  text-decoration: none;
  font-size: 0.93rem;
  color: var(--ink);
  font-weight: 700;
  position: relative;
  padding: 4px 0;
}

nav.main-nav a.active,
nav.main-nav a:hover {
  color: var(--teal-deep);
}

nav.main-nav a.active::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -4px;
  height: 2px;
  background: var(--clay);
  border-radius: 2px;
}

/* ---------- buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--body);
  font-weight: 700;
  font-size: 0.95rem;
  padding: 13px 24px;
  border-radius: var(--radius);
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.btn:hover { transform: translateY(-1px); }

.btn-primary {
  background: var(--navy);
  color: var(--cream);
  box-shadow: var(--shadow);
}
.btn-primary:hover { background: var(--navy-deep); box-shadow: var(--shadow-lift); }

.btn-outline {
  background: transparent;
  border-color: var(--navy);
  color: var(--navy);
}
.btn-outline:hover { background: var(--navy); color: var(--cream); }

.btn-ghost {
  background: var(--sand);
  color: var(--navy);
}
.btn-ghost:hover { background: var(--line); }

.btn-light {
  background: var(--teal);
  color: var(--paper);
}
.btn-light:hover { background: var(--teal-deep); }

/* ---------- hero (badge + copy, side by side) ---------- */

.hero-section {
  padding: 64px 0 40px;
}

.hero-grid {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: 48px;
  align-items: center;
}

.hero-badge {
  justify-self: center;
  position: relative;
}

.hero-badge img {
  width: 100%;
  max-width: 360px;
  border-radius: 50%;
  box-shadow: var(--shadow-lift);
  border: 6px solid var(--paper);
}

.hero-copy p:not(.eyebrow) {
  margin-left: 0;
  margin-right: 0;
}

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

/* ---------- stat / amenity row ---------- */

.amenity-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 22px;
}

.amenity-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 24px 20px;
}

.amenity-card .num {
  font-family: var(--label);
  font-size: 2.1rem;
  color: var(--teal-deep);
  line-height: 1;
  margin-bottom: 6px;
}

.amenity-card h4 {
  font-family: var(--body);
  color: var(--navy);
  font-size: 1rem;
  margin-bottom: 4px;
}

.amenity-card p { font-size: 0.92rem; margin: 0; }

/* ---------- map teaser on home ---------- */

.map-teaser {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: center;
  background: var(--navy);
  border-radius: var(--radius-lg);
  padding: 48px;
  color: var(--cream);
}

.map-teaser h2, .map-teaser .eyebrow { color: var(--cream); }
.map-teaser .eyebrow::before { background: var(--cream); }
.map-teaser p { color: #CBD9DC; }

.dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; margin-right: 6px; }
.dot-available { background: var(--sage); }
.dot-occupied { background: var(--clay); }

/* ---------- home page availability stat panel ---------- */

.teaser-stats {
  display: flex;
  gap: 44px;
  margin: 22px 0 24px;
}

.teaser-stats .stat-num {
  font-family: var(--label);
  font-size: 3.2rem;
  line-height: 1;
  color: var(--cream);
}

.teaser-stats .stat-label {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-top: 8px;
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #CBD9DC;
}

.teaser-bar {
  height: 10px;
  border-radius: 6px;
  overflow: hidden;
  display: flex;
  background: rgba(255, 255, 255, 0.14);
  margin-bottom: 26px;
}

.teaser-bar-fill {
  height: 100%;
  transition: width 0.4s ease;
}

.teaser-bar-fill.avail { background: var(--sage); }
.teaser-bar-fill.occ { background: var(--clay); }

.teaser-caption {
  font-family: var(--mono);
  font-size: 0.76rem;
  color: #CBD9DC;
  margin-bottom: 28px;
}

/* ---------- footer ---------- */

footer.site-footer {
  border-top: 1px solid var(--line);
  padding: 44px 0 30px;
  margin-top: 30px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr 1fr;
  gap: 30px;
}

.footer-grid h4 {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--teal-deep);
  margin-bottom: 12px;
}

.footer-grid p, .footer-grid a { font-size: 0.9rem; }
.footer-grid a { text-decoration: none; display: block; margin-bottom: 6px; color: var(--ink); }
.footer-grid a:hover { color: var(--teal-deep); }

.footer-grid a.directions-link {
  color: var(--teal-deep);
  font-weight: 700;
  margin-top: 4px;
}

.social-icon-row {
  display: flex;
  gap: 12px;
}

.social-icon-row a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: var(--paper);
  margin-bottom: 0;
}

.social-icon-row a:hover { background: var(--sand); }
.social-icon-row svg { width: 17px; height: 17px; fill: var(--navy); stroke: var(--navy); }

.fine-print {
  margin-top: 34px;
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--ink-soft);
  opacity: 0.8;
}

/* ==========================================================================
   Site map page
   ========================================================================== */

.map-page-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  flex-wrap: wrap;
  gap: 20px;
  margin-bottom: 30px;
}

.legend-bar {
  display: flex;
  gap: 22px;
  align-items: center;
  flex-wrap: wrap;
  font-family: var(--mono);
  font-size: 0.78rem;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 12px 18px;
}

.map-frame {
  background: var(--cream-deep);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 34px 30px 44px;
  position: relative;
  overflow-x: auto;
}

.compass-mark {
  position: absolute;
  top: 22px;
  right: 26px;
  width: 46px;
  height: 46px;
  opacity: 0.75;
}

.street-label {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--navy);
  writing-mode: vertical-rl;
  text-orientation: mixed;
}

.park-layout {
  display: grid;
  grid-template-columns: 40px 108px 1fr 40px;
  gap: 22px;
  min-width: 900px;
  align-items: center;
}

.state-street, .roosevelt-street { display: flex; align-items: center; justify-content: center; }

.side-lots {
  display: flex;
  flex-direction: column;
  gap: 10px;
  justify-content: center;
  align-items: flex-start;
}

.rows-wrap {
  display: flex;
  flex-direction: column;
  gap: 14px;
  border: 2px dashed var(--line);
  border-radius: 22px;
  padding: 22px 18px;
  position: relative;
}

.lot-row {
  display: grid;
  grid-template-columns: repeat(12, 64px);
  gap: 8px;
  justify-content: start;
}

.laundry-marker {
  align-self: center;
  justify-self: center;
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 6px 16px;
  color: var(--navy);
}

.lot {
  position: relative;
  width: 64px;
  height: 86px;
  border-radius: 6px;
  border: 1px solid var(--navy);
  background: var(--paper);
  padding: 0;
  margin: 0;
  appearance: none;
  -webkit-appearance: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-family: var(--label);
  font-size: 1.15rem;
  color: var(--navy);
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}

.lot:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.lot:focus-visible { outline: 3px solid var(--teal); outline-offset: 2px; }

.lot.lot-lengthwise {
  width: 108px;
  height: 60px;
}

.lot .status-dot {
  width: 9px; height: 9px; border-radius: 50%;
  margin-top: 4px;
}

.lot.avail { background: rgba(124, 148, 115, 0.16); }
.lot.occ   { background: rgba(185, 106, 71, 0.16); }

.lot.avail .status-dot { background: var(--sage); }
.lot.occ .status-dot { background: var(--clay); }

.edit-mode .lot { cursor: pointer; box-shadow: inset 0 0 0 1px var(--teal); }
.edit-mode .lot::after {
  content: "tap to cycle";
  position: absolute;
  bottom: -18px;
  font-family: var(--mono);
  font-size: 0.55rem;
  color: var(--teal-deep);
  opacity: 0;
}
.edit-mode .lot:hover::after { opacity: 1; }

/* ---------- detail drawer ---------- */

.drawer-backdrop {
  position: fixed; inset: 0;
  background: rgba(20, 42, 56, 0.5);
  opacity: 0; pointer-events: none;
  transition: opacity 0.2s ease;
  z-index: 60;
}
.drawer-backdrop.open { opacity: 1; pointer-events: auto; }

.drawer {
  position: fixed;
  top: 0; right: 0; bottom: 0;
  width: min(380px, 90vw);
  background: var(--paper);
  border-left: 1px solid var(--line);
  transform: translateX(100%);
  transition: transform 0.25s ease;
  z-index: 61;
  padding: 30px 28px;
  overflow-y: auto;
}
.drawer.open { transform: translateX(0); }

.drawer-close {
  background: none; border: none; cursor: pointer;
  font-family: var(--mono); font-size: 0.8rem;
  color: var(--ink-soft); margin-bottom: 18px;
}

.drawer .status-pill {
  display: inline-flex; align-items: center; gap: 6px;
  font-family: var(--mono); font-size: 0.72rem; text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 5px 12px; border-radius: 20px;
  margin-bottom: 16px;
}
.status-pill.avail { background: rgba(124,148,115,0.2); color: var(--sage-deep); }
.status-pill.occ { background: rgba(185,106,71,0.2); color: var(--clay-deep); }

.drawer dl { margin: 0 0 22px; }
.drawer dt { font-family: var(--mono); font-size: 0.68rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--ink-soft); margin-top: 12px; }
.drawer dd { margin: 2px 0 0; font-size: 0.95rem; color: var(--navy); }

.owner-tools {
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px dashed var(--line);
}

.owner-tools label {
  display: block;
  font-family: var(--mono);
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink-soft);
  margin-bottom: 6px;
}

.owner-tools select, .owner-tools textarea {
  width: 100%;
  font-family: var(--body);
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--cream);
  margin-bottom: 12px;
}

/* ---------- admin bar ---------- */

.admin-bar {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}

.admin-bar .status-note {
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--teal-deep);
  display: none;
}

.admin-bar.on .status-note { display: inline; }

/* ==========================================================================
   Inquiry form
   ========================================================================== */

.form-shell {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 42px;
}

.form-section + .form-section {
  margin-top: 36px;
  padding-top: 30px;
  border-top: 1px dashed var(--line);
}

.form-section h3 {
  font-family: var(--mono);
  font-size: 0.78rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--teal-deep);
  margin-bottom: 18px;
}

.field-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}

.field { display: flex; flex-direction: column; gap: 6px; }
.field.full { grid-column: 1 / -1; }

.field label {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--navy);
}

.field .hint {
  font-size: 0.76rem;
  color: var(--ink-soft);
  font-weight: 400;
}

input, select, textarea {
  font-family: var(--body);
  font-size: 0.98rem;
  padding: 12px 13px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--cream);
  color: var(--ink);
}

input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(76, 140, 138, 0.18);
}

.pet-row {
  display: flex;
  gap: 20px;
  align-items: center;
  margin-top: 6px;
}

.radio-inline { display: flex; align-items: center; gap: 6px; font-size: 0.92rem; }

fieldset { border: none; padding: 0; margin: 0; }
legend { font-size: 0.85rem; font-weight: 700; color: var(--navy); padding: 0 0 6px; }

.form-submit-row {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-top: 32px;
}

.form-note {
  font-size: 0.82rem;
  color: var(--ink-soft);
}

#formStatus {
  margin-top: 18px;
  font-family: var(--mono);
  font-size: 0.85rem;
  padding: 12px 14px;
  border-radius: var(--radius);
  display: none;
}
#formStatus.show { display: block; }
#formStatus.ok { background: rgba(124,148,115,0.18); color: var(--sage-deep); }
#formStatus.err { background: rgba(185,106,71,0.18); color: var(--clay-deep); }

/* ==========================================================================
   Area attractions page
   ========================================================================== */

.attraction-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 22px;
}

.attraction-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 26px 24px;
  display: flex;
  flex-direction: column;
}

.attraction-card h3 {
  font-size: 1.15rem;
  margin-bottom: 6px;
}

.attraction-card .distance {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--teal-deep);
  margin-bottom: 10px;
  display: block;
}

.attraction-card p { font-size: 0.94rem; margin-bottom: 16px; }

.attraction-card .directions-link {
  margin-top: auto;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.86rem;
  font-weight: 700;
  color: var(--teal-deep);
  text-decoration: none;
}

.attraction-card .directions-link:hover { color: var(--navy); }

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

@media (max-width: 880px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-badge { order: -1; }
  .hero-badge img { max-width: 220px; }
  .amenity-grid { grid-template-columns: repeat(2, 1fr); }
  .attraction-grid { grid-template-columns: 1fr; }
  .map-teaser { grid-template-columns: 1fr; padding: 32px 24px; }
  .footer-grid { grid-template-columns: 1fr; }
  .field-grid { grid-template-columns: 1fr; }
  nav.main-nav { gap: 16px; }
  .brand-name { font-size: 1rem; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; scroll-behavior: auto !important; }
}
