/* ═══════════════════════════════════════════════════════════
   Sage & Sand — boutique yoga studio
   Calm · intentional · grounded
   ═══════════════════════════════════════════════════════════ */

:root {
  /* palette */
  --paper: #F7F2E9;        /* off-white */
  --sand: #EFE7D8;         /* warm sand */
  --sand-deep: #E4D9C2;
  --sage: #8A9B84;         /* sage green */
  --sage-deep: #5C6B57;
  --sage-dark: #46523F;    /* dark section bg */
  --terracotta: #C4704F;   /* accent */
  --terracotta-deep: #9C5438;
  --terracotta-ink: #8A4529;
  --dusk: #D9A5A0;         /* dusk pink */
  --ink: #37332B;
  --ink-soft: #5E574A;
  --line: rgba(55, 51, 43, 0.14);

  /* type */
  --font-display: 'Fraunces', Georgia, 'Times New Roman', serif;
  --font-body: 'Karla', 'Helvetica Neue', Arial, sans-serif;

  /* rhythm */
  --maxw: 1180px;
  --pad: clamp(1.4rem, 4vw, 3.5rem);
  --ease-soft: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-breathe: cubic-bezier(0.45, 0.05, 0.55, 0.95);

  --radius: 1.25rem;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-snap-type: y proximity;
}

body {
  font-family: var(--font-body);
  font-weight: 400;
  color: var(--ink);
  background: var(--sand);
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* linen / paper grain */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0.05;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.72' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

main, header, footer { position: relative; z-index: 1; }

::selection { background: var(--sage); color: var(--paper); }

a { color: inherit; }

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

/* ── focus ── */
:focus-visible {
  outline: 2px solid var(--terracotta);
  outline-offset: 3px;
  border-radius: 4px;
}

/* ═══════════ progress bar ═══════════ */
.progress {
  position: fixed;
  top: 0; left: 0;
  height: 3px;
  width: 100%;
  background: var(--terracotta);
  transform-origin: left;
  z-index: 120;
  animation: progress linear;
  animation-timeline: scroll();
}
@keyframes progress { to { transform: scaleX(1); } }

/* ═══════════ header ═══════════ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  padding: 1rem var(--pad);
  background: rgba(247, 242, 233, 0.82);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid transparent;
  transition: padding 0.4s var(--ease-soft), border-color 0.4s ease, box-shadow 0.4s ease;
}
.site-header.scrolled {
  padding-top: 0.6rem;
  padding-bottom: 0.6rem;
  border-bottom-color: var(--line);
  box-shadow: 0 10px 30px -22px rgba(55, 51, 43, 0.5);
}
.header-inner {
  max-width: var(--maxw);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  text-decoration: none;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 1.3rem;
  letter-spacing: 0.01em;
  min-height: 44px;
  padding: 0.25rem 0;
}
.brand-mark { color: var(--terracotta); font-size: 1.5rem; transform: translateY(2px); }
.site-nav { display: flex; align-items: center; gap: clamp(0.9rem, 2.5vw, 1.9rem); }
.site-nav a {
  text-decoration: none;
  font-size: 0.92rem;
  letter-spacing: 0.04em;
  color: var(--ink-soft);
  transition: color 0.3s ease;
  padding: 0.7rem 0.1rem;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
}
.site-nav a:hover { color: var(--ink); }
.site-nav .nav-cta {
  color: var(--paper);
  background: var(--sage-deep);
  padding: 0.5rem 1.05rem;
  border-radius: 999px;
  font-weight: 500;
  transition: background 0.3s ease;
}
.site-nav .nav-cta:hover { background: var(--sage-dark); color: var(--paper); }

.chime-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font: 500 0.82rem var(--font-body);
  letter-spacing: 0.05em;
  color: var(--ink-soft);
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.4rem 0.85rem;
  min-height: 44px;
  cursor: pointer;
  transition: opacity 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}
.chime-toggle:hover { color: var(--ink); border-color: rgba(55,51,43,0.35); }
.chime-toggle[aria-pressed="false"] { opacity: 0.45; }
.chime-icon { color: var(--terracotta-deep); font-size: 1rem; }

/* ═══════════ shared section scaffolding ═══════════ */
.section {
  min-height: 100vh;
  scroll-snap-align: start;
  scroll-margin-top: 70px;
  padding: clamp(4.5rem, 10vh, 8rem) var(--pad);
}
.section-head { max-width: 720px; margin-bottom: clamp(3rem, 7vh, 5rem); }
.section-index {
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--terracotta-deep);
  margin-bottom: 1.1rem;
}
.section-title {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(2.1rem, 5.2vw, 3.6rem);
  line-height: 1.12;
  letter-spacing: -0.015em;
  margin-bottom: 1.4rem;
}
.section-intro { font-size: 1.06rem; color: var(--ink-soft); max-width: 52ch; }

