/* L'Hôtel Californie — design tokens & global styles */

:root {
  /* Color */
  --cream: #F5EDE0;
  --cream-2: #EFE4D2;
  --cream-3: #E8DAC2;
  --paper: #FAF4E8;
  --ink: #2A211B;
  --ink-soft: #4A3D33;
  --terracotta: #B05A3C;
  --terracotta-deep: #8E4329;
  --olive: #3F4A2A;
  --olive-deep: #2E3720;
  --ember: #8B5A3C;
  --sand: #C9B79A;
  --line: rgba(42, 33, 27, 0.18);
  --line-soft: rgba(42, 33, 27, 0.10);

  /* Type */
  --f-display: "Cormorant Garamond", "EB Garamond", Georgia, serif;
  --f-body: "EB Garamond", Georgia, serif;
  --f-ui: "Inter", system-ui, sans-serif;

  /* Spacing rhythm */
  --pad-x: clamp(20px, 5vw, 80px);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--f-body);
  font-size: 18px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

/* Subtle paper texture across the page */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  background-image:
    radial-gradient(rgba(139, 90, 60, 0.05) 1px, transparent 1px),
    radial-gradient(rgba(139, 90, 60, 0.03) 1px, transparent 1px);
  background-size: 3px 3px, 7px 7px;
  background-position: 0 0, 1px 1px;
  mix-blend-mode: multiply;
  opacity: 0.6;
}

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

a { color: inherit; }

button { font-family: inherit; cursor: pointer; }

h1, h2, h3, h4 {
  font-family: var(--f-display);
  font-weight: 400;
  margin: 0;
  letter-spacing: 0.005em;
}

p { margin: 0; }

/* ==== HEADER ==== */
.header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px var(--pad-x);
  transition: background 0.4s ease, box-shadow 0.4s ease, padding 0.3s ease, color 0.3s ease;
  color: var(--cream);
}
.header.is-light { color: var(--ink); }
.header.is-scrolled {
  background: rgba(245, 237, 224, 0.92);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  color: var(--ink);
  padding-top: 12px;
  padding-bottom: 12px;
  box-shadow: 0 1px 0 var(--line-soft);
}
.logo {
  font-family: var(--f-display);
  font-size: 14px;
  line-height: 1.05;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  text-align: left;
  cursor: pointer;
  user-select: none;
}
.logo .l1 { font-style: italic; font-weight: 500; }
.logo .l2 { font-weight: 500; }
.nav {
  display: flex;
  gap: 36px;
  align-items: center;
  font-family: var(--f-ui);
  font-size: 11.5px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}
.nav a {
  position: relative;
  text-decoration: none;
  padding: 6px 0;
  opacity: 0.85;
  transition: opacity 0.2s;
  cursor: pointer;
}
.nav a:hover, .nav a.active { opacity: 1; }
.nav a.active::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 1px;
  background: currentColor;
}
.book-btn {
  background: var(--terracotta);
  color: #fff;
  border: none;
  padding: 11px 22px;
  font-family: var(--f-ui);
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  transition: background 0.2s;
}
.book-btn:hover { background: var(--terracotta-deep); }

/* ==== HERO ==== */
.hero {
  position: relative;
  height: 100vh;
  min-height: 640px;
  overflow: hidden;
}
.hero-img {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  filter: brightness(0.85);
}
.hero-img::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,0.25) 0%, rgba(0,0,0,0.15) 40%, rgba(0,0,0,0.5) 100%);
}
.hero-content {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  color: var(--cream);
  text-align: center;
  padding: 0 24px;
}
.hero-content h1 {
  font-family: var(--f-display);
  font-style: italic;
  font-weight: 300;
  font-size: clamp(56px, 9vw, 130px);
  line-height: 0.95;
  letter-spacing: 0.01em;
}
.hero-content h1 .name {
  display: block;
  font-style: normal;
  font-weight: 400;
  letter-spacing: 0.02em;
}
.hero-tagline {
  font-family: var(--f-display);
  font-style: italic;
  font-size: clamp(18px, 2vw, 24px);
  line-height: 1.5;
  margin-top: 28px;
  max-width: 560px;
  opacity: 0.95;
}
.hero-cta {
  margin-top: 44px;
  background: transparent;
  color: var(--cream);
  border: 1px solid rgba(245, 237, 224, 0.7);
  padding: 16px 36px;
  font-family: var(--f-ui);
  font-size: 11px;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  transition: all 0.3s;
}
.hero-cta:hover { background: var(--cream); color: var(--ink); }

