/* ============================================================
   Instyle Hair Salon - "The Room"
   Place-first, warm organic botanical calm.
   Locked palette: forest green ground, cream, terracotta accent.
   Fonts: Gilda Display (display) + Mulish (body).
   ============================================================ */

:root {
  /* Palette (locked) */
  --forest: #20342a;
  --forest-deep: #182720;
  --cream: #eef0e6;
  --cream-dim: #dfe2d4;
  --terracotta: #c07a4a;
  --terracotta-deep: #a4623a;

  /* Semantic */
  --ground: var(--cream);
  --ink: var(--forest);
  --ink-soft: #4a5a4f;
  --accent: var(--terracotta);

  /* One radius system */
  --r: 14px;
  --r-pill: 999px;

  /* Type */
  --display: "Gilda Display", Georgia, "Times New Roman", serif;
  --body: "Mulish", system-ui, -apple-system, sans-serif;

  /* Rhythm */
  --pad-x: clamp(1.25rem, 5vw, 5rem);
  --section-y: clamp(2.75rem, 6vw, 5.25rem);
  --maxw: 1240px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

body {
  margin: 0;
  font-family: var(--body);
  font-weight: 400;
  color: var(--ink);
  background: var(--ground);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img, figure { max-width: 100%; }

a { color: inherit; }

h1, h2, h3 {
  font-family: var(--display);
  font-weight: 400;
  line-height: 1.08;
  margin: 0;
}

/* ---------- Accessibility helpers ---------- */
.skip-link {
  position: absolute;
  left: 1rem;
  top: -3rem;
  z-index: 100;
  background: var(--forest);
  color: var(--cream);
  padding: 0.6rem 1rem;
  border-radius: var(--r);
  transition: top 0.2s ease;
}
.skip-link:focus { top: 1rem; }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}

/* ---------- Shared type pieces ---------- */
.eyebrow {
  font-family: var(--body);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 1.25rem;
}

.section-title {
  font-size: clamp(2.1rem, 5.5vw, 3.6rem);
  color: var(--ink);
  letter-spacing: -0.01em;
}
.section-title--cream { color: var(--cream); }

.prose p {
  font-size: clamp(1rem, 1.5vw, 1.125rem);
  color: var(--ink-soft);
  max-width: 58ch;
  margin: 0 0 1.15rem;
}
.prose p:last-child { margin-bottom: 0; }

.link {
  color: var(--accent);
  text-decoration: none;
  border-bottom: 1px solid rgba(192, 122, 74, 0.4);
  padding-bottom: 1px;
  transition: border-color 0.25s ease, color 0.25s ease;
}
.link:hover { border-color: var(--accent); }

/* ---------- Buttons (one Book label everywhere) ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
  font-family: var(--body);
  font-weight: 600;
  font-size: 0.98rem;
  letter-spacing: 0.02em;
  line-height: 1;
  padding: 0.95rem 1.9rem;
  border-radius: var(--r-pill);
  text-decoration: none;
  cursor: pointer;
  border: 1.5px solid transparent;
  transition: transform 0.18s ease, background-color 0.25s ease, color 0.25s ease, border-color 0.25s ease;
}
.btn:active { transform: translateY(1px); }

.btn--solid {
  background: var(--terracotta);
  color: #fff;
}
.btn--solid:hover { background: var(--terracotta-deep); }

.btn--pill {
  background: var(--forest);
  color: var(--cream);
  padding: 0.7rem 1.5rem;
}
.btn--pill:hover { background: var(--forest-deep); }

.btn--outline-cream {
  background: transparent;
  color: var(--cream);
  border-color: rgba(238, 240, 230, 0.5);
}
.btn--outline-cream:hover {
  background: var(--terracotta);
  border-color: var(--terracotta);
  color: #fff;
}

/* ---------- Top bar ---------- */
.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.85rem var(--pad-x);
  background: var(--cream);
  border-bottom: 1px solid var(--cream-dim);
  min-height: 64px;
}
.topbar__mark {
  display: flex;
  align-items: baseline;
  gap: 0.45rem;
  text-decoration: none;
}
.topbar__name {
  font-family: var(--display);
  font-size: 1.4rem;
  color: var(--forest);
}
.topbar__sub {
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-soft);
}
.topbar__nav {
  display: flex;
  gap: 1.75rem;
  margin-left: auto;
  margin-right: 1.5rem;
}
.topbar__nav a {
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--ink-soft);
  transition: color 0.2s ease;
}
.topbar__nav a:hover { color: var(--accent); }

