/* ---------- #mobile-system ---------- */
/* phones only (max-width 560px): the same phone system as the home and What We Do */
@media (max-width: 559px) {
  /* one rhythm: 48px between sections (the pinned band keeps its own spacing) */
  main > section:not(.hscroll) { padding-block: 48px !important; }
  /* text and buttons centered, buttons stacked */
  section h1, section h2, section h3, section p { text-align: center !important; }
  section h2 + p, section h1 + p { margin-top: 12px; }
  .ctas { display: flex; flex-direction: column; align-items: center; gap: 16px; }
  /* nothing spills past the screen */
  img, canvas, svg, video, iframe { max-width: 100%; }
  section h1 { font-size: clamp(28px, 9.2vw, 44px); overflow-wrap: break-word; }
  /* closing (pre-footer): graphic on the top hairline, buttons 24px apart, no box lines */
  section.closing:not(.hero):not(.hscroll) { position: relative; padding-top: 0 !important; padding-bottom: 0 !important; }
  section.closing:not(.hero):not(.hscroll)::before { content: ""; display: block; position: absolute; top: 0; left: 0; right: 0; height: 1px; background: var(--color-border); z-index: 3; pointer-events: none; }
  section.closing .closing__cell, section.closing .closing__cell.is-in { clip-path: none !important; }
  section.closing .closing__art { min-height: 0 !important; height: 160px; margin-inline: -12px !important; }
  section.closing .closing__main { padding-bottom: 0 !important; text-align: center; align-items: center; }
  section.closing .closing__main p { text-align: center !important; }
  .closing__cta, .closing__cta--2 { padding-inline: var(--gutter) !important; }
  .closing__cta { padding: 24px var(--gutter) 12px !important; }
  .closing__cta--2 { padding: 12px var(--gutter) 24px !important; }
  .endgrid .hl--h[style*="left:"] { display: none !important; }
  .endgrid .hl--v.hl--edge[style*="left: 24px"] { left: 12px !important; }
  .endgrid .hl--v.hl--edge[style*="left: 351px"] { left: calc(100% - 13px) !important; }

  /* footer: box between the side lines, one hairline at the page edge */
  footer { padding-top: 24px !important; padding-bottom: 48px !important; background-image: linear-gradient(var(--color-border), var(--color-border)) !important; background-repeat: no-repeat !important; background-size: 100% 1px !important; background-position: 0 100% !important; }
  .footer__inner { margin-inline: 12px !important; width: auto !important; }
  /* ---------- #mobile-about ---------- */
  /* About Us, phones: the same phone system as Why Granule Labs and What We Do */
  /* hero: frame lines and the top hairline, as on the other pages */
  main > section.pg-hero--rows { position: relative; padding-top: 32px !important; background-image: linear-gradient(var(--color-border), var(--color-border)); background-repeat: no-repeat; background-size: 100% 1px; background-position: 0 36px; }
  main > section.pg-hero--rows { padding-bottom: 0 !important; }   /* the graphic's own 24px is the only space below it */
  main > section.pg-hero--rows::before, main > section.pg-hero--rows::after { content: ""; display: block; position: absolute; top: 0; bottom: 0; width: 1px; background: var(--color-border); border: 0; pointer-events: none; z-index: 1; }
  main > section.pg-hero--rows::before { left: 12px; right: auto; }
  main > section.pg-hero--rows::after { left: auto; right: 12px; }
  main > section.pg-hero--rows .hlines--spot { display: none !important; }
  main > section.pg-hero--rows .wr-title { text-align: center !important; font-size: clamp(28px, 9.2vw, 40px) !important; }

  /* hero copy keeps a 20px gutter; the graphic sits between the frame lines with 48px above and below */
  main > section.pg-hero--rows .wr-copy, main > section.pg-hero--rows .wr-main { padding-inline: 20px !important; margin-inline: 0 !important; width: 100% !important; box-sizing: border-box; }
  main > section.pg-hero--rows .wr-row--viz { padding: 24px 12px !important; margin: 0 !important; box-sizing: border-box; }
  main > section.pg-hero--rows .wr-viz { position: relative; width: 100% !important; height: 260px !important; margin: 0 !important; overflow: hidden; }
  main > section.pg-hero--rows .wr-viz canvas { position: absolute !important; inset: 0 !important; width: 100% !important; height: 100% !important; }
  /* leadership team: two columns that fit the screen */
  .pg-team__row { transform: none !important; translate: none !important; left: 0 !important; margin-left: 0 !important; display: grid !important; grid-template-columns: minmax(0, 1fr) !important; gap: 32px !important; width: 100% !important; padding-inline: 36px !important; box-sizing: border-box; overflow: hidden; }
  .pg-team__row > * { min-width: 0 !important; max-width: 100%; }
  .pg-team__row img { width: 88% !important; height: auto !important; display: block; margin-inline: auto !important; }
  .pg-team__row figcaption { width: 88% !important; margin-inline: auto !important; box-sizing: border-box; }   /* name and icon lined up with the photo edges */
  .pg-team__row > * { width: 100%; }
  .pg-team__row { padding-top: 0 !important; padding-bottom: 0 !important; }
  main > section.pg-team .pg-tw__title { margin: 0 0 32px !important; }   /* space between the heading and the first photo */
  /* "What we care about": centered vertically between the section top and the line below it */
  main > section.pg-vals { padding-top: 0 !important; }
  main > section.pg-vals .pg-head { padding-top: 54px !important; padding-bottom: 54px !important; }
  /* leadership section: equal space above and below, side lines at 12px like the other sections */
  main > section.pg-team { position: relative; padding-top: 16px !important; padding-bottom: 32px !important; }

  /* values: icon centered above its title, text centered */
  .pg-val { display: flex !important; flex-direction: column !important; align-items: center !important; text-align: center !important; }
  .pg-val > svg { margin: 0 auto 12px !important; }
  .pg-val h3, .pg-val p, .pg-val__text { text-align: center !important; }
  .pg-val { padding-block: 20px !important; }
}

