/* Place's two themes, in the app's own look (src/app/globals.css, docs/DESIGN.md). Loaded last, over hyperdesk.com's
   stylesheets (conduit.css, brand.css, agent.css), stages.css and place.css. theme.js sets data-theme on <html> before
   the page paints: the visitor's choice (the header toggle, kept in localStorage) or else the system setting.
   Without JavaScript the page is light. Text is Google Sans, as in the app; page and section titles stay in Geist
   Serif. Neutral grays; color only for labels, status and the app's wallpaper, used as a glow. Every color below is a
   token, so a rule is written once for both themes. */

:root {
  color-scheme: light;
  --body: 'Google Sans', Geist, ui-sans-serif, system-ui, sans-serif;
  --product: 'Google Sans', Inter, ui-sans-serif, system-ui, sans-serif;

  /* Light: the app's light tokens */
  --ink: #1a1a1a;
  --ink-muted: #5f5f5f;
  --ink-faint: #1a1a1a29;
  --ink-soft: #8a8a8a;
  --canvas: #ffffff;
  --surface: #f7f7f7;
  --panel: #ffffff;
  --panel-2: #f5f5f5;
  --panel-3: #f0f0f0;
  --line: #e3e3e3;
  --frame: #ececec;
  --frame-d: #e3e3e3;
  --coal: #262626;
  --black: #262626;
  --on-coal: #ffffff;
  --coal-hover: #3d3d3d;
  --info: #2f5fb3;
  --info-soft: #e8effc;
  --good: #19703a;
  --warn: #9a6a12;
  --hdr: rgb(255 255 255 / 0.84);
  --shadow-panel: 0 1px 2px rgb(0 0 0 / 0.04), 0 24px 48px -24px rgb(0 0 0 / 0.16);
  --pl-glow: radial-gradient(42% 70% at 22% 0%, #dbe7f8 0%, transparent 70%), radial-gradient(38% 62% at 80% 4%, #e7e2f8 0%, transparent 70%), radial-gradient(30% 40% at 55% 92%, #f6e6dd 0%, transparent 70%);
  --pl-wall: radial-gradient(70% 90% at 15% 0%, #dbe7f8 0%, transparent 70%), radial-gradient(60% 80% at 100% 100%, #f4e2d8 0%, transparent 70%), radial-gradient(50% 60% at 85% 8%, #e7e2f8 0%, transparent 70%);
  --tile-glow: radial-gradient(90% 85% at 50% 100%, rgb(165 149 242 / 0.16), rgb(127 166 234 / 0.07) 55%, transparent 80%);
  --final-glow: radial-gradient(50% 90% at 25% 100%, #dbe7f8 0%, transparent 70%), radial-gradient(45% 80% at 78% 100%, #f4e2d8 0%, transparent 70%), radial-gradient(40% 60% at 55% 100%, #e7e2f8 0%, transparent 70%);
  --field-opacity: 0.55;
  --frame-mark: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='13' height='13' fill='%23b5b5b5'%3E%3Crect x='6' width='1' height='13'/%3E%3Crect y='6' width='13' height='1'/%3E%3C/svg%3E");
  --plus: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M8 3v10M3 8h10' fill='none' stroke='%235f5f5f' stroke-width='1.4' stroke-linecap='round'/%3E%3C/svg%3E");
}

/* Dark: the app's dark tokens */
:root[data-theme='dark'] {
  color-scheme: dark;
  --ink: #ededed;
  --ink-muted: #a8a8a8;
  --ink-faint: #ededed29;
  --ink-soft: #808080;
  --canvas: #111111;
  --surface: #1c1c1c;
  --panel: #1c1c1c;
  --panel-2: #222222;
  --panel-3: #262626;
  --line: #333333;
  --frame: #2a2a2a;
  --frame-d: #333333;
  --coal: #ededed;
  --black: #ededed;
  --on-coal: #111111;
  --coal-hover: #ffffff;
  --info: #8fb0e8;
  --info-soft: #172338;
  --good: #5fcf86;
  --warn: #f2c26b;
  --hdr: rgb(17 17 17 / 0.82);
  --shadow-panel: 0 1px 2px rgb(0 0 0 / 0.3), 0 24px 48px -20px rgb(0 0 0 / 0.7);
  --pl-glow: radial-gradient(42% 70% at 22% 0%, rgb(53 84 140 / 0.55), transparent 70%), radial-gradient(38% 62% at 80% 4%, rgb(78 62 140 / 0.45), transparent 70%), radial-gradient(30% 40% at 55% 92%, rgb(120 70 48 / 0.22), transparent 70%);
  --pl-wall: radial-gradient(70% 90% at 15% 0%, rgb(53 84 140 / 0.42), transparent 70%), radial-gradient(60% 80% at 100% 100%, rgb(110 62 44 / 0.34), transparent 70%), radial-gradient(50% 60% at 85% 8%, rgb(78 62 140 / 0.32), transparent 70%);
  --tile-glow: radial-gradient(90% 85% at 50% 100%, rgb(78 62 140 / 0.24), rgb(53 84 140 / 0.08) 55%, transparent 80%);
  --final-glow: radial-gradient(50% 90% at 25% 100%, rgb(53 84 140 / 0.5), transparent 70%), radial-gradient(45% 80% at 78% 100%, rgb(110 62 44 / 0.4), transparent 70%), radial-gradient(40% 60% at 55% 100%, rgb(78 62 140 / 0.35), transparent 70%);
  --field-opacity: 0.32;
  --frame-mark: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='13' height='13' fill='%234d4d4d'%3E%3Crect x='6' width='1' height='13'/%3E%3Crect y='6' width='13' height='1'/%3E%3C/svg%3E");
  --plus: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M8 3v10M3 8h10' fill='none' stroke='%23a8a8a8' stroke-width='1.4' stroke-linecap='round'/%3E%3C/svg%3E");
}

html, body, body.home { background-color: var(--canvas); }
.home .hdr { background-color: var(--hdr); }
@media (max-width: 760px) { .home { background: var(--canvas); } .home .hdr { background: var(--hdr); } }
.home .hero-in::before { opacity: var(--field-opacity); }
::selection { background: var(--panel-3); color: var(--ink); }

/* The logo: one file per theme */
.logo-d { display: none; }
:root[data-theme='dark'] .logo-l { display: none; }
:root[data-theme='dark'] .logo-d { display: block; }

/* Buttons */
.btn.coal, .btn.coal:visited { background: var(--coal); color: var(--on-coal); }
.btn.coal:hover { background: var(--coal-hover); }
.btn.light, .btn.line { background: var(--panel); color: var(--ink); }
.btn.line { box-shadow: inset 0 0 0 1px var(--line); }
.btn.line:hover { box-shadow: inset 0 0 0 1px var(--ink-muted); }
.btn:not(.coal):not(.light):not(.line) { background: var(--panel-3); color: var(--ink); }

/* Header, with the theme toggle */
.hdr, .hdr.scrolled { background: var(--hdr); border-bottom-color: var(--frame-d); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); }
.nav a { color: var(--ink-muted); }
.nav a:hover { color: var(--ink); }
.hdr-end { display: flex; flex: none; align-items: center; gap: 8px; margin-left: auto; }
.hdr .hdr-end .btn { margin-left: 0; }
.theme-btn { display: grid; place-items: center; width: 36px; height: 36px; padding: 0; border: 0; border-radius: 9px; background: transparent; color: var(--ink-muted); cursor: pointer; transition: background-color 0.15s, color 0.15s; }
.theme-btn:hover { background: var(--panel-3); color: var(--ink); }
.theme-btn:focus-visible { outline: 2px solid var(--info); outline-offset: 2px; }
.theme-btn svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.theme-btn .i-sun { display: none; }
:root[data-theme='dark'] .theme-btn .i-sun { display: block; }
:root[data-theme='dark'] .theme-btn .i-moon { display: none; }
@media (max-width: 640px) { .theme-btn { width: 34px; height: 34px; } }

/* Hero: centered serif, the app's wallpaper glowing in from above */
.hero { position: relative; isolation: isolate; }
.hero::before { content: ""; position: absolute; inset: 0 0 auto; z-index: -1; height: 760px; background: var(--pl-glow); pointer-events: none; }
.hero .lede, .lede { color: var(--ink-muted); }
.hero-kicker { display: inline-flex; align-items: center; gap: 8px; margin: 0 0 22px; padding: 5px 12px 5px 6px; border-radius: 999px; background: var(--panel); box-shadow: inset 0 0 0 1px var(--line); color: var(--ink-muted); font-size: 14px; }
.hero-kicker img { width: 22px; height: 22px; border-radius: 6px; box-shadow: 0 0 0 1px var(--line); }
.final-mark { border-radius: 9px; box-shadow: 0 0 0 1px var(--line), 0 6px 16px -8px rgb(0 0 0 / 0.25); }
.home-example-note { color: var(--ink-soft); }

/* Forms */
.get-row { border-color: var(--line); background: var(--panel); box-shadow: 0 1px 2px rgb(0 0 0 / 0.06); }
.get-row:focus-within { border-color: var(--info); box-shadow: 0 0 0 3px color-mix(in srgb, var(--info) 18%, transparent); }
.get input { color: var(--ink); background: transparent; }
.get input::placeholder { color: var(--ink-soft); }
.get-ic { color: var(--ink-soft); }
.get-label, .get.banner .get-label { color: var(--ink-muted); }
.get.banner .get-row { border-color: var(--line); }
.get-tip { color: var(--ink-muted); }
.get.done .get-tip { color: var(--good); }

/* Section heads */
.tag, .tag span { color: var(--ink-muted); }
.sh .h2, .h1, .h2 { color: var(--ink); }

/* The product grid */
.bt-tile { border-color: var(--frame-d); background: var(--panel); }
.bt-pic, .bt-pic.pl-pic { background: var(--tile-glow); }
.bt-copy span { color: var(--ink-muted); }
.bt-copy b { color: var(--ink); }
.pl-statement { border-color: var(--frame-d); background: var(--pl-wall), var(--panel); color: var(--ink); }
.pl-statement__sub { color: var(--ink-muted); }

/* FAQ */
.faq details { border-color: var(--frame-d); }
.faq summary { color: var(--ink); }
.faq details p { color: var(--ink-muted); }

/* Closing card: the wallpaper rising from the bottom */
.final-card { border-color: var(--frame-d); background: var(--canvas); }
.final-bg { background: var(--final-glow); -webkit-mask-image: none; mask-image: none; opacity: 1; }

/* Footer */
.ftr { border-top-color: var(--frame); background: var(--canvas); color: var(--ink-muted); }
.ftr-cols a { color: var(--ink); }
.ftr-bottom { border-top-color: var(--frame); color: var(--ink-soft); }

/* Simple pages */
.doc a { color: var(--ink); }
.doc .upd { color: var(--ink-soft); }

/* "Send" in the headline: circled by hand, one stroke that overshoots where it started, drawn once on load */
.scrib--ring { margin: 0 0.26em 0 0.16em; }
.scrib-o { position: absolute; z-index: -1; left: -0.34em; top: -0.3em; width: calc(100% + 0.68em); height: auto; aspect-ratio: 240 / 122; overflow: visible; pointer-events: none; }
.scrib-o path { fill: none; stroke: url(#scrib-ink); stroke-width: 4.6; stroke-linecap: round; stroke-linejoin: round; }
@media (prefers-reduced-motion: no-preference) {
  .scrib-o path { stroke-dasharray: 1; stroke-dashoffset: 1; animation: scrib-ring 0.9s cubic-bezier(0.55, 0, 0.3, 1) 0.55s forwards; }
}
@keyframes scrib-ring { to { stroke-dashoffset: 0; } }
@media (max-width: 640px) { .scrib-o path { stroke-width: 5.6; } }

/* "Try the demo": a quiet button in the header (hidden on phones) and a link under each form */
.hdr-demo { box-shadow: inset 0 0 0 1px var(--line); }
@media (max-width: 760px) { .hdr .hdr-demo { display: none; } }
.hero-demo { display: inline-flex; align-items: center; gap: 4px; margin-top: 16px; color: var(--ink-muted); font-size: 15px; text-decoration: none; transition: color 0.15s; }
.hero-demo:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }
.hero-demo:focus-visible { outline: 2px solid var(--info); outline-offset: 3px; border-radius: 4px; }

/* The headline's pair, as on ando.so: a person and your agent, overlapping circles set in the line of type */
.h-pair { display: inline-flex; align-items: center; margin: 0 0.16em 0 0.04em; vertical-align: -0.1em; }
.h-pair > span { display: grid; place-items: center; width: 0.92em; height: 0.92em; border-radius: 50%; box-shadow: 0 0 0 0.06em var(--canvas); }
.h-pair__human { background: linear-gradient(135deg, #dbe7f8, #e7e2f8 55%, #f4e2d8); color: #4a5b78; }
.h-pair__human svg { width: 58%; height: 58%; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }
.h-pair__agent { margin-left: -0.22em; background: #1c1c1c; }
.h-pair__agent img { width: 64%; height: 64%; }
:root[data-theme='dark'] .h-pair__human { background: linear-gradient(135deg, #2a3a5a, #3a3358 55%, #4a3226); color: #c8d4ea; }
:root[data-theme='dark'] .h-pair__agent { background: #ededed; }
:root[data-theme='dark'] .h-pair__agent img { filter: invert(1); }
