/* AI Mail site. Tokens copied from the product's own stylesheet (mail_idle/ui/ui.css), so the site matches the app
   and stays self-contained. System fonts only, light and dark by the visitor's setting. */
:root {
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro", system-ui, sans-serif;
  --font-display: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro", system-ui, sans-serif;
  --surface: #ffffff; --canvas: #f7f7f7;
  --ink: rgba(0, 0, 0, .85); --ink-2: #4a4a4a; --ink-3: #727272;
  --line: rgba(0, 0, 0, .1); --line-soft: rgba(0, 0, 0, .05);
  --control-bg: #ffffff; --btn: #ececec; --chip: rgba(0, 0, 0, .06);
  --accent: #0078f0; --accent-ink: #0060c7; --selected: #0165e2;
  --ok: #1f9d47; --ok-soft: #e3f6e8; --ok-ink: #177a36;
  --danger: #e0262b;
  --fill-3: #f2f2f2;
  --shadow: 0 0 0 .5px rgba(0, 0, 0, .12), 0 10px 30px rgba(0, 0, 0, .18);
  --sys-indigo: #6155f5; --sys-purple: #cb30e0; --sys-blue: #0088ff; --sys-teal: #00c3d0;
}
@media (prefers-color-scheme: dark) {
  :root {
    --surface: #1e1e1e; --canvas: #27282a;
    --ink: rgba(255, 255, 255, .85); --ink-2: #b3b3b3; --ink-3: #9a9a9a;
    --line: rgba(255, 255, 255, .1); --line-soft: rgba(255, 255, 255, .05);
    --control-bg: #2f3032; --btn: #37383a; --chip: rgba(255, 255, 255, .08);
    --accent: #0a99ff; --accent-ink: #6cc0ff; --selected: #0158d2;
    --ok: #30d158; --ok-soft: #173a22; --ok-ink: #6fe08f;
    --danger: #ff4245;
    --fill-3: #272727;
    --shadow: 0 0 0 .5px rgba(255, 255, 255, .12), 0 10px 30px rgba(0, 0, 0, .5);
    --sys-indigo: #6d7cff; --sys-purple: #db34f2; --sys-blue: #0091ff; --sys-teal: #00d2e0;
  }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--surface); color: var(--ink); font: 16px/1.5 var(--font); -webkit-font-smoothing: antialiased; }
a { color: var(--accent); }
a:hover { color: var(--accent-ink); }
.wrap { max-width: 1040px; margin: 0 auto; padding: 0 16px; }

/* Hero: a looping video fills it; a gradient is the fallback, and what shows if the video is missing or fails. */
.hero {
  --hero-ink: rgba(0, 0, 0, .88); --hero-ink-2: #3f4650;
  --scrim: linear-gradient(rgba(255, 255, 255, .72), rgba(255, 255, 255, .25) 40%, rgba(255, 255, 255, 0) 70%);
  position: relative; overflow: hidden; color: var(--hero-ink); text-align: center; isolation: isolate;
  background:
    radial-gradient(70% 55% at 50% 100%, color-mix(in srgb, var(--sys-blue) 30%, transparent), transparent 70%),
    radial-gradient(60% 50% at 15% 0%, color-mix(in srgb, var(--sys-purple) 14%, transparent), transparent 70%),
    radial-gradient(60% 50% at 90% 10%, color-mix(in srgb, var(--sys-indigo) 22%, transparent), transparent 70%),
    #eef3fb;
}
@media (prefers-color-scheme: dark) {
  .hero {
    --hero-ink: #fff; --hero-ink-2: rgba(255, 255, 255, .86);
    --scrim: linear-gradient(rgba(10, 12, 20, .72), rgba(10, 12, 20, .6));
    background:
      radial-gradient(70% 55% at 50% 100%, color-mix(in srgb, var(--sys-blue) 50%, transparent), transparent 70%),
      radial-gradient(60% 50% at 90% 10%, color-mix(in srgb, var(--sys-indigo) 55%, transparent), transparent 70%),
      #0d1222;
  }
}
.hero-bg { position: absolute; inset: 0; z-index: -2; background: url(media/hero.jpg) center / cover; }  /* the poster, under the video */
.hero-video { width: 100%; height: 100%; object-fit: cover; display: block; transition: opacity .6s; }
.js .hero-video { opacity: 0; }
.js .hero-video.on { opacity: 1; }
.gone { display: none !important; }
.hero::before { /* keeps the text readable on any frame of the video */
  content: ""; position: absolute; inset: 0; z-index: -1; background: var(--scrim);
}
.hero-inner { padding-top: 22px; }
.brand { margin: 0; font: 600 15px/1 var(--font-display); letter-spacing: .01em; opacity: .9; }
h1 { margin: 36px 0 12px; font: 700 clamp(34px, 7vw, 60px)/1.05 var(--font-display); letter-spacing: -.02em; text-wrap: balance; }
.lede { margin: 0 auto; max-width: 34em; font-size: clamp(16px, 2.4vw, 20px); line-height: 1.4; color: var(--hero-ink-2); text-wrap: balance; }

