/* ───────────────────────────────────────────────────────────────────────
   Ashley Mathew — AI inbox assistants

   COLOUR REASONING, since it was asked for.

   Blue is the right instinct: across colour-psychology work it is the hue
   most consistently associated with trust, competence and security, which is
   why banks, insurers and healthcare reach for it. The catch is that "bright
   blue + white" is also the most common look on the internet, and an AI
   company that looks like a template is working against itself.

   So: deep navy rather than bright blue. Navy reads established and serious
   where #2563EB reads startup. A warm off-white ground (#FBFAF9) rather than
   pure white, because pure white is clinical and the warmth reads human. One
   accent only, used sparingly.

   The honest part: colour is the smallest trust lever here. The research on
   what makes a site credible puts a real photograph of a real person, specific
   claims rather than vague ones, a visible way to make contact, and simple
   restraint far above palette. Hence the headshots, the named sectors, the
   "what it never does" section, and the absence of robot stock imagery.

   GLASS. The tokens below are lifted from Vellori's own globals.css so the two
   properties feel related. The thing most frosted-glass attempts get wrong is
   putting it over a flat colour, where a blur of nothing looks like a slightly
   grey box. The `.wash` orbs behind the page exist to give it something worth
   blurring.
   ─────────────────────────────────────────────────────────────────────── */

