/* ===========================================================
   CAVERNS MOTEL — Design tokens
   Palette: caverns navy night + brand gold + warm cream
   Display: Fraunces  |  Body: Karla  |  Labels: Barlow Semi Condensed
=============================================================== */

:root {
  --clay: #AE9F4F;        /* primary accent — brand GOLD */
  --clay-dark: #8C7F3D;   /* deep gold (hover) */
  --gold-bright: #C8B85E; /* lifted gold */
  --stone: #0E1F3D;       /* deep NAVY — header/footer/night */
  --stone-soft: #1C2E52;
  --navy-deep: #09123D;   /* logo navy — hero base */
  --sand: #F4EFE3;        /* page background — warm cream */
  --sand-dim: #E9E0CC;
  --adobe: #FBF8F0;       /* card background */
  --turquoise: #C8B85E;   /* secondary accent — lifted gold (kept var name) */
  --turquoise-dark: #8C7F3D;
  --ridge: #B9A961;
  --ink: #12213D;         /* near-navy body text */
  --ink-soft: #4A5568;    /* slate for muted text */
  --line: rgba(14, 31, 61, 0.12);
  --white: #ffffff;

  --font-display: 'Fraunces', Georgia, serif;
  --font-body: 'Karla', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-label: 'Barlow Semi Condensed', var(--font-body);

  --radius: 14px;
  --radius-lg: 26px;
  --shadow: 0 14px 40px -18px rgba(9, 18, 61, 0.5);
  --shadow-sm: 0 6px 18px -10px rgba(9, 18, 61, 0.4);
  --container: 1180px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--sand);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, h4 { font-family: var(--font-display); margin: 0 0 .5em; color: var(--stone); font-weight: 600; }
p { margin: 0 0 1em; }
.container { max-width: var(--container); margin: 0 auto; padding: 0 24px; }
section { padding: 96px 0; position: relative; }
@media (max-width: 720px) { section { padding: 64px 0; } }

.eyebrow {
  font-family: var(--font-label);
  text-transform: uppercase;
  letter-spacing: .16em;
  font-size: 13px;
  font-weight: 600;
  color: var(--clay);
  display: inline-block;
  margin-bottom: 14px;
}
.eyebrow.on-dark { color: var(--gold-bright); }
.section-head { max-width: 640px; margin-bottom: 48px; }
.section-head h2 { font-size: clamp(28px, 4vw, 40px); }
.section-head p { color: var(--ink-soft); font-size: 17px; }
.center { text-align: center; margin-left: auto; margin-right: auto; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--font-label);
  text-transform: uppercase;
  letter-spacing: .08em;
  font-weight: 600;
  font-size: 14px;
  padding: 15px 28px;
  border-radius: 999px;
  white-space: nowrap;
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform .15s ease, box-shadow .15s ease, background .15s ease, color .15s ease;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--clay); color: var(--stone); box-shadow: var(--shadow-sm); }
.btn-primary:hover { background: var(--gold-bright); box-shadow: var(--shadow); }
.btn-outline { background: transparent; border-color: currentColor; color: var(--stone); }
.btn-outline:hover { background: var(--stone); color: var(--sand); border-color: var(--stone); }
.btn-outline.on-dark { color: var(--sand); }
.btn-outline.on-dark:hover { background: var(--sand); color: var(--stone); }
.btn-turquoise { background: var(--stone); color: var(--sand); }
.btn-turquoise:hover { background: var(--stone-soft); }
.btn-block { width: 100%; }

/* ---------- Ridgeline divider (signature element) ---------- */
.ridge-divider { display: block; width: 100%; height: 64px; line-height: 0; }
.ridge-divider svg { width: 100%; height: 100%; display: block; }
.ridge-flip { transform: scaleY(-1); }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(14, 31, 61, 0.96);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid rgba(255,255,255,.08);
}
.site-header .container {
  display: flex; align-items: center; justify-content: space-between;
  padding-top: 14px; padding-bottom: 14px;
}
.brand { display: flex; align-items: center; gap: 12px; }
.brand img { height: 50px; width: auto; }
.footer-logo-img { width: 280px; max-width: 100%; height: auto; }
.brand-text { font-family: var(--font-display); color: var(--sand); font-size: 20px; line-height: 1.1; }
.brand-text span { display: block; font-family: var(--font-label); font-size: 11px; letter-spacing: .18em; text-transform: uppercase; color: var(--turquoise); margin-top: 2px; }

