/* Public home page (/). The design code of the connect page
   (packages/backend/src/api/sub-page.ts), reused 1:1: same tokens, header,
   status pill, title, card, buttons and the 960px two-column breakpoint.
   /public/site.css stays with the Apple region guide. */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  color-scheme: dark;
  --bg: #0a0e1a;
  --line: rgba(255, 255, 255, 0.14);
  --text: #ffffff;
  --muted: rgba(255, 255, 255, 0.64);
  --soft: rgba(255, 255, 255, 0.74);
  --note: rgba(255, 255, 255, 0.62);
  --green: #7df0c1;
  --blue: #8bbdff;
  --panel-bg: linear-gradient(162deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.025));
  --panel-border: rgba(255, 255, 255, 0.13);
  --panel-shadow: 0 24px 80px rgba(0, 0, 0, 0.42), inset 0 1px 1px rgba(255, 255, 255, 0.16);
  --radius: 20px;
  --content-max: 640px;
}

html { min-height: 100%; }
/* Header at the top, footer at the bottom, the hero centred in what is left:
   on a tall window the page must not hang under the header with an empty
   screen below it. */
body {
  position: relative;
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100svh;
  padding: 0 0 max(24px, env(safe-area-inset-bottom));
  background: var(--bg);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
a { color: var(--blue); }
a:focus-visible { outline: 2px solid #cfe3ff; outline-offset: 3px; }

/* The site's blue and green glows. Soft radial gradients, no blur filter:
   live blur made scrolling stall on an iPhone 12 Pro (operator, 2026-10-27). */
.animated-background { position: fixed; inset: 0; z-index: 0; overflow: hidden; pointer-events: none; }
.blob-1, .blob-2 { position: absolute; border-radius: 50%; }
.blob-1 { top: 40px; left: -220px; width: 620px; height: 620px; background: radial-gradient(circle, rgba(30, 80, 255, 0.3) 0%, transparent 62%); }
.blob-2 { right: -260px; bottom: -160px; width: 680px; height: 600px; background: radial-gradient(circle, rgba(0, 116, 91, 0.34) 0%, transparent 62%); }

.ic { width: 18px; height: 18px; flex: 0 0 auto; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }

.header { position: relative; z-index: 1; padding: 18px 16px 6px; }
.header-inner, .content, .footer { width: 100%; margin: 0 auto; }
.header-inner { max-width: var(--content-max); display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.content, .footer { max-width: calc(var(--content-max) + 32px); }
.header-left { display: flex; align-items: center; gap: 12px; color: var(--text); text-decoration: none; }
.logo-img { width: 38px; height: 38px; border-radius: 12px; object-fit: cover; box-shadow: 0 10px 28px rgba(0, 0, 0, 0.34); }
.brand-name { font-size: 18px; font-weight: 750; letter-spacing: 0.2px; }
.help-btn {
  display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 14px;
  border: 1px solid var(--line); border-radius: 999px; background: rgba(255, 255, 255, 0.05);
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.1); color: var(--text);
  font-size: 13px; font-weight: 650; text-decoration: none;
}
.help-btn:hover { border-color: rgba(255, 255, 255, 0.28); }

.content { position: relative; z-index: 1; flex: 1 0 auto; display: flex; align-items: center; padding: 28px 16px; }
.layout { width: 100%; }
.stack { display: flex; flex-direction: column; gap: 18px; }

.status-pill {
  display: inline-flex; align-items: center; align-self: flex-start; gap: 8px; min-height: 34px; padding: 7px 12px;
  border: 1px solid var(--line); border-radius: 999px; background: rgba(255, 255, 255, 0.045);
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.12); color: rgba(255, 255, 255, 0.88);
  font-size: 13px; font-weight: 650;
}
.status-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--green); box-shadow: 0 0 18px rgba(125, 240, 193, 0.8); }

