/**
 * RH Fitness Studio — rhfitnessstudio.fitness
 * SplitScroll archetype: IO section crossfade + before/after range slider
 * No external animation libraries
 */
:root {
  --ocean: #1a5f7a;
  --ocean-deep: #134656;
  --sand: #f4ebe1;
  --sand-dark: #e8ddd0;
  --coral: #e07a5f;
  --coral-dark: #c9654c;
  --ink: #1c2b32;
  --muted: #5c7a86;
  --white: #ffffff;
  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 12px 40px rgba(26, 95, 122, 0.12);
  --font-display: "Marcellus", Georgia, serif;
  --font-body: "Karla", system-ui, sans-serif;
  --header-h: 72px;
  --visual-w: min(44vw, 520px);
  --content-max: 640px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.65;
  color: var(--ink);
  background: var(--sand);
  -webkit-font-smoothing: antialiased;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

a {
  color: var(--ocean);
  text-underline-offset: 0.15em;
}

a:hover {
  color: var(--coral-dark);
}

h1,
h2,
h3 {
  font-family: var(--font-display);
  font-weight: 400;
  line-height: 1.15;
  margin: 0 0 0.75rem;
  color: var(--ocean-deep);
}

h1 {
  font-size: clamp(2.2rem, 4.5vw, 3.4rem);
}

h2 {
  font-size: clamp(1.75rem, 3vw, 2.35rem);
}

h3 {
  font-size: 1.25rem;
}

p {
  margin: 0 0 1rem;
}

ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  top: -100%;
  left: 1rem;
  z-index: 9999;
  padding: 0.75rem 1rem;
  background: var(--ocean);
  color: var(--white);
  text-decoration: none;
  border-radius: var(--radius-sm);
}

.skip-link:focus {
  top: 1rem;
}

/* Header */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  height: var(--header-h);
  background: rgba(244, 235, 225, 0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(26, 95, 122, 0.08);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  max-width: 100%;
  height: 100%;
  padding: 0 clamp(1rem, 3vw, 2rem);
  margin-left: var(--visual-w);
}

.brand img {
  height: 36px;
  width: auto;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.site-nav ul {
  display: flex;
  gap: 1.25rem;
}

.site-nav a {
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  color: var(--ink);
}

.site-nav a:hover {
  color: var(--coral);
}

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
}

.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--ocean);
  border-radius: 2px;
  transition: transform 0.25s var(--ease), opacity 0.25s;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.35rem;
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-decoration: none;
  border-radius: 999px;
  border: 2px solid transparent;
  cursor: pointer;
  transition: background 0.25s var(--ease), color 0.25s, border-color 0.25s, transform 0.25s;
}

.btn:focus-visible {
  outline: 2px solid var(--coral);
  outline-offset: 3px;
}

.btn-primary {
  background: var(--coral);
  color: var(--white);
  border-color: var(--coral);
}

.btn-primary:hover {
  background: var(--coral-dark);
  border-color: var(--coral-dark);
  color: var(--white);
}

.btn-ghost {
  background: transparent;
  color: var(--ocean);
  border-color: rgba(26, 95, 122, 0.25);
}

.btn-ghost:hover {
  border-color: var(--ocean);
  color: var(--ocean-deep);
}

.btn-full {
  width: 100%;
}

/* Split layout */
.split-layout {
  display: flex;
  min-height: 100vh;
  padding-top: var(--header-h);
}

.visual-column {
  position: fixed;
  top: var(--header-h);
  left: 0;
  width: var(--visual-w);
  height: calc(100vh - var(--header-h));
  background: var(--ocean-deep);
  overflow: hidden;
}

.visual-stack {
  position: relative;
  width: 100%;
  height: 100%;
}

.visual-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 0.7s var(--ease);
}

.visual-image.is-active {
  opacity: 1;
}

.visual-caption {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 1.5rem;
  background: linear-gradient(transparent, rgba(19, 70, 86, 0.85));
  color: var(--sand);
}

.visual-caption-label {
  display: block;
  font-family: var(--font-display);
  font-size: 1.1rem;
}

.visual-caption-text {
  font-size: 0.85rem;
  opacity: 0.85;
}

.content-column {
  flex: 1;
  margin-left: var(--visual-w);
  min-width: 0;
}

.section {
  padding: clamp(3rem, 8vh, 5.5rem) clamp(1.5rem, 5vw, 4rem);
  max-width: calc(var(--content-max) + 8rem);
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s var(--ease), transform 0.6s var(--ease);
}

.section.is-visible {
  opacity: 1;
  transform: none;
}

