/* Neko's measured rhythm, adapted to Yoda's original colour and type system.
   This file deliberately does not target the masthead or its scroll classes. */
body:not(.yl-detail-page) { --home-ease: cubic-bezier(.22,1,.36,1); }
.home-hero-track { position: relative; background: var(--void); }
.home-hero-track #top {
  position: sticky; top: 0; height: 100svh; min-height: 640px;
  clip-path:none; overflow:visible; background:transparent;
  corner-shape: var(--site-corner-shape);
}
#top .hero-inner { opacity: var(--home-copy-opacity,1); translate: 0 var(--home-copy-y,0px); }
#top #hero-h { font-size: clamp(54px,5.8vw,100px); line-height: 1; max-width: 16ch; margin-inline: auto; }
#top .hero-text { font-size: 18px; line-height: 1.55; max-width: 38em; }
#top .home-gold-mark { position:absolute; inset:0; z-index:4; pointer-events:none; opacity:var(--home-gold-opacity,0); }
#top .home-gold-canvas { width:100%; height:100%; display:block; }
#top .home-gold-fallback {
  position:absolute; left:50%; top:50%; width:var(--home-gold-width,280px); aspect-ratio:1038/720;
  transform:translate(-50%,-50%) rotateY(-15deg); background:linear-gradient(125deg,#f5e4c6,#e7c089 35%,#8d653b 60%,#e7c089 83%);
  mask:url('/assets/brand/YODA-Symbol-starlight.svg') center/contain no-repeat;
  -webkit-mask:url('/assets/brand/YODA-Symbol-starlight.svg') center/contain no-repeat;
}
#top[data-gold-renderer="live"] .home-gold-fallback { display:none; }
#top::before { content:''; position:absolute; inset:0; z-index:5; pointer-events:none; background:var(--void); opacity:var(--home-end-fade,0); }

/* Large editorial headings, shorter reading measures and one shared outer frame. */
html body #quiet-story .quiet-title,
html body #beyond .bh-h, html body #care .cf-h, html body #programs .pg-h,
html body #myhealth .mh-h, html body #about h2, html body #faq .faq-h {
  font:400 clamp(44px,4.7vw,68px)/1.16 var(--f-display) !important;
  letter-spacing:-.035em !important; text-wrap:balance;
}
html body #care .cf-head, html body #programs .pg-head {
  display:grid !important; grid-template-columns:minmax(0,1fr) minmax(0,.7fr); align-items:end;
  max-width:none; gap:64px; margin:0 !important; text-align:left;
}
html body #care .cf-h, html body #programs .pg-h { max-width:16ch; text-align:left; }
html body #care .cf-intro, html body #programs .pg-intro {
  max-width:40ch; margin:0 0 6px auto !important; text-align:left; font-size:18px; line-height:1.6;
}
#myhealth .mh-head > div { display:grid; grid-template-columns:1fr .7fr; gap:64px; align-items:end; width:100%; }
#myhealth .mh-h { max-width:16ch; text-align:left; }
#myhealth .mh-lead { max-width:40ch; margin:0 0 6px auto; font-size:18px; line-height:1.6; text-align:left; }
html body #care .cf-list, html body #programs .pg-list { gap:24px; }
html body #care .cf-tile { min-height:560px; }
#care .cf-copy { padding:32px; }
html body #programs .pg-card { padding:40px; min-height:340px; border:0; box-shadow:none; }
#programs .pg-t { font-size:32px; line-height:1.2; }
#programs .pg-d { font-size:16px; line-height:1.6; }
#programs .pg-foot { margin-top:40px; }
#myhealth.mh-pastel .mh-card-copy { padding-inline:32px; }
#myhealth.mh-pastel .mh-connected { margin-top:64px; gap:40px; }
#about .yl-about-inner { display:grid; grid-template-columns:minmax(0,.85fr) minmax(0,1.15fr); gap:80px; align-items:start; }
html body #about h2 { margin:0; max-width:12ch; text-align:left; }
#about .yl-about-grid { display:grid; grid-template-columns:1fr; gap:32px; }
#about article { grid-row:auto; display:block; padding:0; border:0; border-radius:0; background:none; box-shadow:none; }
#about article h3 { margin:0 0 12px; font:400 32px/1.25 var(--f-display); letter-spacing:-.025em; }
#about article p { max-width:62ch; font-size:18px; line-height:1.65; }
#faq { display:grid; grid-template-columns:minmax(0,.85fr) minmax(0,1.15fr); gap:80px; align-items:start; }
html body #faq .faq-h { margin:0; text-align:left; }
#faq .faq-list { width:100%; margin:0; }
#faq .faq-q { font-size:22px; line-height:1.4; padding-block:28px; }
#final-cta .fc-h { font-size:clamp(54px,5.8vw,100px); line-height:1.04; max-width:15ch; }