/* reveal on scroll — 600ms soft ease */
.js .reveal { opacity: 0; transform: translateY(26px); }
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 600ms var(--ease-soft), transform 600ms var(--ease-soft);
}

/* ═══════════ buttons ═══════════ */
.btn {
  display: inline-block;
  text-decoration: none;
  font: 500 1rem/1.4 var(--font-body);
  letter-spacing: 0.02em;
  border-radius: 999px;
  padding: 1rem 1.7rem;
  cursor: pointer;
  border: 1px solid transparent;
  transition: transform 0.35s var(--ease-soft), background 0.35s ease, color 0.35s ease, box-shadow 0.35s ease;
}
.btn:hover { transform: translateY(-2px); }
.btn-primary {
  background: var(--terracotta-deep);
  color: var(--paper);
  box-shadow: 0 14px 30px -16px rgba(156, 84, 56, 0.7);
}
.btn-primary:hover { background: #8A4529; }
.btn-ghost {
  color: var(--ink);
  border-color: rgba(55, 51, 43, 0.3);
  background: transparent;
}
.btn-ghost:hover { border-color: var(--ink); background: rgba(255, 255, 255, 0.35); }

/* ═══════════ HERO ═══════════ */
.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  align-items: center;
  overflow: hidden;
  scroll-snap-align: start;
}
.hero-media {
  position: absolute;
  inset: 0;
  overflow: hidden;
  transition: transform 9s ease-out;
  will-change: transform;
}
.hero:hover .hero-media { transform: scale(1.07); }
.hero-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 72% center;
  transform-origin: center;
}
/* the 4-second breath cycle */
.breathe { animation: breathe 4s var(--ease-breathe) infinite; }
@keyframes breathe {
  0%, 100% { transform: scale(1); }
  50%      { transform: scale(1.045); }
}
.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    100deg,
    rgba(247, 242, 233, 0.94) 0%,
    rgba(247, 242, 233, 0.75) 32%,
    rgba(247, 242, 233, 0.28) 60%,
    rgba(247, 242, 233, 0) 78%
  );
  pointer-events: none;
}
.hero-content {
  position: relative;
  z-index: 2;
  max-width: 620px;
  padding: 7rem var(--pad) 6rem;
}
.kicker {
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--terracotta-deep);
  margin-bottom: 1.4rem;
}
.hero-title {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(2.7rem, 7vw, 5.3rem);
  line-height: 1.06;
  letter-spacing: -0.02em;
  margin-bottom: 1.6rem;
}
.hero-title em {
  font-style: italic;
  font-weight: 300;
  color: var(--sage-deep);
}
.hero-sub {
  font-size: 1.12rem;
  line-height: 1.85;
  color: var(--ink-soft);
  max-width: 46ch;
  margin-bottom: 2.4rem;
}
.hero-cta { display: flex; gap: 1rem; flex-wrap: wrap; }

/* staggered entrance for hero content */
.hero .reveal:nth-of-type(1) { transition-delay: 0.05s; }
.hero .reveal:nth-of-type(2) { transition-delay: 0.18s; }
.hero .reveal:nth-of-type(3) { transition-delay: 0.32s; }
.hero .reveal:nth-of-type(4) { transition-delay: 0.46s; }