/* The phone: a CSS frame around a real screenshot. The bottom is cropped by the hero, so it rises from the edge. */
.stage { position: relative; height: clamp(340px, 62vw, 470px); margin-top: 28px; }
.glow {
  position: absolute; left: 50%; top: 18%; width: min(560px, 120%); aspect-ratio: 1; transform: translateX(-50%);
  background: radial-gradient(closest-side, color-mix(in srgb, var(--sys-blue) 70%, transparent), color-mix(in srgb, var(--sys-purple) 30%, transparent) 55%, transparent);
  filter: blur(30px); opacity: .75; animation: glow 7s ease-in-out infinite alternate;
}
.phone {
  --pw: clamp(210px, 26vw, 270px); --bezel: calc(var(--pw) * .032);
  position: absolute; left: 50%; top: 14px; width: var(--pw); margin-left: calc(var(--pw) / -2);
  padding: var(--bezel); border-radius: calc(var(--pw) * .168); background: linear-gradient(145deg, #3b3d42, #0c0c0e 55%, #2a2b2f);
  box-shadow: 0 0 0 1.5px #55575c, 0 0 0 3px #0b0b0c, 0 30px 70px rgba(0, 0, 0, .55);
  animation: float 6s ease-in-out infinite alternate;
}
.phone::before, .phone::after { content: ""; position: absolute; width: 3px; border-radius: 2px; background: #2c2d31; }
.phone::before { left: -4.5px; top: 17%; height: 7%; box-shadow: 0 48px 0 #2c2d31; }
.phone::after { right: -4.5px; top: 24%; height: 11%; }
/* The screen has exactly the screenshot's proportions (1206 x 2622), so nothing of the app is cropped; the screenshot
   already carries its own status bar and camera island. */
.screen {
  position: relative; width: 100%; aspect-ratio: 1206 / 2622; overflow: hidden; border-radius: calc(var(--pw) * .136);
  background: linear-gradient(170deg, #2b2d33, #15161a);
}
.screen img { display: block; width: 100%; height: 100%; object-fit: contain; }
@keyframes float { from { transform: translateY(0); } to { transform: translateY(-12px); } }
@keyframes glow { from { transform: translateX(-50%) scale(.94); opacity: .6; } to { transform: translateX(-50%) scale(1.06); opacity: .85; } }

/* The form card overlaps the bottom of the hero. */
.access { position: relative; z-index: 1; margin-top: -56px; padding: 0 16px 40px; }
.card {
  max-width: 520px; margin: 0 auto; padding: 26px 24px 22px; border-radius: 20px; background: var(--surface); box-shadow: var(--shadow);
}
.card h2 { margin: 0 0 6px; font: 650 24px/1.2 var(--font-display); letter-spacing: -.01em; }
.card p { margin: 0 0 18px; color: var(--ink-2); }
.field { display: block; margin: 0 0 14px; }
.field > span, legend { display: block; margin: 0 0 6px; padding: 0; font-size: 13px; font-weight: 590; color: var(--ink-2); }
.opt { font-weight: 400; color: var(--ink-3); }
input[type=email], input[type=text] {
  width: 100%; height: 44px; padding: 0 12px; font: inherit; color: var(--ink); background: var(--control-bg); border: 0; border-radius: 10px;
  box-shadow: 0 0 0 .5px var(--line), inset 0 .5px 1px rgba(0, 0, 0, .06);
}
input:focus-visible { outline: 0; box-shadow: 0 0 0 .5px var(--accent), 0 0 0 3.5px color-mix(in srgb, var(--accent) 35%, transparent); }
fieldset { margin: 0 0 18px; padding: 0; border: 0; min-width: 0; }
.seg { display: flex; gap: 4px; padding: 3px; border-radius: 1000px; background: var(--chip); }
.seg label { flex: 1; position: relative; }
.seg input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.seg span { display: block; padding: 8px 6px; border-radius: 1000px; text-align: center; font-size: 14px; font-weight: 510; color: var(--ink-2); }
.seg input:checked + span { background: var(--surface); color: var(--ink); box-shadow: 0 0 0 .5px var(--line), 0 1px 3px rgba(0, 0, 0, .12); }
.seg input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 1px; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
button {
  width: 100%; height: 46px; border: 0; border-radius: 12px; font: inherit; font-weight: 590; color: #fff; background: var(--selected); cursor: pointer;
}
button:hover { background: color-mix(in srgb, var(--selected) 88%, #fff); }
button:active { background: color-mix(in srgb, var(--selected) 85%, #000); }
button:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
button[disabled] { opacity: .6; cursor: default; }
.msg { min-height: 1.4em; margin: 10px 0 0; font-size: 14px; color: var(--danger); }
.msg:empty { min-height: 0; margin: 0; }
.card p.fine { margin: 14px 0 0; font-size: 13px; line-height: 1.4; color: var(--ink-3); }

/* Thank-you state: shown by the redirect (#sent) with no script, or by the script after a post. */
.card p.thanks { display: none; margin: 0; padding: 14px 16px; border-radius: 12px; background: var(--ok-soft); color: var(--ok-ink); font-weight: 510; }
.card p.thanks:target, .done p.thanks { display: block; }
.card p.thanks:focus { outline: 0; }
.card:has(.thanks:target) form, .done form,
.card:has(.thanks:target) .fine, .done .fine,
.card:has(.thanks:target) > h2 + p, .done > h2 + p { display: none; }

footer { padding: 18px 16px 28px; text-align: center; font-size: 13px; color: var(--ink-3); }
footer nav { display: inline; }
footer a { margin: 0 6px; color: var(--ink-2); text-decoration: none; font-weight: 510; }
footer a:hover { color: var(--accent); }
footer a[aria-current] { color: var(--ink); text-decoration: underline; }

/* Fallback and 404 pages */
.pick { text-align: center; padding: 22vh 16px 0; }
.pick h1 { margin: 0 0 18px; font-size: 40px; }
.pick a { display: inline-block; margin: 0 8px; padding: 8px 16px; border-radius: 1000px; background: var(--chip); color: var(--ink); text-decoration: none; font-weight: 510; }
.pick a:hover { background: var(--line); color: var(--ink); }

@media (min-width: 900px) {
  .hero-inner { padding-top: 28px; }
  h1 { margin-top: 44px; }
  .access { margin-top: -72px; }
}
@media (prefers-reduced-motion: reduce) {
  .phone, .glow { animation: none; }
  .hero-video { transition: none; }
}

/* Connects to what you use: five service logos in a ring around the AI Mail hub, all full colour with flowing dots
   on solid lines.
   Two fixed geometries: a phone ring (.lines-m) and a desktop ring (.lines-d). Nodes and hub sit in % of the same
   box as the SVG lines, so they line up. No script; no outside requests. */
:root { --flow-blue: #4A90E2; --flow-green: #34C38F; --flow-amber: #F5B04C; }
@media (prefers-color-scheme: dark) {
  :root { --flow-blue: #6aa8f0; --flow-green: #4fd6a4; --flow-amber: #ffc46b; }
}
.connect { padding: 4px 0 56px; }
.connect h2 { margin: 0 0 22px; text-align: center; font: 600 15px/1.3 var(--font-display); letter-spacing: .01em; color: var(--ink-2); }
.flow { position: relative; width: 100%; max-width: 400px; aspect-ratio: 360 / 400; margin: 0 auto; }
.lines { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; pointer-events: none; }
.lines-d { display: none; }
.lines .link { fill: none; stroke-width: 1.5; }
.lines .link.live { stroke: var(--flow-blue); stroke-opacity: .55; }
.lines .dot { fill: none; stroke: var(--flow-green); stroke-width: 3.6; stroke-linecap: round; stroke-dasharray: .01 100;
  animation: flow var(--dur, 3.4s) linear infinite; animation-delay: var(--d, 0s); opacity: 0; }
.lines .halo { opacity: .28; }
.lines .halo .dot { stroke-width: 10; }
@keyframes flow {
  0% { stroke-dashoffset: 0; opacity: 0; }
  12% { opacity: 1; }
  82% { opacity: 1; }
  100% { stroke-dashoffset: -100; opacity: 0; }
}
.hub {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); z-index: 1;
  width: 100px; height: 100px; border-radius: 50%; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
  background: linear-gradient(var(--surface), var(--surface)) padding-box, linear-gradient(135deg, var(--flow-blue), var(--flow-green)) border-box;
  border: 2px solid transparent; box-shadow: 0 12px 28px rgba(0, 0, 0, .12);
  color: var(--ink); font: 650 13px/1 var(--font-display);
}
.hub::before {
  content: ""; position: absolute; inset: -7px; border-radius: 50%; border: 2px solid var(--flow-blue); pointer-events: none;
  animation: pulse 3.2s ease-out infinite;
}
.hub-ico { width: 26px; height: 26px; fill: none; stroke: var(--flow-blue); stroke-width: 1.6; stroke-linejoin: round; }
@keyframes pulse { 0% { transform: scale(.92); opacity: .6; } 100% { transform: scale(1.22); opacity: 0; } }
.svcs { position: absolute; inset: 0; margin: 0; padding: 0; list-style: none; }
.svc {
  position: absolute; left: var(--mx); top: var(--my); transform: translate(-50%, -50%);
  width: 36px; height: 36px; margin: 0; padding: 0; border-radius: 12px; display: grid; place-items: center;
  background: var(--surface); box-shadow: 0 0 0 .5px var(--line), 0 4px 12px rgba(0, 0, 0, .07);
}
.svc .brand { width: 20px; height: 20px; display: block; }
.svc .brand .ink { fill: var(--ink); }
@media (min-width: 640px) {
  .flow { max-width: 620px; aspect-ratio: 620 / 460; }
  .lines-m { display: none; }
  .lines-d { display: block; }
  .svc { left: var(--x); top: var(--y); width: 48px; height: 48px; border-radius: 16px; }
  .svc .brand { width: 26px; height: 26px; }
  .hub { width: 124px; height: 124px; font-size: 17px; gap: 6px; }
  .hub-ico { width: 34px; height: 34px; }
}

/* Yours to run: three cards on a canvas band; a column on phones, a row on desktop. */
.own { padding: 48px 0 56px; background: var(--canvas); }
.own-cards { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.own-card {
  --c: var(--flow-blue); margin: 0; padding: 20px 20px 18px; border-radius: 18px; background: var(--surface);
  box-shadow: 0 0 0 .5px var(--line), 0 10px 26px rgba(0, 0, 0, .08); border-top: 3px solid var(--c);
}
.own-ico {
  display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px;
  background: color-mix(in srgb, var(--c) 16%, transparent); color: var(--c);
}
.own-ico .gh-mark { width: 22px; height: 22px; display: block; }
.own-ico .gh-mark .ink { fill: var(--ink); }
.own-ico .ico { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.own-card h3 { margin: 14px 0 6px; font: 650 17px/1.25 var(--font-display); letter-spacing: -.01em; color: var(--ink); }
.own-card p { margin: 0; font-size: 15px; line-height: 1.45; color: var(--ink-2); }
@media (min-width: 760px) {
  .own-cards { grid-template-columns: repeat(3, 1fr); }
}
@media (prefers-reduced-motion: reduce) {
  .lines .dot, .hub::before { display: none; }
  .hub::before { animation: none; }
}