/* ---------- #gap-fixes ---------- */

/* ---------- #tablet-about ---------- */
/* About Us, tablet only (561px to 900px): centered hero, headings, text and buttons, buttons in a row, the frame lines 12px in, the same closing and footer as the home */
@media (min-width: 560px) and (max-width: 759px) {
  main > section.pg-hero--rows { position: relative; padding-top: 48px !important; padding-bottom: 0 !important; background-image: linear-gradient(var(--color-border), var(--color-border)); background-repeat: no-repeat; background-size: 100% 1px; background-position: 0 0; }
  main > section.pg-hero--rows::before, main > section.pg-hero--rows::after { content: ""; display: block; position: absolute; top: 0; bottom: 0; width: 1px; background: var(--color-border); border: 0; pointer-events: none; z-index: 1; }
  main > section.pg-hero--rows::before { left: 12px; right: auto; }
  main > section.pg-hero--rows::after { left: auto; right: 12px; }
  main > section.pg-hero--rows .hlines--spot { display: none !important; }
  main > section.pg-hero--rows .wr-title { text-align: center !important; }
  main > section.pg-hero--rows .wr-copy, main > section.pg-hero--rows .wr-main { padding-inline: 36px !important; margin-inline: 0 !important; width: 100% !important; box-sizing: border-box; }
  main > section.pg-hero--rows .wr-copy { display: flex; flex-direction: column; align-items: center; text-align: center; }
  main > section.pg-hero--rows .wr-copy p { text-align: center !important; margin-inline: auto; }
  main > section.pg-hero--rows .wr-row--viz { padding: 48px 12px 24px !important; margin: 0 !important; box-sizing: border-box; }
  main > section.pg-hero--rows .wr-viz { position: relative; width: 100% !important; height: 260px !important; margin: 0 !important; overflow: hidden; }
  main > section.pg-hero--rows .wr-viz canvas { position: absolute !important; inset: 0 !important; width: 100% !important; height: 100% !important; }
  section h1, section h2, section h3, section p { text-align: center !important; }
  .ctas { display: flex !important; flex-direction: row !important; flex-wrap: wrap; justify-content: center; align-items: center; gap: 24px; }
  main > section.pg-team { position: relative; padding-top: 7px !important; padding-bottom: 64px !important; }
  main > section.pg-team .pg-tw__title { padding-top: 57px !important; }
  main > section.pg-team .pg-team__row { padding-top: 0 !important; padding-bottom: 0 !important; }
  main > section.pg-team .pg-tw__title { margin: 0 0 64px !important; text-align: center !important; }
  .pg-team__row { transform: none !important; translate: none !important; left: 0 !important; margin-left: 0 !important; display: grid !important; grid-template-columns: repeat(2, minmax(0, 1fr)) !important; gap: 16px !important; width: 100% !important; padding-inline: 36px !important; box-sizing: border-box; }
  .pg-team__row > * { min-width: 0 !important; max-width: 100%; transform: none !important; translate: none !important; }
  .pg-team__row img { width: 100% !important; height: auto !important; display: block; }
  main > section.pg-introlike.pg-story { text-align: center; }
  main > section.pg-introlike.pg-story .pg-intro, main > section.pg-introlike.pg-story p { margin-inline: auto !important; max-width: none !important; }
  main > section.pg-vals .pg-head { text-align: center; padding-inline: 36px; }
  .pg-val { display: flex !important; flex-direction: column !important; align-items: center !important; text-align: center !important; padding-inline: 36px !important; }
  .pg-val > svg { margin: 0 auto 12px !important; }
  .pg-val h3, .pg-val p, .pg-val__text { text-align: center !important; }
  main > section.pg-backers { text-align: center; }
  main > section.pg-backers .pg-head, main > section.pg-backers .pg-intro { margin-inline: auto; }
  /* hero spacing: 48px above the heading and 48px between the buttons and the graphic line; 24px heading to text, 32px text to buttons */
  main > section.pg-hero--rows { padding-top: 72px !important; }
  /* stacked, as on the phone: the hero copy and its buttons in one column, the values and the backers one above the other */
  main > section.pg-hero--rows .wr-main { grid-template-columns: minmax(0, 1fr) !important; justify-items: center; }
  main > section.pg-hero--rows .wr-ctas { justify-content: center !important; }
  main > section.pg-vals { grid-template-columns: minmax(0, 1fr) !important; }
  main > section.pg-vals .pg-head { display: block; }
  main > section.pg-vals .pg-head { padding-bottom: 16px !important; }
  main > section.pg-backers { grid-template-columns: minmax(0, 1fr) !important; text-align: center; }
  main > section.pg-backers > * { width: 100%; }
  main > section.pg-vals > *, main > section.pg-backers > * { grid-column: 1 !important; grid-row: auto !important; }
  main > section.pg-backers .pg-backers__logos { width: 100% !important; justify-self: stretch; margin-top: 32px !important; padding: 0 36px !important; box-sizing: border-box; }
  main > section.pg-hero--rows .wr-main { padding-top: 0 !important; padding-bottom: 72px !important; }
  main > section.pg-hero--rows .wr-copy p { margin-top: 24px !important; }
  main > section.pg-hero--rows .wr-main { row-gap: 0 !important; gap: 0 !important; }
  main > section.pg-hero--rows .wr-ctas { margin-top: 32px !important; }
  /* ---------- #tablet-fixes ---------- */
  /* tablet (561px to 900px): the footer box has a hairline on its bottom edge and one on the top edge of the footer, both across the whole screen width (as on Contact); the hero's script-drawn hairlines are hidden (the frame is the 12px lines only) */
  section.pg-hero .hlines { display: none !important; }
  main > section:not(.hscroll) > .hlines > i:not([class]) { display: none !important; }
}
/* the closing section, with the footer frame and lines it shares, stays stacked up to 939px, where its button first fits two columns (a section breakpoint) */
@media (min-width: 560px) and (max-width: 939px) {
  section.closing:not(.hero):not(.hscroll) { position: relative; padding-top: 0 !important; padding-bottom: 0 !important; }
  section.closing:not(.hero):not(.hscroll)::before { content: ""; display: block; position: absolute; top: 0; left: 0; right: 0; height: 1px; background: var(--color-border); z-index: 3; pointer-events: none; }
  section.closing .closing__cell { display: flex !important; flex-wrap: wrap !important; justify-content: center !important; align-items: center !important; column-gap: 16px !important; grid-template-columns: none !important; }
  section.closing .closing__cell > .closing__art, section.closing .closing__cell > .closing__main { flex: 0 0 100% !important; width: 100% !important; grid-area: auto !important; }
  section.closing .closing__cell > .closing__cta, section.closing .closing__cell > .closing__cta--2 { flex: 0 0 auto !important; grid-area: auto !important; padding: 48px 24px 24px !important; }
  section.closing .closing__cta .btn, section.closing .closing__cta--2 .btn { width: auto !important; }
  section.closing .closing__art { min-height: 0 !important; height: 160px; margin-inline: -12px !important; border-bottom: 1px solid var(--color-border) !important; }
  section.closing .closing__main { padding-bottom: 0 !important; text-align: center; }
  .endgrid > .hlines > .hl--v:not(.hl--edge) { display: none !important; }
  .endgrid > .hlines > .hl--h[style*="left:"] { display: none !important; }
  .endgrid > .hlines > .hl--v.hl--edge:nth-child(6) { left: 12px !important; right: auto !important; top: 0 !important; bottom: 0 !important; height: auto !important; translate: none !important; }
  .endgrid > .hlines > .hl--v.hl--edge:nth-child(7) { left: auto !important; right: 12px !important; top: 0 !important; bottom: 0 !important; height: auto !important; translate: none !important; }
  footer { padding-top: 24px !important; padding-bottom: 48px !important; background-image: linear-gradient(var(--color-border), var(--color-border)) !important; background-repeat: no-repeat !important; background-size: 100% 1px !important; background-position: 0 100% !important; }
  .footer__inner { margin-inline: 12px !important; width: auto !important; }
  /* the pre-footer: no line between the body text and the buttons (the line under the graphic stays) */
  .endgrid > .hlines > .hl--h[style*="top: 349px"] { display: none !important; }
  footer { position: relative !important; padding-top: 24px !important; padding-bottom: 48px !important; }
  footer::before { content: ""; display: block; position: absolute; left: 0; right: 0; top: 0; height: 1px; background: var(--color-border); pointer-events: none; }
  footer::after { content: ""; display: block; position: absolute; left: 0; right: 0; bottom: 48px; height: 1px; background: var(--color-border); pointer-events: none; }
}
/* 821px to 900px: the same as 561px to 820px: sections are the full width with no own side borders, the stray vertical hairlines and the desktop column lines are hidden */