.scroll-hint {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  font-size: 0.72rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--ink-soft);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.7rem;
  animation: hintFade 3s ease 1.2s both;
}
.scroll-line {
  width: 1px;
  height: 44px;
  background: linear-gradient(to bottom, var(--terracotta), transparent);
  animation: hintDrop 2.6s var(--ease-soft) infinite;
}
@keyframes hintFade { from { opacity: 0; } to { opacity: 1; } }
@keyframes hintDrop {
  0%   { transform: scaleY(0); transform-origin: top; }
  45%  { transform: scaleY(1); transform-origin: top; }
  55%  { transform: scaleY(1); transform-origin: bottom; }
  100% { transform: scaleY(0); transform-origin: bottom; }
}

/* ═══════════ PRACTICES ═══════════ */
.practices { background: var(--sand); }
.practice-row {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: clamp(2.2rem, 6vw, 6rem);
  align-items: center;
  margin-bottom: clamp(4.5rem, 12vh, 8rem);
  /* each practice becomes its own snap slide — image + text align together */
  scroll-snap-align: start;
  scroll-margin-top: 90px;
}
.practice-row:last-child { margin-bottom: 0; }
.practice-row:nth-of-type(even) .practice-figure { order: 2; }
.practice-row:nth-of-type(odd) .practice-figure { order: 1; }

.frame {
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 30px 60px -40px rgba(55, 51, 43, 0.45);
}
.frame img { aspect-ratio: 4 / 5; object-fit: cover; width: 100%; }
.practice-figure figcaption {
  margin-top: 0.9rem;
  font-size: 0.78rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--terracotta-deep);
  font-weight: 500;
}

.practice-copy h3 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(1.7rem, 3.4vw, 2.4rem);
  margin-bottom: 0.8rem;
  letter-spacing: -0.01em;
}
.practice-copy p { color: var(--ink-soft); max-width: 46ch; }
.practice-tags { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 1.4rem; }
.practice-tags span {
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  color: #46523F;
  border: 1px solid rgba(70, 82, 63, 0.35);
  background: #E0E6DA;
  border-radius: 999px;
  padding: 0.3rem 0.85rem;
}

/* ═══════════ TEACHERS ═══════════ */
.teachers {
  background: var(--paper);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.teacher-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(2rem, 4vw, 3.5rem);
}
.teacher-portrait {
  overflow: hidden;
  border-radius: 48% 48% 1.4rem 1.4rem / 36% 36% 1.4rem 1.4rem;
  margin-bottom: 1.4rem;
  box-shadow: 0 34px 60px -42px rgba(55, 51, 43, 0.5);
  background: var(--sand-deep);
}
.teacher-portrait img { aspect-ratio: 4 / 5; object-fit: cover; width: 100%; }
.teacher-card h3 {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 1.45rem;
  letter-spacing: 0.01em;
}
.teacher-style {
  font-size: 0.8rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--terracotta-deep);
  margin: 0.25rem 0 0.9rem;
}
.teacher-quote {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 400;
  font-size: 1.06rem;
  line-height: 1.6;
  color: var(--sage-deep);
  min-height: 4.4em;
  border-left: 2px solid var(--dusk);
  padding-left: 1rem;
}
.teacher-quote.typing::after {
  content: '▍';
  color: var(--terracotta);
  animation: caret 1s steps(1) infinite;
}
@keyframes caret { 50% { opacity: 0; } }
.teacher-quote-sr {
  position: absolute;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}

/* ═══════════ SCHEDULE ═══════════ */
.schedule { background: var(--sand); }

.week-strip {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 0.6rem;
  margin-bottom: 2.6rem;
}
.day-chip {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 1rem;
  padding: 0.85rem 0.4rem;
  text-align: center;
  transition: border-color 0.3s ease, background 0.3s ease;
}
.day-chip.today {
  background: var(--sage-deep);
  border-color: var(--sage-deep);
}
.day-chip.today .day-name { color: var(--paper); }
.day-chip.today .day-dots { color: rgba(247, 242, 233, 0.82); }
.day-name {
  display: block;
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin-bottom: 0.2rem;
}
.day-dots {
  display: block;
  font-size: 0.7rem;
  letter-spacing: 0.28em;
  color: var(--sage-deep);
}

