/* Jungle Haus site: the full header and footer, and the pieces of the
   Services, service, How we work and About pages. Built only from
   tokens.css roles and components.css parts, like site.css. */

/* ---------- Header: menu on every page ---------- */
/* Desktop: the Services panel holds the two routes side by side, and
   "All services" across the bottom. */
.jh-panel--routes { grid-template-columns: auto auto; max-width: 1120px; }
.jh-panel--routes .jh-panel-item { grid-template-columns: var(--tile-size) 1fr; align-items: start; }
.jh-panel-all { grid-column: 1 / -1; justify-self: start; margin: var(--space-4) var(--space-12) 0; min-height: var(--target-compact); }
.jh-panel-item[aria-current="page"] .jh-panel-name { color: var(--link); }
.jh-nav-trigger.is-current { color: var(--nav-ink-strong); }
.jh-nav-trigger.is-current::after { transform: scaleX(1); background: var(--link); }
.jh-nav-trigger.is-current[aria-expanded="true"]::after { transform: scaleX(0); }
.jh-panel-item[aria-current="page"] .jh-panel-name { font-weight: var(--weight-strong); text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 5px; }
/* Every line in the panel sits on one line from 1024 px up, words
   unchanged (Business, 11-16): the two columns are as wide as their longest
   line ("Brochures and presentations that make people want to work with you."
   needs about 540 px with its icon) and the panel may reach 1120 px. Below
   1200 px the page is too narrow for that at 14 px, so the lines take 13 px
   and the rows 8 px of side padding and gap, which holds from 1000 px (a
   1024 px window with its scrollbar takes 15 px of that). */
@container jh (min-width: 901px) and (max-width: 1199px) {
  .jh-panel--routes .jh-panel-text { font-size: calc(var(--text-body-sm) - 1px); }
  .jh-panel--routes { gap: 0; }
  .jh-panel--routes .jh-panel-item { padding-inline: var(--space-8); column-gap: var(--space-8); }
  .jh-panel--routes .jh-panel-route > .jh-label { margin-inline: var(--space-8); }
}
/* The header's button stays on one line at every width: with four links in the menu
   it wrapped just above 900 px (JH Site 1, 11-18). */
.jh-header .jh-header-cta { white-space: nowrap; }
/* The same for the menu's links, which sit a little closer just above
   900 px so the four fit beside the logo and the button. */
@container jh (min-width: 901px) {
  .jh-nav-link, .jh-nav-trigger { white-space: nowrap; }
}
@container jh (min-width: 901px) and (max-width: 1000px) {
  .jh-nav-link, .jh-nav-trigger { padding-inline: var(--space-12); }
}
/* "Get your free preview" (D4) is too long for the bar beside the logo and
   the Menu button on phones, and beside the four links just above 900 px:
   there it shows "Free preview", and the whole ask stays its name for
   screen readers. */