/* ---------- Media placeholders ---------- */
.media-ph {
  position: relative;
  margin: 0;
  aspect-ratio: 16 / 9;
  border-radius: var(--r);
  overflow: hidden;
  background: #223a2e; /* tone shown behind an image while it loads */
}
.media-ph[data-ar="4/5"] { aspect-ratio: 4 / 5; }
.media-ph[data-ar="4/3"] { aspect-ratio: 4 / 3; }
.media-ph[data-ar="16/9"] { aspect-ratio: 16 / 9; }
.media-ph img,
.media-ph iframe {
  width: 100%;
  height: 100%;
  border: 0;
  object-fit: cover;
  display: block;
}

/* ============================================================
   1. HERO
   ============================================================ */
.hero {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  align-items: stretch;
  gap: clamp(1.5rem, 4vw, 3.5rem);
  min-height: 100dvh;
  padding: clamp(1.5rem, 4vw, 3rem) var(--pad-x) var(--section-y);
  max-width: var(--maxw);
  margin: 0 auto;
}
.hero__media {
  aspect-ratio: auto;
  height: 100%;
  min-height: 60dvh;
}
.hero__copy {
  align-self: center;
  padding-bottom: 2rem;
}
.hero__title {
  font-size: clamp(2.6rem, 6vw, 4.6rem);
  letter-spacing: -0.015em;
  margin-bottom: 1.5rem;
}
.hero__lead {
  font-size: clamp(1.05rem, 1.8vw, 1.28rem);
  color: var(--ink-soft);
  max-width: 40ch;
  margin: 0 0 2.25rem;
}

/* ============================================================
   2. NEIGHBORHOOD
   ============================================================ */
.neighborhood {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: var(--section-y) var(--pad-x);
}
.neighborhood__intro {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: end;
  margin-bottom: clamp(2.5rem, 5vw, 4rem);
}
.neighborhood__intro .section-title { max-width: 12ch; }

.neighborhood__frames {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: clamp(1.25rem, 3vw, 2.5rem);
  align-items: center;
}
.frame--tall { transform: translateY(2rem); }

/* ============================================================
   3. GETTING HERE  (dark, elevated location section)
   ============================================================ */
.getting-here {
  background: var(--forest);
  color: var(--cream);
}
.getting-here__inner {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: clamp(2rem, 5vw, 5rem);
  align-items: center;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: var(--section-y) var(--pad-x);
}
.getting-here__facts .section-title { margin-bottom: 2rem; }

.facts { margin: 0 0 2.5rem; }
.facts__row {
  display: grid;
  grid-template-columns: 9.5rem 1fr;
  gap: 1rem 1.5rem;
  padding: 1.15rem 0;
  border-top: 1px solid rgba(238, 240, 230, 0.16);
}
.facts__row:last-of-type { border-bottom: 1px solid rgba(238, 240, 230, 0.16); }
.facts__term {
  font-family: var(--display);
  font-size: 1.02rem;
  color: var(--terracotta);
}
.facts__desc {
  margin: 0;
  color: rgba(238, 240, 230, 0.9);
  line-height: 1.55;
}
.getting-here .link {
  color: var(--terracotta);
  border-bottom-color: rgba(192, 122, 74, 0.5);
}

/* ============================================================
   4. THE WORK
   ============================================================ */
.work {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: var(--section-y) var(--pad-x);
}
.work .section-title {
  max-width: 16ch;
  margin-bottom: clamp(2.5rem, 5vw, 4rem);
}
.looks {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: clamp(1.25rem, 2.5vw, 2rem);
}
.look { margin: 0; display: flex; flex-direction: column; }
.look__media { margin-bottom: 1.1rem; }
.look__caption { display: flex; flex-direction: column; flex: 1 1 auto; }
.look__name {
  font-size: 1.35rem;
  margin-bottom: 0.4rem;
}
.look__note {
  margin: 0 0 1rem;
  color: var(--ink-soft);
  font-size: 0.95rem;
  line-height: 1.5;
}
.look__book {
  display: inline-flex;
  align-items: center;
  align-self: flex-start;
  margin-top: auto;
  padding: 0.5rem 1.1rem;
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-decoration: none;
  color: var(--accent);
  border: 1.5px solid rgba(192, 122, 74, 0.45);
  border-radius: var(--r-pill);
  transition: transform 0.18s ease, background-color 0.25s ease, color 0.25s ease, border-color 0.25s ease;
}
.look__book:hover {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}
.look__book:active { transform: translateY(1px); }