/* Heading and permanent arrow only. Horizon cards never move on hover. */
html[data-s2] #quiet-story.da.da-direct .qx-path {
  min-height:0; height:420px; padding:32px; display:flex; flex-direction:column; justify-content:flex-end !important; transform:none !important;
  box-shadow:none !important; border:0; transition:none !important;
}
html[data-s2] #quiet-story.da.da-direct .qx-path .qx-copy { min-height:0; width:100%; padding-right:64px; }
html[data-s2] #quiet-story.da.da-direct .qx-path .qx-copy h3 {
  font:400 clamp(26px,2.2vw,36px)/1.14 var(--f-display); letter-spacing:-.035em; white-space:normal;
}
html[data-s2] #quiet-story.da.da-direct .qx-path::after {
  height:48%; inset:auto 0 0; background:linear-gradient(0deg,#eae2d3 0%,#eae2d3 28%,rgba(234,226,211,0) 100%) !important;
}
html[data-s2] #quiet-story.da.da-direct .qx-path .qx-fig { inset:0 !important; width:100% !important; height:100% !important; }
html[data-s2] #quiet-story.da.da-direct .qx-path .qx-fig img {
  object-fit:contain; object-position:center 8% !important; transform:scale(1.25) !important;
  transform-origin:50% 8% !important; transition:none !important;
}
.qx-arrow { position:absolute; bottom:26px; right:26px; display:grid; place-items:center; width:52px; height:52px;
  border-radius:50%; color:var(--void); background:rgba(244,242,237,.92); }
.qx-arrow svg { width:24px; height:24px; }
html[data-s2] #quiet-story.da.da-direct .qx-path:has(a:focus-visible) { outline:2px solid var(--gold); outline-offset:5px; }