.jh-cta-short { display: none; }
@container jh (max-width: 520px) {
  .jh-header-cta .jh-cta-long { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
  .jh-header-cta .jh-cta-short { display: inline; }
}
@container jh (min-width: 901px) and (max-width: 1023px) {
  .jh-header-cta .jh-cta-long { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
  .jh-header-cta .jh-cta-short { display: inline; }
}
/* Apply has no header button of its own. */
.jh-header--no-cta { grid-template-columns: 1fr auto 1fr; }

@container jh (max-width: 900px) {
  /* Phones keep the logo and Apply now in view, beside the Menu button. */
  .jh-header { grid-template-columns: 1fr auto auto; gap: var(--space-8); }
  .jh-header-end { grid-column: 2; grid-row: 1; }
  .jh-header .jh-header-cta { display: inline-flex; }
  .jh-menu-button { grid-column: 3; }
  .jh-header--no-cta { grid-template-columns: 1fr auto; }
  .jh-header--no-cta .jh-menu-button { grid-column: 2; }
  .jh-panel--routes { max-width: none; grid-template-columns: 1fr; }
  .jh-panel--routes .jh-panel-item { align-items: center; }
  .jh-header .jh-header-cta { white-space: nowrap; }
  .jh-panel-all { margin: var(--space-8) 0 0; }
}
@container jh (max-width: 520px) {
  .jh-header .jh-header-cta { min-height: var(--target-compact); padding: var(--space-8) var(--space-16); }
  .jh-menu-button { padding-inline: var(--space-12) var(--space-16); gap: var(--space-8); }
}
/* Narrow phones: the Menu button keeps only its icon in view (its word
   stays for screen readers), so the logo and Apply now fit beside it. */
@container jh (max-width: 430px) {
  .jh-header { --wordmark-height: 26px; }
  .jh-menu-button { width: var(--target-compact); min-height: var(--target-compact); justify-content: center; padding: 0; gap: 0; font-size: 0; }
}

/* ---------- Footer: the logo, both routes, Company, Legal ---------- */
.jh-footer--site .jh-footer-top { grid-template-columns: 1.3fr repeat(4, 1fr); gap: var(--space-32); }
.jh-footer--site .jh-brand { min-height: 0; }
.jh-footer--site .jh-footer-about p { margin-top: var(--space-20); }
@container jh (max-width: 1100px) {
  .jh-footer--site .jh-footer-top { grid-template-columns: repeat(4, 1fr); }
  .jh-footer--site .jh-footer-about { grid-column: 1 / -1; }
}
@container jh (max-width: 700px) {
  .jh-footer--site .jh-footer-top { grid-template-columns: 1fr 1fr; }
}

/* ---------- Page hero: light, words only ---------- */
.jh-page-hero .jh-h1 { max-width: 18ch; }
.jh-page-hero .jh-lead { max-width: 52ch; }
.jh-page-hero .jh-actions { margin-top: var(--space-40); }
@container jh (max-width: 520px) { .jh-page-hero .jh-button { width: 100%; } }

/* Bands on the same theme read as one; a hairline marks where the next
   topic starts. */
.jh-band > .jh-wrap { padding-top: var(--section-space); border-top: var(--stroke-hairline) solid var(--line); }
.jh-section[data-theme="light"] + .jh-band { padding-top: 0; }
/* The watch piece ends with its own script, which sits between it and the
   next band: the next band still counts as following it (Lane D - spacing,
   10-23: the double 160 after "Watch how it works"). */
.jh-section[data-theme="light"] + script + .jh-section[data-theme="light"] { padding-top: 0; }

/* One rhythm (Lane D - spacing, 10-23): the closing band keeps the full
   section space above it after a light section, so the last ask gets the
   same 321 / 145 px as every other light-to-light step, not the smallest
   gap on the page. */
.jh-section[data-theme="light"] + .jh-section.jh-closing-band[data-theme="light"] { padding-top: var(--section-space); }
/* ---------- What you get: a checked list beside the animation ---------- */
.jh-feature { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-40) var(--space-72); align-items: center; }
.jh-feature-text { display: grid; gap: var(--space-32); align-content: start; }
.jh-checks { display: grid; gap: var(--space-16); margin: 0; padding: 0; list-style: none; }
.jh-checks li { display: grid; grid-template-columns: var(--icon-size) 1fr; gap: var(--space-16); align-items: start; font-size: var(--text-body-lg); line-height: var(--leading-body); text-wrap: pretty; }
.jh-checks .jh-icon { margin-top: 2px; color: var(--accent); }
@container jh (max-width: 900px) {
  .jh-feature { grid-template-columns: 1fr; }
}

/* ---------- How it starts ---------- */
.jh-need { display: grid; gap: var(--space-8); margin-top: var(--space-56); padding: var(--card-padding); border-radius: var(--radius-card); background: var(--surface); box-shadow: inset 0 0 0 var(--stroke-hairline) var(--hairline); }
.jh-need p { margin: 0; max-width: var(--measure); }
.jh-need-label { font-weight: var(--weight-emphasis); }
.jh-after-note { margin: var(--space-24) 0 0; max-width: var(--measure); color: var(--text-muted); text-wrap: pretty; }

/* ---------- Included, and not ---------- */
.jh-scope { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--space-24); }
.jh-scope--3 { grid-template-columns: repeat(3, 1fr); }
.jh-scope-group { display: grid; gap: var(--space-16); align-content: start; padding: var(--card-padding); border-radius: var(--radius-card); background: var(--surface); box-shadow: inset 0 0 0 var(--stroke-hairline) var(--hairline); }
.jh-scope-group.is-included { background: var(--overlay); }
.jh-scope-group ul { display: grid; gap: var(--space-12); margin: 0; padding: 0 0 0 var(--space-20); color: var(--text-muted); }
.jh-scope-group li { padding-left: var(--space-4); text-wrap: pretty; }
.jh-scope-group li::marker { color: var(--accent); }
.jh-scope-note { margin: 0; padding-top: var(--space-16); border-top: var(--stroke-hairline) solid var(--line); font-size: var(--text-body-sm); color: var(--text-muted); }
@container jh (max-width: 900px) { .jh-scope, .jh-scope--3 { grid-template-columns: 1fr; } }

