/* Owner JPEG composition, not a screenshot canvas. Shared KUB tokens still
   own type families, controls, surfaces, states and navigation. Local selectors
   choose those roles and arrange this homepage's ink, media and artwork. */
.homepage {
  --home-gutter: clamp(1.25rem, 3.85vw, 8rem);
  --home-hero-gutter: clamp(1.5rem, 6.1vw, 11.25rem);
  --home-gap: clamp(.75rem, 1.6vw, 2.5rem);
  --home-band-space: clamp(1rem, 1.666667vw, 3rem);
}
.homepage .page-pad { padding-inline: max(var(--home-gutter), calc((100% - 175rem) / 2)); }
.homepage .section { padding-block: var(--home-band-space); }
.homepage .kicker { margin-bottom: 0; font-size: var(--text-body); }
.homepage main .link-action { font-size: var(--text-body); }
.home-masks { position: absolute; width: 0; height: 0; pointer-events: none; }
.home-hero, .home-about, .home-trial { position: relative; isolation: isolate; }
.home-art { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: fill; z-index: -1; pointer-events: none; }
.homepage .site-header { position: absolute; inset: 0 0 auto; z-index: 20; background: transparent; }
.homepage .skip-link { z-index: 30; }
.homepage .home-hero { padding: max(8rem, 7.6vw) var(--home-hero-gutter) var(--space-3); }
.home-hero-grid { display: grid; grid-template-columns: minmax(0, 53%) minmax(0, 47%); align-items: end; max-width: 175rem; margin-inline: auto; }
.home-hero-copy { color: var(--on-accent); min-width: 0; position: relative; z-index: 2; }
.home-hero-copy > p { max-width: 34em; }
.home-mark { width: min(38.5vw, 61.25rem); max-width: 100%; }
.home-lettering { width: min(47.85vw, 73.75rem); max-width: none; margin-left: -2.25vw; margin-top: -2.9vw; }
.home-lettering img { width: 100%; }
.home-hero-lead { font-size: var(--text-body); line-height: var(--line-control); text-transform: uppercase; margin-top: var(--space-2); }
.home-hero-body { font-size: var(--text-body); line-height: var(--line-control); margin-top: var(--space-1); }
.home-hero-copy .filter-chips { margin-block: var(--space-2) 0; gap: var(--space-2); }
.home-hero-scene { position: absolute; inset: 0; pointer-events: none; }
.home-hero-photo { position: absolute; bottom: 0; left: 47%; width: min(47vw, 68.75rem); }
.home-hero-note { position: absolute; top: 12%; right: var(--home-gutter); width: min(13vw, 17.8125rem); }
.home-hero-values { position: absolute; top: 43%; right: var(--home-gutter); color: var(--muted); font-size: var(--text-body); line-height: var(--line-control); }
/* Headline/compact-copy roles come from accepted tokens. Their local role
   selection is justified by the JPEG's hierarchy, not a second scale system. */
