/* Homepage components (phase 2). Uses the page's own tokens: --w --ow --ln --ink --inkl --inkg --teal --tealh --bdr --gold */
.hm-cases .sh,.hm-process .sh{margin-bottom:3rem}
.hm-track{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:1.5rem}
.hm-card{background:var(--w);border:1px solid var(--bdr);display:flex;flex-direction:column;min-width:0}
.hm-ba{display:grid;grid-template-columns:1fr;gap:1px;background:var(--bdr)}
.hm-ba figure{margin:0;position:relative;background:var(--ink)}
.hm-ba img{display:block;width:100%;height:auto;aspect-ratio:16/9;object-fit:cover}
.hm-tag{position:absolute;left:.6rem;top:.6rem;font-family:'DM Mono',monospace;font-size:.54rem;letter-spacing:.14em;text-transform:uppercase;color:#fff;background:rgba(26,25,22,.78);padding:.3rem .6rem}
.hm-cb{padding:1.5rem 1.5rem 1.7rem;display:flex;flex-direction:column;flex:1}
.hm-cl{font-family:'DM Mono',monospace;font-size:.54rem;letter-spacing:.14em;text-transform:uppercase;color:var(--teal);display:block;margin-bottom:.7rem}
.hm-ct{font-family:'Playfair Display',serif;font-size:1.22rem;line-height:1.3;color:var(--ink);margin:0 0 .6rem}
.hm-cp{font-size:.88rem;color:var(--inkl);line-height:1.75;margin:0 0 1.3rem}
.hm-more{margin-top:auto;font-size:.72rem;letter-spacing:.08em;text-transform:uppercase;color:var(--teal);text-decoration:none;font-weight:500}
.hm-more::after{content:' →'}
.hm-more:hover{color:var(--tealh)}
.hm-foot{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:1.2rem 2rem;margin-top:2.5rem}
.hm-chips{display:flex;flex-wrap:wrap;gap:.55rem}
.hm-chips a{font-size:.78rem;color:var(--inkm);text-decoration:none;border:1px solid var(--bdr);border-radius:999px;padding:.5rem .95rem;background:var(--w);transition:border-color .2s,color .2s}
.hm-chips a:hover{border-color:var(--teal);color:var(--teal)}

.hm-steps{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:1px;background:var(--bdr);border:1px solid var(--bdr)}
.hm-step{background:var(--w);padding:2rem 1.6rem 2.2rem}
.hm-sn{font-family:'DM Mono',monospace;font-size:.62rem;letter-spacing:.2em;color:var(--gold);display:block;margin-bottom:1.2rem}
.hm-st{font-family:'Playfair Display',serif;font-size:1.2rem;line-height:1.3;color:var(--ink);margin:0 0 .7rem}
.hm-sp{font-size:.88rem;color:var(--inkl);line-height:1.75;margin:0}
.hm-note{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:1rem 2rem;margin-top:2rem}
.hm-note p{font-size:.9rem;color:var(--inkl);line-height:1.7;margin:0;max-width:560px}

.hm-about .ag{align-items:center}
.hm-about .ap{max-width:400px}
.hm-about .ab p{font-size:.95rem}
.hm-about .bg{margin-top:.6rem}

@media(max-width:1024px){
  .hm-track{display:flex;overflow-x:auto;scroll-snap-type:x mandatory;gap:1rem;margin:0 -1.5rem;padding:0 1.5rem .8rem;scrollbar-width:none;-webkit-overflow-scrolling:touch}
  .hm-track::-webkit-scrollbar{display:none}
  .hm-card{flex:0 0 82%;max-width:420px;scroll-snap-align:center}
  .hm-steps{grid-template-columns:1fr 1fr}
  .hm-about .ag{gap:2rem}
  .hm-about .ap{max-width:300px}
}
@media(max-width:560px){
  .hm-steps{grid-template-columns:1fr}
  .hm-step{padding:1.6rem 1.4rem}
  .hm-foot,.hm-note{flex-direction:column;align-items:flex-start}
}

/* About page */
.ab-first{padding-top:9rem}
@media(max-width:1024px){.ab-first{padding-top:7rem}}

/* Section headers stack on tablet and phone (heading no longer squeezed beside the intro) */
@media(max-width:1024px){
  .sh{flex-direction:column;gap:1rem;margin-bottom:2.5rem;padding-bottom:1.5rem}
  .si{max-width:none}
}

/* h1 on the About page looks like the section h2s */
.sh h1{font-family:'Playfair Display',serif;font-size:clamp(1.9rem,3vw,2.7rem);font-weight:400;line-height:1.15;color:var(--ink);margin-bottom:.8rem}
.sh h1 em{font-style:italic;color:var(--teal)}

/* Clinical cases: one case after another, with a clear way forward */
.ba-card{scroll-margin-top:92px}
.case-next{display:inline-block;margin-top:1.6rem;font-size:.74rem;letter-spacing:.08em;text-transform:uppercase;color:var(--teal);text-decoration:none;font-weight:500;border-bottom:1px solid rgba(27,74,82,.3);padding-bottom:.25rem;transition:color .2s,border-color .2s}
.case-next:hover{color:var(--tealh);border-color:var(--tealh)}
