/* The one-screen front door (ui/journey/door.js): "Tell Agint what you want done", the plan, Continue with Google.
   Paper look by default (the product's own: warm paper, violet); ?look=dark is the night variant. Text and controls are checked for WCAG AA:
   ink #17161b on paper ~16:1, ink-2 #4a473f ~8:1, ink-3 #635f58 ~5.4:1, violet #5b43d6 on paper ~6.3:1, white on violet ~6.9:1 (night: ink #f3f0ff
   on #0e0c1a ~16:1, ink-3 #aaa5c6 ~7:1, button #8c78ff with #0e0c1a text ~6:1). The ambient light moves with transform and opacity only, slowly,
   and not at all under prefers-reduced-motion. */
@font-face { font-family: "Instrument Sans Fallback"; font-weight: 100 500; src: local("Segoe UI"), local("SegoeUI"); size-adjust: 102.5%; ascent-override: 94.6%; descent-override: 24.4%; line-gap-override: 0%; }
@font-face { font-family: "Instrument Sans Fallback"; font-weight: 600 900; src: local("Segoe UI Semibold"), local("SegoeUI-Semibold"); size-adjust: 102.3%; ascent-override: 94.8%; descent-override: 24.4%; line-gap-override: 0%; }
:root {
  --display: 'Instrument Serif', 'Iowan Old Style', Georgia, serif;
  --body: 'Instrument Sans', 'Instrument Sans Fallback', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --mono: ui-monospace, 'JetBrains Mono', SFMono-Regular, Menlo, Consolas, monospace;
  --bg: #f5f2ec; --ink: #17161b; --ink-2: #4a473f; --ink-3: #635f58; --line: #dedad2; --edge: #8a857b;
  --card: #fffdf9; --accent: #5b43d6; --accent-2: #3f2aa8; --accent-ink: #fff; --wash: #ece8fb;
  --glow-a: rgba(124, 96, 255, .20); --glow-b: rgba(255, 190, 120, .30); --glow-c: rgba(120, 190, 255, .20);
  --shadow: 0 18px 44px rgba(30, 22, 60, .12);
  --ease: cubic-bezier(.2, .7, .1, 1);
  --top: env(safe-area-inset-top, 0px); --bottom: env(safe-area-inset-bottom, 0px);
  color-scheme: light;
}
html[data-look="dark"] {
  --bg: #0e0c1a; --ink: #f3f0ff; --ink-2: #cfcae8; --ink-3: #aaa5c6; --line: #2b2745; --edge: #6d6891;
  --card: #17142b; --accent: #8c78ff; --accent-2: #b3a5ff; --accent-ink: #0e0c1a; --wash: #241f45;
  --glow-a: rgba(124, 96, 255, .30); --glow-b: rgba(255, 140, 90, .13); --glow-c: rgba(80, 150, 255, .16);
  --shadow: 0 18px 44px rgba(0, 0, 0, .45);
  color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; background: var(--bg); color: var(--ink); }
body { font-family: var(--body); font-size: 17px; line-height: 1.5; -webkit-font-smoothing: antialiased; -webkit-tap-highlight-color: transparent; min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; overflow-x: hidden; }
button, textarea, a { font: inherit; color: inherit; }
a { text-decoration: none; }
.sr { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 10px; }
[hidden] { display: none !important; }

/* ------------------------------------------------------------------ the ambient light */
.ambient { position: fixed; inset: 0; z-index: 0; overflow: hidden; pointer-events: none; }
.ambient i { position: absolute; display: block; border-radius: 50%; filter: blur(70px); will-change: transform; }
.ambient .b1 { width: 62vmax; height: 62vmax; left: -18vmax; top: -22vmax; background: radial-gradient(circle, var(--glow-a), transparent 66%); animation: drift1 38s ease-in-out infinite alternate; }
.ambient .b2 { width: 54vmax; height: 54vmax; right: -16vmax; top: 12vmax; background: radial-gradient(circle, var(--glow-b), transparent 66%); animation: drift2 46s ease-in-out infinite alternate; }
.ambient .b3 { width: 48vmax; height: 48vmax; left: 8vmax; bottom: -26vmax; background: radial-gradient(circle, var(--glow-c), transparent 66%); animation: drift3 52s ease-in-out infinite alternate; }
.ambient .grain { inset: 0; width: 100%; height: 100%; border-radius: 0; filter: none; background: url("art/grain.png") repeat; background-size: 220px; opacity: .07; mix-blend-mode: multiply; animation: none; }
html[data-look="dark"] .ambient .grain { mix-blend-mode: screen; opacity: .05; }
@keyframes drift1 { to { transform: translate3d(9vmax, 7vmax, 0) scale(1.08); } }
@keyframes drift2 { to { transform: translate3d(-10vmax, 6vmax, 0) scale(.94); } }
@keyframes drift3 { to { transform: translate3d(8vmax, -9vmax, 0) scale(1.1); } }