/* ---------- Service cards (related services, About's two links) ---------- */
.jh-cards { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-24); }
.jh-card-link {
  display: grid; grid-template-columns: auto 1fr auto; gap: var(--space-20); align-items: start;
  padding: var(--card-padding); border-radius: var(--radius-card); background: var(--surface);
  box-shadow: inset 0 0 0 var(--stroke-hairline) var(--hairline);
  color: var(--text); text-decoration: none;
  transition: background-color var(--duration-control) var(--ease-standard);
}
.jh-card-link--plain { grid-template-columns: 1fr auto; }
.jh-card-link:hover { background: var(--raised); }
.jh-card-text { display: grid; gap: var(--space-8); }
.jh-card-name { font-family: var(--font-display); font-size: var(--text-subheading); line-height: var(--leading-snug); font-weight: var(--weight-display); }
.jh-card-desc { color: var(--text-muted); text-wrap: pretty; }
.jh-card-arrow { align-self: center; color: var(--text-muted); transition: transform var(--duration-control) var(--ease-out), color var(--duration-control) var(--ease-standard); }
.jh-card-link:hover .jh-card-arrow { transform: translateX(4px); color: var(--text); }
.jh-card-link:hover .jh-card-name { color: var(--link-hover); }
@container jh (max-width: 900px) { .jh-cards { grid-template-columns: 1fr; } }

/* ---------- Services page: each route, its animation beside its cards ---------- */
.jh-route-band { display: grid; grid-template-columns: 5fr 6fr; gap: var(--space-40) var(--space-72); align-items: start; }
.jh-route-band-head { display: grid; gap: var(--space-20); position: sticky; top: calc(var(--header-height) + var(--space-32)); }
.jh-route-band-head > * { margin: 0; }
.jh-route-band-head .jh-lead { margin: 0; }
.jh-route-band .jh-services .jh-tile { width: var(--tile-size); }
.jh-route-band-note { margin: var(--space-24) 0 0; color: var(--text-muted); max-width: var(--measure); text-wrap: pretty; }
.jh-route-band .jh-service-text { text-wrap: pretty; }
@container jh (max-width: 900px) {
  .jh-route-band { grid-template-columns: 1fr; }
  .jh-route-band-head { position: static; }
}

/* ---------- Home: route rows that link to their pages ---------- */
a.jh-route-row:focus-visible { outline: var(--stroke-focus) solid var(--focus); outline-offset: var(--focus-offset); }

/* ---------- How we work: the steps as a timeline ---------- */
.jh-timeline { margin: 0; padding: 0; list-style: none; counter-reset: jh-tl; max-width: 52rem; }
.jh-timeline > li { position: relative; display: grid; grid-template-columns: var(--target) 1fr; gap: var(--space-24); padding-bottom: var(--space-40); counter-increment: jh-tl; }
.jh-timeline > li::before {
  content: counter(jh-tl);
  display: grid; place-items: center; width: var(--target); height: var(--target); border-radius: 50%;
  font: var(--weight-emphasis) var(--text-body)/1 var(--font-numeric); font-variant-numeric: tabular-nums;
  background: var(--action); color: var(--on-action);
  transition: background-color var(--duration-reveal) var(--ease-out), color var(--duration-reveal) var(--ease-out), box-shadow var(--duration-reveal) var(--ease-out);
}
.jh-timeline > li::after { content: ""; position: absolute; left: calc(var(--target) / 2); top: var(--target); bottom: 0; width: var(--stroke-hairline); background: var(--line); }
.jh-timeline > li:last-child { padding-bottom: 0; }
.jh-timeline > li:last-child::after { display: none; }
/* With script and motion, a number waits unfilled until its step reaches the middle of the screen. */
.jh-timeline.is-armed > li:not(.is-lit)::before { background: var(--canvas); color: var(--text); box-shadow: inset 0 0 0 var(--stroke-hairline) var(--border); }
.jh-timeline-body { display: grid; gap: var(--space-12); padding-top: var(--space-8); }
.jh-timeline-body > * { margin: 0; }
.jh-timeline-body p { color: var(--text-muted); max-width: var(--measure); text-wrap: pretty; }
.jh-timeline-body p:first-of-type { color: var(--text); font-size: var(--text-body-lg); }

