/* home.css — homepage-only layout. Loaded after style.css and about-clinic.css.
   Colours and fonts come from the :root tokens in style.css. */

/* ---------- Shared buttons ---------- */
.home-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 48px;
  padding: 0.85rem 1.75rem;
  border-radius: 4px;
  border: 1px solid transparent;
  font-family: var(--font-sans);
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  text-decoration: none;
  transition: box-shadow 0.2s ease, background 0.2s ease, color 0.2s ease;
}
.home-btn--gold {
  background: var(--color-secondary);
  border-color: var(--color-secondary);
  color: var(--color-primary);
}
.home-btn--gold:hover { box-shadow: 0 8px 24px rgba(212, 193, 140, 0.4); }
.home-btn--line {
  background: transparent;
  border-color: rgba(255, 255, 255, 0.45);
  color: var(--color-white);
}
.home-btn--line:hover { border-color: var(--color-secondary); color: var(--color-secondary); }
.home-btn--navy {
  background: var(--color-primary);
  border-color: var(--color-primary);
  color: var(--color-white);
}
.home-btn--navy:hover { box-shadow: var(--shadow-lifted); }
.home-btn:focus-visible,
.picker-tab:focus-visible,
.picker-links a:focus-visible,
.hero-shortcuts a:focus-visible,
.story-play:focus-visible {
  outline: 2px solid var(--color-white);
  outline-offset: 2px;
  box-shadow: 0 0 0 4px var(--color-primary);
}

.home-section { padding: 4rem 0; scroll-margin-top: 5rem; }
.home-section--cream { background: var(--color-bg-light); }
.home-section--white { background: var(--color-white); }
.home-head { text-align: center; max-width: 640px; margin: 0 auto 2rem; }
.home-eyebrow {
  display: block;
  margin-bottom: 0.6rem;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--color-text-light);
}
.home-head h2 { font-size: 2rem; line-height: 1.2; }
.home-head p { margin-top: 0.75rem; color: var(--color-text-light); line-height: 1.7; }

/* ---------- First screen ---------- */
.hero-eyebrow {
  display: block;
  margin-bottom: 1rem;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--color-secondary);
}
.hero-title { font-size: clamp(2.4rem, 4.4vw, 4rem); line-height: 1.08; letter-spacing: 0; margin-bottom: 1.1rem; }
.hero-subtitle { max-width: 56ch; margin-bottom: 1.75rem; opacity: 0.92; line-height: 1.65; }
.hero-shortcuts { margin-top: 2rem; }
.hero.film .hero-shortcuts ul { justify-content: flex-start; }
.hero-shortcuts__label {
  display: block;
  margin-bottom: 0.7rem;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.75);
}
.hero-shortcuts ul {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem;
  margin: 0;
  padding: 0;
  list-style: none;
}
.hero-shortcuts a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0.5rem 1rem;
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.45);
  color: var(--color-white);
  font-size: 0.9rem;
  font-weight: 500;
  text-decoration: none;
  transition: border-color 0.2s ease, color 0.2s ease;
}
.hero-shortcuts a:hover { border-color: var(--color-secondary); color: var(--color-secondary); }

/* ---------- Treatment index ----------
   Wide screens: the heading and the seven areas stay pinned on the left while the open
   area (picture, then its treatments) sits on the right. Phones: the areas are one
   swipe row of words above the open area. Without JavaScript the area list is hidden
   and all seven areas show, one under the other. */
.picker { padding: clamp(3.5rem, 8vw, 7rem) 0; }
.picker .container { max-width: 1240px; }
.picker .home-head { max-width: none; margin: 0 0 1.75rem; text-align: left; }
.picker .home-head h2 { font-size: clamp(2.2rem, 4.6vw, 4rem); line-height: 1.02; }
.picker .home-head p { max-width: 34ch; }
.picker .home-eyebrow { color: var(--color-primary); }

