/* Applymon — landing + auth front door
   MATCHES THE DESKTOP APP, deliberately. The two used to be opposites: the app
   is warm paper with a Fraunces serif display, the landing was near-black slate
   with a Bricolage grotesque. Someone who downloaded from this page opened a
   product that looked like a different company's.
   Tokens below are lifted from src/renderer/src/styles/global.css so the two
   stay in step; the NAMES are the landing's own (here --ink is the page
   background, in the app --ink is the text colour). */

:root {
  /* Surfaces — the app's paper/panel/rule */
  --ink: #fbfaf7;          /* page background (app --paper) */
  --ink-2: #f4f2ed;        /* recessed band */
  --panel: #ffffff;        /* cards (app --panel) */
  --line: #e7e5df;         /* hairlines (app --rule) */
  --line-2: #d9d6cd;       /* stronger rule (app --rule-strong) */

  /* Type */
  --text: #111827;         /* app --ink */
  --muted: #6b7280;        /* app --muted */

  /* One accent, and it is the APP's indigo — the landing was purple #7c7bff,
     which read as a different brand next to the product. */
  --accent: #3b5bff;       /* app --indigo */
  --accent-2: #2c46d8;     /* hover/darker */
  --accent-ink: #ffffff;   /* text on accent */
  --accent-soft: #eef1ff;  /* app --indigo-soft */

  --display: 'Fraunces', Georgia, 'Times New Roman', serif;
  --body: 'Hanken Grotesk', system-ui, -apple-system, sans-serif;
  --mono: 'Geist Mono', ui-monospace, SFMono-Regular, Menlo, monospace;

  --gut: clamp(20px, 5vw, 64px);
  --rhythm: clamp(64px, 10vw, 132px);
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--ink);
  color: var(--text);
  font-family: var(--body);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* A single faint indigo bloom behind the fold. The only ambient decoration. */
body::before {
  content: "";
  position: fixed;
  inset: -20vh -10vw auto -10vw;
  height: 90vh;
  background: radial-gradient(60% 55% at 72% 22%, rgba(59, 91, 255, 0.07), transparent 70%);
  pointer-events: none;
  z-index: 0;
}

a { color: inherit; }

h1, h2, h3 {
  font-family: var(--display);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.05;
  margin: 0;
  font-optical-sizing: auto;
}

p { margin: 0; }

.wrap {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 var(--gut);
}

/* ---------- utility type ---------- */

.eyebrow {
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
}

.lede { color: var(--muted); font-size: 1.06rem; }

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

.masthead {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 26px 0 0;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  text-decoration: none;
  font-family: var(--display);
  font-weight: 600;
  font-size: 1.06rem;
  letter-spacing: -0.01em;
}

.brand svg { display: block; }

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  border: 1px solid var(--line-2);
  background: transparent;
  color: var(--text);
  font-family: var(--body);
  font-size: 0.95rem;
  font-weight: 500;
  padding: 12px 20px;
  border-radius: 10px;
  text-decoration: none;
  cursor: pointer;
  transition: border-color 0.18s ease, background-color 0.18s ease, color 0.18s ease, transform 0.18s ease;
}

.btn:hover { border-color: var(--accent); background: var(--accent-soft); }
.btn:active { transform: translateY(1px); }

.btn-primary {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--accent-ink);
  font-weight: 600;
}

.btn-primary:hover { background: var(--accent-2); border-color: var(--accent-2); color: var(--accent-ink); }

.btn-ghost { border-color: transparent; color: var(--muted); padding-left: 12px; padding-right: 12px; }
.btn-ghost:hover { color: var(--text); background: transparent; border-color: transparent; }

.btn-wide { width: 100%; }

.btn[disabled], .btn[aria-busy="true"] { opacity: 0.55; pointer-events: none; }

:where(a, button, input, summary):focus-visible {
  outline: 2px solid var(--accent-2);
  outline-offset: 2px;
  border-radius: 8px;
}

/* ---------- forms ---------- */

label.field {
  display: block;
  font-family: var(--mono);
  font-size: 11.5px;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 7px;
}

input[type="email"], input[type="password"], input[type="text"] {
  width: 100%;
  background: var(--ink-2);
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--text);
  font-family: var(--body);
  font-size: 1rem;
  padding: 12px 14px;
  transition: border-color 0.18s ease;
}

input:focus { outline: none; border-color: var(--accent); }
input::placeholder { color: var(--muted); }

/* ---------- the card used by /login, /auth/callback, /checkout/* ---------- */

.stage {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}

.stage-body {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px 0 72px;
}

.card {
  width: 100%;
  max-width: 430px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.94), rgba(251, 250, 247, 0.94));
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: clamp(24px, 5vw, 34px);
}

.card h1 { font-size: 1.55rem; margin-bottom: 8px; }
.card .lede { font-size: 0.97rem; }

.stack > * + * { margin-top: 14px; }
.stack-lg > * + * { margin-top: 22px; }

.rule {
  display: flex;
  align-items: center;
  gap: 14px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.rule::before, .rule::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--line);
}

.note { font-size: 0.86rem; color: var(--muted); }
.note a { color: var(--accent-2); }

.msg {
  font-size: 0.9rem;
  border-radius: 10px;
  padding: 11px 13px;
  border: 1px solid var(--line-2);
  background: var(--accent-soft);
}
.msg[data-tone="error"] { border-color: #f0c7bf; background: #fbe9e5; color: #9b2c16; }

.linkish {
  background: none;
  border: none;
  padding: 0;
  color: var(--accent-2);
  font: inherit;
  font-size: 0.86rem;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
}

[hidden] { display: none !important; }

/* ---------- the mon ---------- */

.mon-bulb { transform-origin: 73px 9px; }

@keyframes mon-pulse {
  0%, 100% { opacity: 0.55; transform: scale(0.9); }
  50% { opacity: 1; transform: scale(1.12); }
}

@keyframes mon-blink {
  0%, 92%, 100% { transform: scaleY(1); }
  95% { transform: scaleY(0.12); }
}

.mon-eyes { transform-origin: 60px 66px; animation: mon-blink 6.5s ease-in-out infinite; }
.mon-bulb { animation: mon-pulse 2.4s ease-in-out infinite; }

@media (prefers-reduced-motion: reduce) {
  .mon-eyes, .mon-bulb { animation: none; }
  * { scroll-behavior: auto !important; }
}

/* ---------- footer ---------- */

.footer {
  border-top: 1px solid var(--line);
  padding: 26px 0 34px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  font-size: 0.86rem;
  color: var(--muted);
}

.footer a { color: var(--muted); text-decoration: none; }
.footer a:hover { color: var(--text); }

.footer-links { display: flex; gap: 20px; }