/* Paying, and how we use AI: two columns of short facts */
.jh-facts { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--space-24) var(--space-40); margin: 0; padding: 0; list-style: none; }
.jh-facts > li { margin: 0; padding-top: var(--space-20); border-top: var(--stroke-hairline) solid var(--line); text-wrap: pretty; }
.jh-facts strong { font-weight: var(--weight-emphasis); }
@container jh (max-width: 900px) { .jh-facts { grid-template-columns: 1fr; } }

/* Common questions: each opens to its answer (native <details>) */
.jh-questions { max-width: 52rem; margin: 0; padding: 0; list-style: none; border-top: var(--stroke-hairline) solid var(--line); }
.jh-questions > li { border-bottom: var(--stroke-hairline) solid var(--line); }
.jh-questions summary {
  display: flex; align-items: center; justify-content: space-between; gap: var(--space-24);
  min-height: calc(var(--target) + var(--space-16)); padding-block: var(--space-16);
  font: var(--weight-display) var(--text-body-lg)/var(--leading-snug) var(--font-display);
  cursor: pointer; list-style: none; border-radius: var(--radius-structural);
}
.jh-questions summary::-webkit-details-marker { display: none; }
.jh-questions summary .jh-icon { color: var(--text-muted); transition: transform var(--duration-nav) var(--ease-out); }
.jh-questions details[open] summary .jh-icon { transform: rotate(180deg); }
.jh-questions summary:hover { color: var(--link-hover); }
.jh-questions details p { margin: 0 0 var(--space-24); max-width: var(--measure); color: var(--text-muted); text-wrap: pretty; }

/* ---------- About ---------- */
.jh-about-why { display: grid; }
/* The facts over the painted landscape, full width, at least 60% of the
   screen (review 10-25, R20). The shade is at least 62% of near-black
   everywhere, so white text measures 5.3:1 or more even over the image's
   lightest pixel. */
.jh-about-place { isolation: isolate; overflow: hidden; display: grid; align-content: end; min-height: 60vh; min-height: 60svh; color: var(--text-on-image); }
.jh-about-place-img { position: absolute; inset: 0; z-index: -2; width: 100%; height: 100%; object-fit: cover; }
.jh-about-place::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, rgb(16 22 19 / .62), rgb(16 22 19 / .78)); }
.jh-about-place .jh-about-facts > li { border-top-color: rgb(255 255 255 / .4); color: var(--text-on-image); }
.jh-about-why-text { display: grid; gap: var(--space-24); max-width: var(--measure); }
.jh-about-why-text > * { margin: 0; }
.jh-about-why-text p { font-size: var(--text-lead); line-height: var(--leading-body); text-wrap: pretty; }
.jh-about-why-text p + p { color: var(--text-muted); }
.jh-beliefs { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--space-40); margin: 0; padding: 0; list-style: none; }
.jh-beliefs > li { padding-top: var(--space-24); border-top: var(--stroke-hairline) solid var(--line); }
.jh-beliefs strong { display: block; margin-bottom: var(--space-12); font: var(--weight-display) var(--text-subheading)/var(--leading-snug) var(--font-display); text-wrap: balance; }
.jh-beliefs p { margin: 0; color: var(--text-muted); text-wrap: pretty; }
.jh-about-facts { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--space-24); margin: 0; padding: 0; list-style: none; }
.jh-about-facts > li { padding-top: var(--space-20); border-top: var(--stroke-hairline) solid var(--line); font-size: var(--text-body-lg); text-wrap: pretty; }
@container jh (max-width: 900px) {
  .jh-about-why, .jh-about-facts { grid-template-columns: 1fr; }
  .jh-beliefs { grid-template-columns: 1fr; gap: var(--space-32); max-width: 36rem; margin-inline: auto; }
}