/* ---------- #hero-901 ---------- */
/* About Us, 901px to 1000px: the hero centered, the heading, the text and the buttons in one column; the text is not cut */
@media (min-width: 760px) and (max-width: 1099px) {
  main > section.pg-hero--rows .wr-main { grid-template-columns: minmax(0, 1fr) !important; justify-items: center; height: auto !important; overflow: visible !important; }
  main > section.pg-hero--rows .wr-copy { align-items: center; text-align: center; }
  main > section.pg-hero--rows .wr-title, main > section.pg-hero--rows .wr-copy p { text-align: center !important; margin-inline: auto; max-width: 34em; }
  main > section.pg-hero--rows .wr-ctas { justify-content: center !important; margin-top: 32px !important; }
  main > section.pg-hero--rows .wr-copy, main > section.pg-hero--rows .wr-copy p { height: auto !important; max-height: none !important; overflow: visible !important; }
}

/* ---------- #hero-buttons-box ---------- */
/* About Us, up to 1000px (phones, tablet and 901px to 1000px): the second hero button has the same box style as the first */
@media (max-width: 1099px) {
  main > section.pg-hero--rows .wr-ctas .link--mono { position: relative; display: inline-flex; align-items: center; justify-content: center; height: 56px; padding: 0 24px !important; border: 1px solid var(--line-soft); color: var(--color-text); text-decoration: none; background: transparent; white-space: nowrap; box-sizing: border-box; }
  main > section.pg-hero--rows .wr-ctas .link--mono::after { display: none !important; }
  main > section.pg-hero--rows .wr-ctas .btn { height: 56px; box-sizing: border-box; }
}