/* One subtle lift for section introductions. Cards remain legible while entering. */
.home-arrival { opacity:1; }
@media (prefers-reduced-motion:no-preference) {
  .home-arrival.is-awaiting { opacity:0; translate:0 24px; }
  .home-arrival { transition:opacity .8s var(--home-ease),translate 1s var(--home-ease); }
  html.js #care [data-cf], html.js #programs [data-pg] { transition-duration:.8s,1s; }
  #care .cf-fig img { transition:scale 1.2s var(--home-ease); }
  @media (hover:hover) {
    #care .cf-tile:hover .cf-fig img { scale:1.035; }
    #programs .pg-card { transition:background-color .35s ease; }
    #programs .pg-card:hover { background-color:rgba(231,192,137,.2); }
  }
}
@media (max-width:1199px) {
  html body #programs .pg-card { padding:32px; min-height:300px; }
  #about .yl-about-inner, #faq { gap:48px; }
}
@media (max-width:1000px) {
  html[data-s2="1"] #quiet-story.da.da-direct .da-board { grid-template-columns:repeat(3,minmax(0,1fr)); grid-template-areas:'title title title' 'body body body' 'facts facts facts' 'male female junior' 'offer offer offer' 'addons addons addons'; }
  html[data-s2] #quiet-story.da.da-direct .qx-path { height:340px; padding:22px; }
  html[data-s2] #quiet-story.da.da-direct .qx-path .qx-copy { padding-right:0; padding-bottom:56px; }
  .qx-arrow { bottom:20px; right:20px; width:44px; height:44px; }
  html body #care .cf-head, html body #programs .pg-head, #myhealth .mh-head > div { gap:32px; }
}
@media (max-width:767px) {
  .home-hero-track #top { min-height:560px; }
  #top #hero-h { font-size:54px; max-width:12ch; }
  #top .hero-text { font-size:16px; line-height:1.55; }
  html body #quiet-story .quiet-title, html body #beyond .bh-h, html body #care .cf-h, html body #programs .pg-h,
  html body #myhealth .mh-h, html body #about h2, html body #faq .faq-h { font-size:40px !important; line-height:1.1 !important; }
  html body #care .cf-head, html body #programs .pg-head, #myhealth .mh-head > div { display:block !important; }
  html body #care .cf-intro, html body #programs .pg-intro, #myhealth .mh-lead { margin:24px 0 0 !important; font-size:16px; }
  html body #care .cf-list, html body #programs .pg-list { gap:20px; }
  html body #care .cf-tile { min-height:500px; }
  #care .cf-copy { padding:24px; }
  html body #programs .pg-card { padding:28px; min-height:260px; }
  #programs .pg-t { font-size:28px; }
  #myhealth.mh-pastel .mh-card-copy { padding-inline:24px; }
  #myhealth.mh-pastel .mh-connected { margin-top:40px; gap:28px; }
  #about .yl-about-inner, #faq { grid-template-columns:1fr; gap:40px; }
  #about article h3 { font-size:28px; }
  #about article p { font-size:16px; line-height:1.6; }
  #faq .faq-q { font-size:20px; padding-block:24px; }
  #final-cta .fc-h { font-size:54px; }
}
@media (max-width:599px) {
  html[data-s2="1"] #quiet-story.da.da-direct .da-board { grid-template-columns:minmax(0,1fr); grid-template-areas:'title' 'body' 'facts' 'male' 'female' 'junior' 'offer' 'addons'; }
  html[data-s2] #quiet-story.da.da-direct .qx-path { height:350px; padding:26px; }
  html[data-s2] #quiet-story.da.da-direct .qx-path .qx-copy { padding:0 56px 0 0; }
  html[data-s2] #quiet-story.da.da-direct .qx-path .qx-copy h3 { font-size:28px; }
  .qx-arrow { bottom:22px; right:22px; }
}
@media (prefers-reduced-motion:reduce) {
  .home-hero-track { height:auto !important; }
  .home-hero-track #top { position:relative; clip-path:none; }
  #top .hero-inner { opacity:1; translate:none; }
  #top .home-gold-mark { opacity:0; }
  #top::before { opacity:0; }
  .home-arrival.is-awaiting { opacity:1; translate:none; }
}
@media (min-width:768px) {
  #care .cf-t { font-size:32px; line-height:1.2; }
  #programs .pg-t { min-height:2.4em; padding-top:0; margin-top:28px !important; }
}

/* Body-area summary removed: close its former grid rows as well. */
@media (min-width:1001px) {
  html[data-s2="1"] #quiet-story.da.da-direct .da-board {
    grid-template-areas:'title title title' 'body body body' 'facts facts facts' 'male female junior' 'offer offer offer' 'addons addons addons';
  }
}

/* Clip the photo and its shade, never the gold canvas above them. The rounded
   frame stays small while the symbol grows beyond all four edges. */
html body .home-hero-track #top { clip-path:none; overflow:visible; background:transparent; }
.home-hero-track #top .hero-photo,
.home-hero-track #top::before,
.home-hero-track #top::after {
  clip-path:inset(calc(var(--home-morph,0) * 20px) calc(var(--home-morph,0) * var(--site-gutter)) round calc(var(--home-morph,0) * var(--site-card-radius)));
}
@media(prefers-reduced-motion:reduce) {
  .home-hero-track #top .hero-photo,.home-hero-track #top::before,.home-hero-track #top::after { clip-path:none; }
}

/* Keep text visible through the logo opening while concealing outer-edge spill. */
@media (min-width:768px) and (prefers-reduced-motion:no-preference) {
  html body .home-hero-track #top { opacity:var(--home-scene-opacity,1); }
  html body #quiet-story.home-next-reveal { background:#f4f2ed; }
  html body #quiet-story.home-next-reveal > .quiet-stage { clip-path:var(--home-next-bounds,none); }
  html body #quiet-story.home-next-reveal .da-board { clip-path:var(--home-next-clip,none); }
}