/* ---------- Service animations: the extra motions ---------- */
/* Pieces that only pass through the scene rest hidden: the final frame,
   which is also the reduced-motion still, never shows them. */
.jh-story .st-flash, .jh-story .st-ring, .jh-story .st-pass { opacity: 0; }
.ill-label { font: 600 12px/1 var(--font-text); fill: var(--ill-ink); letter-spacing: .01em; }
@media (prefers-reduced-motion: no-preference) {
  .jh-story.is-armed .st-flash { animation-name: jh-st-flash; animation-timing-function: var(--ease-in-out); }
  .jh-story.is-armed .st-ring { animation-name: jh-st-ring; animation-iteration-count: var(--n, 1); }
  .jh-story.is-armed .st-draw { animation-name: jh-st-draw; stroke-dasharray: 1; animation-timing-function: var(--ease-in-out); }
  .jh-story.is-armed .st-pass { animation-name: jh-st-pass; animation-timing-function: var(--ease-in-out); }
  .jh-story.is-armed .st-form { animation-name: jh-st-form; animation-timing-function: var(--ease-in-out); }
  .jh-story.is-armed .st-press { animation-name: jh-st-press; animation-timing-function: var(--ease-in-out); transform-origin: 0 0; }
}
/* In, held, out. */
@keyframes jh-st-flash { 0% { opacity: 0; } 15%, 80% { opacity: 1; } 100% { opacity: 0; } }
/* A soft ring that spreads and fades (a ringing phone). */
@keyframes jh-st-ring { from { opacity: .9; transform: scale(.75); } to { opacity: 0; transform: scale(1.45); } }
/* A line drawn from its start (paths with pathLength="1"). */
@keyframes jh-st-draw { from { stroke-dashoffset: 1; } to { stroke-dashoffset: 0; } }
/* Travels from its start to its resting place, then leaves. */
@keyframes jh-st-pass {
  0% { opacity: 0; transform: translate(var(--x, 0px), var(--y, 0px)); }
  12% { opacity: 1; transform: translate(var(--x, 0px), var(--y, 0px)); }
  85% { opacity: 1; transform: none; }
  100% { opacity: 0; transform: none; }
}
/* Appears at its start, then travels to its resting place and stays. */
@keyframes jh-st-form {
  0% { opacity: 0; transform: translate(var(--x, 0px), var(--y, 0px)) scale(var(--s, 1)); }
  30% { opacity: 1; transform: translate(var(--x, 0px), var(--y, 0px)) scale(var(--s, 1)); }
  100% { opacity: 1; transform: none; }
}
/* A cursor arrives and clicks once. */
@keyframes jh-st-press {
  0% { opacity: 0; transform: translate(var(--x, 0px), var(--y, 0px)); }
  15% { opacity: 1; }
  65% { transform: none; }
  78% { transform: scale(.82); }
  90%, 100% { opacity: 1; transform: none; }
}

/* ---------- Why it matters (WhyCards.astro) ---------- */
/* Every service page has these cards since 10-24's words (Lane B - words,
   frames and review fixes, 10-25); the five AI pages have no watch piece,
   so the rules live here, not only in watch.css. */
.jh-why { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--space-24); margin: 0; padding: 0; list-style: none; }
.jh-why-card {
  display: grid; gap: var(--space-16); align-content: start;
  padding: var(--card-padding); border-radius: var(--radius-card); background: var(--surface);
  box-shadow: inset 0 0 0 var(--stroke-hairline) var(--hairline);
}
.jh-why-card .jh-tile { background: var(--raised); }
.jh-why-title { margin: 0; font-family: var(--font-display); font-size: var(--text-subheading); line-height: var(--leading-snug); font-weight: var(--weight-display); }
.jh-why-card p { margin: 0; color: var(--text-muted); text-wrap: pretty; }
@container jh (max-width: 900px) { .jh-why { grid-template-columns: 1fr; } }

/* A link inside a field's hint (Apply's "Refresh or Redesign?") sits in the
   line of text, in the link color, like the links in the form note. */
.jh-hint a { color: var(--link); text-underline-offset: 3px; }
