/* ==========================================================================
   Sienna Beach Hotel — Base styles, reset, typography, layout primitives
   ========================================================================== */

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

html { overflow-x: hidden; }
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: var(--fs-base);
  line-height: var(--lh-normal);
  color: var(--color-text);
  background: var(--color-bg);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

img, picture, video, svg { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul, ol { padding: 0; margin: 0; list-style: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
input, textarea, select { font: inherit; color: inherit; }

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  color: var(--color-heading);
  font-weight: 500;
  line-height: var(--lh-tight);
  margin: 0 0 var(--space-sm);
  letter-spacing: -0.012em;
}
h3, h4 { font-weight: 600; }
p { margin: 0 0 var(--space-sm); }
p:last-child { margin-bottom: 0; }

/* Skip link */
.skip-link {
  position: absolute;
  left: 1rem;
  top: -60px;
  background: var(--navy-900);
  color: var(--ivory);
  padding: 0.75rem 1.25rem;
  border-radius: var(--radius-sm);
  z-index: 999;
  transition: top var(--dur-fast) var(--ease);
}
.skip-link:focus { top: 1rem; }

/* Focus visibility */
a:focus-visible, button:focus-visible, input:focus-visible,
textarea:focus-visible, select:focus-visible, [tabindex]:focus-visible {
  outline: 2.5px solid var(--color-focus);
  outline-offset: 3px;
  border-radius: 4px;
}

/* --- Type scale utility classes --- */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.55em;
  font-family: var(--font-body);
  font-size: var(--fs-xs);
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--color-accent-dark);
  margin-bottom: var(--space-sm);
}
.eyebrow::before {
  content: '';
  width: 28px;
  height: 1.5px;
  background: currentColor;
  opacity: 0.6;
}

.h-display { font-size: var(--fs-3xl); }
.h1 { font-size: var(--fs-2xl); }
.h2 { font-size: var(--fs-xl); }
.h3 { font-size: var(--fs-lg); }
.h4 { font-size: var(--fs-md); }
.lede {
  font-size: var(--fs-md);
  line-height: var(--lh-snug);
  color: var(--color-text-soft);
  max-width: 62ch;
}
.text-soft { color: var(--color-text-soft); }
.text-inverse { color: var(--color-text-inverse); }
.serif { font-family: var(--font-display); }

/* --- Layout --- */
.container {
  width: 100%;
  max-width: var(--container-w);
  margin-inline: auto;
  padding-inline: var(--container-pad);
}
.section { padding-block: var(--section-pad); }
.section-tight { padding-block: calc(var(--section-pad) * 0.6); }
.section-header {
  max-width: 700px;
  margin-bottom: var(--space-xl);
}
.section-header.center { margin-inline: auto; text-align: center; }
.bg-alt { background: var(--color-bg-alt); }
.bg-navy { background: var(--navy-800); color: var(--ivory); }
.bg-navy .eyebrow { color: var(--ocean-300); }
.bg-navy h1, .bg-navy h2, .bg-navy h3, .bg-navy h4 { color: var(--ivory); }
.bg-navy .lede { color: rgba(250, 246, 239, 0.78); }

.grid { display: grid; gap: var(--space-lg); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 900px) {
  .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 620px) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
}

.flex { display: flex; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-sm { gap: var(--space-sm); }
.gap-md { gap: var(--space-md); }

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0; padding: 0; margin: -1px;
}

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6em;
  padding: 0.95em 1.9em;
  border-radius: var(--radius-pill);
  font-size: var(--fs-sm);
  font-weight: 600;
  letter-spacing: 0.02em;
  white-space: nowrap;
  transition: transform var(--dur-fast) var(--ease), box-shadow var(--dur-fast) var(--ease),
              background-color var(--dur-fast) var(--ease), color var(--dur-fast) var(--ease),
              border-color var(--dur-fast) var(--ease);
  border: 1.5px solid transparent;
}
.btn:active { transform: translateY(1px); }

.btn-primary {
  background: var(--color-accent);
  color: var(--white);
  box-shadow: var(--shadow-sm);
}
.btn-primary:hover { background: var(--color-accent-dark); box-shadow: var(--shadow-md); }

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

.bg-navy .btn-outline, .hero .btn-outline {
  color: var(--ivory);
}
.bg-navy .btn-outline:hover, .hero .btn-outline:hover {
  background: var(--ivory);
  color: var(--navy-900);
  border-color: var(--ivory);
}

.btn-ghost {
  background: transparent;
  color: var(--color-accent-dark);
  padding-inline: 0.2em;
  border-radius: 0;
}
.btn-ghost::after { content: '\2192'; transition: transform var(--dur-fast) var(--ease); }
.btn-ghost:hover::after { transform: translateX(5px); }

.btn-sm { padding: 0.65em 1.4em; font-size: var(--fs-xs); }
.btn-block { width: 100%; }

/* --- Card --- */
.card {
  background: var(--color-surface);
  border-radius: var(--radius-image);
  overflow: hidden;
  transition: box-shadow var(--dur-med) var(--ease), transform var(--dur-med) var(--ease);
}

.media-frame {
  display: block;
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-image);
  background: var(--sand);
}
/* When a <picture> wrapper (used for WebP sources) sits inside a
   media-frame, it has no intrinsic height of its own, so a plain
   width/height:100% on the img can't resolve correctly against it — the
   image falls back to its natural aspect ratio instead of covering the
   frame (same underlying issue fixed for .hero-media picture earlier).
   Pinning the picture itself to the frame keeps every media-frame image
   sized correctly whether or not it's wrapped in <picture>. */
.media-frame picture { position: absolute; inset: 0; }
.media-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 900ms var(--ease);
}
.media-frame:hover img { transform: scale(1.05); }

/* --- Reveal-on-scroll --- */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 900ms var(--ease), transform 900ms var(--ease);
}
.reveal.is-visible { opacity: 1; transform: translateY(0); }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
}

/* --- Divider --- */
.divider {
  width: 60px;
  height: 2px;
  background: var(--color-accent);
  border-radius: 2px;
  margin-block: var(--space-md);
}