.sched-day { margin-bottom: 2.6rem; }
.sched-day-name {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 1.2rem;
  margin-bottom: 0.6rem;
  color: var(--sage-deep);
}
.sched-row {
  border-bottom: 1px solid var(--line);
}
.sched-main {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 1.1rem;
  background: transparent;
  border: none;
  font: 400 1rem var(--font-body);
  color: var(--ink);
  padding: 1.05rem 0.4rem;
  cursor: pointer;
  text-align: left;
  transition: padding 0.35s var(--ease-soft), background 0.3s ease;
}
.sched-main:hover { background: rgba(228, 217, 194, 0.45); }
.sched-row.open .sched-main { padding-bottom: 0.6rem; }
.sched-time {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 500;
  color: var(--terracotta-deep);
  min-width: 4.6ch;
}
.sched-name { flex: 1; font-weight: 500; }
.sched-teacher {
  color: var(--ink-soft);
  font-size: 0.9rem;
  min-width: 6ch;
}
.seats {
  font-size: 0.76rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  border-radius: 999px;
  padding: 0.28rem 0.8rem;
  white-space: nowrap;
}
.seats-ok   { background: var(--sage-deep); color: var(--paper); }
.seats-low  { background: var(--terracotta-deep); color: var(--paper); }
.seats-full { background: #645D51; color: var(--paper); }
.sched-chev {
  color: var(--ink-soft);
  font-size: 1.1rem;
  transition: transform 0.45s var(--ease-soft);
}
.sched-row.open .sched-chev { transform: rotate(180deg); }

/* expandable detail */
.sched-detail {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.5s var(--ease-soft);
}
.sched-row.open .sched-detail { max-height: 220px; }
.sched-detail p {
  margin: 0;
  padding: 0.3rem 1.4rem 0;
  font-size: 0.94rem;
  color: var(--ink-soft);
}
.sched-detail p:last-child { padding-bottom: 1.1rem; }
.sched-detail strong { color: var(--ink); font-weight: 500; }

.schedule-note {
  margin-top: 2.4rem;
  color: var(--ink-soft);
  font-size: 0.98rem;
}
.schedule-note a {
  color: var(--terracotta-deep);
  text-decoration-color: rgba(156, 84, 56, 0.4);
  text-underline-offset: 3px;
}

/* ═══════════ FIRST CLASS FREE ═══════════ */
.first-class {
  background: var(--sage-dark);
  color: var(--paper);
  display: flex;
  align-items: center;
  scroll-snap-align: start;
}
.first-class .section-index-light { color: rgba(247, 242, 233, 0.78); }
.first-class .section-title { color: var(--paper); }
.fc-inner { max-width: 640px; margin: 0 auto; text-align: center; }
.fc-sub {
  color: rgba(247, 242, 233, 0.82);
  font-size: 1.08rem;
  line-height: 1.85;
  margin-bottom: 2.6rem;
}
.fc-form {
  display: grid;
  grid-template-columns: 1fr 1fr auto;
  gap: 0.8rem;
  align-items: end;
}
.fc-field { text-align: left; }
.fc-field label {
  display: block;
  font-size: 0.76rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(247, 242, 233, 0.66);
  margin-bottom: 0.45rem;
}
.fc-field input {
  width: 100%;
  background: rgba(247, 242, 233, 0.1);
  border: 1px solid rgba(247, 242, 233, 0.28);
  border-radius: 999px;
  color: var(--paper);
  font: 400 1rem var(--font-body);
  padding: 0.95rem 1.3rem;
  transition: border-color 0.3s ease, background 0.3s ease;
}
.fc-field input::placeholder { color: rgba(247, 242, 233, 0.4); }
.fc-field input:focus {
  outline: none;
  border-color: var(--dusk);
  background: rgba(247, 242, 233, 0.16);
}
.btn-fc {
  background: var(--terracotta-deep);
  color: var(--paper);
  font-weight: 600;
  white-space: nowrap;
  box-shadow: 0 16px 34px -18px rgba(0, 0, 0, 0.55);
}
.btn-fc:hover { background: var(--terracotta-ink); color: var(--paper); transform: translateY(-2px); }
.fc-success {
  margin-top: 1.6rem;
  font-family: var(--font-display);
  font-style: italic;
  font-size: 1.15rem;
  color: rgba(247, 242, 233, 0.85);
}
.fc-note {
  margin-top: 1.3rem;
  font-size: 0.82rem;
  color: rgba(247, 242, 233, 0.55);
  letter-spacing: 0.02em;
}

/* ═══════════ FOOTER ═══════════ */
.site-footer {
  background: var(--sand-deep);
  border-top: 1px solid var(--line);
  padding: 3.5rem var(--pad) 2rem;
  scroll-snap-align: start;
}
.footer-inner {
  max-width: var(--maxw);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr 1fr;
  gap: 2.4rem;
}
.footer-logo {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 1.35rem;
  margin-bottom: 0.4rem;
}
.footer-tag { color: var(--ink-soft); font-size: 0.92rem; }
.footer-col h4 {
  font-size: 0.76rem;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--terracotta-ink);
  margin-bottom: 0.8rem;
}
.footer-col p { color: var(--ink-soft); font-size: 0.94rem; line-height: 1.8; }
.footer-col a { text-decoration: none; border-bottom: 1px solid transparent; transition: border-color 0.3s ease; display: inline-flex; align-items: center; min-height: 44px; padding: 0.3rem 0; }
.footer-col a:hover { border-bottom-color: var(--ink-soft); }
.footer-social { margin-top: 0.6rem; }
.footer-small {
  max-width: var(--maxw);
  margin: 2.6rem auto 0;
  padding-top: 1.4rem;
  border-top: 1px solid var(--line);
  font-size: 0.8rem;
  color: var(--ink-soft);
  letter-spacing: 0.04em;
}