.nav-toggle {
  display: none;
  order: -1;
  background: none; border: none; cursor: pointer;
  width: 40px; height: 40px; padding: 0;
  align-items: center; justify-content: center;
}
.nav-toggle .bars { display: flex; flex-direction: column; gap: 5px; width: 22px; }
.nav-toggle .bars i { display: block; height: 2px; width: 100%; background: var(--sand); border-radius: 2px; transition: .2s; }

.main-nav { display: flex; align-items: center; gap: 30px; }
.main-nav a { font-family: var(--font-label); text-transform: uppercase; font-size: 13.5px; letter-spacing: .07em; color: var(--sand); opacity: .85; }
.main-nav a:hover { opacity: 1; color: var(--turquoise); }
.header-cta { display: flex; align-items: center; gap: 12px; }

@media (max-width: 900px) {
  .nav-toggle { display: flex; }
  .site-header { -webkit-backdrop-filter: none; backdrop-filter: none; }
  .brand img { height: 40px; }
  .brand-text { display: none; }
  .main-nav {
    position: fixed; top: 73px; left: 0; right: 0; bottom: 0;
    background: var(--stone); flex-direction: column; align-items: flex-start;
    padding: 30px 24px; gap: 22px; transform: translateX(-100%); transition: transform .25s ease;
    overflow-y: auto;
  }
  .main-nav.open { transform: translateX(0); }
  .main-nav a { font-size: 18px; }
  .header-cta .btn-outline { display: none; }
}

