/* ==========================================================================
   Visory — v3 homepage design layer
   Loaded after styles.css, on the homepage only. Bold tight sans, light grey
   page, large rounded cards, a photographic hero with the nav over it, and
   lime as the single accent. Everything is scoped to .v3 so the rest of the
   site keeps the current system until this direction is rolled out.
   ========================================================================== */

.v3 {
  --bg: #f2f2f0;
  --surface: #ffffff;
  --surface-2: #e8e8e5;
  --ink: #101216;
  --ink-soft: #5c6068;
  --lime: #d8f23c;
  --line: rgba(16, 18, 22, 0.1);
  --r: 24px;
  --r-sm: 16px;
  --shadow: 0 24px 60px -32px rgba(16, 18, 22, 0.45);
  --font-display: "Inter Tight", "Inter", system-ui, sans-serif;

  background: var(--bg);
  color: var(--ink);
  font-family: "Inter", system-ui, sans-serif;
}

.v3 .container { width: min(1240px, 100%); padding-inline: clamp(1rem, 3vw, 2rem); }

/* Headlines are the loudest thing on the page: heavy, tight, near-black. */
.v3 h1, .v3 h2, .v3 h3, .v3 .h-xl {
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: -0.035em;
  line-height: 1.02;
  color: var(--ink);
  text-wrap: balance;
}

.v3 h2 { font-size: clamp(2rem, 4.3vw, 3.6rem); margin: 0 0 1rem; }
.v3 h3 { font-size: clamp(1.1rem, 1.6vw, 1.35rem); letter-spacing: -0.02em; line-height: 1.2; }
.v3 p { color: var(--ink-soft); }

/* Section labels are numbered in order down the page, so the index stays
   right when a section is added or removed. */
.v3 main { counter-reset: v3-section; }

.v3 .eyebrow {
  display: inline-flex;
  align-items: baseline;
  gap: 0.75rem;
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 0.72rem;
  font-weight: 400;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin: 0 0 1.4rem;
}

.v3 .eyebrow::before {
  counter-increment: v3-section;
  content: counter(v3-section, decimal-leading-zero);
  letter-spacing: 0.04em;
  color: var(--ink);
}

/* ------------------------------------------------------------- buttons -- */

.v3 .btn {
  --btn-bg: var(--ink);
  --btn-fg: #fff;
  min-height: 52px;
  padding: 0.85rem 1.1rem 0.85rem 1.5rem;
  border-radius: 999px;
  font-weight: 500;
  font-size: 0.95rem;
  letter-spacing: -0.01em;
  gap: 0.9rem;
}

.v3 .btn::after {
  content: "";
  width: 30px; height: 30px;
  border-radius: 50%;
  background: var(--lime) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23101216' stroke-width='2.4'%3E%3Cpath d='M5 12h13M12 5l7 7-7 7'/%3E%3C/svg%3E") center/14px no-repeat;
  transition: transform 380ms var(--ease);
}