/* ---------- #vq-css ---------- */
/* About Us: the founders' quotes. Both show at once on a faint granule dot field; the second sentence of each
   is highlighted the way the H1s are, wiping in when the quote comes on screen. The two quotes differ in length and
   in where the highlight falls, so the type is smaller than a pull quote to keep them within a line of each other. */
.vqs { position: relative; border-top: 1px solid var(--color-border); padding: clamp(64px, 8vw, 120px) var(--gutter, 24px);
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18'%3E%3Crect width='2' height='2' fill='%23F5F5F5' fill-opacity='.1'/%3E%3C/svg%3E") 8px 8px / 18px 18px; }
.vqs__grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(20px, 3vw, 40px); max-width: 1120px; margin-inline: auto; }
.vq { margin: 0; display: flex; flex-direction: column; justify-content: space-between; gap: 32px; padding: clamp(28px, 3.2vw, 48px);
  background: var(--color-surface-1); border: 1px solid var(--color-border); }
.vq blockquote { margin: 0; text-align: left; }
.vq p, .vq figcaption { text-align: left !important; }
.vq blockquote::before { content: "\201C"; content: "\201C" / ""; display: block; height: .5em; margin-bottom: 8px; font: 400 64px/1 var(--font-display); color: var(--color-orange); }
.vq p { margin: 0; font-family: var(--font-display); font-weight: var(--weight-headline, 400); font-size: clamp(20px, 1.75vw, 26px); line-height: 1.35; color: var(--color-off-white); text-wrap: pretty; }
.vq__hl { color: inherit; padding: 0 .08em; -webkit-box-decoration-break: clone; box-decoration-break: clone;
  background: linear-gradient(var(--color-orange), var(--color-orange)) no-repeat 0 0 / 0% 100%; transition: background-size 1s cubic-bezier(.4, 0, .2, 1), color .3s .7s; }