.picker-tabs { display: flex; flex-direction: column; border-top: 1px solid rgba(15, 23, 42, 0.14); }
.picker-tab {
  display: grid;
  grid-template-columns: 2.25rem 1fr auto;
  align-items: baseline;
  gap: 0.5rem;
  width: 100%;
  min-height: 56px;
  padding: 0.7rem 0;
  border: 0;
  border-bottom: 1px solid rgba(15, 23, 42, 0.14);
  background: none;
  color: var(--color-text-light);
  text-align: left;
  cursor: pointer;
  transition: color 0.25s ease, padding-left 0.35s cubic-bezier(0.2, 0.7, 0.2, 1);
}
.picker-tab__n { font-family: var(--font-sans); font-size: 0.72rem; font-weight: 600; letter-spacing: 1.5px; font-variant-numeric: tabular-nums; }
.picker-tab__name { font-family: var(--font-serif); font-size: clamp(1.5rem, 2.3vw, 2.1rem); line-height: 1.1; }
.picker-tab__count { font-family: var(--font-sans); font-size: 0.78rem; letter-spacing: 0.3px; }
.picker-tab:hover { color: var(--color-primary); padding-left: 0.5rem; }
.picker-tab[aria-selected="true"] { color: var(--color-primary); padding-left: 0.9rem; box-shadow: inset 3px 0 0 var(--color-secondary); }
.picker-tab[aria-selected="true"] .picker-tab__n { color: var(--color-primary); }
.picker-tab:focus-visible { outline: 2px solid var(--color-primary); outline-offset: 2px; box-shadow: none; }
.picker:not(.is-ready) .picker-tabs { display: none; }

.picker-panel { scroll-margin-top: 7rem; margin-bottom: 2.5rem; }
.picker.is-ready .picker-panel { margin-bottom: 0; }
.picker.is-ready .picker-panel[hidden] { display: none; }
.picker.is-ready .picker-panel:not([hidden]) { animation: picker-in 0.55s cubic-bezier(0.2, 0.7, 0.2, 1); }
@keyframes picker-in { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }

.picker-panel__hero {
  position: relative;
  display: flex;
  align-items: flex-end;
  min-height: clamp(220px, 30vw, 380px);
  border-radius: 12px;
  overflow: hidden;
  background: var(--color-primary);
  color: var(--color-white);
}
.picker-panel__hero img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.picker.is-ready .picker-panel:not([hidden]) .picker-panel__hero img { animation: picker-zoom 1.4s cubic-bezier(0.2, 0.7, 0.2, 1); }
@keyframes picker-zoom { from { transform: scale(1.08); } to { transform: none; } }
.picker-panel__hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(15, 23, 42, 0.88) 0%, rgba(15, 23, 42, 0.3) 55%, rgba(15, 23, 42, 0.05) 100%);
}
.picker-panel__words { position: relative; z-index: 1; padding: 1.5rem clamp(1.25rem, 2.5vw, 2rem); }
.picker-panel__words h3 { font-size: clamp(1.6rem, 2.6vw, 2.4rem); line-height: 1.1; color: var(--color-white); }
.picker-panel__words p { margin-top: 0.35rem; color: rgba(255, 255, 255, 0.88); }

