/* =========================================================================
   PyLot Passenger — site de divulgação
   Conceito: mesa de despacho de uma companhia aérea virtual, à noite.
   Paleta ancorada em luzes de instrumento (âmbar) e horizonte artificial
   de PFD (ciano). Conteúdo estruturado como tiras de progresso de voo
   (flight progress strips) — o cartão de papel usado em despacho/ATC.
   ========================================================================= */

:root {
  /* -- cor: tema claro (rampa ao amanhecer) -------------------------- */
  --bg: #edf1f5;
  --surface: #ffffff;
  --surface-2: #f5f8fb;
  --ink: #101826;
  --ink-muted: #4b5768;
  --line: #d7dee7;
  --line-strong: #b9c4d1;
  --amber: #a8650f;
  --amber-ink: #7a4a0a;
  --amber-soft: #f3e2c8;
  --cyan: #146b76;
  --cyan-soft: #d9eef0;
  --shadow: 0 1px 2px rgba(16, 24, 38, 0.06), 0 8px 24px rgba(16, 24, 38, 0.06);
  --grid: rgba(16, 24, 38, 0.055);
  --grid-strong: rgba(16, 24, 38, 0.09);
  --glow-amber: rgba(168, 101, 15, 0.35);
  --glow-cyan: rgba(20, 107, 118, 0.3);

  /* -- tipografia ------------------------------------------------------ */
  --font-display: "Segoe UI Semibold", "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  --font-body: "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  --font-mono: "Cascadia Code", "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;

  --fs-eyebrow: 0.75rem;
  --fs-data: 0.875rem;
  --fs-body: 1rem;
  --fs-body-lg: 1.125rem;
  --fs-h3: 1.375rem;
  --fs-h2: clamp(1.75rem, 3.2vw, 2.25rem);
  --fs-h1: clamp(2.35rem, 5.2vw, 3.75rem);

  --content-w: 1120px;
  --radius: 3px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0b1420;
    --surface: #121d2c;
    --surface-2: #0e1826;
    --ink: #eaf0f6;
    --ink-muted: #93a2b4;
    --line: #223349;
    --line-strong: #2c415c;
    --amber: #f2a93c;
    --amber-ink: #ffd794;
    --amber-soft: #2a2011;
    --cyan: #4bd0d6;
    --cyan-soft: #0f2b2c;
    --shadow: 0 1px 0 rgba(0, 0, 0, 0.4), 0 20px 40px rgba(0, 0, 0, 0.35);
    --grid: rgba(234, 240, 246, 0.055);
    --grid-strong: rgba(234, 240, 246, 0.1);
    --glow-amber: rgba(242, 169, 60, 0.45);
    --glow-cyan: rgba(75, 208, 214, 0.4);
  }
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}

body {
  margin: 0;
  background-color: var(--bg);
  background-image:
    linear-gradient(var(--grid-strong) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-strong) 1px, transparent 1px),
    linear-gradient(var(--grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 336px 336px, 336px 336px, 28px 28px, 28px 28px;
  background-position: -1px -1px;
  color: var(--ink);
  font-family: var(--font-body);
  font-size: var(--fs-body);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img, svg { display: block; max-width: 100%; }

a { color: inherit; }

.wrap {
  width: 100%;
  max-width: var(--content-w);
  margin-inline: auto;
  padding-inline: clamp(1.25rem, 4vw, 2rem);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
  font-family: var(--font-mono);
  font-size: var(--fs-eyebrow);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--amber-ink);
}

.eyebrow::before {
  content: "";
  width: 0.9em;
  height: 1px;
  background: currentColor;
  box-shadow: 0 0 6px var(--glow-amber);
}

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 700;
  margin: 0;
  text-wrap: balance;
  letter-spacing: -0.01em;
}

h1 { font-size: var(--fs-h1); line-height: 1.06; letter-spacing: -0.02em; }
h2 { font-size: var(--fs-h2); line-height: 1.15; }
h3 { font-size: var(--fs-h3); line-height: 1.25; }

p {
  margin: 0;
  text-align: justify;
  text-justify: inter-word;
  hyphens: none;
}

.lede {
  font-size: var(--fs-body-lg);
  color: var(--ink-muted);
  max-width: 46ch;
}

.mono { font-family: var(--font-mono); }

