/* ============================================================
   Aventurine — the home page's two new pieces
   Load after css/sections.css.

   1. The hero borrows Aventurine Manage's band (aventurine-manage.html), with the
      brand's headline and lead on the charcoal ground over a field of dots
      that swell in a slow wave.
   2. App Suite: one card per app, in a section of its own below the hero.
   3. Self-custody: the privacy band (css/sections.css, .pv-*) set on the
      page's own ground instead of charcoal.
   ============================================================ */

/* ---------- 1. the hero ----------
   Aventurine Manage's band (css/hero-ledger.css, css/budget-tiles.css) with two
   changes. The ground is the site's charcoal rather than Manage's deep green:
   the band paints var(--av-deep), and its ::before inherits the token from the
   header, so redefining it here recolours this page's hero alone. And the
   brand's headline and lead are longer than Aventurine Manage's, so they wrap
   instead of holding one line each. */
.home-hero { --av-deep: var(--surface-inverse) }
.home-hero h1 { white-space: normal; text-wrap: balance; max-width: 18ch; margin: 0 auto }
.home-hero .lead { white-space: normal; max-width: 56ch }

/* ---------- 1b. the photo ----------
   The hero is the photo of Aventurine Planner on a monitor (css/hero-ledger.css,
   .ledger-hero--shot); only the wall behind the copy differs from Manage's. */
.tiles .home-hero.ledger-hero--shot::before {
  background:
    linear-gradient(rgb(0 0 0 / .3), rgb(0 0 0 / .3)),
    url("../assets/images/aventurine-planner-mockup.png") center top / 100% 900% no-repeat;
}

/* the bottom 18% of the photo is cut off the hero (js/hero-trim.js sets --hero-trim):
   clipped, and the next section moves up by the same amount. */
.home-hero {
  clip-path: inset(0 0 var(--hero-trim, 0px) 0);
  margin-bottom: calc(-1 * var(--hero-trim, 0px));
}

/* ---------- 1d. the Planner features ----------
   Copy on one side and a screenshot on the other, swapping sides down the
   page. The copy is first in the markup, so below 900px the rows stack in
   that order. */
.hf { padding-block: clamp(64px, 9vw, 120px) }
.hf .sec-head { max-width: none; margin: 0 auto clamp(48px, 7vw, 80px); text-align: center }
.hf .sec-head h2 { font-size: clamp(2rem, 3.6vw, 3rem); text-wrap: balance }
.hf-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 2fr);
  align-items: center;
  gap: clamp(2rem, 5vw, 4rem);
}
.hf-row + .hf-row { margin-top: clamp(4rem, 9vw, 7rem) }
@media (min-width: 901px) {
  .hf-row--flip { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr) }
  .hf-row--flip .hf-frame { order: -1 }
}
.hf-copy h3 { font-size: clamp(1.6rem, 2.6vw, 2.1rem); line-height: 1.15; text-wrap: balance }
.hf-copy p {
  max-width: 38ch;
  margin-top: 16px;
  font-size: 1.1rem;
  line-height: 1.6;
  color: var(--text-muted);
}
.hf-checks { list-style: none; margin: 24px 0 0; padding: 0; display: grid; gap: 12px }
.hf-checks li {
  position: relative;
  padding-left: 32px;
  font-size: 1.05rem;
  line-height: 1.4;
  color: var(--text);
}
.hf-checks li::before {
  content: "";
  position: absolute;
  left: 4px; top: .25em;
  width: 6px; height: 12px;
  border: solid #2e9e5b;
  border-width: 0 3px 3px 0;
  transform: rotate(45deg);
}
.hf-frame {
  overflow: hidden;
  border-radius: var(--radius-lg);
  background: #000;
  /* keep the black out from under the border: at the rounded corners it
     bled through the border's antialiased edge as a dark fringe */
  background-clip: padding-box;
  border: 1px solid #d4d4d2;
  box-shadow: 0 2px 8px rgb(0 0 0 / .05), 0 32px 64px -32px rgb(0 0 0 / .35);
}
.hf-frame { width: 100%; aspect-ratio: 16 / 9 }
/* the canvas screenshot is a window grab, not 16:9: match its shape so nothing is cropped */
.hf-frame--canvas { aspect-ratio: 1379 / 809 }
.hf-frame--projection { aspect-ratio: 1070 / 645 }
.hf-frame--goals { aspect-ratio: 1432 / 887 }
.hf-frame--compare { aspect-ratio: 927 / 575 }
.hf-frame img { display: block; width: 100%; height: 100%; object-fit: cover }
.hf-more { margin-top: clamp(3rem, 6vw, 5rem); text-align: center; font-weight: 700 }
.hf-more a { color: var(--accent); text-decoration: none }
.hf-more a:hover { text-decoration: underline }
@media (max-width: 900px) {
  .hf-row { grid-template-columns: minmax(0, 1fr); gap: 32px }
}

/* ---------- faq ----------
   The heading and a line about asking us sit in the left third of .wrap and
   the questions fill the other two (sections.css's .faq details, here at full
   width rather than its 760px column). They stack below 900px. */