.vq.is-in .vq__hl { background-size: 100% 100%; color: var(--color-black); }
html:not(.js) .vq__hl { background-size: 100% 100%; color: var(--color-black); }
.vq figcaption { display: flex; align-items: center; gap: 14px; font: 400 12px/1.5 var(--font-mono); letter-spacing: .1em; text-transform: uppercase; }
.vq__face { flex: none; width: 44px; height: 44px; object-fit: cover; filter: grayscale(1) contrast(1.05); background: var(--color-surface-2); }
.vq__name { display: block; color: var(--color-off-white); }
.vq__role { display: block; color: var(--color-text-muted); }
@media (max-width: 759px) { .vqs__grid { grid-template-columns: minmax(0, 1fr); } }   /* side by side from 760 (a section breakpoint); narrower, the quotes break to single words */
@media (prefers-reduced-motion: reduce) { .vq__hl { transition: none; } }

/* ---------- logo sizes (were inline styles; !important keeps them as strong) ---------- */
img[src="img/logo-pure-play-partners.png"] { width: 240px !important; height: 71px !important; }
img[src="img/logo-gryphon-investors.png"] { width: 236px !important; height: 71px !important; }

/* the backers' logos sit on the sunk band, as the customer logos on Why Us do: one treatment for every logo strip (fix G10) */
main > section.pg-backers { background: var(--color-surface-0); border-top: 1px solid var(--color-border); }
main > section.pg-backers .pg-backers__logo { background: transparent; }

/* Section spacing (fix G10): every section keeps 48px between its edge and its content on phones and 96px from 760px
   up, unless something runs to the edge. The rule is in CLAUDE.md; tests/section-spacing.spec.mjs checks it. */
@media (max-width: 759px) {
  body main > section.pg-hero--rows .wr-row--viz { padding-bottom: 48px !important; }
  body main > section.pg-team { padding-top: 0 !important; padding-bottom: 48px !important; }
}
@media (min-width: 760px) {
  body main > section.vqs { padding-block: 96px !important; }
  body main > section.pg-team .pg-tw__title { padding-top: 96px !important; }
  body main > section.pg-team .pg-team__row { padding-bottom: 96px !important; }
  body main > section.pg-vals { padding-bottom: 64px !important; }   /* the last value keeps 32px of its own */
  body main > section.pg-backers { padding-top: 96px !important; }
}
/* the values open on a hairline, as every other hand-off on the page does (inner.css drops the line after a .pg-tw band) */
main > section.pg-tw + section.pg-vals { border-top: 1px solid var(--color-border); }