.v3 .btn--lime { --btn-bg: var(--lime); --btn-fg: var(--ink); }
.v3 .btn--lime::after { background-color: var(--ink); background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23d8f23c' stroke-width='2.4'%3E%3Cpath d='M5 12h13M12 5l7 7-7 7'/%3E%3C/svg%3E"); }

.v3 .btn--quiet {
  --btn-bg: transparent;
  --btn-fg: var(--ink);
  border: 1px solid var(--line);
}

/* Secondary buttons drop the arrow disc so the primary action stays obvious. */
.v3 .btn--quiet,
.v3 .btn--on-photo { padding-inline: 1.5rem; }
.v3 .btn--quiet::after,
.v3 .btn--on-photo::after { display: none; }

.v3 .btn--on-photo { --btn-bg: #fff; --btn-fg: var(--ink); }

/* -------------------------------------------------------------- header -- */

/* Inner pages get a solid header; the homepage header rides over the sky
   and stays white until the page scrolls. */
.v3 .site-header { background: rgba(242, 242, 240, 0.9); border-bottom: 1px solid var(--line); }
.v3 .header-row { min-height: 84px; }

.v3--home .site-header:not(.is-scrolled) { background: transparent; border-bottom-color: transparent; }
.v3--home .site-header:not(.is-scrolled) .brand,
.v3--home .site-header:not(.is-scrolled) .nav-list a { color: #fff; }
.v3--home .site-header:not(.is-scrolled) .nav-list a:hover { border-bottom-color: #fff; }
.v3--home .site-header:not(.is-scrolled) .nav-toggle { border-color: rgba(255,255,255,0.6); }
.v3--home .site-header:not(.is-scrolled) .nav-toggle span { background: #fff; }

.v3 .brand { font-family: var(--font-display); font-size: 1.05rem; font-weight: 700; letter-spacing: -0.02em; text-transform: none; }
.v3 .nav-list a { font-size: 0.95rem; color: var(--ink); }
.v3 .header-cta { min-height: 44px; padding: 0.6rem 0.75rem 0.6rem 1.2rem; --btn-bg: var(--lime); --btn-fg: var(--ink); }
.v3 .header-cta::after { width: 26px; height: 26px; background-color: var(--ink); background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23d8f23c' stroke-width='2.4'%3E%3Cpath d='M5 12h13M12 5l7 7-7 7'/%3E%3C/svg%3E"); }

/* ---------------------------------------------------------------- hero -- */

/* Centred copy over open sky, meadow along the bottom edge. */
.v3-hero {
  position: relative;
  isolation: isolate;
  display: grid;
  align-items: start;
  min-height: min(100svh, 900px);
  margin-top: -84px;
  padding: calc(84px + clamp(3.5rem, 11vh, 7.5rem)) 0 clamp(10rem, 26vh, 15rem);
  color: #fff;
  text-align: center;
  overflow: hidden;
}

/* Generated sky-and-meadow image. The gradient underneath shows only
   while it loads. */
.v3-hero__bg {
  position: absolute;
  inset: 0;
  z-index: -2;
  background: linear-gradient(180deg, #16469f 0%, #3a7cd6 55%, #d6e9f6 82%, #5f9a40 100%);
}
.v3-hero__bg img,
.v3-hero__bg picture { position: absolute; inset: 0; width: 100%; height: 100%; }
.v3-hero__bg img { object-fit: cover; object-position: center bottom; }

/* Light scrim behind the copy only: the sky stays bright, the type stays legible. */
.v3-hero::after {
  content: "";
  position: absolute; inset: 0; z-index: -1;
  background:
    radial-gradient(42% 30% at 50% 52%, rgba(10, 34, 84, 0.34), rgba(10, 34, 84, 0) 100%),
    linear-gradient(180deg, rgba(10, 34, 84, 0.42) 0%, rgba(10, 34, 84, 0.16) 45%, rgba(10, 34, 84, 0) 70%);
}

.v3-hero__inner { display: grid; justify-items: center; }

.v3 .v3-hero__badge {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  margin: 0 0 1.6rem;
  padding: 0.3rem 0.9rem 0.3rem 0.3rem;
  border: 1px solid rgba(255, 255, 255, 0.45);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  font-size: 0.82rem;
  font-weight: 500;
  color: #fff;
}

.v3-hero__badge span {
  padding: 0.22rem 0.65rem;
  border-radius: 999px;
  background: var(--lime);
  font-size: 0.74rem;
  font-weight: 600;
  color: var(--ink);
}

.v3-hero h1 {
  max-width: 18ch;
  margin: 0 0 1.3rem;
  font-size: clamp(2.5rem, 6vw, 5.2rem);
  color: #fff;
  text-shadow: 0 2px 28px rgba(10, 34, 84, 0.3);
}

.v3 .v3-hero__lead {
  max-width: 50ch;
  margin: 0 0 2.2rem;
  font-size: clamp(1.02rem, 1.25vw, 1.15rem);
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.95);
  text-shadow: 0 1px 2px rgba(10, 34, 84, 0.35), 0 1px 18px rgba(10, 34, 84, 0.55);
}

.v3-hero__actions { display: flex; flex-wrap: wrap; gap: 0.7rem; align-items: center; justify-content: center; }

/* ---------------------------------------------- cards riding the hero -- */

/* The proof cards sit below the meadow rather than covering it. */
.v3-deck {
  position: relative;
  z-index: 2;
  margin-top: clamp(1.5rem, 3vw, 2.5rem);
}

.v3-deck__row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.9rem;
}

.v3-card {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  min-height: 190px;
  padding: 1.3rem;
  border-radius: var(--r);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.v3-card__label {
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.v3-card__figure {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.9rem, 3.1vw, 2.7rem);
  letter-spacing: -0.04em;
  line-height: 1;
  margin: auto 0 0;
  color: var(--ink);
}

.v3-card__note { margin: 0; font-size: 0.82rem; line-height: 1.45; color: var(--ink-soft); }

.v3-card--lime { background: var(--lime); }
.v3-card--lime .v3-card__label,
.v3-card--lime .v3-card__note { color: rgba(16, 18, 22, 0.66); }

.v3-card--ink { background: var(--ink); }
.v3-card--ink .v3-card__figure { color: #fff; }
.v3-card--ink .v3-card__label { color: rgba(255, 255, 255, 0.6); }
.v3-card--ink .v3-card__note { color: rgba(255, 255, 255, 0.72); }

.v3-card--grey { background: var(--surface-2); box-shadow: none; }

/* A card whose body is a screenshot. */
.v3-card--shot {
  position: relative;
  padding: 0;
  overflow: hidden;
  box-shadow: none;
  border: 1px solid var(--line);
}
.v3-card__media { height: 170px; overflow: hidden; background: var(--surface-2); border-bottom: 1px solid var(--line); }
.v3-card__media img { width: 100%; height: 100%; object-fit: cover; object-position: top center; }
.v3-card--shot .v3-card__body { padding: 1.2rem 1.3rem 1.4rem; display: grid; gap: 0.5rem; justify-items: start; }
.v3-card--shot h3 { margin: 0.3rem 0 0; font-size: 1.3rem; }
.v3-card__link { margin-top: 0.6rem; }

/* The whole card is the click target; the link stays the accessible name. */
.v3-card__link::before { content: ""; position: absolute; inset: 0; border-radius: inherit; }
.v3-card--shot:has(.v3-card__link:focus-visible) { outline: 2px solid var(--ink); outline-offset: 3px; }

/* ------------------------------------------------------------ sections -- */

.v3 .section { padding-block: clamp(3.5rem, 8vw, 7rem); }
.v3 .section--tight { padding-block: clamp(2.5rem, 5vw, 4rem); }
.v3 .section--plain { background: var(--bg); }

/* Headline split: small eyebrow on the left, big statement on the right. */
.v3-split {
  display: grid;
  grid-template-columns: minmax(0, 0.3fr) minmax(0, 1fr);
  gap: clamp(1.5rem, 4vw, 3rem);
  align-items: start;
  padding-top: 1.4rem;
  border-top: 1px solid var(--line);
}

.v3-split h2 { max-width: 18ch; }

.v3-soft { color: var(--ink-soft); }

/* Steps, question bubbles and panels in the v3 language. */
.v3-grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.9rem; }
.v3-grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.9rem; }

.v3-panel {
  padding: clamp(1.4rem, 2.4vw, 2rem);
  border-radius: var(--r);
  background: var(--surface);
}

.v3-panel--grey { background: var(--surface-2); }
.v3-panel--lime { background: var(--lime); }
.v3-panel--lime p { color: rgba(16, 18, 22, 0.72); }
.v3-panel--ink { background: var(--ink); }
.v3-panel--ink h3, .v3-panel--ink .v3-card__figure { color: #fff; }
.v3-panel--ink p { color: rgba(255, 255, 255, 0.72); }

.v3-step__no {
  display: block;
  margin-bottom: clamp(1.6rem, 3vw, 2.6rem);
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  color: var(--ink-soft);
}

.v3-steps { margin-bottom: 0; padding: 0; list-style: none; }
.v3-actions--start { justify-content: flex-start; }

/* Founder strip with a face on it. */
.v3-about {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr);
  gap: clamp(1.2rem, 3vw, 2rem);
  align-items: start;
}
.v3-about img { width: 96px; height: 96px; border-radius: 50%; object-fit: cover; }
.v3-about h3 { max-width: 34ch; margin: 0; }

.v3 .link--light { color: #fff; border-bottom-color: rgba(255, 255, 255, 0.4); }

.v3-panel p { font-size: 0.93rem; line-height: 1.6; margin: 0.5rem 0 0; }

.v3-asks { display: flex; flex-wrap: wrap; gap: 0.6rem; margin: 2rem 0; padding: 0; list-style: none; }

.v3-ask {
  padding: 0.75rem 1.15rem;
  border-radius: 999px 999px 999px 6px;
  background: var(--surface);
  font-size: 0.92rem;
  color: var(--ink);
  box-shadow: 0 10px 24px -20px rgba(16, 18, 22, 0.5);
}

.v3 .lead { font-size: clamp(1rem, 1.15vw, 1.12rem); line-height: 1.65; color: var(--ink-soft); max-width: 62ch; }

.v3 .link { font-weight: 500; border-bottom-color: var(--line); }

/* Numbered list of reasons / steps. */
.v3-list { display: grid; gap: 0.8rem; margin: 0; padding: 0; list-style: none; }

.v3-list li {
  display: grid;
  grid-template-columns: 2.4rem minmax(0, 1fr);
  gap: 0.6rem 1rem;
  align-items: start;
  padding: 1.2rem 1.4rem;
  border-radius: var(--r-sm);
  background: var(--surface);
}

.v3-list b {
  grid-column: 2;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.02rem;
  letter-spacing: -0.02em;
}

.v3-list span.n {
  grid-row: span 2;
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--ink-soft);
}

.v3-list p { grid-column: 2; margin: 0.2rem 0 0; font-size: 0.92rem; }

/* Results cards reuse the deck card with a screenshot on top. */
.v3-case__meta { display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: center; margin-bottom: 0.2rem; }

.v3-chip {
  padding: 0.25rem 0.6rem;
  border-radius: 999px;
  background: var(--surface-2);
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

/* FAQ */
.v3 .faq { border-top: 1px solid var(--line); }
.v3 .faq details { border-bottom: 1px solid var(--line); }
.v3 .faq summary { padding: 1.3rem 0; font-family: var(--font-display); font-weight: 600; font-size: 1.05rem; letter-spacing: -0.02em; }
.v3 .faq-body { color: var(--ink-soft); }

/* Closing CTA: one big lime block. */
.v3-cta {
  border-radius: var(--r);
  background: var(--lime);
  padding: clamp(2.5rem, 6vw, 4.5rem);
  text-align: center;
  display: grid;
  justify-items: center;
  gap: 1.4rem;
}

.v3-cta h2 { max-width: 16ch; margin: 0; font-size: clamp(2rem, 4.6vw, 3.6rem); }
.v3 .v3-cta p { margin: 0; max-width: 40ch; color: rgba(16, 18, 22, 0.7); }

/* Footer */
.v3 .footer { background: var(--bg); border-top: 1px solid var(--line); }
.v3 .footer-row { font-family: "Inter", system-ui, sans-serif; text-transform: none; letter-spacing: 0; font-size: 0.86rem; color: var(--ink-soft); }
.v3 .footer-brand { font-family: var(--font-display); font-weight: 700; letter-spacing: -0.02em; color: var(--ink); }

/* The system diagram inherits the v3 palette. */
.v3 .system-diagram { background: var(--surface); border: 0; border-radius: var(--r); }
/* styles.css zeroes the figure margin, so the utility needs to win here. */
.v3 .system-diagram.mt-lg { margin-top: 0.9rem; }
.v3 .dgm-box rect { fill: var(--surface-2); stroke: none; }
.v3 .dgm-accent rect { fill: var(--lime); }
.v3 .dgm-label { font-family: var(--font-display); font-weight: 700; fill: var(--ink); }
.v3 .dgm-step, .v3 .dgm-note { font-family: "Inter", system-ui, sans-serif; fill: var(--ink-soft); }
.v3 .dgm-flow path { stroke: var(--ink-soft); }
.v3 .system-diagram figcaption {
  max-width: 68ch;
  margin-top: 1.2rem;
  padding-top: 1.1rem;
  border-top: 1px solid var(--line);
  font-size: 0.9rem;
  line-height: 1.6;
  color: var(--ink-soft);
}
.v3 .system-diagram figcaption b { color: var(--ink); font-weight: 600; }

/* ---------------------------------------------------------- responsive -- */

@media (max-width: 1020px) {
  .v3-grid-3 { grid-template-columns: 1fr; }
  .v3-split { grid-template-columns: 1fr; }
}

@media (max-width: 780px) {
  .v3-hero { min-height: 0; padding-bottom: clamp(8rem, 30vw, 11rem); }
  .v3-deck__row { grid-template-columns: 1fr; }
  .v3-grid-2 { grid-template-columns: 1fr; }
  .v3--home .site-header:not(.is-scrolled) .main-nav .nav-list a { color: var(--ink); }
  .v3-list li { grid-template-columns: 1.8rem minmax(0, 1fr); }
  .v3-about { grid-template-columns: 1fr; }
  .v3-about img { width: 72px; height: 72px; }
}

@media (max-width: 560px) {
  /* The snapshot CTA label is long; let it wrap instead of pushing the page. */
  .v3 .btn { white-space: normal; text-align: start; border-radius: 26px; }
  .v3-hero__badge span { display: none; }
  .v3 .v3-hero__badge { padding: 0.4rem 0.9rem; font-size: 0.78rem; }
  .v3 .v3-hero__actions { flex-direction: column; align-items: stretch; width: 100%; }
  .v3 .v3-hero__actions .btn { justify-content: center; }
  .v3 h1, .v3 h2, .v3 h3 { overflow-wrap: break-word; }
  .v3 .v3-cta { padding-inline: 1.4rem; }
}

/* -------------------------------------------------------------- motion -- */
/* Curves come from the shared tokens in styles.css (--ease-out, --ease-in-out).
   The global reduced-motion rule in styles.css collapses every duration below
   to near zero, so each piece lands in its final state instantly. */

/* Hero: one entrance on load. CSS animation rather than the scroll observer,
   so it runs off the main thread and never waits on script. */
@keyframes v3-rise {
  from { opacity: 0; transform: translateY(14px); }
}

.v3-in {
  animation: v3-rise 700ms var(--ease-out) both;
  animation-delay: calc(80ms + var(--i, 0) * 70ms);
}

/* The photo settles as the copy arrives. Transform only, so it is painted
   at once and stays a fast LCP. */
@keyframes v3-settle {
  from { transform: scale(1.05); }
}

.v3-hero__bg img { animation: v3-settle 1600ms var(--ease-out) both; }

/* Scroll reveal: shorter travel and a firmer curve than the site default. */
.v3 [data-reveal] {
  transform: translateY(12px);
  transition: opacity 600ms var(--ease-out), transform 600ms var(--ease-out);
  transition-delay: var(--reveal-delay, 0ms);
}

.v3 [data-reveal].is-visible { transform: none; }

/* Diagram: the arrows draw in order once it scrolls into view, so the loop
   reads as a sequence (See, Fix, Grow, report, back to See). */
.v3 .dgm-flow path {
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
  opacity: 0;
  transition:
    stroke-dashoffset 650ms var(--ease-in-out),
    opacity 120ms linear;
  transition-delay: calc(350ms + var(--d, 0) * 260ms);
}

.v3 .system-diagram.is-visible .dgm-flow path { stroke-dashoffset: 0; opacity: 1; }

@media (scripting: none) {
  .v3 .dgm-flow path { stroke-dashoffset: 0; opacity: 1; }
}

/* Buttons: a press you can feel, no hover lift. */
.v3 .btn {
  transition:
    transform 160ms var(--ease-out),
    background-color 200ms ease,
    border-color 200ms ease,
    color 200ms ease;
}

.v3 .btn:hover,
.v3 .btn:hover::after,
.v3 .link:hover::after { transform: none; }

.v3 .btn:active { transform: scale(0.97); }
.v3 .btn::after { transition: transform 200ms var(--ease-out); }

/* Results cards: the screenshot leans in a little on hover, which tells you
   the whole card is a link. */
.v3-card__media img { transition: transform 500ms var(--ease-out); }

/* Hover only where there is a real pointer; touch fires false hovers. */
@media (hover: hover) and (pointer: fine) {
  .v3 .btn:hover::after { transform: translateX(3px); }
  .v3 .link:hover::after { transform: translateX(3px); }
  .v3-card--shot:hover .v3-card__media img { transform: scale(1.03); }
  .v3 .btn--quiet:hover { border-color: var(--ink); }
  .v3 .btn--on-photo:hover { --btn-bg: rgba(255, 255, 255, 0.22); }
}

/* FAQ: answers open instead of snapping. Browsers without ::details-content
   keep the instant toggle. */
.v3 { interpolate-size: allow-keywords; }

.v3 .faq details::details-content {
  block-size: 0;
  overflow: hidden;
  opacity: 0;
  transition:
    block-size 250ms var(--ease-out),
    opacity 250ms var(--ease-out),
    content-visibility 250ms allow-discrete;
}

.v3 .faq details[open]::details-content { block-size: auto; opacity: 1; }

/* --------------------------------------------------------- inner pages -- */
/* Every page now loads this layer. The older components in styles.css read
   their colours and faces from tokens, so remapping the tokens here moves
   them onto the v3 palette and type without restyling each one. */

.v3 {
  --paper: #f2f2f0;
  --paper-2: #e8e8e5;
  --panel: #ffffff;
  --text: #101216;
  --muted: #5c6068;
  --muted-2: #7a7e86;
  --line-soft: rgba(16, 18, 22, 0.08);
  --serif: "Inter Tight", "Inter", system-ui, sans-serif;
}

/* The serif was set light; the sans needs weight to carry the same role. */
.v3 :is(.stat-figure, .case-figure, .metric-figure, .principle-no,
        .numbered-no, .intersect, .tier-price) {
  font-weight: 700;
  letter-spacing: -0.035em;
}

.v3 .principle-quote { font-weight: 600; letter-spacing: -0.02em; }

/* No italic flourishes: emphasis in a heading reads as plain text. */
.v3 :is(h1, h2, h3) em,
.v3 .serif-it { font-family: inherit; font-style: normal; }

/* Labels lose their leading dash. */
.v3 .deliverable dt::before,
.v3 .field > label::before,
.v3 .breadcrumb::before { content: none; }

/* The page-title label is not part of the numbered section run. */
.v3 .page-hero .eyebrow::before { content: none; }
.v3 .page-hero .eyebrow { gap: 0; }

.v3 .page-hero h1 { max-width: 18ch; }