/* ---------- Hero ---------- */
.hero {
  position: relative; overflow: hidden;
  background:
    radial-gradient(ellipse 120% 80% at 72% 4%, rgba(174,159,79,.14) 0%, transparent 52%),
    linear-gradient(180deg, #070E28 0%, #0B1A3A 38%, #12264C 70%, #1B325E 100%);
  padding: 116px 0 0;
  color: var(--sand);
}
.hero .container { position: relative; z-index: 3; padding-bottom: 96px; }
.hero-grid { display: grid; grid-template-columns: 1.15fr .85fr; gap: 56px; align-items: center; }
@media (max-width: 940px) { .hero-grid { grid-template-columns: 1fr; gap: 40px; } }
.hero-eyebrow { color: var(--gold-bright); }
.hero h1 {
  color: var(--sand);
  font-size: clamp(38px, 5.6vw, 62px);
  line-height: 1.04;
  max-width: 15ch;
  letter-spacing: -.01em;
}
.hero h1 em { font-style: italic; color: var(--turquoise); }
.hero p.lede { color: #E6DCCB; font-size: 18px; max-width: 46ch; }
.hero-actions { display: flex; gap: 16px; flex-wrap: wrap; margin-top: 32px; }

/* Starfield + moon */
.hero-sky { position: absolute; inset: 0; z-index: 1; overflow: hidden; }
.hero-stars {
  position: absolute; inset: 0;
  background-image:
    radial-gradient(1.4px 1.4px at 12% 18%, #fff, transparent),
    radial-gradient(1.2px 1.2px at 28% 32%, #ffe9c9, transparent),
    radial-gradient(1.6px 1.6px at 44% 12%, #fff, transparent),
    radial-gradient(1px 1px at 58% 26%, #fff, transparent),
    radial-gradient(1.4px 1.4px at 68% 40%, #cfe8e4, transparent),
    radial-gradient(1.2px 1.2px at 78% 16%, #fff, transparent),
    radial-gradient(1px 1px at 88% 34%, #ffe9c9, transparent),
    radial-gradient(1.3px 1.3px at 8% 44%, #fff, transparent),
    radial-gradient(1px 1px at 34% 48%, #fff, transparent),
    radial-gradient(1.5px 1.5px at 52% 44%, #fff, transparent),
    radial-gradient(1px 1px at 20% 8%, #fff, transparent),
    radial-gradient(1.2px 1.2px at 92% 8%, #fff, transparent);
  opacity: .0; animation: starfade 1.6s ease .3s forwards;
}
.hero-star-twinkle {
  position: absolute; inset: 0;
  background-image:
    radial-gradient(1.6px 1.6px at 24% 22%, #fff, transparent),
    radial-gradient(1.6px 1.6px at 64% 30%, #fff, transparent),
    radial-gradient(1.6px 1.6px at 84% 20%, #fff, transparent);
  opacity: .0; animation: twinkle 3.4s ease-in-out 1.2s infinite;
}
@keyframes starfade { to { opacity: .9; } }
@keyframes twinkle { 0%,100% { opacity: .15; } 50% { opacity: .95; } }
.hero-moon {
  position: absolute; top: 64px; right: 8%; width: 92px; height: 92px; border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #FBF3E2, #E9D8B8 60%, #D9C39B);
  box-shadow: 0 0 44px 8px rgba(251,243,226,.28), inset -10px -8px 0 rgba(180,158,120,.28);
  z-index: 1;
}
@media (max-width: 940px) { .hero-moon { width: 64px; height: 64px; top: 40px; right: 12%; } }
.hero-ridge-bg { position: absolute; left: 0; right: 0; bottom: 0; z-index: 2; line-height: 0; }
.hero-ridge-bg svg { width: 100%; height: auto; display: block; }
.hero-strip { display: flex; flex-wrap: wrap; gap: 28px; margin-top: 44px; padding-top: 26px; border-top: 1px solid rgba(255,255,255,.14); }
.hero-strip div { font-family: var(--font-label); font-size: 13px; letter-spacing: .05em; color: #D8CBB6; display: flex; align-items: center; gap: 8px; }
.hero-strip svg { width: 16px; height: 16px; color: var(--turquoise); }

/* Floating stay card (hero right / signature) */
.stay-card {
  background: rgba(251,247,239,.97);
  border: 1px solid rgba(255,255,255,.5);
  border-radius: 22px;
  padding: 28px 26px;
  box-shadow: 0 30px 60px -30px rgba(0,0,0,.6);
  color: var(--ink);
  position: relative;
  overflow: hidden;
}
.stay-card::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 6px;
  background: linear-gradient(90deg, var(--stone), var(--clay));
}
.stay-card .sc-label { font-family: var(--font-label); text-transform: uppercase; letter-spacing: .14em; font-size: 11.5px; color: var(--clay); }
.stay-card .sc-heading { font-family: var(--font-display); font-size: 26px; color: var(--stone); line-height: 1.1; margin: 6px 0 8px; }
.stay-card .sc-sub { font-size: 14px; color: var(--ink-soft); margin: 0 0 16px; }
.stay-card hr { border: none; border-top: 1px solid var(--line); margin: 16px 0; }
.sc-row { display: flex; align-items: flex-start; gap: 10px; font-size: 14px; color: var(--ink-soft); margin-bottom: 10px; }
.sc-row svg { width: 17px; height: 17px; color: var(--turquoise); flex-shrink: 0; margin-top: 2px; }
.stay-card .btn { width: 100%; margin-top: 8px; }

/* ---------- About / intro ---------- */
.about-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: 64px; align-items: center; }
.about-photo { position: relative; }
.arch-frame {
  border-radius: 50% 50% 14px 14px / 60px 60px 14px 14px;
  overflow: hidden; box-shadow: var(--shadow); aspect-ratio: 4/5; background: var(--stone-soft);
}
.arch-frame img { width: 100%; height: 100%; object-fit: cover; }
@media (max-width: 860px) { .about-grid { grid-template-columns: 1fr; gap: 40px; } }

/* ---------- Rooms ---------- */
.rooms-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
@media (max-width: 980px) { .rooms-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 660px) { .rooms-grid { grid-template-columns: 1fr; } }
.room-card {
  background: var(--adobe); border-radius: var(--radius-lg); overflow: hidden;
  box-shadow: var(--shadow-sm); display: flex; flex-direction: column;
}
.room-photo { aspect-ratio: 4/3; overflow: hidden; background: var(--sand-dim); position: relative; }
.room-photo img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease; }
.room-card:hover .room-photo img { transform: scale(1.05); }
.room-body { padding: 24px; flex: 1; display: flex; flex-direction: column; }
.room-body h3 { font-size: 21px; margin-bottom: 6px; }
.room-price { display: none; font-family: var(--font-label); color: var(--clay); font-weight: 700; letter-spacing: .03em; margin-bottom: 10px; }
body.prices-on .room-price { display: block; }
.sc-price-block { display: none; }
body.prices-on .sc-price-block { display: block; }
.stay-card .sc-price { font-family: var(--font-display); font-size: 34px; color: var(--stone); line-height: 1; margin: 0 0 12px; }
.stay-card .sc-per { font-family: var(--font-body); font-size: 15px; color: var(--ink-soft); }
.room-body p { color: var(--ink-soft); font-size: 15px; flex: 1; }
.room-tags { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0 18px; }
.room-tags span { font-family: var(--font-label); font-size: 12px; letter-spacing: .04em; background: var(--sand-dim); color: var(--ink-soft); padding: 5px 12px; border-radius: 999px; }

/* ---------- Amenities ---------- */
.amenities-section { background: var(--stone); color: var(--sand); }
.amenities-section .section-head p { color: #C9BCA8; }
.amenities-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 22px; }
@media (max-width: 980px) { .amenities-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 620px) { .amenities-grid { grid-template-columns: repeat(2, 1fr); } }
.amenity {
  background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.1);
  border-radius: var(--radius); padding: 22px 16px; text-align: center;
}
.amenity svg { width: 30px; height: 30px; color: var(--turquoise); margin-bottom: 10px; }
.amenity span { font-family: var(--font-label); font-size: 13.5px; letter-spacing: .02em; display: block; }

/* ---------- Gallery ---------- */
#work.section-hidden { display: none; }
.gallery-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
@media (max-width: 900px) { .gallery-grid { grid-template-columns: repeat(2, 1fr); } }
.gallery-grid figure {
  margin: 0; border-radius: var(--radius); overflow: hidden; aspect-ratio: 1; background: var(--sand-dim);
  box-shadow: var(--shadow-sm);
}
.gallery-grid img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease; }
.gallery-grid figure:hover img { transform: scale(1.06); }

/* ---------- Nearby attractions ---------- */
.nearby-list { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
@media (max-width: 900px) { .nearby-list { grid-template-columns: 1fr 1fr; } }
@media (max-width: 600px) { .nearby-list { grid-template-columns: 1fr; } }
.nearby-card {
  background: var(--adobe); border-radius: var(--radius); padding: 24px;
  border: 1px solid var(--line);
}
.nearby-card .dist { font-family: var(--font-label); color: var(--turquoise-dark); font-weight: 700; font-size: 13px; letter-spacing: .04em; text-transform: uppercase; margin-bottom: 6px; }
.nearby-card h3 { font-size: 18px; margin-bottom: 6px; }
.nearby-card p { color: var(--ink-soft); font-size: 14.5px; margin: 0; }

/* ---------- Location / map ---------- */
.location-wrap { display: grid; grid-template-columns: .9fr 1.1fr; gap: 40px; align-items: stretch; }
@media (max-width: 900px) { .location-wrap { grid-template-columns: 1fr; } }
.location-info { background: var(--adobe); border-radius: var(--radius-lg); padding: 36px; box-shadow: var(--shadow-sm); }
.location-info dl { margin: 20px 0 0; }
.location-info dt { font-family: var(--font-label); text-transform: uppercase; letter-spacing: .07em; font-size: 12.5px; color: var(--clay); margin-top: 18px; }
.location-info dd { margin: 4px 0 0; font-size: 16px; }
#motelMap { width: 100%; height: 100%; min-height: 340px; border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow-sm); background: var(--sand-dim); }

/* ---------- Contact ---------- */
.contact-section { background: var(--sand-dim); }
.contact-wrap { display: grid; grid-template-columns: .8fr 1.2fr; gap: 56px; }
@media (max-width: 900px) { .contact-wrap { grid-template-columns: 1fr; } }
.contact-card { background: var(--stone); color: var(--sand); border-radius: var(--radius-lg); padding: 36px; }
.contact-card .btn { margin-top: 22px; }
.contact-line { display: flex; gap: 12px; align-items: flex-start; margin-bottom: 18px; }
.contact-line svg { width: 20px; height: 20px; color: var(--turquoise); flex-shrink: 0; margin-top: 2px; }

.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
@media (max-width: 560px) { .form-grid { grid-template-columns: 1fr; } }
.form-grid .full { grid-column: 1 / -1; }
label { font-family: var(--font-label); font-size: 13px; text-transform: uppercase; letter-spacing: .05em; color: var(--ink-soft); display: block; margin-bottom: 6px; }
input, textarea, select {
  width: 100%; font-family: var(--font-body); font-size: 15px; padding: 13px 14px;
  border: 1px solid var(--line); border-radius: 10px; background: var(--white); color: var(--ink);
}
input:focus, textarea:focus, select:focus { outline: 2px solid var(--stone); outline-offset: 1px; }
textarea { resize: vertical; min-height: 110px; }
.form-status { margin-top: 14px; font-family: var(--font-label); font-size: 14px; }
.form-status.ok { color: var(--turquoise-dark); }
.form-status.err { color: var(--clay-dark); }

/* ---------- Footer ---------- */
.site-footer { background: var(--stone); color: #C9BCA8; padding: 64px 0 28px; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 40px; margin-bottom: 40px; }
@media (max-width: 760px) { .footer-grid { grid-template-columns: 1fr; gap: 30px; } }
.footer-logo { background: var(--sand); display: inline-block; padding: 10px 16px; border-radius: 10px; margin-bottom: 14px; }
.footer-logo img { height: 40px; }
.site-footer h4 { color: var(--sand); font-family: var(--font-label); text-transform: uppercase; letter-spacing: .07em; font-size: 13.5px; margin-bottom: 14px; }
.site-footer a { color: #C9BCA8; }
.site-footer a:hover { color: var(--turquoise); }
.footer-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 10px; font-size: 14.5px; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.1); padding-top: 22px; font-size: 13px; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px; }

/* ---------- Book Now modal ---------- */
.modal-overlay {
  position: fixed; inset: 0; background: rgba(36,31,27,.72); backdrop-filter: blur(3px);
  display: none; align-items: center; justify-content: center; z-index: 1000; padding: 20px;
}
.modal-overlay.open { display: flex; }
.modal-box {
  background: var(--adobe); border-radius: var(--radius-lg); padding: 40px 34px; max-width: 380px; width: 100%;
  text-align: center; box-shadow: var(--shadow); position: relative;
}
.modal-close { position: absolute; top: 14px; right: 14px; background: none; border: none; font-size: 22px; cursor: pointer; color: var(--ink-soft); line-height: 1; }
.modal-box .eyebrow { margin-bottom: 6px; }
.modal-box h3 { font-size: 24px; margin-bottom: 10px; }
.modal-box p { color: var(--ink-soft); font-size: 14.5px; }
.modal-phone {
  display: block; font-family: var(--font-display); font-size: 30px; color: var(--clay);
  margin: 18px 0; word-break: break-word;
}
.modal-box .btn { margin-top: 6px; }

/* ---------- Skip link / a11y ---------- */
.skip-link {
  position: absolute; left: -999px; top: auto; background: var(--clay); color: #fff; padding: 12px 18px;
  border-radius: 8px; z-index: 2000;
}
.skip-link:focus { left: 16px; top: 16px; }
:focus-visible { outline: 3px solid var(--stone); outline-offset: 2px; }

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

/* ---------- Scroll reveal ---------- */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity .6s ease, transform .6s ease; }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; } }

/* Card lift */
.room-card, .nearby-card { transition: transform .2s ease, box-shadow .2s ease; }
.room-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.nearby-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-sm); border-color: var(--turquoise); }