/* ============================================================
   5. BOOK  (embedded scheduler)
   ============================================================ */
.book {
  background: var(--forest-deep);
  color: var(--cream);
}
.book__inner {
  max-width: 820px;
  margin: 0 auto;
  padding: var(--section-y) var(--pad-x);
  text-align: center;
}
.book__title {
  font-size: clamp(2.4rem, 6vw, 4rem);
  color: var(--cream);
  margin-bottom: 1.25rem;
}
.book__lead {
  font-size: clamp(1.05rem, 1.7vw, 1.2rem);
  color: rgba(238, 240, 230, 0.85);
  max-width: 54ch;
  margin: 0 auto 2.5rem;
}

/* Scheduler mount: script.js shows the Square (embed) or Calendly (injected)
   block inside this container, based on the BOOKING provider. */
.scheduler {
  max-width: 720px;
  margin: 0 auto 1.75rem;
}
/* Live Calendly widget */
.calendly-inline-widget {
  border-radius: var(--r);
  overflow: hidden;
  background: var(--cream);
}
.scheduler__fallback {
  margin: 0.9rem 0 0;
  font-size: 0.9rem;
  color: rgba(238, 240, 230, 0.65);
}
/* Square inline embed, contained so it reads as part of the page */
.square-embed {
  max-width: 680px;
  margin: 0 auto;
  min-height: 480px;
  background: var(--cream);
  border: 1px solid var(--cream-dim);
  border-radius: var(--r);
  overflow: hidden;
}
.square-embed iframe {
  width: 100% !important;
  min-height: 480px;
  border: 0;
  display: block;
}

.book__fallback {
  font-size: 1.05rem;
  color: rgba(238, 240, 230, 0.85);
  margin: 0 0 0.85rem;
}
.book .link {
  color: var(--terracotta);
  border-bottom-color: rgba(192, 122, 74, 0.5);
}
.book__meta {
  font-size: 0.9rem;
  color: rgba(238, 240, 230, 0.6);
  margin: 0;
}

/* ============================================================
   6. VOICES  (testimonials)
   ============================================================ */
.voices__inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: var(--section-y) var(--pad-x);
}
.voices .section-title {
  max-width: 16ch;
  margin-bottom: clamp(2.5rem, 5vw, 4rem);
}
.coverflow {
  max-width: 860px;
  margin: 0 auto;
  overflow: hidden; /* clip side cards so they never cause horizontal scroll */
}
.coverflow__stage {
  position: relative;
  height: 360px;
  perspective: 1400px;
  touch-action: pan-y; /* let the page scroll vertically; we handle horizontal drag */
}
.cf-card {
  position: absolute;
  left: 50%;
  top: 50%;
  width: min(330px, 80vw);
  min-height: 280px;
  margin: 0;
  padding: 2.5rem 2rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  text-align: center;
  background: var(--cream);
  border: 1px solid var(--cream-dim);
  border-radius: var(--r);
  box-shadow: 0 22px 48px rgba(24, 39, 32, 0.18);
  transform-style: preserve-3d;
  transition: transform 0.55s cubic-bezier(0.2, 0.8, 0.2, 1), opacity 0.55s ease;
  cursor: pointer;
  user-select: none;
}
.cf-card.is-active { cursor: default; }
.cf-card__stars {
  color: var(--accent);
  letter-spacing: 0.18em;
  font-size: 0.95rem;
  margin: 0 0 1rem;
}
.cf-card__quote {
  font-family: var(--display);
  font-size: clamp(1.2rem, 2vw, 1.6rem);
  line-height: 1.32;
  color: var(--ink);
  margin: 0;
}
.cf-card__name {
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--ink);
  margin: 1.35rem 0 0;
}
.cf-card__src {
  font-weight: 400;
  font-size: 0.8rem;
  color: var(--ink-soft);
  margin: 0.3rem 0 0;
}