.picker-links {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: 2.5rem;
  margin: 0.75rem 0 0;
  padding: 0;
  list-style: none;
  counter-reset: treat;
}
.picker-links li { counter-increment: treat; }
.picker-links a {
  display: grid;
  grid-template-columns: 2rem 1fr auto;
  align-items: center;
  gap: 0.5rem;
  min-height: 56px;
  padding: 0.6rem 0;
  border-bottom: 1px solid rgba(15, 23, 42, 0.12);
  color: var(--color-primary);
  font-size: 1.05rem;
  font-weight: 500;
  text-decoration: none;
  transition: color 0.2s ease, padding-left 0.35s cubic-bezier(0.2, 0.7, 0.2, 1);
}
.picker-links a::before {
  content: counter(treat, decimal-leading-zero);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 1px;
  color: var(--color-text-light);
  font-variant-numeric: tabular-nums;
}
.picker-links a::after { content: "\2192"; color: var(--color-primary); opacity: 0.45; transition: transform 0.35s cubic-bezier(0.2, 0.7, 0.2, 1), opacity 0.2s ease; }
.picker-links a:hover { padding-left: 0.5rem; }
.picker-links a:hover::after { transform: translateX(6px); opacity: 1; }
.picker-links a:focus-visible { outline: 2px solid var(--color-primary); outline-offset: 2px; box-shadow: none; }
.picker-help { margin-top: 1.75rem; color: var(--color-text-light); }
.picker-help a { color: var(--color-primary); font-weight: 600; }

@media (min-width: 769px) {
  .picker__layout { display: grid; grid-template-columns: minmax(280px, 0.8fr) minmax(0, 1.4fr); gap: clamp(2rem, 5vw, 5rem); align-items: start; }
  .picker.is-ready .picker__side { position: sticky; top: calc(var(--hdr, 76px) + 2rem); }
}
@media (max-width: 768px) {
  .picker .home-head { margin-bottom: 1.1rem; }
  /* One swipe row of words. The row runs to both screen edges. */
  .picker-tabs {
    flex-direction: row;
    gap: 1.4rem;
    margin: 0 -1.25rem 1.1rem;
    padding: 0 1.25rem;
    overflow-x: auto;
    border-top: 0;
    border-bottom: 1px solid rgba(15, 23, 42, 0.14);
    scrollbar-width: none;
  }
  .picker-tabs::-webkit-scrollbar { display: none; }
  .picker-tab { display: block; flex: 0 0 auto; width: auto; min-height: 48px; padding: 0.5rem 0; border-bottom: 3px solid transparent; }
  .picker-tab__n, .picker-tab__count { display: none; }
  .picker-tab__name { font-size: 1.45rem; white-space: nowrap; }
  .picker-tab:hover { padding-left: 0; }
  .picker-tab[aria-selected="true"] { padding-left: 0; box-shadow: none; border-bottom-color: var(--color-secondary); }
  .picker-panel__hero { min-height: 200px; }
  .picker-links { grid-template-columns: 1fr; }
  .picker-links a { min-height: 52px; font-size: 1rem; }
}
@media (prefers-reduced-motion: reduce) {
  .picker.is-ready .picker-panel:not([hidden]),
  .picker.is-ready .picker-panel:not([hidden]) .picker-panel__hero img { animation: none; }
  .picker-tab, .picker-links a, .picker-links a::after { transition: none; }
}

/* ---------- Patient stories ---------- */
.stories-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 280px));
  justify-content: center;
  gap: 1.25rem;
}
.story { margin: 0; }
.story-frame {
  position: relative;
  aspect-ratio: 9 / 16;
  border-radius: 12px;
  overflow: hidden;
  background: var(--color-primary);
}
.story-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.story-play {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.9rem;
  padding: 1rem;
  color: var(--color-white);
  text-align: center;
  text-decoration: none;
}
.story-play__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 64px;
  height: 64px;
  border: 2px solid var(--color-secondary);
  border-radius: 50%;
  color: var(--color-secondary);
  transition: background 0.2s ease, color 0.2s ease;
}
.story-play:hover .story-play__icon { background: var(--color-secondary); color: var(--color-primary); }
.story-play__title { font-family: var(--font-serif); font-size: 1.1rem; line-height: 1.3; }
.story-play__meta { font-size: 0.8rem; color: rgba(255, 255, 255, 0.75); }
.story figcaption { margin-top: 0.6rem; font-size: 0.9rem; color: var(--color-text-light); text-align: center; }
.story figcaption a { color: var(--color-primary); font-weight: 600; }

