/* Homepage theme contract:
 * Only visible direct-child SECTIONs of #main participate; the first is dark.
 * Structural selectors recalculate automatically on insertion, removal, reorder
 * and [hidden] changes, including language rerenders. Nested content, anchors,
 * header and footer do not count. Hide a whole section with the hidden attribute.
 * Components consume these tokens; never assign a palette by section ID/class.
 */
body[data-page=home] #main > section{
 --section-background:#061a32;--section-ink:#f6f7fa;--section-muted:#bdcbdc;
 --section-accent:#d0a575;--section-border:#526379;--section-surface:#102b47;
 --section-focus:#edbc82;--section-news-art:0;--section-about-art:.45;
 --muted:var(--section-muted);--ink:var(--section-ink);--line:var(--section-border);
 background:var(--section-background);color:var(--section-ink);color-scheme:dark;
}
body[data-page=home] #main > section:nth-child(even of section:not([hidden])){
 --section-background:#f8f6f1;--section-ink:#142338;--section-muted:#586a7d;
 --section-accent:#825e3a;--section-border:#b6a187;--section-surface:#ffffff;
 --section-focus:#315f8b;--section-news-art:.32;--section-about-art:0;
 color-scheme:light;
}
body[data-page=home] #main > section[hidden]{display:none}
body[data-page=home] #main > section :is(h2,h3,.business-brand,.business-visit,.news-all){color:var(--section-ink)}
body[data-page=home] #main > section :is(p,.company-en,.news-card-excerpt){color:var(--section-muted)}
body[data-page=home] #main > section :is(.eyebrow,.num,.news-meta,.news-card-arrow,.news-sample,.news-swipe-arrow,.text-link span){color:var(--section-accent)}
body[data-page=home] #main > section :is(.text-link,.news-all,.news-sample,.mission-grid article,.business-item){border-color:var(--section-border)}
body[data-page=home] #main > section :is(.text-link,.news-all):hover{color:var(--section-accent)}
body[data-page=home] #main > section :is(a,button):focus-visible{outline:2px solid var(--section-focus);outline-offset:5px}
body[data-page=home] #main > section .news-card{background:var(--section-surface);color:var(--section-ink);border-color:var(--section-border);box-shadow:0 10px 34px #00000008}
body[data-page=home] #main > section .news-card-image{background:var(--section-surface)}
body[data-page=home] #main > section .news-card:hover{border-color:var(--section-accent)}
body[data-page=home] #main > section .news-card:hover .news-card-arrow{color:var(--section-accent)}

/* Decorative imagery is optional and follows the inherited palette. */
body[data-page=home] .news-section{position:relative;isolation:isolate;overflow:hidden;border-bottom:0}
body[data-page=home] .news-section::before{content:"";position:absolute;inset:0;z-index:-1;pointer-events:none;background:url('assets/news/section-light-ribbons.png') center/cover no-repeat;opacity:var(--section-news-art)}
body[data-page=home] .about{position:relative;isolation:isolate;overflow:hidden}
body[data-page=home] .about::before{content:"";position:absolute;inset:0;z-index:-1;pointer-events:none;background:linear-gradient(90deg,#061a32 16%,#061a32b8 65%,#061a328c),url('assets/material-connection-desktop.png') center/cover no-repeat;opacity:var(--section-about-art)}
@media(max-width:720px){
 body[data-page=home] .news-section::before{background-size:auto 100%;background-position:43% center}
 body[data-page=home] .about::before{background-position:65% center}
}

/* Desktop scrolling follows the page layout; keep the mobile cue. */
@media(min-width:721px){body[data-site=agf][data-page=home] .scroll-cue{display:none}}

/* Fit the desktop opening to the live viewport, including the measured header. */
@media(min-width:721px){
 body[data-site=agf][data-page=home] .hero{height:calc(100vh - var(--home-header-height,116px));height:calc(100dvh - var(--home-header-height,116px));min-height:0;max-height:none;display:grid;grid-template-rows:minmax(0,1fr) auto;padding:0 0 clamp(20px,4dvh,42px)}
 body[data-site=agf][data-page=home] .slides{height:auto;min-height:0}
 body[data-site=agf][data-page=home] .slide{display:grid;align-items:center}
 body[data-site=agf][data-page=home] .slide-content{top:auto;transform:none;position:relative}
 body[data-site=agf][data-page=home] .hero-bottom{position:relative;left:auto;right:auto;bottom:auto;margin:0 8% 0 16.7%;width:auto}
 body[data-site=agf][data-page=home] .hero-logo-animated{top:50%;width:min(27.5vw,calc((100dvh - var(--home-header-height,116px) - 100px)*.8))}
 body[data-site=agf][data-page=home] .slide h1{font-size:clamp(30px,min(3.7vw,6dvh),64px)}
 body[data-site=agf][data-page=home] .slide h2.value-title{font-size:clamp(32px,min(4.8vw,7dvh),76px)}
}
@media(min-width:721px) and (max-width:1100px){body[data-site=agf][data-page=home] .hero-bottom{margin-left:11%;margin-right:6%}}
@media(min-width:721px) and (max-height:700px){
 body[data-site=agf][data-page=home] .slide p{font-size:15px;line-height:1.65}
 body[data-site=agf][data-page=home] .slide-overline{font-size:11px;margin-bottom:12px}
 body[data-site=agf][data-page=home] .value-english{font-size:12px;margin-bottom:12px;letter-spacing:1.2px}
 body[data-site=agf][data-page=home] .slide-link{margin-top:10px}
 body[data-site=agf][data-page=home] .slide h1,body[data-site=agf][data-page=home] .slide h2.value-title{margin-bottom:12px}
}
@media(min-width:721px){body[data-site=agf][data-page=home] .slide-shade{background:linear-gradient(0deg,#07182d 0%,#07182d00 25%),linear-gradient(90deg,#07182d 0%,#07182dbb 18%,transparent 49%)}}

/* One business section for the current esports operation. */
body[data-page=home] .unified-business{position:relative;border-top:1px solid var(--section-border);padding-top:64px;padding-bottom:72px}
.business-anchor{position:absolute;top:0;left:0}
.business-company{display:grid;grid-template-columns:minmax(0,.8fr) minmax(0,1.2fr);gap:64px;align-items:center;margin-top:38px}
.business-brand{display:flex;align-items:center;justify-content:center;gap:26px;min-height:240px;padding:24px;color:var(--section-ink)}
.business-brand img{display:block;width:106px;height:auto;flex:none}
.business-wordmark{font-size:clamp(16px,1.5vw,23px);letter-spacing:1.2px;line-height:1.6;font-weight:500}

.business-company-copy{min-width:0}
.business-company-copy h3{font-size:clamp(24px,2.2vw,32px);line-height:1.45;margin:0 0 20px;font-weight:600}
body[data-page=home] .unified-business p{color:var(--section-muted);font-size:16px;line-height:1.85;margin:0 0 20px}
.business-visit{display:inline-flex;align-items:center;gap:24px;min-height:44px;font-size:14px;color:var(--section-ink);border-bottom:1px solid var(--section-border);margin-top:0}
.business-visit:hover{color:var(--section-accent)}
@media(max-width:720px){body[data-page=home] .unified-business{padding-top:44px;padding-bottom:48px}.business-company{grid-template-columns:1fr;gap:26px;margin-top:24px}.business-brand{min-height:155px;padding:18px;gap:22px}.business-brand img{width:88px}.business-wordmark{font-size:17px;letter-spacing:1px}.business-company-copy h3{font-size:25px}}