:root {
  --ink:        #0D1B2A;
  --ink-soft:   #40536B;
  --ground:     #FBFAF9;
  --tint:       #F1F4F8;
  --line:       #E2E7EE;
  --accent:     #0F4C81;
  --accent-ink: #0B3A63;
  --warm:       #B9761F;

  /* Vellori's glass, verbatim — DESIGN.md §3 / globals.css */
  --glass:        rgba(255, 255, 255, 0.62);
  --glass-strong: rgba(255, 255, 255, 0.78);
  --glass-edge:   rgba(255, 255, 255, 0.90);
  --glass-shadow: 0 1px 2px rgba(15, 28, 46, 0.05), 0 14px 40px rgba(15, 28, 46, 0.09);

  --radius:  18px;
  --measure: 34rem;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --ink: #ECF1F7; --ink-soft: #A3B2C6; --ground: #0B1420;
    --tint: #101B29; --line: #22324a; --accent: #6FA8DC; --accent-ink: #9CC6EC;
    --warm: #E0A75E;
    --glass:        rgba(255, 255, 255, 0.055);
    --glass-strong: rgba(255, 255, 255, 0.09);
    --glass-edge:   rgba(255, 255, 255, 0.12);
    --glass-shadow: 0 1px 2px rgba(0,0,0,.35), 0 14px 40px rgba(0,0,0,.40);
  }
}
:root[data-theme="dark"] {
  --ink: #ECF1F7; --ink-soft: #A3B2C6; --ground: #0B1420;
  --tint: #101B29; --line: #22324a; --accent: #6FA8DC; --accent-ink: #9CC6EC;
  --warm: #E0A75E;
  --glass: rgba(255,255,255,.055); --glass-strong: rgba(255,255,255,.09);
  --glass-edge: rgba(255,255,255,.12);
  --glass-shadow: 0 1px 2px rgba(0,0,0,.35), 0 14px 40px rgba(0,0,0,.40);
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font: 400 1.0625rem/1.65 Inter, system-ui, -apple-system, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* ───────────────────────── the wash behind the glass ───────────────────
   Fixed, so panels blur a different part of it as the page scrolls. Very low
   opacity: this should never be noticed as a shape, only as the reason the
   frosted panels have something to be frosted about. */
.wash { position: fixed; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; }
.orb { position: absolute; border-radius: 50%; filter: blur(90px); opacity: .5; }
.orb-a { width: 46vw; height: 46vw; left: -10vw; top: -8vw;  background: #BBD3EC; }
.orb-b { width: 40vw; height: 40vw; right: -8vw; top: 32vh;  background: #E8D7BE; opacity: .42; }
.orb-c { width: 52vw; height: 52vw; left: 18vw;  top: 118vh; background: #C7D9EA; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .orb-a { background: #15314e; opacity: .55; }
  :root:not([data-theme="light"]) .orb-b { background: #3d2f1b; opacity: .40; }
  :root:not([data-theme="light"]) .orb-c { background: #112a44; opacity: .55; }
}

h1, h2, h3 {
  font-family: Fraunces, Georgia, "Times New Roman", serif;
  font-weight: 600; line-height: 1.12; letter-spacing: -.015em;
  margin: 0 0 .6rem; text-wrap: balance;
}
h1 { font-size: clamp(2.3rem, 5.4vw, 3.75rem); }
h2 { font-size: clamp(1.7rem, 3.4vw, 2.5rem); }
h3 { font-size: 1.1rem; font-family: Inter, system-ui, sans-serif; font-weight: 600; letter-spacing: 0; }
p  { margin: 0 0 1rem; }

a { color: var(--accent); text-underline-offset: 3px; }
a:hover { color: var(--accent-ink); }

.skip { position: absolute; left: -999px; background: var(--accent); color: #fff; padding: .7rem 1rem; z-index: 99; }
.skip:focus { left: 1rem; top: 1rem; }

.wrap { width: min(72rem, 100% - 2rem); margin-inline: auto; }
@media (min-width: 48rem) { .wrap { width: min(72rem, 100% - 4rem); } }
.narrow { max-width: 46rem; }

/* ─────────────────────────────── glass ─────────────────────────────── */
.glass {
  background: var(--glass);
  -webkit-backdrop-filter: blur(26px) saturate(180%);
  backdrop-filter: blur(26px) saturate(180%);
  border: 1px solid var(--glass-edge);
  border-radius: var(--radius);
  box-shadow: var(--glass-shadow);
}
/* Safari and Firefox without backdrop-filter get a solid panel rather than a
   washed-out transparent one that makes the text hard to read. */
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .glass { background: var(--glass-strong); }
}

/* ───────────────────────────── scroll reveal ───────────────────────── */
/* Hidden ONLY once reveal.js has run — see the comment in that file. */
.js-reveal [data-reveal] {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity .62s cubic-bezier(.22,.61,.36,1), transform .62s cubic-bezier(.22,.61,.36,1);
  will-change: opacity, transform;
}
.js-reveal [data-reveal].is-in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .js-reveal [data-reveal] { opacity: 1; transform: none; transition: none; }
}

/* ───────────────────────────────── nav ─────────────────────────────── */
.nav { position: sticky; top: 0; z-index: 20; border-bottom: 1px solid var(--line); }
.glass-nav {
  background: var(--glass);
  -webkit-backdrop-filter: blur(22px) saturate(180%);
  backdrop-filter: blur(22px) saturate(180%);
}
.nav-inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .85rem 0; }
.word { font-family: Fraunces, Georgia, serif; font-weight: 600; font-size: 1.1rem; color: var(--ink); text-decoration: none; letter-spacing: -.01em; }
.nav nav { display: flex; align-items: center; gap: 1.5rem; }
.nav nav a:not(.btn) { color: var(--ink-soft); text-decoration: none; font-size: .94rem; font-weight: 500; }
.nav nav a:not(.btn):hover { color: var(--ink); }
@media (max-width: 46rem) { .nav nav a:not(.btn) { display: none; } }

/* ──────────────────────────────── buttons ──────────────────────────── */
.btn {
  display: inline-block; background: var(--accent); color: #fff;
  padding: .72rem 1.25rem; border-radius: 999px; text-decoration: none;
  font-weight: 600; font-size: .95rem; white-space: nowrap;
  transition: background .15s ease, transform .15s ease, box-shadow .15s ease;
}
.btn:hover { background: var(--accent-ink); color: #fff; transform: translateY(-1px); box-shadow: 0 8px 22px -8px rgba(15,76,129,.5); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .btn { color: #07121d; } }
:root[data-theme="dark"] .btn { color: #07121d; }
.btn-sm { padding: .5rem .95rem; font-size: .88rem; }
.btn-lg { padding: .9rem 1.7rem; font-size: 1.02rem; }
.btn-ghost { color: var(--ink); text-decoration: none; font-weight: 600; font-size: .98rem; border-bottom: 2px solid var(--line); padding-bottom: 2px; transition: border-color .15s ease; }
.btn-ghost:hover { color: var(--ink); border-color: var(--accent); }

.cta-row { display: flex; flex-wrap: wrap; align-items: center; gap: 1.4rem; margin: 1.6rem 0 .9rem; }

/* ───────────────────────────────── hero ────────────────────────────── */
.hero { padding: clamp(3rem, 8vw, 6rem) 0 clamp(2.5rem, 5vw, 4rem); }
.hero-grid { display: grid; gap: clamp(2rem, 5vw, 4rem); align-items: center; }
@media (min-width: 56rem) { .hero-grid { grid-template-columns: 1.15fr .85fr; } }

.eyebrow { text-transform: uppercase; letter-spacing: .14em; font-size: .76rem; font-weight: 600; color: var(--warm); margin: 0 0 .9rem; }
.lede { font-size: 1.14rem; color: var(--ink-soft); max-width: var(--measure); }
.micro { font-size: .88rem; color: var(--ink-soft); margin: 0; }

.portrait, .desk { margin: 0; }
.portrait img, .desk img {
  display: block; width: 100%; height: auto; border-radius: var(--radius);
  /* The source is 2:3; cropping to 4:5 keeps face and shoulders and loses the
     lower torso, which is the tighter, better frame anyway. The shifted
     object-position is what stops it cropping his head. */
  aspect-ratio: 4 / 5; object-fit: cover; object-position: 50% 18%;
  border: 1px solid var(--glass-edge);
  box-shadow: var(--glass-shadow);
}
.desk img { aspect-ratio: 1 / 1; object-position: 50% 30%; }

/* ──────────────────────────── trust strip ──────────────────────────── */
.strip { margin: 0 auto; width: min(72rem, 100% - 2rem); }
@media (min-width: 48rem) { .strip { width: min(72rem, 100% - 4rem); } }
.strip-inner { display: flex; flex-wrap: wrap; gap: .6rem 2.2rem; padding: 1.05rem 1.4rem; font-size: .9rem; color: var(--ink-soft); font-weight: 500; width: 100%; }
.strip-inner span { position: relative; padding-left: 1.1rem; }
.strip-inner span::before { content: ""; position: absolute; left: 0; top: .52em; width: .42rem; height: .42rem; border-radius: 50%; background: var(--accent); }

/* ──────────────────────────────── bands ────────────────────────────── */
.band { padding: clamp(3rem, 7vw, 5.5rem) 0; }
.band-dark { background: var(--ink); color: var(--ground); }
.band-dark h2, .band-dark .lede { color: var(--ground); }
.sub { color: var(--ink-soft); max-width: var(--measure); margin-bottom: 2.4rem; font-size: 1.05rem; }

/* ──────────────────────────────── steps ────────────────────────────── */
.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 1.1rem; }
@media (min-width: 46rem) { .steps { grid-template-columns: repeat(2, 1fr); gap: 1.2rem; } }
/* Three children, two columns, ALL THREE PLACED EXPLICITLY. Auto-placement
   puts the paragraph in column one, which sizes that column to the paragraph
   and squeezes the heading into a one-word-per-line sliver. */
.steps li { display: grid; grid-template-columns: auto 1fr; column-gap: 1rem; row-gap: 0; align-items: start; padding: 1.5rem 1.6rem; }
.steps h3 { grid-column: 2; grid-row: 1; margin: .2rem 0 .3rem; }
.steps p  { grid-column: 2; grid-row: 2; color: var(--ink-soft); margin: 0; font-size: .99rem; }
.num {
  grid-column: 1; grid-row: 1 / span 2;
  display: grid; place-items: center; width: 2.1rem; height: 2.1rem; border-radius: 50%;
  background: var(--accent); color: #fff; font-weight: 600; font-size: .92rem;
  font-variant-numeric: tabular-nums;
}
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .num { color: #07121d; } }

.aside { margin-top: 2.2rem; padding: 1.1rem 1.3rem; border-left: 3px solid var(--warm); background: var(--glass-strong); -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px); border-radius: 0 var(--radius) var(--radius) 0; color: var(--ink-soft); max-width: 44rem; }

/* ──────────────────────────────── cards ────────────────────────────── */
.cards { display: grid; gap: 1.2rem; }
@media (min-width: 46rem) { .cards { grid-template-columns: repeat(3, 1fr); } }
.card { padding: 1.7rem 1.6rem; transition: transform .25s ease, box-shadow .25s ease; }
.card:hover { transform: translateY(-3px); box-shadow: 0 1px 2px rgba(15,28,46,.05), 0 22px 50px rgba(15,28,46,.13); }
.card h3 { margin-bottom: .55rem; }
.card p { color: var(--ink-soft); margin: 0; font-size: .99rem; }

/* ──────────────────────────────── ticks ────────────────────────────── */
.ticks { list-style: none; margin: 2rem 0 0; padding: 0; display: grid; gap: 1.1rem; }
.ticks li { position: relative; padding-left: 2rem; color: var(--ink-soft); max-width: 42rem; }
.ticks strong { color: var(--ink); font-weight: 600; }
.ticks li::before { content: ""; position: absolute; left: 0; top: .42em; width: .72rem; height: .4rem; border-left: 2px solid var(--accent); border-bottom: 2px solid var(--accent); transform: rotate(-45deg); }

/* ──────────────────────────────── quote ────────────────────────────── */
.quote { margin: 0; }
.quote p { font-family: Fraunces, Georgia, serif; font-size: clamp(1.3rem, 2.6vw, 1.8rem); line-height: 1.4; margin: 0 0 1.2rem; text-wrap: balance; }
.quote cite { font-style: normal; font-size: .93rem; color: #9FB2C9; }

/* ──────────────────────────────── book ─────────────────────────────── */
.book-grid { display: grid; gap: clamp(2rem, 5vw, 3.5rem); align-items: center; }
@media (min-width: 52rem) { .book-grid { grid-template-columns: .8fr 1.2fr; } }

/* ──────────────────────────────── footer ───────────────────────────── */
.foot { border-top: 1px solid var(--line); padding: 2rem 0; }
.foot-inner { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .4rem; }
.foot p { margin: 0; font-size: .92rem; color: var(--ink-soft); }

/* ─────────────────────────── demos (video) ─────────────────────────── */
.demos { display: grid; gap: 1.4rem; }
@media (min-width: 54rem) { .demos { grid-template-columns: repeat(2, 1fr); } }
.demo { margin: 0; overflow: hidden; }
.demo figcaption { padding: 1.3rem 1.5rem 1.5rem; }
.demo figcaption h3 { margin-bottom: .45rem; }
.demo figcaption p { color: var(--ink-soft); margin: 0; font-size: .97rem; }

.player { position: relative; display: block; background: #0D1B2A; line-height: 0; cursor: pointer; }
.player img, .player video { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; }
.player video { object-fit: contain; background: #0D1B2A; }
.play {
  position: absolute; inset: 0; margin: auto;
  width: 4.3rem; height: 4.3rem; border-radius: 50%; border: 0; cursor: pointer;
  display: grid; place-items: center; color: #fff;
  background: rgba(13, 27, 42, .62);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  box-shadow: 0 6px 26px rgba(0,0,0,.34);
  transition: transform .18s ease, background .18s ease;
}
.play svg { margin-left: 3px; }           /* optical centring of a triangle */
.player:hover .play { transform: scale(1.07); background: var(--accent); }
.play:focus-visible { outline: 3px solid #fff; outline-offset: 3px; }
.runtime {
  position: absolute; right: .7rem; bottom: .7rem; z-index: 1;
  background: rgba(13,27,42,.72); color: #fff; font-size: .78rem; font-weight: 600;
  padding: .2rem .5rem; border-radius: 6px; line-height: 1.5;
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
}
.player.is-playing .play, .player.is-playing .runtime { display: none; }

/* ───────────────────────── before / after mock ─────────────────────── */
/* DELIBERATELY A DIAGRAM, NOT A SCREENSHOT. No browser chrome, no mail-client
   furniture — nobody could mistake it for captured evidence, which is the
   point: the real screens are in the walkthroughs above. */
.ba { display: grid; gap: 1.3rem; margin-bottom: 2.4rem; }
@media (min-width: 54rem) { .ba { grid-template-columns: repeat(2, 1fr); } }
.ba-side { padding: 1.5rem 1.6rem; }
.ba-tag { font-size: .74rem; letter-spacing: .14em; text-transform: uppercase; font-weight: 600; margin: 0 0 1.1rem; }
.ba-tag-before { color: var(--ink-soft); }
.ba-tag-after  { color: var(--accent); }
.ba-note { color: var(--ink-soft); font-size: .93rem; margin: 1.2rem 0 0; }

/* ───────────────────────────── the figures ─────────────────────────── */
.figures { list-style: none; margin: 0; padding: 0; display: grid; gap: 1.1rem; }
@media (min-width: 46rem) { .figures { grid-template-columns: repeat(3, 1fr); } }
.figures li { padding: 1.5rem 1.5rem 1.6rem; }
.figures strong {
  display: block; font-family: Fraunces, Georgia, serif; font-weight: 600;
  font-size: clamp(1.7rem, 3vw, 2.2rem); line-height: 1.05; letter-spacing: -.02em;
  color: var(--accent); margin-bottom: .5rem;
}
.figures span { color: var(--ink-soft); font-size: .95rem; }

/* ───────────────────── before / after screenshots ──────────────────── */
.ba-side { display: flex; flex-direction: column; }
.shot {
  display: block; width: 100%; padding: 0; border: 0; background: none;
  cursor: zoom-in; border-radius: 10px; overflow: hidden; line-height: 0;
  position: relative;
}
.shot img {
  display: block; width: 100%; height: auto;
  border: 1px solid var(--line); border-radius: 10px;
  transition: transform .3s ease;
}
.shot:hover img { transform: scale(1.012); }
.shot:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
/* An inbox at a third of the page cannot be read, and the detail IS the point,
   so say the enlargement is there rather than hoping it is discovered. */
.shot::after {
  content: "Click to enlarge";
  position: absolute; right: .55rem; bottom: .55rem;
  font-size: .72rem; font-weight: 600; color: #fff;
  background: rgba(13,27,42,.72); padding: .2rem .5rem; border-radius: 6px;
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
  opacity: 0; transition: opacity .2s ease; line-height: 1.6;
}
.shot:hover::after, .shot:focus-visible::after { opacity: 1; }
.ba-note { margin-top: 1rem; }

/* ─────────────────────────────── lightbox ──────────────────────────── */
.lightbox {
  position: fixed; inset: 0; z-index: 100; display: none;
  align-items: center; justify-content: center; padding: clamp(.6rem, 1.6vw, 1.4rem);
  background: rgba(8, 16, 26, .9);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
}
.lightbox.is-open { display: flex; }
/* Fill the screen rather than float in the middle of it. No rem cap — on a big
   monitor that cap left the video at a third the size and "I can't make it big
   enough" was the fair reaction. */
.lightbox-inner { width: 100%; max-width: none; }
.lightbox-img {
  display: block; width: 100%; height: auto; max-height: 94vh; object-fit: contain;
  margin: 0 auto;
  border-radius: 10px; box-shadow: 0 30px 80px rgba(0,0,0,.5);
}
/* The 16:9 box is sized to the LARGER of the two limits: as wide as the screen
   allows, or as tall as it allows, whichever hits first — so a 16:9 video fills
   a 16:9-ish screen almost edge to edge instead of being capped by width alone.
   `96vh * 16/9 ≈ 171vh` is the width that makes the height reach 96vh. */
.lightbox-frame {
  position: relative; aspect-ratio: 16 / 9;
  width: min(100%, 171vh);
  margin: 0 auto;
}
/* A <video> needs the same absolute fill as the iframe, or it renders at its
   intrinsic 2560px and overflows the whole overlay. */
.lightbox-frame iframe,
.lightbox-frame video {
  position: absolute; inset: 0; width: 100%; height: 100%;
  border: 0; border-radius: 10px; box-shadow: 0 30px 80px rgba(0,0,0,.5);
  background: #0D1B2A;
}
.lightbox-close {
  position: absolute; top: 1rem; right: 1.2rem; z-index: 1;
  width: 2.6rem; height: 2.6rem; border-radius: 50%; border: 0; cursor: pointer;
  font-size: 1.6rem; line-height: 1; color: #fff; background: rgba(255,255,255,.14);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
}
.lightbox-close:hover { background: rgba(255,255,255,.26); }
.lightbox-close:focus-visible { outline: 3px solid #fff; outline-offset: 2px; }

/* ───────────────────────────── offer strip ─────────────────────────── */
/* Above the sticky nav. A BRIGHT blue, deliberately lighter than the navy nav
   and hero, so it stands out instead of blending into them — the first
   version was navy-on-navy and all but invisible. Whole strip is a link. */
.offer {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: center;
  gap: .4rem .85rem; text-align: center;
  padding: .72rem 1.1rem; text-decoration: none;
  background: linear-gradient(90deg, #1763A6 0%, #2A7FC9 100%);
  color: #fff;
  font-size: .96rem; line-height: 1.45;
}
.offer strong { color: #fff; font-weight: 700; }
.offer span { color: #EAF3FB; }
.offer-go {
  color: #fff !important; font-weight: 700; white-space: nowrap;
  background: rgba(255,255,255,.2); padding: .24rem .7rem; border-radius: 999px;
  border: 1px solid rgba(255,255,255,.45);
}
.offer:hover .offer-go { background: rgba(255,255,255,.34); }
@media (max-width: 34rem) { .offer span:not(.offer-go) { flex-basis: 100%; } }