.home-faq { background: var(--color-aventurine-200) }
.faq-split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 2fr);
  gap: clamp(24px, 4vw, 64px);
  align-items: start;
}
.home-faq .sec-head { max-width: none; margin: 0; text-align: left }
.home-faq .sec-head h2 { font-size: clamp(2rem, 3.6vw, 3rem); text-wrap: balance }
.home-faq .faq { max-width: none; margin: 0 }
.home-faq details:first-child { padding-top: 0 }
.home-faq details p a, .home-faq .sec-head p a { color: var(--accent) }
.home-faq a[href^="mailto:"] { white-space: nowrap }

@media (max-width: 900px) {
  .faq-split { grid-template-columns: minmax(0, 1fr) }
}

/* ---------- winning ----------
   A heading, sized like the FAQ's below it, over a row of
   left-aligned columns, each a bold headline over a line of body text. They
   stack below 900px. Everything starts at .wrap's left edge, like the other
   sections' copy. The section takes the tan of .section-tint and the turning
   stone that was the privacy band's. */
.winning .sec-head { max-width: none; margin: 0 0 48px; text-align: left }
.winning .sec-head h2 { font-size: clamp(2rem, 3.6vw, 3rem); text-wrap: balance }
.win-statements {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(24px, 4vw, 48px);
}
.win-statement { text-align: left }
.win-statement h3 {
  font-size: clamp(1.3rem, 2vw, 1.6rem);
  font-weight: 700;
  line-height: 1.25;
  color: var(--text);
  text-wrap: balance;
}
.win-statement p {
  margin: 12px 0 0;
  font-size: 1.05rem;
  line-height: 1.6;
  color: var(--text-muted);
  text-wrap: pretty;
}
.winning {
  /* the stone runs off the band and is cut at its edges; isolate gives the
     stone's z-index: -1 a floor above the page ground, under the copy */
  position: relative;
  isolation: isolate;
  overflow: hidden;
}
/* The stone is a wireframe redrawn each frame by js/stone-wireframe.js,
   centred on the band at more than its size, behind the copy, in dark
   charcoal. The line holds its width at any size. */
.winning .pv-rock {
  position: absolute;
  z-index: -1;
  left: 50%;
  top: 50%;
  width: clamp(448px, 77vw, 1148px);
  height: auto;
  transform: translate(-50%, -50%);
  overflow: visible;
  pointer-events: none;
}
.winning .pv-rock path {
  fill: none;
  stroke: var(--color-aventurine-800);
  stroke-width: 1.25;
  stroke-linecap: round;
  vector-effect: non-scaling-stroke;
}
.winning .pv-rock [data-part="front"] { stroke-opacity: .5 }
.winning .pv-rock [data-part="back"] { stroke-opacity: .14 }
/* the edge glare: a second drawing of the same lines, darker, thicker and
   fully opaque, shown only through a soft circle that follows the pointer
   (js/stone-wireframe.js sets the mask's centre and radius, and --gk here) */
.winning .pv-rock [data-part="glare"] {
  stroke: var(--color-aventurine-950);
  stroke-width: 1.75;
  opacity: var(--gk, 0);
}
/* the link to the about page, a bold arrow link (.link-arrow in
   css/sections.css) under the first column */
.win-more { margin-top: 48px }
.win-more .link-arrow { font-size: 1.05rem; font-weight: 700 }
@media (max-width: 900px) {
  .win-statements { grid-template-columns: minmax(0, 1fr); max-width: 56ch }
}

/* ---------- 2. app suite ----------
   One card per app, side by side, under a bare "App Suite" heading. They are
   cards rather than links (the first site's whole-card link), so the hover that
   marked a link is gone. White on the light ground, with a hairline. */
.brand-suite .sec-head { margin-bottom: 2rem }
.brand-suite .brand-apps {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr));
  gap: 20px;
  animation: none; /* the hero's entrance; this list scrolls in with .reveal */
}
.brand-app {
  display: grid;
  gap: 16px;
  padding: 24px;
  align-items: start;
}
.brand-suite .brand-app,
.brand-suite .brand-app:hover,
.brand-suite .brand-app:active { background: var(--white); border-color: var(--border) }
.brand-app-head { display: flex; align-items: center; gap: 16px }
.brand-app-mark { width: 56px; height: 56px }
.brand-app-name { font-size: 1.45rem; line-height: 1.2 }
.brand-app-what { font-size: 1rem; line-height: 1.55 }
.brand-app-actions { display: flex; flex-wrap: wrap; gap: 12px; padding-top: 4px }

/* ---------- 3. self-custody ----------
   The privacy band without its charcoal, on the page's own ground, with the
   band's light-on-dark colours turned round for it. Its tan and its stone
   moved up to the winning section. Nothing here changes the band on the other
   pages. */
