  *, *::before, *::after { box-sizing: border-box; }

  :root {
    --gs-az: #003250;
    --gs-az3: #00172a;
    --gs-ceu: #35a3dc;
    --gs-tq: #22bec6;
    --grad-accent: linear-gradient(135deg, var(--gs-ceu) 0%, var(--gs-tq) 100%);
    --font-ui: 'Raleway', Arial, Helvetica, sans-serif;
    --font-mono: 'JetBrains Mono', 'Courier New', monospace;
    --font-hand: 'Caveat', 'Segoe Print', cursive;
    --ink: rgba(255, 255, 255, 0.92);
    --ink-soft: rgba(255, 255, 255, 0.66);
    --ink-faint: rgba(255, 255, 255, 0.42);
    color-scheme: dark;
  }

  html, body { margin: 0; height: 100%; background: var(--gs-az3); }
  body { font-family: var(--font-ui); color: var(--ink); -webkit-font-smoothing: antialiased; }

  .page {
    position: relative;
    min-height: 100vh;
    min-height: 100svh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    background: linear-gradient(160deg, #00172a 0%, #003250 45%, #004a72 75%, #005a8a 100%);
  }
  .page::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
      radial-gradient(ellipse 80% 60% at 80% 20%, rgba(53, 163, 220, 0.18) 0%, transparent 60%),
      radial-gradient(ellipse 50% 40% at 10% 80%, rgba(34, 190, 198, 0.12) 0%, transparent 50%),
      radial-gradient(ellipse 40% 30% at 90% 90%, rgba(230, 101, 106, 0.08) 0%, transparent 50%);
    pointer-events: none;
  }
  /* Drafting-paper grid: the sketch sits on a blueprint sheet. */
  .page::after {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
      linear-gradient(rgba(53, 163, 220, 0.06) 1px, transparent 1px),
      linear-gradient(90deg, rgba(53, 163, 220, 0.06) 1px, transparent 1px);
    background-size: 64px 64px;
    pointer-events: none;
  }

  #stars { position: absolute; inset: 0; z-index: 1; pointer-events: none; }

  #sketch {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: 100%;
    z-index: 2;
    pointer-events: none;
    overflow: visible;
  }
  #sketch text { font-family: var(--font-hand); fill: rgba(255, 255, 255, 0.62); }

  .spotlight {
    position: absolute;
    inset: 0;
    z-index: 3;
    pointer-events: none;
    background: radial-gradient(520px circle at var(--mx, -1000px) var(--my, -1000px), rgba(53, 163, 220, 0.11), transparent 65%);
  }
  .shade {
    position: absolute;
    inset: 0;
    z-index: 3;
    pointer-events: none;
    background: radial-gradient(ellipse 62% 60% at 0% 0%, rgba(0, 23, 42, 0.82) 0%, rgba(0, 23, 42, 0.45) 45%, transparent 75%);
  }
  .noise {
    position: absolute;
    inset: 0;
    z-index: 3;
    pointer-events: none;
    opacity: 0.05;
    mix-blend-mode: overlay;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='200' height='200'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0.6 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
  }

  /* ── Foreground ─────────────────────────────────────────────── */
  .nav, .hero, .page-footer { position: relative; z-index: 4; }

  .nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.25rem clamp(1rem, 6vw, 6rem);
  }
  .brand { display: flex; align-items: center; gap: 0.7rem; text-decoration: none; color: var(--ink); }
  .brand-logo { display: block; height: 34px; width: auto; }
  .logo-mark {
    width: 36px;
    height: 36px;
    border-radius: 9px;
    background: var(--grad-accent);
    display: grid;
    place-items: center;
    box-shadow: 0 6px 18px rgba(53, 163, 220, 0.35);
  }
  .logo-mark svg { width: 22px; height: 22px; }
  .brand-name { font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; font-size: 0.95rem; }
  .nav-meta { font-family: var(--font-mono); font-size: 0.72rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-faint); }

  .hero {
    padding: clamp(0.5rem, 3vh, 2.25rem) clamp(1rem, 6vw, 6rem) 2rem;
    max-width: 44rem;
    animation: rise 0.7s cubic-bezier(0.2, 0.7, 0.2, 1) both;
  }
  @keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

  .eyebrow {
    font-family: var(--font-mono);
    font-size: 0.74rem;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--gs-ceu);
    margin: 0 0 0.9rem;
  }
  h1 {
    margin: 0;
    font-weight: 300;
    font-size: clamp(3.4rem, 7.5vw, 5.5rem);
    line-height: 0.95;
    letter-spacing: 0.04em;
  }
  .underline { display: block; width: min(330px, 70%); height: 22px; margin: 0.25rem 0 1.1rem -4px; overflow: visible; }
  .tagline {
    margin: 0 0 0.5rem;
    font-size: clamp(1.2rem, 2.2vw, 1.45rem);
    font-weight: 600;
    line-height: 1.3;
  }
  .lead { margin: 0 0 1.4rem; font-size: 0.95rem; line-height: 1.55; color: var(--ink-soft); max-width: 32rem; }

  .cta-row { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; }
  .btn-google {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    height: 3rem;
    padding: 0 1.4rem;
    border: none;
    border-radius: 8px;
    background: #ffffff;
    color: #1a2a3a;
    font-family: inherit;
    font-size: 0.95rem;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.28);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
  }
  .btn-google:hover { transform: translateY(-2px); box-shadow: 0 12px 30px rgba(0, 0, 0, 0.34); }
  .btn-google:focus-visible { outline: 2px solid var(--gs-ceu); outline-offset: 3px; }
  .g-icon { width: 18px; height: 18px; }
  .hint { font-size: 0.82rem; color: var(--ink-faint); }

  .features {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 1.4rem;
    margin: 2.2rem 0 0;
    padding: 0;
    list-style: none;
    font-family: var(--font-mono);
    font-size: 0.74rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--ink-soft);
  }
  .features li { display: flex; align-items: center; gap: 0.5rem; }
  .features li::before {
    content: '';
    width: 14px;
    height: 7px;
    border: 1.5px solid var(--gs-tq);
    border-bottom: none;
    border-radius: 7px 7px 0 0;
  }

  .page-footer {
    margin-top: auto;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.9rem;
    padding: 1.6rem 1rem 1.1rem;
    font-size: 0.72rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--ink-faint);
    background: linear-gradient(to bottom, transparent, rgba(0, 23, 42, 0.55));
  }
  .page-footer .rule { width: 48px; height: 1px; background: linear-gradient(90deg, var(--gs-ceu), var(--gs-tq)); }
  .page-footer .rule.flip { background: linear-gradient(90deg, var(--gs-tq), var(--gs-ceu)); }

  /* Sketch reveal: each stroke draws itself in (dash offset → 0). */
  /* Short, wide windows: the drawing (scaled by width) rises toward the text,
     so the hero steps down in size instead of the drawing moving. Set from JS. */
  .hero.is-compact { padding-top: 0.25rem; }
  .hero.is-compact h1 { font-size: clamp(3rem, 6vw, 4.4rem); }
  .hero.is-compact .underline { margin-bottom: 0.8rem; }
  .hero.is-compact .lead { display: none; }
  .hero.is-compact .tagline { margin-bottom: 1rem; }
  .hero.is-tight .eyebrow { display: none; }
  .hero.is-tight .tagline { font-size: 1.1rem; }

  @keyframes draw { to { stroke-dashoffset: 0; } }
  @keyframes fade { to { opacity: 1; } }

  /* On a phone the bridge becomes a band under the content instead of a
     backdrop: the hero reserves the space and the page may scroll a bit. */
  @media (max-width: 640px) {
    #sketch { height: 50vh; }
    .nav-meta { display: none; }
    .shade { background: linear-gradient(to bottom, rgba(0, 23, 42, 0.55) 0%, transparent 55%); }
    .hero { padding-top: 0.75rem; margin-bottom: 26vh; }
    h1 { font-size: 3.2rem; }
    .underline { margin-bottom: 1rem; }
    .lead { font-size: 0.95rem; margin-bottom: 1.4rem; }
    .features { margin-top: 1.3rem; }
    .page-footer { font-size: 0.64rem; letter-spacing: 0.14em; gap: 0.6rem; }
    .page-footer .rule { width: 24px; }
  }
  @media (max-height: 760px) and (min-width: 641px) {
    .hero { padding-top: 0.5rem; }
    .lead { margin-bottom: 1.4rem; }
    .features { margin-top: 1.5rem; }
  }
  @media (prefers-reduced-motion: reduce) {
    .hero { animation: none; }
  }

  /* mensagens do login (erro de domínio, sem acesso, falha; e a saída) */
  .btn-google { text-decoration: none; }
  .notice { margin: 1.1rem 0 0; max-width: 32rem; padding: 0.65rem 0.95rem; border-radius: 8px; font-size: 0.88rem;
            line-height: 1.45; color: var(--ink-soft); background: rgba(255, 255, 255, 0.08); border: 1px solid rgba(255, 255, 255, 0.16); }
  .notice.err { color: #ffd9da; background: rgba(230, 101, 106, 0.16); border-color: rgba(230, 101, 106, 0.55); }