/* ------------------------------------------------------------------ the bar */
.top { position: relative; z-index: 2; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: calc(14px + var(--top)) max(20px, 4vw) 0; }
.brand { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; font-weight: 600; font-size: 18px; letter-spacing: .02em; }
.mark { --mark-rim: #3f2aa8; width: 26px; height: 26px; color: var(--accent); flex: none; display: inline-block;
  background: radial-gradient(circle closest-side at 48.22% 48.22%, var(--mark-rim) 0 47%, transparent 48%) no-repeat, radial-gradient(circle closest-side, currentColor 0 87%, var(--mark-rim) 88%) no-repeat;
  -webkit-mask: url("../agint-mark.svg?v=1") center / 100% 100% no-repeat; mask: url("../agint-mark.svg?v=1") center / 100% 100% no-repeat; }
html[data-look="dark"] .mark { --mark-rim: #b3a5ff; }
.quiet { display: inline-flex; align-items: center; min-height: 44px; padding: 0 4px; color: var(--ink-2); font-size: 15px; border-bottom: 1px solid transparent; }
.quiet:hover { color: var(--accent); }

/* ------------------------------------------------------------------ the stage */
.stage { position: relative; z-index: 1; flex: 1; width: 100%; max-width: 820px; margin: 0 auto; padding: clamp(18px, 6vh, 64px) max(20px, 4vw) calc(48px + var(--bottom)); display: flex; flex-direction: column; justify-content: center; }
.stage[data-phase="plan"] { justify-content: flex-start; padding-top: clamp(14px, 4vh, 40px); }
.kicker { margin: 0 0 14px; font-family: var(--mono); font-size: 12px; letter-spacing: .16em; text-transform: uppercase; color: var(--accent); font-weight: 600; }
.display { margin: 0 0 clamp(20px, 3.4vh, 34px); font-family: var(--display); font-weight: 400; font-size: clamp(40px, 9.2vw, 74px); line-height: 1.02; letter-spacing: -.018em; max-width: 14ch; text-wrap: balance; }
.display em { font-style: italic; color: var(--accent); }

.box { position: relative; background: var(--card); border: 1px solid var(--edge); border-radius: 22px; box-shadow: var(--shadow); padding: 16px 16px 12px 20px; transition: border-color .25s var(--ease), box-shadow .25s var(--ease); }
.box:focus-within { border-color: var(--accent); box-shadow: var(--shadow), 0 0 0 3px color-mix(in srgb, var(--accent) 22%, transparent); }
#d-job { display: block; width: 100%; min-height: 84px; max-height: 40vh; resize: none; border: 0; outline: 0; background: transparent; font-size: 20px; line-height: 1.4; color: var(--ink); padding: 0; }
#d-job::placeholder { color: var(--ink-3); opacity: 1; }
.box-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 6px; }
.count { font-size: 13px; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.go { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 48px; padding: 0 22px; border: 0; border-radius: 999px; background: var(--accent); color: var(--accent-ink); font-weight: 600; font-size: 17px; cursor: pointer; transition: transform .3s var(--ease), background .2s; }
.go svg { width: 20px; height: 20px; }
.go:hover:not([disabled]) { background: var(--accent-2); transform: translateY(-1px); }
html[data-look="dark"] .go:hover:not([disabled]) { background: #a897ff; }
.go[disabled] { opacity: .4; cursor: not-allowed; }

.try { margin: 26px 0 10px; font-size: 14px; color: var(--ink-3); }
.chips { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 10px; }
.chips button { min-height: 44px; padding: 8px 16px; border-radius: 999px; border: 1px solid var(--line); background: color-mix(in srgb, var(--card) 80%, transparent); cursor: pointer; font-size: 15px; line-height: 1.3; text-align: left; transition: border-color .2s, transform .25s var(--ease), background .2s; }
.chips button:hover { border-color: var(--accent); background: var(--card); transform: translateY(-1px); }

/* ------------------------------------------------------------------ the plan */
.you { margin: 0 0 18px; display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 14px; color: var(--ink-2); font-size: 16px; }
.you q { quotes: none; font-family: var(--display); font-size: clamp(22px, 4.4vw, 30px); line-height: 1.2; color: var(--ink); overflow-wrap: anywhere; flex: 1 1 16em; }
.linkish { background: none; border: 0; padding: 8px 0; min-height: 44px; color: var(--accent); cursor: pointer; text-decoration: underline; text-underline-offset: 3px; font-size: 15px; }
.plan-h { margin: 0 0 14px; font-family: var(--mono); font-size: 12px; letter-spacing: .16em; text-transform: uppercase; color: var(--accent); font-weight: 600; }
.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; counter-reset: s; }
.steps li { position: relative; background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 14px 16px 14px 56px; font-size: 17px; line-height: 1.45; box-shadow: 0 6px 20px rgba(30, 22, 60, .06); counter-increment: s; opacity: 0; transform: translate3d(0, 12px, 0); animation: rise .6s var(--ease) forwards; }
html[data-look="dark"] .steps li { box-shadow: none; }
.steps li::before { content: counter(s); position: absolute; left: 16px; top: 14px; width: 28px; height: 28px; border-radius: 50%; background: var(--wash); color: var(--accent); display: grid; place-items: center; font-weight: 600; font-size: 14px; }
.steps li.last { border-style: dashed; }
.plan.handoff #d-edit, .plan.handoff .thinking { display: none; }
.plan.handoff .plan-h { font-family: var(--display); font-size: clamp(30px, 6vw, 44px); letter-spacing: -.01em; text-transform: none; color: var(--ink); font-weight: 400; margin-top: 4px; }
.plan.handoff .you { margin-bottom: 4px; }
.thinking { margin: 14px 0 0; display: flex; gap: 6px; height: 14px; align-items: center; }
.thinking i { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); opacity: .3; animation: pulse 1.1s ease-in-out infinite; }
.thinking i:nth-child(2) { animation-delay: .18s; } .thinking i:nth-child(3) { animation-delay: .36s; }
@keyframes pulse { 50% { opacity: 1; transform: translateY(-3px); } }
@keyframes rise { to { opacity: 1; transform: none; } }
.after { margin-top: 22px; opacity: 0; transform: translate3d(0, 12px, 0); animation: rise .7s var(--ease) .1s forwards; }
.facts { display: grid; gap: 10px; }
.fact { margin: 0; padding: 8px 14px; display: grid; grid-template-columns: 11em 1fr; gap: 4px 14px; font-size: 16px; color: var(--ink-2); }
.fact b { color: var(--ink); font-weight: 600; }
.fact.approve { padding: 12px 14px; border-radius: 14px; background: var(--wash); color: var(--ink); }
.cta { margin: 26px 0 0; display: grid; gap: 14px; justify-items: start; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 12px; min-height: 56px; padding: 0 28px; border-radius: 999px; border: 1px solid var(--edge); cursor: pointer; font-weight: 600; font-size: 18px; max-width: 100%; text-align: center; transition: transform .3s var(--ease), box-shadow .3s; }
.btn.google { background: #fff; color: #1f1f1f; border-color: #dadce0; box-shadow: 0 10px 28px -12px rgba(30, 22, 60, .35); }
.btn.google:hover { transform: translateY(-2px); }
.btn.google svg { width: 22px; height: 22px; flex: none; }
.btn.solid { background: var(--accent); color: var(--accent-ink); border-color: transparent; }
.btn[disabled] { opacity: .55; cursor: progress; }
.cta .quiet { padding: 0; }
.fine { margin: 10px 0 0; font-size: 14px; color: var(--ink-3); }
.fine.err { color: #b3261e; }
html[data-look="dark"] .fine.err { color: #ff9a92; }
.team { margin-top: 34px; padding-top: 20px; border-top: 1px solid var(--line); display: grid; gap: 10px; }
.team p { margin: 0; color: var(--ink-2); font-size: 16px; }
.team .fine { margin: 0; min-height: 1.4em; }
.team-acts { display: flex; flex-wrap: wrap; gap: 10px; }
.chip-btn { display: inline-flex; align-items: center; min-height: 44px; padding: 0 16px; border-radius: 999px; border: 1px solid var(--line); background: transparent; cursor: pointer; font-size: 15px; transition: border-color .2s, background .2s; }
.chip-btn:hover { border-color: var(--accent); background: var(--card); }
.agint-inapp { --violet: var(--accent); --muted: var(--ink-3); --rule: var(--line); width: 100%; max-width: 30em; text-align: left !important; }
.nojs { position: fixed; inset: auto 0 40px; text-align: center; }

@media (max-width: 560px) {
  .fact { grid-template-columns: 1fr; }
  .go { padding: 0 18px; }
  .steps li { padding: 13px 14px 13px 52px; }
  .btn { width: 100%; font-size: 16px; gap: 10px; padding: 0 14px; }
  .cta .quiet { justify-self: center; }
}
@media (max-height: 640px) and (min-width: 561px) { .display { font-size: clamp(36px, 7vh, 56px); } }
@media (prefers-reduced-motion: reduce) {
  .ambient i { animation: none; }
  .steps li, .after { animation: none; opacity: 1; transform: none; }
  .thinking i { animation: none; opacity: .6; }
  * { transition-duration: .01ms !important; scroll-behavior: auto !important; }
}
