/* The page a visitor sees before signing in: banner, Solunex logo, an animated line about what SSDO and SAS are, Sola, and the
   sign-in / sign-up form in a dialog opened from the banner. Colours come from the same tokens as the console, so dark and light
   mode both work (assets/app.css). */
.front { display: none; min-height: 100vh; }
body.gated .front { display: block; }
body.booting .front { visibility: hidden; }          /* until we know whether this is a signed-in person */
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ── the banner ── */
.front-bar { position: sticky; top: 0; z-index: 30; display: flex; align-items: center; gap: 18px; padding: 10px 28px;
  background: color-mix(in srgb, var(--ink) 88%, transparent); backdrop-filter: blur(10px); border-bottom: 1px solid var(--ink-3); }
.fb-brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--paper); }
.fb-brand img { display: block; width: 40px; height: auto; }
.fb-brand .gate-brand { font-size: 22px; }
.fb-nav { display: flex; gap: 20px; margin-left: 18px; }
.fb-nav a { color: var(--paper-dim); text-decoration: none; font-size: 14px; }
.fb-nav a:hover { color: var(--paper); }
.fb-actions { display: flex; align-items: center; gap: 10px; margin-left: auto; }
.fb-link, .fb-cta { font-family: var(--sans); font-size: 14px; font-weight: 600; border-radius: 9px; padding: 9px 16px; cursor: pointer; }
.fb-link { background: transparent; color: var(--paper); border: 1px solid var(--ink-3); }
.fb-link:hover { border-color: var(--fact); color: var(--fact); }
.fb-cta { background: var(--fact); color: var(--ink); border: 1px solid var(--fact); }
.fb-cta:hover { filter: brightness(1.08); }
.fb-link.big, .fb-cta.big { font-size: 15.5px; padding: 12px 22px; }
.theme-btn { display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: 9px; cursor: pointer;
  background: transparent; color: var(--paper-dim); border: 1px solid var(--ink-3); }
.theme-btn:hover { color: var(--fact); border-color: var(--fact); }
.theme-btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.side-top .theme-btn { width: 32px; height: 32px; border-radius: 6px; margin-left: auto; margin-right: 6px; }

/* ── the first screen ── */
.front-main { max-width: 1120px; margin: 0 auto; padding: 0 24px; }
.hero { display: grid; grid-template-columns: minmax(240px, 400px) 1fr; gap: 54px; align-items: center; padding: 64px 0 36px; }
.hero-logo { width: 100%; height: auto; filter: drop-shadow(0 18px 30px rgba(0,0,0,.35)); animation: rise .7s ease both; }
:root[data-theme="light"] .hero-logo { filter: drop-shadow(0 14px 24px rgba(13,27,42,.22)); }
.kicker { font-family: var(--mono); font-size: 12px; letter-spacing: 1.6px; text-transform: uppercase; color: var(--fact); margin-bottom: 14px; }
.hero h1 { font-size: clamp(30px, 4.4vw, 50px); line-height: 1.1; letter-spacing: -.02em; font-weight: 700; }
.typed-line { margin: 18px 0 14px; min-height: 2.9em; font-family: var(--mono); font-size: clamp(15px, 1.7vw, 19px); line-height: 1.45; color: var(--fact); }
.typed-caret { display: inline-block; width: 2px; height: 1.1em; margin-left: 3px; vertical-align: text-bottom; background: var(--fact); animation: blink 1s steps(2, start) infinite; }
@keyframes blink { to { visibility: hidden; } }
.front .lead { font-size: 17px; line-height: 1.6; color: var(--paper-dim); max-width: 60ch; }
.front .lead b { color: var(--paper); }
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 26px; }

/* ── Sola ── */
.fr-sola { padding: 28px 0 26px; scroll-margin-top: 70px; }
.sola-card { max-width: 780px; margin: 0 auto; background: var(--ink-2); border: 1px solid var(--ink-3); border-radius: 16px; padding: 18px 20px 14px;
  box-shadow: 0 18px 50px rgba(0,0,0,.22); }
:root[data-theme="light"] .sola-card { box-shadow: 0 14px 40px rgba(13,27,42,.1); }
.sola-head { display: flex; align-items: center; gap: 12px; padding-bottom: 12px; border-bottom: 1px solid var(--ink-3); }
.sola-head small { display: block; color: var(--paper-dim); font-size: 12.5px; }
.sola-av { flex: none; width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; color: var(--ink);
  background: linear-gradient(135deg, var(--fact), var(--infer)); }