/* ---------- Doctor ---------- */
.home-doctor { background: var(--color-primary); color: rgba(255, 255, 255, 0.85); }
.home-doctor__inner {
  display: grid;
  grid-template-columns: 240px 1fr;
  align-items: center;
  gap: 2.5rem;
  max-width: 900px;
  margin: 0 auto;
}
.home-doctor__photo img {
  display: block;
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border: 2px solid var(--color-secondary);
  border-radius: 12px;
}
.home-doctor .home-eyebrow { color: var(--color-secondary); }
.home-doctor h2 { font-size: 2rem; color: var(--color-white); }
.home-doctor__role { margin: 0.4rem 0 1rem; font-size: 0.95rem; color: var(--color-secondary); }
.home-doctor p { line-height: 1.75; }
.home-doctor__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 0.75rem 1.5rem; margin-top: 1.5rem; }
.home-doctor__link { color: var(--color-white); font-weight: 500; }
.home-doctor__link:hover { color: var(--color-secondary); }

/* ---------- First visit ---------- */
.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
  max-width: 960px;
  margin: 0 auto;
  padding: 0;
  list-style: none;
  counter-reset: step;
}
.steps li {
  counter-increment: step;
  padding: 1.75rem;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  background: var(--color-white);
}
.steps li::before {
  content: counter(step);
  display: block;
  margin-bottom: 0.5rem;
  font-family: var(--font-serif);
  font-size: 2rem;
  line-height: 1;
  color: var(--color-primary);
}
.steps h3 { font-size: 1.2rem; margin-bottom: 0.4rem; }
.steps p { color: var(--color-text-light); line-height: 1.65; }
.steps-cta { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.75rem; margin-top: 2rem; }
.steps-cta .home-btn--line { border-color: var(--color-primary); color: var(--color-primary); }
.steps-cta .home-btn--line:hover { background: var(--color-primary); color: var(--color-white); }
.steps-cta .home-btn:focus-visible { outline-color: var(--color-primary); box-shadow: none; }

/* ---------- Fold-away reference rows in the About band ---------- */
#about-clinic .home-fold > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  cursor: pointer;
  list-style: none;
}
#about-clinic .home-fold > summary::-webkit-details-marker { display: none; }
#about-clinic .home-fold > summary::after { content: "+"; font-size: 1.5rem; line-height: 1; color: var(--color-text-light); }
#about-clinic .home-fold[open] > summary::after { content: "\2212"; }
#about-clinic .home-fold > summary .clinic-sub__title { margin: 0; text-align: left; }
#about-clinic .home-fold[open] > summary { margin-bottom: 1.25rem; }
#about-clinic .clinic-sub:has(> .home-fold:not([open])) { padding-top: 1.25rem; padding-bottom: 1.25rem; }

/* ---------- Phone bottom bar ---------- */
.home-bar { display: none; }