/* ═══════════ responsive ═══════════ */
@media (max-width: 1024px) {
  .teacher-grid { grid-template-columns: repeat(3, 1fr); gap: 1.6rem; }
}

@media (max-width: 900px) {
  .practice-row { grid-template-columns: 1fr; }
  .practice-row:nth-of-type(even) .practice-figure { order: 0; }
  .practice-copy h3 { margin-top: 0.2rem; }
  .teacher-grid { grid-template-columns: 1fr; max-width: 460px; }
  .teacher-quote { min-height: 0; }
  .fc-form { grid-template-columns: 1fr; }
  .btn-fc { width: 100%; }
}

@media (max-width: 720px) {
  .header-inner { justify-content: center; }
  .site-nav { order: 3; width: 100%; justify-content: center; flex-wrap: wrap; gap: 0.7rem 1.1rem; }
  .week-strip { grid-template-columns: repeat(4, 1fr); }
  .sched-teacher { display: none; }
  .sched-main { gap: 0.8rem; }
  .footer-inner { grid-template-columns: 1fr 1fr; }
  .hero-content { padding-top: 6rem; }
  .hero-overlay {
    background: linear-gradient(
      180deg,
      rgba(247, 242, 233, 0.88) 0%,
      rgba(247, 242, 233, 0.72) 52%,
      rgba(247, 242, 233, 0.2) 100%
    );
  }
}

@media (max-width: 420px) {
  .week-strip { grid-template-columns: repeat(3, 1fr); }
  .hero-cta .btn { width: 100%; text-align: center; }
}

/* ═══════════ reduced motion ═══════════ */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; scroll-snap-type: none; }
  .breathe, .scroll-line, .scroll-hint, .progress { animation: none !important; }
  .kenburns img, .hero-media { transition: none !important; }
  .js .reveal { opacity: 1; transform: none; transition: none; }
  .teacher-quote.typing::after { content: ''; }
}
