/* ============================================================
   ABOUT: "sunrise statement" (Mark's pick, 2026-10-20, from the Silna
   Health reference). Prefix ab-. Built by assets-source/build_about_page.py.
   1. .ab-dawn   navy hero: belief as the H1, light-blue dawn glow rising
                 behind a faint Mournes skyline whose front layer is white,
                 so the hero runs straight into the white story section
   2. .ab-story  label + heading left, two paragraphs right
   3. .ab-how    "Our values": five tilted glass cards, big faint icon in each
   4. .ab-note   founder's note, signed with the logo peaks (no photo)
   5. .ab-facts  fold-out rows
   js/about.js adds .ab-anim to <body>; .ab-reveal blocks and the cards
   then rise in as they scroll into view. Without JS / reduced motion
   everything is simply visible.
   Previous version: assets-source/pre-about-sunrise-backup/.
   ============================================================ */

/* ---------- 1. Hero ---------- */
.ab-dawn {
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  min-height: 92vh;
  min-height: 92svh;
  padding: calc(var(--nav-height) + 60px) 0 clamp(120px, 18vh, 200px);
  background: linear-gradient(180deg, var(--dark) 0%, #112652 55%, var(--navy) 100%);
  color: var(--white);
  text-align: center;
}
.ab-dawn-inner { position: relative; z-index: 2; }
.ab-dawn .section-label { color: var(--light-blue); }
.ab-dawn h1 {
  max-width: 30ch;               /* wide enough for the first sentence to sit on two lines on desktop */
  margin: 0 auto;
  font-size: clamp(2.1rem, 4.6vw, 3.9rem);
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: -0.03em;
  color: var(--white);
  text-wrap: balance;
}
/* The rest of the heading, on its own lines and quieter than the first sentence */
.ab-dawn-more {
  display: block;
  max-width: 34rem;
  margin: 1.5rem auto 0;
  font-size: clamp(1.05rem, 1.6vw, 1.3rem);
  font-weight: 500;
  line-height: 1.6;
  letter-spacing: 0;
  color: rgba(255, 255, 255, 0.8);
}

/* The sunrise: a wide light-blue glow sitting on the horizon */
.ab-dawn-glow {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 62% 58% at 50% 100%, rgba(166, 196, 240, 0.8) 0%, rgba(123, 159, 212, 0.5) 30%, rgba(46, 101, 184, 0.22) 60%, rgba(46, 101, 184, 0) 100%);
  pointer-events: none;
}
.ab-ridge { position: absolute; left: 0; right: 0; bottom: -1px; z-index: 1; width: 100%; height: clamp(70px, 14vh, 150px); }
.ab-ridge-back { fill: rgba(26, 53, 104, 0.55); }
.ab-ridge-front { fill: var(--white); }

/* ---------- 2. Our story ---------- */
.ab-story { padding: 90px 0 110px; background: var(--white); }
.ab-story-inner { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.35fr); gap: 2rem 5rem; align-items: start; }
.ab-story h2 { margin: 0; font-size: clamp(1.8rem, 3.4vw, 2.7rem); line-height: 1.12; letter-spacing: -0.025em; }
.ab-story-copy p { margin: 0 0 1.25rem; font-size: 1.12rem; line-height: 1.7; color: var(--text); }
.ab-story-copy p:last-child { margin-bottom: 0; }

/* ---------- 3. Our values: glass cards (Mark's reference, 2026-10-20) ----------
   Dark section with soft blue glows. Five frosted-glass cards in a row,
   each tilted and nudged up or down a little; a large faint line icon is
   drawn inside each card behind the words. Hover straightens a card and
   lights it up. Three then two on tablets, one column on phones. */