@media (max-width: 768px) {
  .home-section { padding: 3rem 0; }
  .home-head h2, .home-doctor h2 { font-size: 1.6rem; }

  .hero__media { background-image: url("../images/clinic-walk-poster-phone.webp"); }
  .hero__scrim { background: linear-gradient(0deg, rgba(15, 23, 42, 0.94) 0%, rgba(15, 23, 42, 0.78) 46%, rgba(15, 23, 42, 0.15) 78%, rgba(15, 23, 42, 0.35) 100%); }
  .hero__content { padding: 9rem 1.25rem 1.5rem; }
  .film-chapter { top: 1rem; right: auto; left: 1.25rem; font-size: 0.7rem; }
  .hero-eyebrow { font-size: 0.7rem; margin-bottom: 0.75rem; }
  .hero-title { font-size: 1.9rem; margin-bottom: 0.8rem; }
  .hero-subtitle { font-size: 0.92rem; margin-bottom: 1.1rem; }
  .rail__stage { overflow: visible; padding-bottom: 3rem; }
  .rail__track { overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; padding-bottom: 0.5rem; }
  .rail__track::-webkit-scrollbar { display: none; }
  .rail-card { scroll-snap-align: center; }
  .rail-card a { height: 52vh; }
  .hero-buttons { gap: 0.6rem; }
  .hero-buttons .home-btn { width: 100%; max-width: 340px; }
  .hero-shortcuts { margin-top: 1.1rem; }
  /* One swipe row, so the five treatments never push the buttons off the first screen. */
  .hero.film .hero-shortcuts ul { flex-wrap: nowrap; overflow-x: auto; margin: 0 -1.25rem; padding: 0 1.25rem; scrollbar-width: none; }
  .hero.film .hero-shortcuts ul::-webkit-scrollbar { display: none; }
  .hero-shortcuts li { flex: 0 0 auto; }
  .hero-shortcuts a { font-size: 0.85rem; padding: 0.45rem 0.85rem; white-space: nowrap; }


  .stories-grid { gap: 0.75rem; }
  .story-play__title { font-size: 0.95rem; }
  .story-play__icon { width: 52px; height: 52px; }

  .home-doctor__inner { grid-template-columns: 1fr; gap: 1.5rem; text-align: center; }
  .home-doctor__photo { max-width: 180px; margin: 0 auto; }
  .home-doctor__actions { justify-content: center; }

  .steps { grid-template-columns: 1fr; gap: 0.75rem; }
  .steps li { display: grid; grid-template-columns: 2.25rem 1fr; column-gap: 0.75rem; padding: 1.1rem 1.25rem; }
  .steps li::before { grid-row: span 2; margin: 0; }
  .steps-cta .home-btn { width: 100%; max-width: 340px; }

  body { padding-bottom: calc(64px + env(safe-area-inset-bottom)); }
  .home-bar {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 900;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
    padding: 0.5rem 0.75rem calc(0.5rem + env(safe-area-inset-bottom));
    background: var(--color-primary);
    box-shadow: 0 -4px 20px rgba(15, 23, 42, 0.2);
    transition: transform 0.25s ease;
  }
  .home-bar.is-tucked { transform: translateY(110%); }
  .home-bar a {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    border-radius: 4px;
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    text-decoration: none;
  }
  .home-bar__book { background: var(--color-secondary); color: var(--color-primary); }
  .home-bar__chat { background: #25d366; color: var(--color-primary); }

  /* Cookie notice: same words and both buttons, in one slim row instead of a
     block that covers the booking buttons. It sits above the bottom bar. */
  body .cc-banner {
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: center;
    gap: 0.6rem;
    padding: 0.5rem 0.75rem;
    text-align: left;
    font-size: 0.72rem;
    line-height: 1.35;
  }
  body.home-bar-on .cc-banner { bottom: calc(64px + env(safe-area-inset-bottom)); }
  /* While the notice is open, the first-screen offer moves up so the notice
     does not sit on WhatsApp or the treatment shortcuts. */
  body:has(.cc-banner.cc-visible) .hero.film .hero__content { padding-top: 2rem; padding-bottom: 8.5rem; }
  body .cc-banner p { flex: 1 1 auto; }
  body .cc-banner .cc-btns { width: auto; flex-direction: column; gap: 0.35rem; }
  body .cc-banner .cc-btn { flex: none; min-width: 88px; min-height: 44px; padding: 0.35rem 0.6rem; font-size: 0.75rem; }
}

/* Wide screens: the open notice is one row, so a smaller lift clears the shortcuts. */
@media (min-width: 769px) {
  body:has(.cc-banner.cc-visible) .hero.film .hero__content { padding-bottom: 5.5rem; }
}

/* Short phones: no room for the shortcut row above the open notice. The same
   five links are in the treatment rail just below. */
@media (max-width: 768px) and (max-height: 650px) {
  body:has(.cc-banner.cc-visible) .hero.film .hero-shortcuts { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .home-bar, .home-btn, .picker-tab, .rail-card img { transition: none; }
}