/* ==== SECTION CHROME ==== */
.section {
  position: relative;
  padding: 110px var(--pad-x);
}
.section-narrow {
  max-width: 760px;
  margin: 0 auto;
  text-align: center;
}
.section-title {
  font-family: var(--f-display);
  font-style: italic;
  font-weight: 400;
  font-size: clamp(40px, 5vw, 64px);
  line-height: 1.05;
  margin-bottom: 8px;
}
.section-rule {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 18px 0 28px;
  color: var(--terracotta);
}
.section-rule::before, .section-rule::after {
  content: "";
  width: 36px;
  height: 1px;
  background: currentColor;
  opacity: 0.6;
}
.section-rule .diamond {
  width: 5px; height: 5px;
  background: currentColor;
  transform: rotate(45deg);
  opacity: 0.7;
}
.section-lede {
  font-size: 19px;
  line-height: 1.65;
  color: var(--ink-soft);
  font-family: var(--f-body);
}
.ghost-link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--f-ui);
  font-size: 10.5px;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--ink);
  border-bottom: 1px solid var(--line);
  padding-bottom: 4px;
  transition: gap 0.25s, border-color 0.25s, color 0.25s;
  cursor: pointer;
}
.ghost-link:hover { gap: 16px; border-color: var(--terracotta); color: var(--terracotta); }

.pill-link {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-family: var(--f-display);
  font-style: italic;
  font-size: 17px;
  text-decoration: none;
  color: var(--ink);
  padding: 10px 22px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: transparent;
  transition: all 0.25s;
}
.pill-link:hover { background: var(--ink); color: var(--cream); border-color: var(--ink); }

/* Botanical ornament */
.botanical {
  position: absolute;
  width: 140px;
  opacity: 0.55;
  pointer-events: none;
}

/* ==== FOOTER ==== */
.footer-bar {
  background: var(--olive);
  color: var(--cream);
  text-align: center;
  padding: 18px;
  font-family: var(--f-ui);
  font-size: 10.5px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
}
.footer-bar .star { margin: 0 10px; opacity: 0.7; }

/* ==== TILE / CARD ==== */
.tile {
  display: block;
  text-decoration: none;
  color: inherit;
  cursor: pointer;
}
.tile-img {
  position: relative;
  width: 100%;
  aspect-ratio: 4/3;
  background-size: cover;
  background-position: center;
  overflow: hidden;
  margin-bottom: 18px;
}
.tile-img::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0);
  transition: background 0.3s;
}
.tile:hover .tile-img::after { background: rgba(0,0,0,0.08); }
.tile-eyebrow {
  font-family: var(--f-ui);
  font-size: 10.5px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--terracotta);
  margin-bottom: 10px;
}
.tile h3 {
  font-family: var(--f-display);
  font-size: 26px;
  font-style: italic;
  font-weight: 400;
  margin-bottom: 10px;
}
.tile p {
  font-size: 16px;
  color: var(--ink-soft);
  line-height: 1.55;
  margin-bottom: 14px;
}

/* ==== REVEAL ANIMATION ==== */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 1s ease, transform 1s ease;
}
.reveal.in {
  opacity: 1;
  transform: translateY(0);
}

/* ==== LIGHTBOX ==== */
.lightbox {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  inset: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(20, 14, 10, 0.94);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  padding: 40px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s;
}
.lightbox.open { opacity: 1; pointer-events: auto; }
.lightbox img {
  max-width: 90vw;
  max-height: 78vh;
  object-fit: contain;
  box-shadow: 0 30px 80px rgba(0,0,0,0.5);
}
.lightbox-caption {
  color: var(--cream);
  font-family: var(--f-display);
  font-style: italic;
  margin-top: 24px;
  font-size: 18px;
}
.lb-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: transparent;
  border: 1px solid rgba(245, 237, 224, 0.4);
  color: var(--cream);
  width: 48px; height: 48px;
  border-radius: 50%;
  font-size: 28px;
  font-family: Georgia, serif;
  font-style: normal;
  line-height: 48px;
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 0 2px 0;
  cursor: pointer;
  transition: background 0.2s;
}
.lb-arrow:hover { background: rgba(245, 237, 224, 0.15); }
.lb-arrow.prev { left: 24px; }
.lb-arrow.next { right: 24px; }
.lb-close {
  position: absolute;
  top: 24px; right: 24px;
  background: transparent;
  border: none;
  color: var(--cream);
  font-family: var(--f-ui);
  font-size: 11px;
  letter-spacing: 0.25em;
  text-transform: uppercase;
}