.pv-paper .pv-head h2 { color: var(--text); text-wrap: wrap; margin-bottom: clamp(1.5rem, 3vw, 2rem) }
.pv-paper .pv-head h2 em {
  background: linear-gradient(135deg, var(--color-accent-600), var(--color-accent-400), var(--color-accent-600));
  -webkit-background-clip: text;
  background-clip: text;
}
.pv-paper .pv-head p { color: var(--text-muted) }
/* the argument on the left (60% of the row), the padlock on the right (40%); they stack again once the row is too narrow to hold both */
.pv-paper .pv-split {
  display: grid;
  grid-template-columns: minmax(0,3fr) minmax(0,2fr);
  gap: clamp(2rem,5vw,4.5rem);
  align-items: center;
}
.pv-paper .pv-split .pv-head { display: block }
@media (max-width:900px) {
  .pv-paper .pv-split { grid-template-columns: 1fr }
}
/* the logo's triangle (the mark's green) with a padlock in the middle, in the
   mark's pale mint */
.pv-art { display: grid; place-items: center }
.pv-art svg { display: block; width: min(100%, 276px); height: auto }
.pv-tri { fill: #497e74 }
.pv-lock-shackle { fill: none; stroke: #d3f5f0; stroke-width: .12; stroke-linecap: round }
.pv-lock-body { fill: #d3f5f0 }
.pv-lock-key { fill: #497e74 }
.pv-checks { margin-top: 24px }
.pv-checks li { font-weight: 500 }

/* ---------- testimonials ---------- */
.tm-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: clamp(1.25rem,2.5vw,1.75rem); max-width: 1200px; margin: 0 auto }
.tm {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 1.5rem;
  margin: 0;
  padding: clamp(1.4rem,2.5vw,1.9rem);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
}
.tm blockquote { margin: 0; font-family: 'Lusitana', serif; font-size: 1.1rem; line-height: 1.6; color: var(--text) }
.tm figcaption { display: flex; flex-direction: column; gap: .15rem }
.tm-name { font-family: 'Manrope', sans-serif; font-weight: 600; color: var(--text) }
.tm-role { font-size: .9rem; color: var(--text-muted) }
@media (max-width:900px) { .tm-grid { grid-template-columns: 1fr } }

/* ---------- a hairline between the bands ---------- */
body > section {
  border-bottom: 1px solid var(--border);
}


/* ---------- the cards' edge glare ----------
   The price cards (js/card-glare.js). Near the
   mouse a card's border catches a glare centred on the pointer, as the
   hero's glass edges do: a hot core fading a short way along the border
   either side (::after, masked to the 1px border), and the faintest bloom
   just outside it (::before, a 4px ring at low strength). The script sets
   --gx and --gy (the pointer, from the card's top left) and --gk (its
   strength, 0 to 1); without it, or under reduced motion, --gk stays 0.
   White, on the dark band. */
.price-grid#checkout .price {
  --glare: var(--white);
  position: relative;
}
.price-grid#checkout .price::before,
.price-grid#checkout .price::after {
  content: "";
  position: absolute;
  border-radius: inherit;
  opacity: var(--gk, 0);
  pointer-events: none;
  -webkit-mask:
    linear-gradient(#000 0 0) content-box,
    linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask:
    linear-gradient(#000 0 0) content-box exclude,
    linear-gradient(#000 0 0);
}
.price-grid#checkout .price::after {
  inset: -1px;
  padding: 1px;
  background: radial-gradient(circle 120px at calc(var(--gx, 0px) + 1px) calc(var(--gy, 0px) + 1px),
    var(--glare), color-mix(in srgb, var(--glare) 40%, transparent) 35%, transparent);
}
.price-grid#checkout .price::before {
  inset: -4px;
  padding: 4px;
  border-radius: calc(var(--radius) + 4px);
  background: radial-gradient(circle 60px at calc(var(--gx, 0px) + 4px) calc(var(--gy, 0px) + 4px),
    color-mix(in srgb, var(--glare) 14%, transparent), transparent);
}
/* the price cards' glare reaches further: a wider core and bloom */
.price-grid#checkout .price::after {
  background: radial-gradient(circle 240px at calc(var(--gx, 0px) + 1px) calc(var(--gy, 0px) + 1px),
    var(--glare), color-mix(in srgb, var(--glare) 40%, transparent) 35%, transparent);
}
.price-grid#checkout .price::before {
  background: radial-gradient(circle 120px at calc(var(--gx, 0px) + 4px) calc(var(--gy, 0px) + 4px),
    color-mix(in srgb, var(--glare) 14%, transparent), transparent);
}

/* The hero's Explore button: solid white, charcoal lettering */
.home-hero .hero-cta .btn-secondary {
  background: var(--white);
  border-color: var(--white);
  color: var(--surface-inverse);
}
.home-hero .hero-cta .btn-secondary:hover  { background: color-mix(in srgb, var(--white) 88%, var(--surface)); border-color: var(--white); color: var(--surface-inverse) }
.home-hero .hero-cta .btn-secondary:active { background: color-mix(in srgb, var(--white) 70%, var(--surface)); border-color: var(--white); color: var(--surface-inverse) }
