/* ---------------------------------------------------------------------------
   blocks.css: one part per kind of section, in the order of the Add Section
   window. Each part is named after its component in src/components/blocks/.
   Breakpoints are container widths of `.site`; see chrome.css.
   --------------------------------------------------------------------------- */

/* A heading with a button beside it, used by more than one section. */
.section-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: end; gap: 18px 40px; margin-bottom: clamp(24px, 3cqw, 38px); }

/* ---- The openers: hero-home and page-head --------------------------------
   Both are deep canopy green whatever the section's background, because
   the header sits on top of them in white. Leaves from the icon sprite
   hang in from the edges; the room for the header is the extra space at
   the top. */
.hero, .page-head { position: relative; isolation: isolate; overflow: hidden; background: radial-gradient(ellipse at 20% 30%, #1F6B48, var(--canopy) 70%); color: var(--white); border-block: 0; }
.opener-leaf { position: absolute; z-index: -1; pointer-events: none; color: var(--emerald); }
.opener-leaf--a { left: -70px; top: -60px; width: 300px; height: 300px; rotate: 150deg; filter: blur(3px); }
.opener-leaf--b { right: -80px; bottom: -110px; width: 380px; height: 380px; rotate: -20deg; color: #14532F; }

/* ---- hero-home --------------------------------------------------------- */
.hero { display: grid; align-items: end; min-height: clamp(560px, 72vh, 780px); padding-block: 200px clamp(50px, 7cqw, 90px); }
.hero-words { display: grid; gap: 24px; justify-items: start; max-width: 760px; }
.hero-mark { display: inline-block; padding: .04em .1em 0; background: var(--sun); color: var(--ink); }
.hero .lead { color: #E3F2E8; }
.hero-note { font-weight: 700; color: #CFE3D6; }
/* The photo fills the right of the opener and fades into the green. */
.hero-photo { position: absolute; inset: 0 0 0 38%; z-index: -3; }
.hero-photo .photo { width: 100%; height: 100%; object-position: 50% 30%; }
.hero::after { content: ""; position: absolute; inset: 0; z-index: -2; background: linear-gradient(90deg, var(--canopy) 36%, rgba(11, 46, 34, .6) 48%, rgba(11, 46, 34, 0) 70%), linear-gradient(0deg, rgba(6, 26, 19, .55), transparent 40%); }
@container site (max-width: 700px) {
  .hero { padding-top: 150px; }
  .hero-photo { inset: 0; opacity: .4; }
  .hero::after { background: linear-gradient(0deg, rgba(11, 46, 34, .95), rgba(11, 46, 34, .6)); }
}

/* ---- page-head --------------------------------------------------------- */
.page-head { display: grid; gap: 18px; justify-items: start; padding-block: 190px clamp(44px, 6cqw, 80px); }
.page-head .lead { color: #E3F2E8; }
.page-links { margin-top: 8px; }
@container site (max-width: 700px) {
  .page-head { padding-top: 140px; }
}

/* ---- room-tiles: a trail sign for each room ------------------------------
   A round photo ringed in the room's color, the name on a wooden arrow
   that nudges forward when pointed at, and one line under it. */
.tiles { padding-block: clamp(56px, 7cqw, 104px); }
.tiles-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 30px 22px; }
.tile { display: block; height: 100%; color: var(--forest-ink); text-decoration: none; }
.tile-photo { display: block; aspect-ratio: 1; border-radius: 50%; box-shadow: 0 0 0 5px var(--mist), 0 0 0 9px var(--c), 0 20px 30px rgba(11, 46, 34, .25); transition: transform .4s; }
.tile:hover .tile-photo { transform: scale(1.04); }
.tile-words { display: grid; gap: 8px; }
.tile-name {
  display: block;
  margin-top: 20px;
  padding: 12px 32px 12px 14px;
  border: 3px solid var(--bark-dark);
  background: repeating-linear-gradient(180deg, #8A5A36 0 6px, #7E5131 6px 9px, #8F603B 9px 15px);
  clip-path: polygon(0 0, 86% 0, 100% 50%, 86% 100%, 0 100%);
  color: var(--white);
  font-size: 17px;
  text-shadow: 0 2px 0 rgba(0, 0, 0, .35);
  transition: transform .2s;
}
.tile:hover .tile-name { transform: translateX(6px); }
.tile-line { color: #244B39; font-weight: 600; font-size: 14px; line-height: 1.35; }
/* The tiles' lift from base.css would fight the arrow, so it stays still. */
.tile.lifts:hover { transform: none; box-shadow: none; }
@container site (min-width: 340px) {
  .tiles-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@container site (min-width: 1050px) {
  .tiles-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); }
}
@media (prefers-reduced-motion: reduce) {
  .tile:hover .tile-photo, .tile:hover .tile-name { transform: none; }
}
html[data-a11y-stop-anim] .tile:hover :is(.tile-photo, .tile-name) { transform: none; }

/* ---- store-facts ------------------------------------------------------- */
.facts { padding-block: 0 clamp(56px, 7cqw, 104px); }
.facts-row { display: grid; border: var(--rule); background: var(--white); color: var(--ink); }
.fact { padding: 20px 24px; }
.fact + .fact { border-top: var(--rule); }
.fact dd { margin-top: 6px; font-size: 18px; line-height: 1.4; }
.fact a { text-decoration: none; font-weight: 700; }
@container site (min-width: 760px) {
  .facts-row { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .fact + .fact { border-top: 0; border-left: var(--rule); }
}

/* ---- callout: a leafy green band ---------------------------------------
   Emerald unless the section's background says otherwise, with one big
   leaf in the corner. */
.callout { position: relative; isolation: isolate; overflow: hidden; display: grid; gap: 28px; align-items: center; padding-block: clamp(56px, 7cqw, 100px); }
.callout:not([class*="bg-"]) { background: radial-gradient(ellipse at 80% 0, #2C8C5C, var(--emerald) 70%); color: var(--white); }
.callout-leaf { position: absolute; right: -30px; bottom: -50px; z-index: -1; width: 240px; height: 240px; color: rgba(255, 255, 255, .08); pointer-events: none; }
.callout-words { display: grid; gap: 16px; }
@container site (min-width: 760px) {
  .callout { grid-template-columns: minmax(0, 1fr) auto; gap: 40px; }
}

/* ---- photo-words ------------------------------------------------------- */
.pw { display: grid; gap: clamp(28px, 5cqw, 72px); align-items: center; padding-block: clamp(56px, 7cqw, 104px); }
.pw-photo .photo { aspect-ratio: 4 / 3; }
.pw-words { display: grid; gap: 22px; justify-items: start; }
@container site (min-width: 860px) {
  .pw { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .pw--right .pw-photo { order: 2; }
}

/* ---- room-list --------------------------------------------------------- */
.animals { padding-block: clamp(40px, 5cqw, 72px); }
.jump { margin-bottom: clamp(20px, 3cqw, 36px); }
.jump-btn { background: var(--c); color: var(--on-c); }
.animal { display: grid; gap: clamp(24px, 4cqw, 64px); align-items: start; padding-block: clamp(40px, 5.5cqw, 84px); border-top: var(--rule); scroll-margin-top: 16px; }
.animal:first-child { border-top: 0; }
.photo--room { aspect-ratio: 4 / 3; border: var(--rule); box-shadow: 8px 8px 0 var(--c); }
.animal-words { display: grid; gap: 16px; justify-items: start; }
.animal-text { max-width: 60ch; }
.have { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 190px), 1fr)); gap: 8px 24px; justify-self: stretch; }
.have li { position: relative; padding-left: 22px; font-weight: 700; }
.have li::before { content: ""; position: absolute; left: 0; top: .42em; width: 11px; height: 11px; border: 2px solid var(--ink); background: var(--c); }
.tip { padding: 16px 18px; border: var(--rule); background: var(--white); color: var(--ink); max-width: 60ch; }
.tip .label { display: block; margin-bottom: 4px; font-size: 14px; }
@container site (min-width: 860px) {
  .animal { grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); }
  .animal:nth-child(even) .animal-photo { order: 2; }
}

/* ---- big-number -------------------------------------------------------- */
.big-number { padding-block: clamp(56px, 9cqw, 130px); text-align: center; }
.big-number-figure { font-family: var(--display); font-size: clamp(76px, 18cqw, 260px); line-height: .9; text-shadow: .05em .05em 0 var(--c); }
.big-number-line { margin: 22px auto 0; }

/* ---- quote ------------------------------------------------------------- */
.quote { display: grid; gap: clamp(28px, 5cqw, 72px); align-items: center; padding-block: clamp(56px, 7cqw, 104px); }
.quote-text { max-width: 20ch; }
.quote-cite { margin-top: 18px; font-weight: 700; }
.quote-photo .photo { aspect-ratio: 4 / 5; }
@container site (min-width: 860px) {
  .quote--photo { grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); }
}

/* ---- owners ------------------------------------------------------------ */
.owners { display: grid; gap: 28px; justify-items: start; padding-block: clamp(56px, 7cqw, 104px); }
.owners-row { display: grid; justify-self: stretch; border: var(--rule); color: var(--ink); }
.owner { display: grid; gap: 8px; align-content: start; padding: 26px 24px; background: var(--green); }
.owner:nth-child(3n+2) { background: var(--yellow); }
.owner:nth-child(3n) { background: var(--pink); }
.owner + .owner { border-top: var(--rule); }
.owner-year { font-family: var(--display); font-size: clamp(52px, 6cqw, 86px); line-height: 1; }
.owner-who { font-size: 21px; font-weight: 800; }
.owner-text { line-height: 1.5; }
@container site (min-width: 860px) {
  .owners-row { grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); }
  .owner + .owner { border-top: 0; border-left: var(--rule); }
}

/* ---- pairs ------------------------------------------------------------- */
.pairs { display: grid; gap: 26px; padding-block: clamp(56px, 7cqw, 104px); }
.pairs-list { border-top: var(--rule); }
.pair { display: grid; gap: 8px; padding-block: 22px; border-bottom: 1px solid var(--soft-line); }
.pair:last-child { border-bottom: 0; }
.pair-text { max-width: 60ch; }
@container site (min-width: 760px) {
  .pair { grid-template-columns: 28ch 1fr; gap: clamp(18px, 3cqw, 44px); align-items: baseline; }
}

/* ---- hours ------------------------------------------------------------- */
.hours { display: grid; gap: clamp(32px, 4cqw, 64px); align-items: start; padding-block: clamp(56px, 7cqw, 104px); }
.hours-week { display: grid; gap: 20px; }
.hours-list { border: var(--rule); background: var(--white); color: var(--ink); }
.hours-list li { display: flex; justify-content: space-between; gap: 16px; padding: 13px 18px; border-bottom: 1px solid var(--soft-line); font-size: 18px; font-variant-numeric: tabular-nums; }
.hours-list li:last-child { border-bottom: 0; }
.hours-list b { font-weight: 600; }
.hours-list li.is-today { background: var(--green); font-weight: 800; }
.hours-list li.is-today b { font-weight: 800; }
.hours-contact { display: grid; gap: 24px; justify-items: start; }
.hours-contact .label { margin-bottom: 6px; }
.hours-address { font-size: clamp(20px, 2.2cqw, 28px); font-weight: 700; line-height: 1.25; }
.phone-big { font-family: var(--display); font-weight: 400; font-size: clamp(28px, 4cqw, 52px); padding: 16px 24px; background: var(--yellow); }
.hours-note { grid-column: 1 / -1; }
@container site (min-width: 860px) {
  .hours { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
}

/* ---- faq --------------------------------------------------------------- */
.faq { display: grid; gap: 22px; padding-block: clamp(56px, 7cqw, 104px); }
.faq-list { border-top: var(--rule); }
.faq-item { border-bottom: var(--rule); }
.faq-item summary { display: flex; justify-content: space-between; gap: 20px; padding-block: 20px; font-size: clamp(18px, 1.8cqw, 21px); font-weight: 800; cursor: pointer; list-style: none; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: "+"; flex: none; font-family: var(--display); font-size: 26px; line-height: 1; }
.faq-item[open] summary::after { content: "\2212"; }
.faq-answer { padding-bottom: 22px; }

/* ---- quiz -------------------------------------------------------------- */
.quiz { display: grid; gap: 18px; padding-block: clamp(56px, 7cqw, 104px); }
.quiz-box { display: grid; gap: 24px; max-width: 900px; margin-top: 16px; padding: clamp(22px, 3.4cqw, 44px); border: var(--rule); box-shadow: var(--shadow); background: var(--white); color: var(--ink); }
.quiz-count { font-weight: 700; margin-bottom: 10px; }
.quiz-bar { height: 20px; border: var(--rule); background: var(--white); }
.quiz-bar i { display: block; width: 0; height: 100%; background: var(--green); transition: width .3s; }
.quiz-q { margin: 0; padding: 0; border: 0; min-width: 0; }
.quiz-question { margin-bottom: 22px; padding: 0; font-size: clamp(24px, 3cqw, 40px); }
.quiz-answers { display: grid; gap: 12px; }
.quiz-answer { padding: 16px 20px; border: var(--rule); border-radius: 14px; box-shadow: 0 5px 0 var(--ink); background: var(--white); font-size: 18px; font-weight: 700; text-align: left; transition: transform .15s, box-shadow .15s; }
.quiz-answer:hover { transform: translate(-3px, -4px); box-shadow: 6px 8px 0 var(--ink); }
.quiz-answer:active { transform: scale(.98); }
.quiz-results { display: grid; gap: 28px; }
.quiz-result { display: grid; gap: 22px; align-items: center; }
.quiz-photo { aspect-ratio: 1; }
.quiz-result-words { display: grid; gap: 14px; justify-items: start; }
.quiz-again { justify-self: start; font-weight: 800; text-decoration: underline; text-underline-offset: 4px; }
@container site (min-width: 640px) {
  .quiz-result { grid-template-columns: 200px minmax(0, 1fr); }
}
/* Without the script there is no quiz to take, so the questions and the
   progress bar stay hidden and every result shows as a suggestion. With it,
   only the current question, or the one result, is shown. */
.quiz-progress, .quiz-q { display: none; }
.has-quiz .quiz-progress { display: block; }
.has-quiz .quiz-q.is-on { display: block; }
.has-quiz .quiz-results { display: none; }
.has-quiz .quiz-results.is-on { display: grid; }
.has-quiz .quiz-result { display: none; }
.has-quiz .quiz-result.is-on { display: grid; }
@media (prefers-reduced-motion: reduce) { .quiz-answer:hover { transform: none; } }
html[data-a11y-stop-anim] .quiz-answer:hover { transform: none; }

/* ---- guide-list -------------------------------------------------------- */
.guides { display: grid; gap: 28px; padding-block: clamp(56px, 7cqw, 104px); }
.guide-groups { display: grid; gap: 28px; }
.guide-group { border: var(--rule); background: var(--white); color: var(--ink); }
.guide-group-title { padding: 12px 16px; border-bottom: var(--rule); background: var(--c); color: var(--on-c); }
.guide-link { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 16px; padding: 14px 16px; border-bottom: 1px solid var(--soft-line); text-decoration: none; }
.guide-links li:last-child .guide-link { border-bottom: 0; }
.guide-link-title { font-weight: 800; font-size: 18px; }
.guide-link:hover .guide-link-title { text-decoration: underline; text-decoration-thickness: 3px; text-underline-offset: 5px; }
@container site (min-width: 860px) {
  .guide-groups { grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; }
}

/* ---- prose ------------------------------------------------------------- */
.prose-block { display: grid; gap: 22px; justify-items: start; padding-block: clamp(56px, 7cqw, 104px); }
.prose { max-width: 65ch; }
.prose > .h2 { margin-bottom: .5em; }
.prose h2:not(.h2) { margin: 1.4em 0 .4em; font-family: var(--display); font-weight: 400; font-size: clamp(24px, 2.6cqw, 32px); line-height: 1.05; text-transform: uppercase; }
.prose h3 { margin: 1.4em 0 .4em; font-family: var(--display); font-weight: 400; font-size: 20px; text-transform: uppercase; }
.prose p, .prose ul, .prose ol, .prose table { margin-block: .8em; }
.prose > :first-child { margin-top: 0; }
.prose li + li { margin-top: .3em; }
.prose a { font-weight: 700; text-decoration-thickness: 2px; text-underline-offset: 3px; }
.prose table { border-collapse: collapse; font-size: 15px; }
.prose th, .prose td { padding: 8px 10px; border-bottom: 1px solid var(--soft-line); text-align: left; vertical-align: top; }

/* ---- Care guide pages (layouts/Guide.astro) ------------------------------ */
.guide-room a { text-decoration: none; }
.guide-room a:hover { text-decoration: underline; }
.guide-head .tag { border-bottom-color: currentColor; }
.guide-page { display: grid; gap: clamp(36px, 5cqw, 72px); align-items: start; padding-block: clamp(48px, 6cqw, 96px); }
.guide-article { display: grid; gap: 30px; justify-items: start; }
.guide-side { display: grid; gap: 20px; }
.guide-link[aria-current="page"] { background: var(--ink); color: var(--white); }
@container site (min-width: 960px) {
  .guide-page { grid-template-columns: minmax(0, 1fr) 320px; }
}