.section-home {
  min-height: calc(100vh - var(--header-h));
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding-top: 2rem;
  padding-bottom: 3rem;
}

.eyebrow {
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--coral);
  margin-bottom: 1rem;
}

.lead {
  font-size: 1.125rem;
  color: var(--muted);
  max-width: 34rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin: 1.75rem 0 2rem;
}

.hours-chip {
  margin: 0;
  padding: 1rem 1.25rem;
  background: var(--white);
  border-radius: var(--radius);
  border: 1px solid var(--sand-dark);
  max-width: 28rem;
}

.hours-chip dt {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ocean);
  margin-bottom: 0.25rem;
}

.hours-chip dd {
  margin: 0;
  font-size: 0.9rem;
  color: var(--muted);
}

.section-intro {
  color: var(--muted);
  margin-bottom: 1.5rem;
}

.owner-quote {
  margin: 2rem 0 0;
  padding: 1.5rem 1.75rem;
  background: var(--white);
  border-left: 4px solid var(--coral);
  border-radius: 0 var(--radius) var(--radius) 0;
  box-shadow: var(--shadow);
}

.owner-quote p {
  font-style: italic;
  font-size: 1.05rem;
  margin-bottom: 0.75rem;
}

.owner-quote footer {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--ocean);
}

/* Services */
.service-cards {
  display: grid;
  gap: 1rem;
  margin-bottom: 2.5rem;
}

.service-cards li {
  padding: 1.25rem 1.5rem;
  background: var(--white);
  border-radius: var(--radius);
  border: 1px solid var(--sand-dark);
  transition: box-shadow 0.3s var(--ease), transform 0.3s var(--ease);
}

.service-cards li:hover {
  box-shadow: var(--shadow);
  transform: translateY(-2px);
}

.service-cards h3 {
  margin-bottom: 0.35rem;
}

.service-cards p {
  margin: 0;
  font-size: 0.95rem;
  color: var(--muted);
}

/* Before / after */
.before-after {
  padding: 1.5rem;
  background: var(--white);
  border-radius: var(--radius);
  border: 1px solid var(--sand-dark);
}

.before-after-header h3 {
  margin-bottom: 0.35rem;
}

.before-after-header p {
  font-size: 0.9rem;
  color: var(--muted);
  margin-bottom: 1.25rem;
}

.before-after-frame {
  position: relative;
  aspect-ratio: 16 / 10;
  border-radius: var(--radius-sm);
  overflow: hidden;
  user-select: none;
}

.ba-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.ba-after {
  position: relative;
  z-index: 1;
}

.ba-before-wrap {
  position: absolute;
  inset: 0;
  z-index: 2;
  width: 50%;
  overflow: hidden;
  border-right: 3px solid var(--coral);
}

.ba-before {
  width: 100%;
  height: 100%;
  max-width: none;
}

.ba-control {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: flex;
  align-items: center;
  margin: 0;
  cursor: ew-resize;
}

.ba-control input[type="range"] {
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  cursor: ew-resize;
}

.ba-labels {
  position: absolute;
  bottom: 0.75rem;
  left: 0.75rem;
  right: 0.75rem;
  z-index: 4;
  display: flex;
  justify-content: space-between;
  pointer-events: none;
}

.ba-labels span {
  padding: 0.25rem 0.6rem;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--white);
  background: rgba(19, 70, 86, 0.7);
  border-radius: 999px;
}

