/* O portão do lab: o papel blueprint da seção final da gappin.app ("Field notes"). */
@font-face { font-family: "Rajdhani"; src: url(fonts/Rajdhani-Regular.ttf); font-weight: 400; font-display: swap; }
@font-face { font-family: "Rajdhani"; src: url(fonts/Rajdhani-Medium.ttf); font-weight: 500; font-display: swap; }
@font-face { font-family: "Rajdhani"; src: url(fonts/Rajdhani-SemiBold.ttf); font-weight: 600; font-display: swap; }
@font-face { font-family: "Share Tech Mono"; src: url(fonts/ShareTechMono-Regular.ttf); font-display: swap; }
@font-face { font-family: "Exo 2 Thin"; src: url(fonts/Exo2-Thin.ttf); font-weight: 100; font-display: block; }
:root {
  --ink: #e4f5fa; --soft: #93b9c5; --dim: #4fa3bd; --holo: hsl(192 100% 72%); --amber: #ffb23e; --amber-ink: #160d00;
  --line: hsl(192 100% 72% / 0.22); --line-strong: hsl(192 100% 72% / 0.46);
  --mono: "Share Tech Mono", ui-monospace, monospace; --text: "Rajdhani", system-ui, sans-serif; --thin: "Exo 2 Thin", "Rajdhani", sans-serif;
  --gutter: clamp(16px, 4vw, 48px);
}
* { box-sizing: border-box; }
html { background: hsl(206 65% 7%); }
body {
  margin: 0; color: var(--ink); font: 500 16px/1.5 var(--text); min-height: 100svh;
  background:
    repeating-linear-gradient(to right, hsl(200 80% 60% / 0.07) 0 1px, transparent 1px 24px),
    repeating-linear-gradient(to bottom, hsl(200 80% 60% / 0.07) 0 1px, transparent 1px 24px),
    repeating-linear-gradient(to right, hsl(200 80% 60% / 0.12) 0 1px, transparent 1px 120px),
    repeating-linear-gradient(to bottom, hsl(200 80% 60% / 0.12) 0 1px, transparent 1px 120px),
    radial-gradient(ellipse 80% 70% at 60% 50%, hsl(208 70% 13%), hsl(206 65% 7%));
}
::selection { background: var(--amber); color: var(--amber-ink); }
:focus-visible { outline: 2px solid var(--amber); outline-offset: 3px; }
.gate { min-height: 100svh; display: grid; align-items: center; padding: 8svh var(--gutter); }
.gate__in { max-width: 80rem; margin: 0 auto; width: 100%; display: grid; grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr); gap: clamp(24px, 4vw, 64px); align-items: center; }
.gate__text { display: grid; gap: 18px; }
.eyebrow { margin: 0; font: 400 0.74rem var(--mono); letter-spacing: 0.2em; text-transform: uppercase; color: var(--dim); }
.eyebrow b { font-weight: 400; color: var(--amber); }
h1 { margin: 0; font: 100 clamp(2.6rem, 5vw, 4.2rem)/1 var(--thin); letter-spacing: 0.02em; }
.lede { margin: 0; max-width: 40ch; color: var(--soft); font-size: 1.1rem; line-height: 1.55; }
.lede--ink { color: var(--ink); font: 100 clamp(1.3rem, 2vw, 1.6rem)/1.35 var(--thin); }
.box { display: grid; gap: 10px; padding-top: 16px; border-top: 1px solid var(--line); max-width: 34rem; }
.lbl { font: 400 0.72rem var(--mono); letter-spacing: 0.16em; text-transform: uppercase; color: var(--dim); }
.row { display: flex; gap: 10px; }
input {
  flex: 1; min-width: 0; min-height: 48px; padding: 0 14px; font: 500 1.05rem var(--text); color: var(--ink);
  background: hsl(205 60% 6% / 0.85); border: 1px solid var(--line-strong); border-radius: 3px;
}
#code { font: 400 1.2rem var(--mono); letter-spacing: 0.18em; text-transform: uppercase; }
input::placeholder { color: hsl(192 30% 46%); letter-spacing: inherit; }
input:focus { outline: none; border-color: var(--holo); box-shadow: 0 0 0 3px hsl(192 100% 72% / 0.15); }
.btn {
  display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 0 18px; white-space: nowrap;
  font: 600 0.88rem/1 var(--text); letter-spacing: 0.14em; text-transform: uppercase; cursor: pointer;
  color: var(--amber-ink); background: var(--amber); border: 0; border-radius: 3px; transition: transform 160ms, box-shadow 300ms;
}
.btn:hover { transform: translateY(-1px); box-shadow: 0 0 24px 2px hsl(36 100% 62% / 0.35); }
.btn--ghost { color: var(--ink); background: transparent; box-shadow: inset 0 0 0 1px var(--line-strong); }
.btn--ghost:hover { box-shadow: inset 0 0 0 1px var(--holo); }
form[aria-busy="true"] .btn { opacity: 0.6; pointer-events: none; }
.fine { margin: 0; font-size: 0.86rem; color: hsl(192 25% 58%); }
.status { margin: 0; min-height: 1.3em; font: 400 0.82rem var(--mono); letter-spacing: 0.04em; color: var(--amber); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.box.is-done .row, .box.is-done .fine { display: none; }
.back { margin: 6px 0 0; font: 400 0.74rem var(--mono); letter-spacing: 0.14em; text-transform: uppercase; }
.back a { color: var(--soft); text-decoration: none; }
.back a:hover { color: var(--holo); }
.study { display: block; width: 100%; height: min(70svh, 40rem); }
.shake { animation: shake 360ms; }
@keyframes shake { 20%, 60% { transform: translateX(-6px); } 40%, 80% { transform: translateX(6px); } }
/* o logo em contorno: desenha uma vez, e a pena âmbar fica percorrendo o traço */
.logo-outline { width: min(16rem, 58vw); height: auto; overflow: visible; }
.logo-outline path { fill: none; vector-effect: non-scaling-stroke; }
.logo-outline__draw path { stroke: var(--holo); stroke-width: 1.1; stroke-dasharray: 1; stroke-dashoffset: 1; animation: draw 2.4s cubic-bezier(.2,.7,.2,1) calc(var(--i) * 140ms) forwards; }
.logo-outline__pen path { stroke: var(--amber); stroke-width: 2; stroke-linecap: round; stroke-dasharray: 0.035 0.965; opacity: 0.9; animation: pen 6s linear calc(2.4s + var(--i) * 0.6s) infinite both; }
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes pen { from { stroke-dashoffset: 1; } to { stroke-dashoffset: 0; } }
@media (max-width: 860px) {
  .gate { padding-top: 4svh; }
  .gate__in { grid-template-columns: 1fr; }
  .study { order: -1; height: 38svh; }
  .row { flex-direction: column; }
}
@media (prefers-reduced-motion: reduce) {
  .logo-outline__draw path { stroke-dashoffset: 0; animation: none; }
  .logo-outline__pen { display: none; }
}