.sola-log { display: flex; flex-direction: column; gap: 10px; max-height: 380px; overflow-y: auto; padding: 14px 2px; scroll-behavior: smooth; }
.sola-msg { max-width: 88%; padding: 10px 14px; border-radius: 12px; font-size: 14.5px; line-height: 1.55; }
.sola-msg h4 { font-size: 13px; font-family: var(--mono); letter-spacing: .3px; margin: 0 0 6px; color: var(--fact); }
.sola-msg p + p { margin-top: 8px; }
.sola-msg.bot { align-self: flex-start; background: var(--ink); border: 1px solid var(--ink-3); }
.sola-msg.me { align-self: flex-end; background: var(--fact); color: var(--ink); }
.sola-chips { display: flex; flex-wrap: wrap; gap: 8px; padding: 4px 0 12px; }
.sola-chips button { font-family: var(--sans); font-size: 13px; padding: 7px 12px; border-radius: 999px; cursor: pointer; background: transparent;
  color: var(--paper); border: 1px solid var(--ink-3); }
.sola-chips button:hover { border-color: var(--fact); color: var(--fact); }
.sola-ask { display: flex; gap: 8px; }
.sola-ask input { flex: 1; min-width: 0; font-size: 14.5px; padding: 11px 13px; border-radius: 10px; background: var(--ink); color: var(--paper); border: 1px solid var(--ink-3); }
.sola-ask input:focus { outline: 2px solid var(--fact); outline-offset: 1px; }
.sola-ask button { font-size: 14.5px; font-weight: 600; padding: 0 20px; border-radius: 10px; cursor: pointer; background: var(--fact); color: var(--ink); border: none; }
.sola-note { margin-top: 10px; font-size: 12px; color: var(--muted); }

/* ── the rest ── */
.fr-more { padding: 46px 0 60px; scroll-margin-top: 70px; }
.fr-more h2 { font-size: clamp(22px, 2.6vw, 30px); letter-spacing: -.01em; margin-bottom: 22px; text-align: center; }
.fr-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; }
.fr-grid article { background: var(--ink-2); border: 1px solid var(--ink-3); border-radius: 14px; padding: 20px; }
.fr-grid h3 { font-family: var(--mono); font-size: 15px; color: var(--fact); margin-bottom: 8px; }
.fr-grid p { color: var(--paper-dim); font-size: 14.5px; line-height: 1.6; }
.front-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 18px; justify-content: center; padding: 26px 24px 34px;
  border-top: 1px solid var(--ink-3); color: var(--paper-dim); font-size: 13px; }
.front-foot img { width: 28px; height: auto; }
.ff-links { display: flex; gap: 16px; }
.ff-links a { color: var(--paper-dim); }

/* ── sign in / sign up, in a dialog opened from the banner ── */
.auth-back { position: fixed; inset: 0; z-index: 60; display: flex; align-items: center; justify-content: center; padding: 20px;
  background: rgba(5, 12, 20, .62); backdrop-filter: blur(3px); overflow-y: auto; }
.auth-back[hidden] { display: none; }
.auth-back .gate-card { position: relative; margin: auto; }
.auth-x { position: absolute; top: 10px; right: 12px; width: 32px; height: 32px; border-radius: 8px; border: none; background: transparent;
  color: var(--paper-dim); font-size: 22px; line-height: 1; cursor: pointer; }
.auth-x:hover { color: var(--paper); background: var(--ink); }

@media (max-width: 860px) {
  .front-bar { padding: 8px 14px; gap: 10px; }
  .fb-nav { display: none; }
  .hero { grid-template-columns: 1fr; gap: 26px; padding-top: 30px; text-align: center; }
  .hero-logo { max-width: 240px; margin: 0 auto; }
  .front .lead { margin: 0 auto; }
  .hero-cta { justify-content: center; }
  .fb-link, .fb-cta { padding: 8px 12px; font-size: 13.5px; }
  .sola-msg { max-width: 96%; }
}
@media (max-width: 520px) {
  .front-bar { gap: 6px; padding: 8px 10px; }
  .fb-actions { gap: 6px; }
  .fb-link, .fb-cta { padding: 7px 9px; font-size: 13px; }
  .gate-brand { display: none; }                      /* the logo stays; the name is on the page below */
}
@media (prefers-reduced-motion: reduce) {
  .hero-logo { animation: none; }
  .typed-caret { animation: none; }
  .sola-log { scroll-behavior: auto; }
}