.tabular { font-variant-numeric: tabular-nums; }

.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* -- barra superior: parece uma tira de status de instrumento -------- */

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  background: var(--bg);
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}

.topbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-block: 0.85rem;
}

.wordmark {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
  color: var(--ink);
}

.wordmark-mark {
  width: 30px;
  height: 30px;
  flex: none;
  color: var(--amber);
}

.wordmark-text {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: -0.01em;
  white-space: nowrap;
}

.wordmark-text span {
  color: var(--ink-muted);
  font-weight: 500;
}

.nav {
  display: flex;
  align-items: center;
  gap: 1.75rem;
}

.nav-links {
  display: flex;
  gap: 1.75rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-links a {
  text-decoration: none;
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  letter-spacing: 0.04em;
  color: var(--ink-muted);
  padding-block: 0.25rem;
  border-bottom: 1px solid transparent;
  transition: color 0.15s ease, border-color 0.15s ease;
}

.nav-links a:hover,
.nav-links a:focus-visible {
  color: var(--ink);
  border-color: var(--amber);
}

.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  color: var(--ink);
  width: 38px;
  height: 34px;
  align-items: center;
  justify-content: center;
}

.btn {
  --btn-fg: var(--surface);
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  letter-spacing: 0.04em;
  text-decoration: none;
  padding: 0.62rem 1rem;
  border-radius: var(--radius);
  border: 1px solid transparent;
  white-space: nowrap;
  transition: transform 0.12s ease, background 0.15s ease, border-color 0.15s ease;
}

.btn:active { transform: translateY(1px); }

.btn-primary {
  background: var(--amber);
  color: #1a1200;
  font-weight: 600;
  box-shadow: 0 0 0 1px transparent, 0 0 18px var(--glow-amber);
}
.btn-primary:hover { background: var(--amber-ink); }
.btn-primary:hover { background: color-mix(in srgb, var(--amber) 88%, white 12%); }

.btn-ghost {
  background: transparent;
  border-color: var(--line-strong);
  color: var(--ink);
}
.btn-ghost:hover { border-color: var(--amber); color: var(--amber-ink); }

*:focus-visible {
  outline: 2px solid var(--amber);
  outline-offset: 2px;
}

/* -- seções genéricas -------------------------------------------------- */

section { padding-block: clamp(2.5rem, 5.5vw, 4.25rem); }

.section-head {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  margin-bottom: clamp(1.5rem, 3.5vw, 2.25rem);
  max-width: 62ch;
  position: relative;
  padding-left: 14px;
}

.section-head::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.2em;
  bottom: 0.2em;
  width: 6px;
  border-left: 1px solid var(--line-strong);
  border-top: 1px solid var(--line-strong);
  border-bottom: 1px solid var(--line-strong);
}

.section-alt {
  background: var(--surface-2);
  background: color-mix(in srgb, var(--surface-2) 62%, transparent);
  border-block: 1px solid var(--line);
}

/* .reveal starts fully visible: this is a progressive enhancement.
   Only after script.js confirms it can run the reveal animation does it
   stamp .js-reveal on <html> and hide these elements pre-animation, so
   content never depends on JavaScript to become visible. */
.js-reveal .reveal {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}
.js-reveal .reveal.is-visible { opacity: 1; transform: none; }

/* cards cascade in individually once their grid becomes visible, instead
   of the whole group appearing at once */
.js-reveal .cycle > .cycle-step,
.js-reveal .grid-features > .feature,
.js-reveal .placard-grid > .placard-cell {
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.4s ease, transform 0.4s ease;
}
.js-reveal .cycle.is-visible > .cycle-step,
.js-reveal .grid-features.is-visible > .feature,
.js-reveal .placard.is-visible .placard-cell {
  opacity: 1;
  transform: none;
}

.cycle > .cycle-step:nth-child(1) { transition-delay: 0ms; }
.cycle > .cycle-step:nth-child(2) { transition-delay: 70ms; }
.cycle > .cycle-step:nth-child(3) { transition-delay: 140ms; }
.cycle > .cycle-step:nth-child(4) { transition-delay: 210ms; }
.cycle > .cycle-step:nth-child(5) { transition-delay: 280ms; }
.cycle > .cycle-step:nth-child(6) { transition-delay: 350ms; }