.home-editorial-title { font-size: var(--text-h1); line-height: .94; }
.home-editorial-body, .home-card-body { font-size: var(--text-body); line-height: var(--line-control); }
.home-about { display: grid; grid-template-columns: minmax(0, 33%) minmax(0, 67%); align-items: end; }
.homepage .home-about { padding-top: var(--space-1); padding-bottom: 0; }
.home-about-copy { position: relative; z-index: 1; max-width: 33em; align-self: start; padding-top: var(--space-1); padding-bottom: var(--space-2); }
.home-about-copy .home-editorial-title { letter-spacing: -.045em; }
.home-about-copy > .home-editorial-body { max-width: 26em; margin-top: var(--space-1); }
.home-about-copy > .link-action { display: inline-block; margin-top: var(--space-1); }
.home-you { width: 3.2em; }
.home-about-scene { position: relative; align-self: end; width: 109%; margin-left: -9%; aspect-ratio: 565 / 256; }
.home-about-photo { position: absolute; bottom: 0; left: 4%; width: 92%; clip-path: url(#kub-home-about-cutout); }
.home-about-note { position: absolute; right: 0; top: 0; width: 19%; }
.home-section-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: var(--home-gap); margin-bottom: var(--space-2); }
.home-directions .home-editorial-title { font-size: var(--text-display); letter-spacing: -.035em; }
.home-direction-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--home-gap); }
.home-directions .media { aspect-ratio: 185 / 146; }
.home-direction-grid > article, .home-teacher-grid > article, .home-event-grid > article { padding: 0; min-width: 0; }
.home-card-copy { padding: var(--space-1) var(--space-2); }
.home-card-copy h3 { margin-top: 0; }
.home-card-copy h3 a { display: flex; justify-content: space-between; gap: var(--space-1); color: inherit; text-decoration: none; }
.home-card-copy h3 span[aria-hidden] { color: var(--accent); }
.home-card-copy .home-card-body { margin-top: var(--space-1); }
.home-direction-title { font-size: var(--text-h3); line-height: var(--line-heading); letter-spacing: -.035em; }
.homepage .home-directions { padding-block: var(--space-2) var(--space-1); background: var(--subtle); position: relative; isolation: isolate; }
.home-directions > .note { margin-top: var(--space-1); }
.home-why { display: grid; grid-template-columns: minmax(0, 30.3%) minmax(0, 69.7%); align-items: stretch; }
.homepage .home-why { padding: 0; }
.home-why-title { position: relative; padding: var(--space-2) var(--space-2) var(--space-5) var(--home-gutter); border-radius: 0 var(--space-4) var(--space-4) 0; }
.home-why-title h2 { letter-spacing: -.04em; }
.home-why-line { position: absolute; width: 62%; right: var(--space-3); bottom: var(--space-1); }
.home-benefits { display: grid; grid-template-columns: 1.12fr 1fr 1fr 1.1fr; gap: var(--space-2); padding: var(--space-2) var(--home-gutter) var(--space-2) var(--space-3); }
.home-benefits article + article { border-left: 1px solid var(--line); padding-left: var(--space-2); }
.home-benefit-icon { width: var(--space-5); }
.home-benefit-title { color: var(--text); font-family: var(--font-body); font-size: var(--text-body); line-height: var(--line-control); margin-top: var(--space-1); letter-spacing: -.035em; }
.home-benefits .home-card-body { margin-top: var(--space-1); }
.home-teachers, .home-events { position: relative; isolation: isolate; display: grid; grid-template-columns: minmax(0, 23%) minmax(0, 77%); column-gap: 0; row-gap: var(--space-1); }
.homepage .home-teachers { background: var(--subtle); padding-block: var(--space-2); }
.home-side-copy { padding-right: var(--home-gap); }
.home-side-copy > * + * { margin-top: var(--space-1); }
.home-side-copy .link-action { display: inline-block; }
.home-teacher-heading { font-family: var(--font-body); font-size: var(--text-h3); line-height: var(--line-heading); letter-spacing: -.065em; }
.home-teacher-note { width: 96%; }
.home-teacher-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--home-gap); }
/* Intentional portrait framing: real photo identity is preserved. This clip
   crops only the media viewport; it is not an overflow repair for the page. */
.home-teacher-portrait { display: block; position: relative; aspect-ratio: 143 / 137; overflow: clip; border-radius: var(--media-radius); }
.home-teacher-portrait .media { position: absolute; width: 115%; max-width: none; height: 115%; left: -7.5%; top: -10%; object-fit: cover; }
.home-teacher-grid > article:first-child .media { width: 155%; height: 155%; left: -27.5%; top: -15%; }
.home-teacher-grid > article:nth-child(2) .media { width: 155%; height: 155%; left: -27.5%; top: -38%; }
.home-teacher-grid > article:last-child .media { top: -8%; }
.home-teacher-name { font-family: var(--font-body); font-size: var(--text-h4); line-height: var(--line-heading); letter-spacing: -.025em; }
.home-full-row { grid-column: 1 / -1; }
.home-events { background: var(--surface); grid-template-columns: minmax(0, 23%) minmax(0, 77%); }
.home-events .home-side-copy > .caption { font-size: var(--text-body); line-height: var(--line-control); }
.home-events .type-title-editorial { line-height: .94; letter-spacing: -.035em; }
.home-event-grid { grid-template-columns: 181fr 181fr 196fr; gap: var(--home-gap); }
.home-event-title { max-width: 100%; font-family: var(--font-body); font-size: var(--text-body-lg); line-height: var(--line-heading); letter-spacing: -.02em; }
.home-event-photo { position: relative; }
.home-event-photo .media { aspect-ratio: 181 / 116; }
.home-event-grid > article:last-child .media { aspect-ratio: 196 / 116; }
.home-event-date { position: absolute; top: 0; left: 0; display: flex; flex-direction: column; align-items: center; padding: var(--space-1); width: 29%; height: 54.5%; justify-content: center; border-radius: 0; }
.home-event-grid > article:last-child .home-event-date { width: 30%; }
.home-date-number { font-size: var(--text-h2); line-height: var(--line-heading); font-weight: 400; }
.home-date-month { font-size: var(--text-body-lg); line-height: var(--line-control); }
.home-event-grid article:first-child .home-event-date { background: var(--muted); }
.home-trial { display: grid; grid-template-columns: minmax(0, 40%) minmax(0, 60%); align-items: end; color: var(--on-accent); }
.homepage .home-trial { padding: var(--space-2) var(--home-hero-gutter) 0; }
.home-trial-copy h2 { line-height: .8; font-weight: 400; letter-spacing: -.035em; }
.home-trial-copy { position: relative; z-index: 1; padding-bottom: var(--space-2); }
.home-trial-copy > p { max-width: 27em; }
.home-trial-copy .caption, .home-trial-copy .note { color: var(--on-accent); }
.home-trial-copy > .button { margin-top: var(--space-1); }
.home-trial-copy > .note { margin-top: var(--space-1); }
.home-trial-copy > .caption { font-size: var(--text-body-lg); line-height: var(--line-control); }
.home-free { display: inline-block; width: 5.75em; vertical-align: middle; }
.home-trial-scene { position: relative; isolation: isolate; align-self: end; width: 92%; margin-left: -7%; aspect-ratio: 401 / 187; }
/* Keep the accepted media envelope; crop only the photograph's lower body.
   Alpha isolation, not an approximate CSS polygon, defines the girl edge. */