.gradient { background: linear-gradient(91deg, #edf5ff 0%, #aeccff 43%, #cda0ff 78%, #7df0c1 115%); -webkit-background-clip: text; background-clip: text; color: transparent; }
.setup-title { font-size: clamp(30px, 9.4vw, 44px); font-weight: 820; line-height: 1.04; text-wrap: balance; }
/* «на каждый день» stays on one line: the gradient must not be cut after «на». */
.setup-title .gradient { white-space: nowrap; }
.setup-lead { font-size: clamp(15px, 4vw, 17px); line-height: 1.55; color: var(--muted); text-wrap: pretty; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  display: inline-flex; align-items: center; gap: 8px; min-height: 38px; padding: 8px 13px;
  border: 1px solid rgba(255, 255, 255, 0.12); border-radius: 999px; background: rgba(255, 255, 255, 0.052);
  color: var(--soft); font-size: 13px; font-weight: 620;
}

.card { border: 1px solid var(--panel-border); border-radius: var(--radius); background: var(--panel-bg); box-shadow: var(--panel-shadow); padding: 18px; display: flex; flex-direction: column; gap: 14px; }
.side-title { font-size: 17px; font-weight: 750; }
.actions { display: flex; flex-direction: column; gap: 10px; }
.step-note { font-size: 13px; line-height: 1.5; color: var(--note); }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 0 16px;
  border-radius: 14px; border: 1px solid rgba(255, 255, 255, 0.14); background: rgba(255, 255, 255, 0.05);
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.1); color: var(--text);
  font: inherit; font-size: 15px; font-weight: 650; text-align: center; text-decoration: none; cursor: pointer;
  transition: transform 0.16s ease, border-color 0.16s ease, background 0.16s ease;
}
.btn:hover { transform: translateY(-1px); border-color: rgba(255, 255, 255, 0.28); }
.btn-primary {
  min-height: 56px; padding: 0 22px; border-radius: 18px; border-color: rgba(174, 204, 255, 0.62);
  background: linear-gradient(135deg, rgba(139, 189, 255, 0.44), rgba(125, 240, 193, 0.26) 60%, rgba(255, 255, 255, 0.08));
  box-shadow: 0 18px 44px rgba(42, 103, 255, 0.24), inset 0 1px 1px rgba(255, 255, 255, 0.22);
  font-size: 16px; font-weight: 750;
}
.btn-primary .ic { width: 20px; height: 20px; }
.btn-primary:hover { border-color: rgba(255, 255, 255, 0.5); }
.btn-secondary:hover { background: rgba(255, 255, 255, 0.075); }

.footer {
  position: relative; z-index: 1; padding: 0 16px;
  display: flex; flex-wrap: wrap; gap: 10px 18px; justify-content: space-between;
  color: rgba(255, 255, 255, 0.6); font-size: 12px;
}
.footer a { color: rgba(255, 255, 255, 0.72); text-decoration: none; }
.footer a:hover { color: var(--text); }

@media (max-width: 48em) {
  /* Lighter shadows on phones: big blurred shadows on every card cost scrolling. */
  .card { box-shadow: 0 12px 32px rgba(0, 0, 0, 0.32), inset 0 1px 1px rgba(255, 255, 255, 0.14); }
}
/* Phone: three groups — the pitch (status, headline, text), the chips and
   the actions panel. Whatever height is left over is split equally into the
   four gaps around them (auto margins), so a tall phone has even spacing
   instead of one empty band above, below or in the middle. */
@media (max-width: 600px) {
  .content { flex-direction: column; align-items: stretch; padding: 8px 16px 12px; }
  .layout { flex: 1 0 auto; gap: 16px; }
  .layout > .stack, .layout > .side { display: contents; }
  .status-pill, .chips, .card { margin-top: auto; }
  .card { margin-bottom: auto; }
  .setup-title { font-size: clamp(30px, 10.6vw, 48px); }
  .card { padding: clamp(18px, 5vw, 24px); gap: 16px; }
}
@media (min-width: 960px) {
  .header { padding: 28px 24px 0; }
  .header-inner { max-width: 1120px; }
  .content, .footer { max-width: 1168px; }
  .logo-img { width: 44px; height: 44px; border-radius: 14px; }
  .help-btn { font-size: 14px; padding: 0 16px; }
  .content { padding: 48px 24px; }
  .footer { padding: 0 24px; }
  .layout { display: grid; grid-template-columns: minmax(0, 1fr) 400px; column-gap: 64px; align-items: center; }
  .setup-title { font-size: clamp(52px, 4.6vw, 64px); line-height: 1.02; }
  .setup-lead { font-size: 18px; max-width: 560px; text-wrap: pretty; }
  .card { padding: 22px; border-radius: 24px; }
}
