/* Homepage-only panel navigation. No stacked sections behind the hero.
   The separate Solutions, AI Agents, Flexibility and Blog pages remain unchanged. */
html[data-icast-home-panel] { scroll-behavior: auto !important; }
html[data-icast-home-panel] main > section:not([data-icast-active]) { display: none !important; }
html[data-icast-home-panel] main > section[hidden] { display: none !important; }

/* The only visible content on the default homepage is its opening screen.
   The footer is available inside the linked information panels instead. */
html[data-icast-home-panel="home"],
html[data-icast-home-panel="home"] body { height: 100%; overflow: hidden; overscroll-behavior: none; }
html[data-icast-home-panel="home"] .site-footer { display: none !important; }
html[data-icast-home-panel="home"] .hero { height: 100vh; height: 100svh; min-height: 0; overflow: hidden; }
html[data-icast-home-panel="home"] .hero-inner.container {
  height: 100%; min-height: 0;
  padding-top: clamp(112px, 14svh, 168px);
  padding-bottom: clamp(20px, 3.5svh, 46px);
}
/* Avoid taller source artwork bleeding below the single landing screen. */
html[data-icast-home-panel="home"] .hero-art { max-height: min(70svh, 610px); }

/* A subtle explicit route preserves the former impact animation. */
.impact-link {
  display: block; width: fit-content; margin-top: 12px; font-size: 15px; line-height: 1.5;
  color: var(--forest); text-decoration: underline; text-underline-offset: 5px;
  text-decoration-thickness: 1px;
}
.impact-link:hover { color: #8b652c; }
.panel-quicklinks { display:flex; gap:22px; flex-wrap:wrap; margin-top:22px; }
.panel-quicklinks a { color:var(--forest); text-decoration:underline; text-underline-offset:5px; }

/* A selected information page has a compact fixed header and may scroll
   within its own content, never into unrelated home sections. */
html[data-icast-home-panel="content"] .site-header {
  position: fixed; inset: 0 0 auto; z-index: 30;
  background: rgba(249,246,239,.96); backdrop-filter: blur(15px);
  box-shadow: 0 1px 0 rgba(22,60,47,.1);
}
html[data-icast-home-panel="content"] .site-header .header-inner.container { height: var(--anchor-header-height, 80px); }
html[data-icast-home-panel="content"] main { padding-top: var(--anchor-header-height, 80px); }
html[data-icast-home-panel="content"] { overflow-y: auto; }

/* Keep the landing copy readable on short laptop displays, without
   allowing the old fixed minimum height to create an unwanted scrollbar. */
@media (min-width: 901px) and (max-height: 780px) {
  html[data-icast-home-panel="home"] .hero-inner.container { padding-top: clamp(86px, 13.5svh, 112px); padding-bottom: 16px; }
  html[data-icast-home-panel="home"] .hero h1 { font-size: clamp(44px, 4.5vw, 70px); line-height: 1.08; }
  html[data-icast-home-panel="home"] .hero-kicker { margin-top: 16px; font-size: clamp(12px, 1vw, 16px); }
  html[data-icast-home-panel="home"] .hero-roles { margin-top: 14px; font-size: 15px; line-height: 1.55; }
  html[data-icast-home-panel="home"] .hero-roles > strong { font-size: 22px; margin-bottom: 6px; }
  html[data-icast-home-panel="home"] .hero .outline-cta { margin-top: 18px; min-height: 48px; padding: 11px 18px; }
  html[data-icast-home-panel="home"] .impact-link { margin-top: 12px; }
}
@media (max-width: 900px) {
  html[data-icast-home-panel="home"] .hero { overflow: hidden; }
  html[data-icast-home-panel="home"] .hero-inner.container {
    display:flex; flex-direction:column; justify-content:center; align-items:stretch;
    padding-top: clamp(83px, 11svh, 112px); padding-bottom: 12px;
  }
  html[data-icast-home-panel="home"] .hero-copy { padding-top:0; }
  html[data-icast-home-panel="home"] .hero-art {
    position:relative; top:auto; left:auto; right:auto; transform:none;
    width:clamp(95px, 21svh, 178px); height:auto; max-height:24svh;
    margin: clamp(8px, 1.2svh, 18px) auto 0;
  }
  html[data-icast-home-panel="home"] .hero-kicker { margin-top:15px; }
  html[data-icast-home-panel="home"] .hero-roles { margin-top:13px; font-size:15px; line-height:1.45; }
  html[data-icast-home-panel="home"] .hero-roles > strong { margin-bottom:5px; }
  html[data-icast-home-panel="home"] .hero .outline-cta { margin-top:17px; min-height:50px; }
  html[data-icast-home-panel="home"] .impact-link { display:block; margin-top:12px; }
}
@media (max-width: 520px) {
  html[data-icast-home-panel="home"] .hero-inner.container { padding-top:clamp(78px, 11svh, 102px); padding-bottom:8px; }
  html[data-icast-home-panel="home"] .hero h1 { font-size: clamp(30px, 8.2vw, 42px); line-height:1.11; }
  html[data-icast-home-panel="home"] .hero-kicker { margin-top:12px; font-size:12px; line-height:1.45; }
  html[data-icast-home-panel="home"] .hero-roles { margin-top:10px; font-size:13px; line-height:1.4; }
  html[data-icast-home-panel="home"] .hero-roles > strong { font-size:19px; margin-bottom:4px; }
  html[data-icast-home-panel="home"] .hero .outline-cta { margin-top:13px; min-height:44px; width:260px; font-size:15px; padding:10px 15px; }
  html[data-icast-home-panel="home"] .hero .outline-cta span { font-size:21px; }
  html[data-icast-home-panel="home"] .impact-link { font-size:13px; margin-top:9px; }
  html[data-icast-home-panel="home"] .hero-art { width:clamp(84px, 20svh, 154px); max-height:23svh; margin-top:7px; }
}
/* Very short heights: prioritize access to the main heading and CTA. */
@media (max-height: 570px) {
  html[data-icast-home-panel="home"] .hero-art { display:none; }
}
/* If a user enlarges text enough to exceed the viewport, avoid clipping
   interactive controls: internal scrolling is a fallback for accessibility. */
@media (max-width: 520px) and (max-height: 560px) {
  html[data-icast-home-panel="home"] .hero { overflow-y:auto; }
}