.home-trial-photo, .home-trial-support { position: absolute; bottom: 0; left: 0; width: 100%; aspect-ratio: 412 / 187; object-fit: cover; object-position: 50% 25%; }
.home-trial-photo { z-index: 1; }
.home-trial-support { z-index: 0; pointer-events: none; }
.home-trial-note { position: absolute; z-index: 2; right: -24%; top: 0; width: 25%; }
.homepage .site-footer { padding-block: var(--space-2); }
.homepage .footer-main { grid-template-columns: minmax(0, 22.5%) minmax(0, 44%) minmax(0, 16.8%) minmax(0, 16.7%); gap: 0; padding-bottom: var(--space-2); align-items: start; }
.homepage .footer-main > * { min-width: 0; }
.homepage .footer-main .brand { flex-wrap: nowrap; align-items: center; }
.homepage .footer-main .brand span { max-width: 9em; }
.homepage .footer-main .footer-contact > .caption { margin-top: var(--space-1); }
.home-footer-note { width: min(100%, 12.4vw); justify-self: end; }
.homepage .footer-legal { padding-top: var(--space-1); gap: var(--space-1); }
@media (max-width: 1199px) {
  .home-direction-grid, .home-teacher-grid, .home-benefits { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .home-teachers, .home-events { background: var(--surface); grid-template-columns: minmax(0, 1fr); gap: var(--home-gap); }
  .home-benefits article + article { border-left: 0; padding-left: 0; }
  .home-teacher-heading { font-size: var(--text-h2); }
  .homepage .footer-main { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--home-gap); }
}
@media (max-width: 899px) {
  .homepage .site-header { position: relative; background: var(--accent); }
  .homepage .home-hero { padding-top: var(--home-band-space); background: var(--accent); }
  .home-hero-grid, .home-about, .home-why, .home-trial { grid-template-columns: minmax(0, 1fr); }
  .home-hero-copy > p { max-width: none; }
  .home-mark { width: 80%; }
  .home-lettering { width: 100%; margin-left: 0; margin-top: var(--space-1); }
  .home-hero-scene { position: relative; inset: auto; width: 100%; aspect-ratio: .98; margin-top: var(--home-band-space); }
  .home-hero-photo { left: 0; width: 83%; }
  .home-hero-note { top: 0; right: 0; width: 27%; }
  .home-hero-values { top: auto; bottom: 18%; right: 0; font-size: var(--text-small); }
  .home-hero .home-art { top: auto; height: calc((100vw - 2 * var(--home-hero-gutter)) / .98 + var(--home-band-space)); }
  .home-about-copy { margin-bottom: var(--home-band-space); }
  .home-about-scene { width: 100%; margin-left: 0; }
  .home-about-photo { width: 100%; left: 0; }
  .home-about-note { width: 23%; }
  .home-why-title { margin-right: var(--home-gutter); }
  .home-benefits { padding-inline: var(--home-gutter); }
  .home-teacher-heading { letter-spacing: -.035em; }
  .home-teacher-note { width: min(70%, 15rem); }
  .home-trial-copy { padding-bottom: var(--home-band-space); }
  .home-trial-copy h2 { line-height: var(--line-heading); }
  .home-trial-scene { width: 100%; margin-left: 0; aspect-ratio: auto; padding-top: calc(23.25% + var(--space-1)); }
  .home-trial-photo { position: relative; width: 100%; left: 0; }
  .home-trial-note { width: 22%; top: 0; right: 0; }
  /* Edge modules keep their square geometry when cards stack into a long row. */
  .home-directions > .home-art { height: calc(100vw * 307 / 836); }
  .home-teachers > .home-art { height: calc(100vw * 211 / 836); }
  .home-events > .home-art { height: calc(100vw * 216 / 836); }
  .home-trial .home-art { top: auto; height: calc((100vw - 2 * var(--home-hero-gutter)) * 187 / 401 + var(--home-band-space)); }
  .home-trial { background: #352268; }
}
@media (max-width: 599px) {
  .home-direction-grid, .home-teacher-grid, .home-event-grid, .home-benefits { grid-template-columns: minmax(0, 1fr); }
  .home-about-scene { aspect-ratio: 1.65; }
  .home-event-grid > article:last-child .media { aspect-ratio: 181 / 116; }
  .home-event-date { max-width: 35%; }
  .home-free { max-width: 100%; }
  .homepage .footer-main { grid-template-columns: minmax(0, 1fr); }
  .home-footer-note { justify-self: start; width: min(45%, 8rem); }
}