/* ==== FORM ==== */
.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 18px;
}
.field label {
  font-family: var(--f-ui);
  font-size: 10.5px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ink-soft);
}
.field input, .field select, .field textarea {
  font-family: var(--f-body);
  font-size: 16px;
  padding: 11px 14px;
  background: var(--paper);
  border: 1px solid var(--line);
  color: var(--ink);
  outline: none;
  transition: border-color 0.2s;
}
.field input:focus, .field select:focus, .field textarea:focus {
  border-color: var(--terracotta);
}
.field.error input, .field.error select, .field.error textarea {
  border-color: var(--terracotta-deep);
  background: rgba(176, 90, 60, 0.05);
}
.field-error {
  font-family: var(--f-ui);
  font-size: 11px;
  color: var(--terracotta-deep);
  letter-spacing: 0.05em;
}
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }

.btn-primary {
  background: var(--terracotta);
  color: #fff;
  border: none;
  padding: 14px 28px;
  font-family: var(--f-ui);
  font-size: 11px;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  transition: background 0.2s;
  width: 100%;
}
.btn-primary:hover { background: var(--terracotta-deep); }
.btn-primary:disabled { opacity: 0.5; cursor: not-allowed; }

/* ==== APP ROOT ==== */
.app {
  position: relative;
  z-index: 2;
}
.page-fade {
  animation: pageFade 0.5s ease both;
}
@keyframes pageFade {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ==================================================
   RESPONSIVE — TABLET (≤960) and PHONE (≤640)
   ================================================== */

/* Mobile menu button (hidden on desktop) */
.menu-btn {
  display: none;
  background: transparent;
  border: 1px solid currentColor;
  color: inherit;
  width: 40px;
  height: 40px;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  cursor: pointer;
}
.mobile-nav-overlay {
  position: fixed;
  inset: 0;
  background: var(--paper);
  z-index: 999;
  display: flex;
  flex-direction: column;
  padding: 100px 32px 40px;
  gap: 28px;
  transform: translateY(-100%);
  transition: transform 0.4s cubic-bezier(0.7, 0, 0.3, 1);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}
.mobile-nav-overlay > * { flex-shrink: 0; }
.mobile-nav-overlay.open { transform: translateY(0); }
.mobile-nav-overlay a {
  font-family: var(--f-display);
  font-style: italic;
  font-size: 32px;
  color: var(--ink);
  text-decoration: none;
  border-bottom: 1px solid var(--line-soft);
  padding-bottom: 16px;
  cursor: pointer;
}
.mobile-nav-overlay .book-btn {
  margin-top: 16px;
  width: 100%;
  padding: 18px;
}
.mobile-nav-close {
  position: absolute;
  top: 20px;
  right: 24px;
  background: none;
  border: none;
  font-size: 22px;
  color: var(--ink);
  cursor: pointer;
  line-height: 1;
  padding: 8px;
}

/* TABLET */
@media (max-width: 960px) {
  body { font-size: 17px; }
  :root { --pad-x: clamp(20px, 4vw, 36px); }

  .section { padding: 80px var(--pad-x); }
  .section-title { font-size: clamp(36px, 6vw, 52px); }

  /* Header — hide nav, show menu button */
  .nav { display: none; }
  .menu-btn { display: inline-flex; }
  .header { padding: 14px var(--pad-x); }
  .header .book-btn { padding: 10px 16px; font-size: 10px; letter-spacing: 0.16em; }

  /* Hero */
  .hero { min-height: 560px; }

  /* Home tiles: 1 column on tablet → 3 too cramped */
  .home-tiles { grid-template-columns: repeat(2, 1fr) !important; gap: 36px !important; }

  /* Residence rows: stack image + text */
  .res-row { grid-template-columns: 1fr !important; gap: 24px !important; direction: ltr !important; }

  /* Experience grid: 2 columns */
  .xp-grid { grid-template-columns: repeat(2, 1fr) !important; }

  /* Two-col page layouts (story, contact, room-detail body, hosts) */
  .two-col { grid-template-columns: 1fr !important; gap: 36px !important; }

  /* Availability: stack calendar + form */
  .avail-grid { grid-template-columns: 1fr !important; gap: 28px !important; }

  /* Detail-page "title 2 col" → single column */
  .detail-body { grid-template-columns: 1fr !important; gap: 36px !important; }

  /* Editorial gallery: 2 across instead of 12 */
  .edit-gallery { grid-template-columns: repeat(2, 1fr) !important; }
  .edit-gallery > * { grid-column: span 1 !important; }

  /* Hosts: image + text stack */
  .host-row { grid-template-columns: 1fr !important; gap: 28px !important; direction: ltr !important; }

  /* Day timeline: tighter columns */
  .day-grid { grid-template-columns: 80px 1fr !important; }

  /* Botanicals — hide on tablet */
  .botanical { display: none; }
}

/* PHONE */
@media (max-width: 640px) {
  body { font-size: 16px; }
  :root { --pad-x: 20px; }

  .section { padding: 60px var(--pad-x); }
  .section-title { font-size: 36px; }
  .section-lede { font-size: 16.5px; }

  .header { padding: 12px var(--pad-x); }
  .logo { font-size: 11px; letter-spacing: 0.14em; }
  /* Hide the desktop "Book your stay" pill on phone — the hamburger menu has it */
  .header .book-btn { display: none; }

  /* Hero text */
  .hero { min-height: 520px; height: 92vh; }
  .hero-content h1 { font-size: 60px !important; }
  .hero-tagline { font-size: 16px !important; margin-top: 20px !important; }
  .hero-cta { padding: 14px 24px; margin-top: 30px; }

  /* Home tiles: 1 col */
  .home-tiles { grid-template-columns: 1fr !important; gap: 40px !important; }

  /* Experience: 1 col */
  .xp-grid { grid-template-columns: 1fr !important; gap: 24px !important; }

  /* Editorial gallery: 1 col */
  .edit-gallery { grid-template-columns: 1fr !important; }

  /* Lightbox tweaks */
  .lightbox { padding: 16px; }
  .lb-arrow { width: 40px; height: 40px; }
  .lb-arrow.prev { left: 8px; }
  .lb-arrow.next { right: 8px; }
  .lightbox img { max-height: 70vh; }

  /* Forms: stack date row */
  .field-row { grid-template-columns: 1fr !important; gap: 0 !important; }

  /* Day timeline: stack */
  .day-grid { grid-template-columns: 1fr !important; row-gap: 6px !important; }
  .day-grid > div:nth-child(odd) { padding-bottom: 0; border: none; }

  /* Detail hero */
  .detail-hero { height: 60vh !important; min-height: 420px !important; }

  /* Contact-specific responsive */
  .contact-top { padding-top: 100px !important; }
  .contact-details span { word-break: break-word; overflow-wrap: anywhere; }
  .contact-form { max-width: 100% !important; }
  .contact-img-wrap { order: -1; }
  .contact-img-wrap .tile-img { aspect-ratio: 16/10 !important; }

  /* Availability page */
  .avail-top { padding-top: 100px !important; padding-bottom: 10px !important; }
  .cal-card { padding: 14px !important; }
  .cal-card > div:first-child { font-size: 19px !important; }
  .cal-card button { padding: 8px 0 !important; font-size: 14px !important; min-width: 0; }
  .cal-card .day-head { font-size: 9px !important; }
  /* Calendar weekday labels (the 7-col Mo Tu We…) */
  .cal-card > div:nth-child(2) { gap: 2px !important; font-size: 9px !important; }
  /* Calendar day cells grid */
  .cal-card > div:nth-child(3) { gap: 3px !important; }
  /* Legend at bottom */
  .cal-card > div:last-child { flex-wrap: wrap; gap: 12px !important; font-size: 9px !important; }

  .inquiry-card { padding: 18px !important; }
  .inquiry-card h3 { font-size: 24px !important; margin-bottom: 16px !important; }
}