.ab-how {
  position: relative;
  overflow: hidden;
  padding: 120px 0 140px;
  background:
    radial-gradient(ellipse 45% 55% at 50% 72%, rgba(46, 101, 184, 0.55) 0%, rgba(46, 101, 184, 0) 70%),
    radial-gradient(ellipse 35% 45% at 12% 25%, rgba(123, 159, 212, 0.18) 0%, rgba(123, 159, 212, 0) 70%),
    radial-gradient(ellipse 35% 45% at 90% 85%, rgba(123, 159, 212, 0.14) 0%, rgba(123, 159, 212, 0) 70%),
    linear-gradient(180deg, var(--dark) 0%, #0f2350 100%);
  color: var(--white);
}
.ab-how-head { max-width: 38rem; margin: 0 auto 4.5rem; text-align: center; }
.ab-how .section-label { color: var(--light-blue); }
.ab-how h2 { margin: 0 0 1rem; font-size: clamp(1.9rem, 3.6vw, 2.9rem); letter-spacing: -0.025em; color: var(--white); }
.ab-how-intro { margin: 0; font-size: 1.08rem; line-height: 1.6; color: rgba(255, 255, 255, 0.78); }

.ab-how-list { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 1.25rem; align-items: start; margin: 0; padding: 0; list-style: none; }
.ab-how-card {
  --tilt: 0deg;
  --drop: 0px;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  min-height: 17.5rem;
  margin-top: var(--drop);
  padding: 1.6rem 1.4rem;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 14px;
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.15) 0%, rgba(255, 255, 255, 0.05) 55%, rgba(255, 255, 255, 0.08) 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.28), 0 24px 50px rgba(5, 12, 30, 0.35);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  rotate: var(--tilt);
  transition: rotate 0.45s cubic-bezier(.2, .8, .2, 1), background 0.35s ease, border-color 0.35s ease;
}
.ab-how-card:nth-child(1) { --tilt: -4deg;   --drop: 2.5rem; }
.ab-how-card:nth-child(2) { --tilt: 2.5deg;  --drop: 0rem; }
.ab-how-card:nth-child(3) { --tilt: -1.5deg; --drop: 2rem; }
.ab-how-card:nth-child(4) { --tilt: 3deg;    --drop: 0.5rem; }
.ab-how-card:nth-child(5) { --tilt: -2.5deg; --drop: 2.25rem; }
.ab-how-card:hover {
  rotate: 0deg;
  border-color: rgba(255, 255, 255, 0.35);
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.24) 0%, rgba(255, 255, 255, 0.09) 55%, rgba(255, 255, 255, 0.12) 100%);
}
/* the big faint icon inside each card, behind the words */
.ab-how-icon {
  position: absolute;
  top: -12%;
  right: -18%;
  width: 95%;
  aspect-ratio: 1;
  color: rgba(255, 255, 255, 0.2);
  pointer-events: none;
  transition: color 0.35s ease;
}
.ab-how-icon svg { width: 100%; height: 100%; }
.ab-how-icon svg * { stroke-width: 1.2px; vector-effect: non-scaling-stroke; }
.ab-how-card:hover .ab-how-icon { color: rgba(255, 255, 255, 0.34); }
.ab-how-card h3 { position: relative; margin: 0 0 0.6rem; font-size: 1.2rem; font-weight: 700; color: var(--white); }
.ab-how-card p { position: relative; margin: 0; font-size: 0.92rem; line-height: 1.55; color: rgba(255, 255, 255, 0.8); }

/* ---------- 4. Founder's note (Mark's words, 2026-10-20) ----------
   A white letter card: the note in quotation marks, first sentence large,
   the rest at reading size, signed under a thin rule. */
.ab-note-wrap { padding: 110px 0; background: var(--off-white); }
.ab-note {
  max-width: 44rem;
  margin: 0 auto;
  padding: 3.5rem 3.75rem 3rem;
  border: 1px solid var(--border);
  border-radius: 20px;
  background: var(--white);
  box-shadow: var(--shadow-lg);
}
.ab-note .section-label { display: block; }
.ab-note blockquote { margin: 0; }
.ab-note blockquote p { margin: 0 0 1.25rem; font-size: 1.12rem; line-height: 1.75; color: var(--text); }
.ab-note-lead { display: block; margin-bottom: 1rem; font-size: clamp(1.6rem, 3vw, 2.2rem); font-weight: 800; line-height: 1.2; letter-spacing: -0.02em; color: var(--navy); }
/* quotation marks around the whole note: opening one hangs just left of the first line */
.ab-note-lead::before { content: "\201C"; margin-left: -0.5em; padding-right: 0.06em; color: var(--blue); }
.ab-note blockquote p:last-child { margin-bottom: 0; }
.ab-note blockquote p:last-child::after { content: "\201D"; }
.ab-note-sign { display: flex; align-items: center; gap: 1rem; margin-top: 2rem; padding-top: 1.5rem; border-top: 1px solid var(--border); }
.ab-note-sign img { width: 3.75rem; height: auto; }
.ab-note-sign p { margin: 0; font-size: 0.95rem; color: var(--text-muted); line-height: 1.4; }
.ab-note-sign strong { display: block; font-size: 1.15rem; color: var(--navy); }

/* ---------- 5. The details ---------- */
.ab-facts { padding: 100px 0; background: var(--white); }
.ab-facts-inner { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); gap: 2rem 4rem; align-items: start; }
.ab-facts h2 { margin: 0; font-size: clamp(1.6rem, 3vw, 2.3rem); letter-spacing: -0.02em; }
.ab-facts-list { border-top: 1px solid var(--navy); }
.ab-fact { border-bottom: 1px solid var(--border); }
.ab-fact summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.25rem 0;
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--navy);
  cursor: pointer;
  list-style: none;
  transition: color var(--transition);
}
.ab-fact summary::-webkit-details-marker { display: none; }
.ab-fact summary:hover { color: var(--blue); }
.ab-fact summary:focus-visible { outline: 2px solid var(--blue); outline-offset: 3px; }
/* plus that turns into a minus when the row is open */
.ab-fact-icon { position: relative; flex: none; width: 1.9rem; height: 1.9rem; border: 1.5px solid var(--navy); border-radius: 50%; }
.ab-fact-icon::before,
.ab-fact-icon::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0.75rem;
  height: 1.5px;
  background: var(--navy);
  translate: -50% -50%;
  transition: rotate var(--transition);
}
.ab-fact-icon::after { rotate: 90deg; }
.ab-fact[open] .ab-fact-icon::after { rotate: 0deg; }
.ab-fact-body { padding: 0 0 1.5rem; }
.ab-fact-body p { max-width: 38rem; margin: 0; }
.ab-fact-body a { font-weight: 700; color: var(--blue); border-bottom: 1px solid var(--light-blue); }
.ab-fact-body a:hover,
.ab-fact-body a:focus-visible { color: var(--navy); border-color: var(--navy); }