.grid-features > .feature:nth-child(1) { transition-delay: 0ms; }
.grid-features > .feature:nth-child(2) { transition-delay: 50ms; }
.grid-features > .feature:nth-child(3) { transition-delay: 100ms; }
.grid-features > .feature:nth-child(4) { transition-delay: 150ms; }
.grid-features > .feature:nth-child(5) { transition-delay: 200ms; }
.grid-features > .feature:nth-child(6) { transition-delay: 250ms; }
.grid-features > .feature:nth-child(7) { transition-delay: 300ms; }
.grid-features > .feature:nth-child(8) { transition-delay: 350ms; }

.placard-grid > .placard-cell:nth-child(1) { transition-delay: 0ms; }
.placard-grid > .placard-cell:nth-child(2) { transition-delay: 70ms; }
.placard-grid > .placard-cell:nth-child(3) { transition-delay: 140ms; }
.placard-grid > .placard-cell:nth-child(4) { transition-delay: 210ms; }

/* -- hero ---------------------------------------------------------------- */

.hero {
  padding-top: clamp(2rem, 5vw, 3.5rem);
  position: relative;
  overflow: hidden;
}

.hero-inner {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  gap: clamp(1.5rem, 4vw, 3rem);
  align-items: center;
}

.hero-copy {
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
}

.hero-actions {
  display: flex;
  gap: 0.85rem;
  flex-wrap: wrap;
  margin-top: 0.25rem;
}

.hero-chart {
  width: 100%;
  max-width: 440px;
  margin-inline: auto;
}

.hero-scan {
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--cyan), transparent);
  filter: blur(1px);
  opacity: 0;
  pointer-events: none;
}

.hud-strip {
  display: flex;
  justify-content: center;
  gap: 0.75rem;
  margin-top: 0.75rem;
}

.hud-tape {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.2rem;
  padding: 0.5rem 0.9rem;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: var(--surface);
  min-width: 68px;
}

.hud-label {
  font-family: var(--font-mono);
  font-size: 0.625rem;
  letter-spacing: 0.1em;
  color: var(--ink-muted);
}

.hud-value {
  font-family: var(--font-mono);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--cyan);
  text-shadow: 0 0 10px var(--glow-cyan);
  font-variant-numeric: tabular-nums;
}

.hud-unit {
  font-family: var(--font-mono);
  font-size: 0.625rem;
  color: var(--ink-muted);
}

@media (max-width: 860px) {
  .hero-inner { grid-template-columns: 1fr; }
  .hero-chart { order: -1; max-width: 300px; }
}

@media (prefers-reduced-motion: no-preference) {
  .needle-sway {
    transform-origin: 0px 0px;
    animation: needle-sway 7s ease-in-out infinite;
  }
  .route-line {
    animation: route-flow 1.4s linear infinite;
  }
  .route-plane {
    offset-path: path("M64 340 Q 180 300 230 320 T 380 260");
    offset-rotate: auto;
    animation: route-fly 6s linear infinite;
  }
  .hero-scan {
    animation: scan-sweep 6s ease-in-out infinite;
  }

  .hero-copy .eyebrow { animation: boot-in 0.6s ease both; }
  .hero-copy h1 { animation: boot-in 0.6s ease 0.08s both; }
  .hero-copy .lede { animation: boot-in 0.6s ease 0.16s both; }
  .hero-copy .hero-actions { animation: boot-in 0.6s ease 0.24s both; }
  .hero-chart { animation: boot-in-scale 0.8s ease 0.1s both; }
}

@keyframes needle-sway {
  0%, 100% { transform: rotate(-3deg); }
  50% { transform: rotate(3deg); }
}

@keyframes route-flow {
  to { stroke-dashoffset: -16; }
}

@keyframes route-fly {
  0% { offset-distance: 0%; opacity: 0; }
  6% { opacity: 1; }
  94% { opacity: 1; }
  100% { offset-distance: 100%; opacity: 0; }
}

@keyframes scan-sweep {
  0%, 100% { top: 0%; opacity: 0; }
  10% { opacity: 0.6; }
  50% { top: 92%; opacity: 0.6; }
  90% { opacity: 0; }
}

@keyframes boot-in {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: none; }
}

@keyframes boot-in-scale {
  from { opacity: 0; transform: scale(0.94); }
  to { opacity: 1; transform: scale(1); }
}