.carousel__controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
  margin-top: 2.5rem;
}
.carousel__nav {
  width: 2.5rem;
  height: 2.5rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  line-height: 1;
  color: var(--accent);
  background: transparent;
  border: 1.5px solid rgba(192, 122, 74, 0.45);
  border-radius: var(--r-pill);
  cursor: pointer;
  transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease, transform 0.15s ease;
}
.carousel__nav:hover { background: var(--accent); border-color: var(--accent); color: #fff; }
.carousel__nav:active { transform: translateY(1px); }
.carousel__dots { display: flex; align-items: center; gap: 0.55rem; }
.carousel__dot {
  width: 9px;
  height: 9px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: var(--cream-dim);
  cursor: pointer;
  transition: background-color 0.2s ease, transform 0.2s ease;
}
.carousel__dot:hover { transform: scale(1.2); }
.carousel__dot.is-active { background: var(--accent); }

@media (prefers-reduced-motion: reduce) {
  .cf-card { transition: opacity 0.2s ease; }
}

/* ============================================================
   7. FOOTER
   ============================================================ */
.footer {
  background: var(--forest);
  color: var(--cream);
  border-top: 1px solid rgba(238, 240, 230, 0.14);
}
.footer__inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: clamp(2.5rem, 5vw, 4rem) var(--pad-x) 1.5rem;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1.5rem 3rem;
}
.footer__brand { display: flex; flex-direction: column; gap: 0.35rem; }
.footer__name {
  font-family: var(--display);
  font-size: 1.5rem;
}
.footer__tag {
  color: rgba(238, 240, 230, 0.7);
  font-size: 0.95rem;
}
.footer__contact {
  font-style: normal;
  color: rgba(238, 240, 230, 0.82);
  line-height: 1.7;
  font-size: 0.95rem;
}
.footer .link {
  color: var(--terracotta);
  border-bottom-color: rgba(192, 122, 74, 0.5);
}
.footer__legal {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 var(--pad-x) 2rem;
  font-size: 0.82rem;
  color: rgba(238, 240, 230, 0.55);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem 1.25rem;
}
.footer__links { display: flex; flex-wrap: wrap; gap: 1.25rem; }
.footer__links a {
  color: rgba(238, 240, 230, 0.7);
  text-decoration: none;
  transition: color 0.2s ease;
}
.footer__links a:hover { color: var(--terracotta); }

/* ============================================================
   LEGAL PAGES (privacy, terms)
   ============================================================ */
.legal { padding: clamp(2rem, 5vw, 3.5rem) 0 var(--section-y); }
.legal__inner { max-width: 760px; margin: 0 auto; padding: 0 var(--pad-x); }
.legal__back {
  display: inline-block;
  font-size: 0.9rem;
  color: var(--accent);
  text-decoration: none;
  margin-bottom: 1.5rem;
}
.legal__back:hover { text-decoration: underline; }
.legal__title { font-size: clamp(2rem, 5vw, 3.2rem); color: var(--ink); margin-bottom: 0.4rem; }
.legal__updated { font-size: 0.9rem; color: var(--ink-soft); margin: 0 0 2rem; }
.legal__note {
  background: var(--cream-dim);
  border-radius: var(--r);
  padding: 1rem 1.25rem;
  font-size: 0.9rem;
  color: var(--ink-soft);
  margin: 0 0 2.5rem;
}
.legal__body h2 {
  font-size: clamp(1.3rem, 2.5vw, 1.7rem);
  color: var(--ink);
  margin: 2.5rem 0 0.85rem;
}
.legal__body p {
  font-size: 1rem;
  color: var(--ink-soft);
  line-height: 1.7;
  margin: 0 0 1rem;
}
.legal__body ul { margin: 0 0 1rem; padding-left: 1.25rem; color: var(--ink-soft); line-height: 1.7; }
.legal__body li { margin-bottom: 0.4rem; }
.legal__body a { color: var(--accent); }

/* ============================================================
   SCROLL REVEALS (motivated: content arrives as you read down)
   ============================================================ */
[data-reveal] {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}
[data-reveal].is-visible {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  [data-reveal] {
    opacity: 1;
    transform: none;
    transition: none;
  }
  .btn:active { transform: none; }
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 960px) {
  .hero {
    grid-template-columns: 1fr;
    min-height: auto;
    padding-top: 2rem;
  }
  .hero__media { min-height: 48dvh; order: -1; }
  .hero__copy { padding-bottom: 0; }

  .neighborhood__intro { grid-template-columns: 1fr; align-items: start; }
  .neighborhood__frames { grid-template-columns: 1fr; }
  .frame--tall { transform: none; }

  .getting-here__inner { grid-template-columns: 1fr; }

  .looks { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 640px) {
  .topbar__nav { display: none; }
  .looks { grid-template-columns: 1fr; }
  .facts__row { grid-template-columns: 1fr; gap: 0.35rem; padding: 1rem 0; }
  .footer__inner { flex-direction: column; }
}