.ab-badges { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem 1.5rem; margin: 1.25rem 0 0; padding: 0; list-style: none; }
.ab-badges a { display: block; border: 0; transition: translate var(--transition); }
.ab-badges a:hover,
.ab-badges a:focus-visible { translate: 0 -3px; }
.ab-badges img { display: block; width: auto; height: 84px; }
.ab-badges .ab-badge-wide { height: 60px; }

/* ---------- Motion (js/about.js adds .ab-anim to <body>) ---------- */
@keyframes ab-sunrise {
  from { opacity: 0; translate: 0 12%; }
  to   { opacity: 1; translate: 0 0; }
}
@keyframes ab-rise {
  from { opacity: 0; translate: 0 1.5rem; }
  to   { opacity: 1; translate: 0 0; }
}
.ab-anim .ab-dawn-glow { animation: ab-sunrise 2.4s cubic-bezier(.2, .7, .2, 1) 0.15s backwards; }   /* "backwards", not "both": once it has risen the glow is a plain layer again (a held animation broke page painting on scroll) */
.ab-anim .ab-dawn-inner > * { animation: ab-rise 0.9s cubic-bezier(.2, .8, .2, 1) both; }
.ab-anim .ab-dawn-inner > :nth-child(2) { animation-delay: 0.15s; }
.ab-anim .ab-dawn-inner > :nth-child(3) { animation-delay: 0.35s; }
.ab-anim .ab-reveal,
.ab-anim .ab-how-card { opacity: 0; translate: 0 1.75rem; transition: opacity 0.7s ease, translate 0.7s cubic-bezier(.2, .8, .2, 1); }
.ab-anim .ab-how-card { translate: 0 3rem; transition: opacity 0.8s ease, translate 0.8s cubic-bezier(.2, .8, .2, 1), rotate 0.45s cubic-bezier(.2, .8, .2, 1), background 0.35s ease, border-color 0.35s ease; }
.ab-anim .ab-how-card:nth-child(2) { transition-delay: 0.12s; }
.ab-anim .ab-how-card:nth-child(3) { transition-delay: 0.24s; }
.ab-anim .ab-how-card:nth-child(4) { transition-delay: 0.36s; }
.ab-anim .ab-how-card:nth-child(5) { transition-delay: 0.48s; }
.ab-anim .ab-story-copy.ab-reveal { transition-delay: 0.12s; }
.ab-anim .is-in { opacity: 1; translate: none; }
.ab-anim .ab-how-card.is-in:hover { transition-delay: 0s; }   /* the stagger is only for the first reveal */

@media (min-width: 901px) and (max-width: 1150px) {
  .ab-how-list { grid-template-columns: repeat(6, minmax(0, 1fr)); row-gap: 2.5rem; }
  .ab-how-card { grid-column: span 2; }
  .ab-how-card:nth-child(4) { grid-column: 2 / 4; }
  .ab-how-card:nth-child(5) { grid-column: 4 / 6; }
}

/* ============ Smaller screens ============ */
@media (max-width: 900px) {
  .ab-dawn { min-height: 80vh; min-height: 80svh; }
  .ab-story,
  .ab-how,
  .ab-note-wrap,
  .ab-facts { padding: 70px 0; }
  .ab-story-inner,
  .ab-facts-inner { grid-template-columns: minmax(0, 1fr); gap: 1.5rem; }
  .ab-how-head { margin-bottom: 2.5rem; }
  .ab-how-list { grid-template-columns: minmax(0, 1fr); max-width: 24rem; margin: 0 auto; gap: 1.5rem; }
  .ab-how-card { min-height: 14rem; }
  .ab-how-card:nth-child(n) { --drop: 0rem; --tilt: 1.5deg; }
  .ab-how-card:nth-child(odd) { --tilt: -1.5deg; }
  .ab-dawn-glow { background: radial-gradient(ellipse 110% 55% at 50% 100%, rgba(166, 196, 240, 0.8) 0%, rgba(123, 159, 212, 0.5) 30%, rgba(46, 101, 184, 0.22) 60%, rgba(46, 101, 184, 0) 100%); }
}
@media (max-width: 480px) {
  .ab-badges img { height: 64px; }
  .ab-badges .ab-badge-wide { height: 46px; }
}
@media (max-width: 600px) {
  .ab-note { padding: 2.25rem 1.5rem 2rem 1.75rem; border-radius: 16px; }
}