/* Price accordion */
.price-accordion,
.faq-accordion {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.price-group,
.faq-accordion details {
  background: var(--white);
  border: 1px solid var(--sand-dark);
  border-radius: var(--radius);
  overflow: hidden;
}

.price-group summary,
.faq-accordion summary {
  padding: 1rem 1.25rem;
  font-family: var(--font-display);
  font-size: 1.05rem;
  color: var(--ocean-deep);
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.price-group summary::-webkit-details-marker,
.faq-accordion summary::-webkit-details-marker {
  display: none;
}

.price-group summary::after,
.faq-accordion summary::after {
  content: "+";
  font-family: var(--font-body);
  font-size: 1.25rem;
  color: var(--coral);
  transition: transform 0.25s;
}

.price-group[open] summary::after,
.faq-accordion details[open] summary::after {
  content: "−";
}

.price-list {
  padding: 0 1.25rem 1rem;
  border-top: 1px solid var(--sand-dark);
}

.price-list li {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.65rem 0;
  border-bottom: 1px dashed rgba(92, 122, 134, 0.25);
  font-size: 0.95rem;
}

.price-list li:last-child {
  border-bottom: 0;
}

.price-list li span:last-child {
  font-weight: 600;
  color: var(--ocean);
  white-space: nowrap;
}

.faq-accordion details p {
  padding: 0 1.25rem 1rem;
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
  border-top: 1px solid var(--sand-dark);
}

/* Booking */
.booking-grid {
  display: grid;
  gap: 2rem;
}

.booking-form {
  display: grid;
  gap: 1rem;
  padding: 1.5rem;
  background: var(--white);
  border-radius: var(--radius);
  border: 1px solid var(--sand-dark);
  box-shadow: var(--shadow);
}

.field label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 0.35rem;
  color: var(--ocean-deep);
}

.field input,
.field select {
  width: 100%;
  padding: 0.75rem 0.9rem;
  font-family: var(--font-body);
  font-size: 1rem;
  border: 1px solid var(--sand-dark);
  border-radius: var(--radius-sm);
  background: var(--sand);
  color: var(--ink);
  transition: border-color 0.2s, box-shadow 0.2s;
}

.field input:focus,
.field select:focus {
  outline: none;
  border-color: var(--ocean);
  box-shadow: 0 0 0 3px rgba(26, 95, 122, 0.15);
}

.field input.is-invalid,
.field select.is-invalid {
  border-color: var(--coral);
}

.form-status {
  margin: 0;
  padding: 0.75rem 1rem;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
}

.form-status.is-success {
  background: rgba(26, 95, 122, 0.1);
  color: var(--ocean-deep);
}

.form-status.is-error {
  background: rgba(224, 122, 95, 0.12);
  color: var(--coral-dark);
}

.booking-aside {
  padding: 1.5rem;
  background: var(--ocean);
  color: var(--sand);
  border-radius: var(--radius);
}

.booking-aside h3 {
  color: var(--sand);
  margin-bottom: 1rem;
}

.hours-list li {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.5rem 0;
  font-size: 0.9rem;
  border-bottom: 1px solid rgba(244, 235, 225, 0.15);
}

.hours-list li:last-child {
  border-bottom: 0;
}

.booking-aside a {
  color: var(--sand);
  font-weight: 600;
}

.booking-note {
  margin: 1.25rem 0 0;
  font-size: 0.9rem;
}

/* Footer */
.site-footer {
  padding: 2.5rem clamp(1.5rem, 5vw, 4rem) 2rem;
  background: var(--ocean-deep);
  color: rgba(244, 235, 225, 0.9);
  max-width: calc(var(--content-max) + 8rem);
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.footer-brand {
  font-family: var(--font-display);
  font-size: 1.1rem;
  color: var(--sand);
}

.footer-hours-label {
  font-weight: 600;
  color: var(--sand);
}

.site-footer a {
  color: var(--sand);
}

.site-footer a:hover {
  color: var(--coral);
}

.footer-copy {
  margin: 0;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(244, 235, 225, 0.15);
  font-size: 0.85rem;
  opacity: 0.8;
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  .visual-image,
  .section,
  .service-cards li,
  .btn {
    transition: none;
  }

  .section {
    opacity: 1;
    transform: none;
  }
}

/* Tablet / mobile */
@media (max-width: 960px) {
  :root {
    --visual-w: 0px;
  }

  .header-inner {
    margin-left: 0;
  }

  .nav-toggle {
    display: flex;
  }

  .site-nav {
    position: fixed;
    top: var(--header-h);
    right: 0;
    bottom: 0;
    width: min(320px, 100vw);
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 1.5rem;
    background: var(--sand);
    border-left: 1px solid var(--sand-dark);
    transform: translateX(100%);
    transition: transform 0.35s var(--ease);
  }

  .site-nav.is-open {
    transform: translateX(0);
  }

  .site-nav ul {
    flex-direction: column;
    gap: 0;
    margin-bottom: 1.5rem;
  }

  .site-nav li {
    border-bottom: 1px solid var(--sand-dark);
  }

  .site-nav a {
    display: block;
    padding: 0.85rem 0;
  }

  .header-cta {
    width: 100%;
    text-align: center;
  }

  .visual-column {
    position: relative;
    top: 0;
    width: 100%;
    height: 42vh;
    min-height: 260px;
  }

  .split-layout {
    flex-direction: column;
    padding-top: var(--header-h);
  }

  .content-column {
    margin-left: 0;
  }

  .section-home {
    min-height: auto;
  }

  .booking-grid {
    grid-template-columns: 1fr;
  }
}

@media (min-width: 961px) {
  .booking-grid {
    grid-template-columns: 1.2fr 0.8fr;
    align-items: start;
  }

  .service-cards {
    grid-template-columns: repeat(2, 1fr);
  }
}