/* -- ciclo operacional (sequência real, por isso numerada) --------------- */

.cycle {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 1.75rem 1.5rem;
}

.cycle-step {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  position: relative;
  padding-top: 1.1rem;
  border-top: 2px dashed var(--line-strong);
  transition: border-color 0.15s ease;
}

.cycle-step:hover {
  border-top-color: var(--amber);
}

.cycle-step-num {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--amber-ink);
  letter-spacing: 0.06em;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.cycle-step-num::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--amber);
  box-shadow: 0 0 8px var(--glow-amber);
  flex: none;
}

.cycle-step h3 {
  font-size: 1rem;
  font-weight: 700;
}

.cycle-step p {
  font-size: 0.875rem;
  color: var(--ink-muted);
}

/* -- grid de recursos ----------------------------------------------------- */

.grid-features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.25rem;
}

.feature {
  background: var(--surface);
  padding: 1.75rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
  transition: background 0.15s ease, transform 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

.feature:hover {
  background: var(--surface-2);
  transform: translateY(-2px);
  border-color: var(--amber);
  box-shadow: 0 10px 28px var(--glow-amber);
}

.feature-icon {
  width: 34px;
  height: 34px;
  border-radius: var(--radius);
  border: 1px solid var(--line-strong);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--amber);
  transition: border-color 0.15s ease;
}

.feature:hover .feature-icon { border-color: var(--amber); }

.feature-icon svg { width: 18px; height: 18px; }

.feature-status {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--cyan);
}

.feature p { color: var(--ink-muted); font-size: 0.9375rem; }

/* -- critérios de avaliação (placard) ------------------------------------- */

.placard-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.25rem;
}
@media (min-width: 860px) {
  .placard-grid { grid-template-columns: repeat(4, 1fr); }
}
@media (max-width: 520px) {
  .placard-grid { grid-template-columns: 1fr; }
}

.placard-cell {
  padding: 1.5rem 1.5rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.placard-cell:hover {
  border-color: var(--cyan);
  box-shadow: 0 10px 24px var(--glow-cyan);
}

.placard-title {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--amber-ink);
  margin-bottom: 0.6rem;
  display: block;
}

.placard-cell ul {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.placard-cell li {
  font-size: 0.9375rem;
  color: var(--ink-muted);
  padding-left: 1rem;
  position: relative;
  text-align: justify;
  text-justify: inter-word;
  hyphens: none;
}

.placard-cell li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 6px;
  height: 1px;
  background: var(--line-strong);
}

/* -- notam / roadmap ------------------------------------------------------- */

.notam {
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius);
  padding: 1.75rem;
  background: var(--surface);
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.notam-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.75rem;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.06em;
  color: var(--ink-muted);
}

.notam-tag {
  background: var(--amber-soft);
  color: var(--amber-ink);
  padding: 0.3rem 0.6rem;
  border-radius: var(--radius);
  font-weight: 600;
  box-shadow: 0 0 14px var(--glow-amber);
}

/* -- rodapé -------------------------------------------------------------------- */

footer {
  border-top: 1px solid var(--line);
  padding-block: 2.5rem;
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 2rem;
  flex-wrap: wrap;
}

.footer-legal {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--ink-muted);
  max-width: 46ch;
  line-height: 1.7;
}

.footer-links {
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.footer-links a {
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  text-decoration: none;
  color: var(--ink-muted);
  border-bottom: 1px solid transparent;
}
.footer-links a:hover { color: var(--amber-ink); border-color: currentColor; }

/* -- responsivo ------------------------------------------------------------------ */

@media (max-width: 860px) {
  .nav-links { display: none; }
  .nav-toggle { display: inline-flex; }
  .nav.is-open .nav-links {
    display: flex;
    position: absolute;
    top: calc(100% + 1px);
    left: 0;
    right: 0;
    flex-direction: column;
    gap: 0;
    background: var(--bg);
    border-bottom: 1px solid var(--line);
    padding: 0.5rem clamp(1.25rem, 4vw, 2rem) 1rem;
  }
  .nav.is-open .nav-links a { padding-block: 0.65rem; border-bottom: 1px solid var(--line); }
  .topbar-inner { position: relative; }
}

@media (max-width: 560px) {
  .footer-inner { flex-direction: column; }
}
