/* ===========================
   SUBPAGES — Estilos Compartilhados
   Machado Plataformas
=========================== */

/* ── PAGE HERO ── */

.page-hero {
  background: linear-gradient(150deg, #1A2E46 0%, #112236 50%, #0d1825 100%);
  padding-top: calc(var(--navbar-height) + var(--space-8));
  padding-bottom: var(--space-14);
  overflow: hidden;
  position: relative;
  min-height: 0;
  display: flex;
  align-items: flex-end;
  border-bottom: 1px solid rgba(91, 155, 213, 0.18);
}

/* Glow azul esquerda + linha diagonal clean */
.page-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 75% 85% at -5% 65%, rgba(27, 77, 132, 0.45) 0%, transparent 65%),
    radial-gradient(ellipse 35% 45% at 98% 10%, rgba(91, 155, 213, 0.10) 0%, transparent 60%),
    linear-gradient(128deg,
      transparent calc(55% - 0.5px),
      rgba(91, 155, 213, 0.08) calc(55% - 0.5px),
      rgba(91, 155, 213, 0.08) calc(55% + 0.5px),
      transparent calc(55% + 0.5px)
    );
  pointer-events: none;
  z-index: 0;
}

.page-hero::after { content: none; }

/* ── PAGE DIVIDER ── */

.page-divider {
  height: 1px;
  background: rgba(51,51,51,0.6);
  margin: 0;
}

.page-divider__label { display: none; }

/* ── Decorativos removidos no redesign clean ── */
.page-hero__scan,
.page-hero__ticker,
.page-hero__page-num,
.page-hero__coords,
.page-hero__deco {
  display: none;
}

/* ── Status ── */
.page-hero__status {
  display: none;
}

/* ── PAGE HERO — Eyebrow ── */

.page-hero__eyebrow {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  font-family: var(--font-ui-mono);
  font-size: var(--text-xs);
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--color-primary-light);
  margin-bottom: var(--space-5);
  opacity: 0;
  animation: subpage-fade-up 0.7s ease 0.1s forwards;
}

.page-hero__eyebrow::before {
  content: '';
  display: inline-block;
  height: 1px;
  width: 0;
  background: currentColor;
  animation: subpage-rule-draw 0.7s var(--ease-machado) 0.25s forwards;
}

/* ── PAGE HERO — Title ── */

.page-hero__title {
  font-family: var(--font-titles);
  font-size: clamp(1.75rem, 5.5vw, 4rem);
  font-weight: 700;
  line-height: 0.9;
  letter-spacing: -0.01em;
  text-transform: uppercase;
  margin: 0;
}

.page-hero__title-line {
  display: block;
  overflow: clip;
  padding-bottom: 0.1em;
  margin-bottom: -0.1em;
}

.page-hero__title-inner {
  display: block;
  transform: translateY(105%);
  animation: subpage-title-rise 1.1s var(--ease-machado) forwards;
  color: var(--color-white);
}

.page-hero__title-line:nth-child(1) .page-hero__title-inner { animation-delay: 0.1s; }
.page-hero__title-line:nth-child(2) .page-hero__title-inner { animation-delay: 0.18s; }
.page-hero__title-line:nth-child(3) .page-hero__title-inner { animation-delay: 0.26s; }

/* ── PAGE HERO — Sub ── */

.page-hero__sub {
  display: none;
}

/* ── KEYFRAMES ── */

@keyframes subpage-fade-up {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes subpage-title-rise {
  from { transform: translateY(105%); filter: blur(8px); }
  to   { transform: translateY(0);    filter: blur(0); }
}

@keyframes subpage-rule-draw {
  from { width: 0; }
  to   { width: 2.5rem; }
}

@keyframes page-hero-scan {
  from { top: 0; opacity: 1; }
  to   { top: 100%; opacity: 0; }
}

@keyframes page-hero-ticker {
  from { transform: translateX(0); }
  to   { transform: translateX(-33.333%); }
}

@keyframes status-pulse {
  0%, 100% { opacity: 1; box-shadow: 0 0 0 0 rgba(74,222,128,0.5); }
  50%       { opacity: 0.6; box-shadow: 0 0 0 4px rgba(74,222,128,0); }
}

@keyframes page-hero-bg-in {
  from { opacity: 0; }
  to   { opacity: 1; }
}

@keyframes page-hero-deco-in {
  from { opacity: 0; transform: translateY(calc(-50% + 24px)); }
  to   { opacity: 1; transform: translateY(-50%); }
}

/* ── PAGE SECTION — Base ── */

.page-section {
  padding-block: var(--section-md);
}

.page-section--dark {
  background: var(--color-black);
  color: var(--color-white);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.page-section--mid {
  background: var(--color-bg);
  color: var(--color-text);
  border-bottom: 1px solid var(--color-border);
}

.page-section--surface {
  background: var(--color-surface);
  color: var(--color-text-dark);
}

/* ── SECTION HEADER ── */

.sec-header {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  margin-bottom: var(--space-12);
}

/* ── SEC KICKER ── */

.sec-kicker {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  font-family: var(--font-ui-mono);
  font-size: var(--text-xs);
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--color-primary-light);
}

.sec-kicker::before {
  content: '';
  display: inline-block;
  width: 2rem;
  height: 1px;
  background: currentColor;
  opacity: 0.8;
  flex-shrink: 0;
}

/* ── SEC TITLE ── */

.sec-title {
  font-family: var(--font-heading);
  font-size: clamp(var(--text-3xl), 5vw, var(--text-5xl));
  font-weight: var(--weight-bold);
  line-height: 0.92;
  letter-spacing: -0.02em;
  color: var(--color-white);
  text-wrap: balance;
}

.sec-title--onlight {
  color: var(--color-text);
}

/* ── SEC SUB ── */

.sec-sub {
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: 1.7;
  color: rgba(255, 255, 255, 0.55);
  max-width: 44ch;
}

.sec-sub--onlight {
  color: var(--color-text-muted);
}

/* ── KPI STRIP ── */

.kpi-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 1px;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.07);
}

.kpi-strip--light {
  background: var(--color-border);
  border-color: var(--color-border);
}

/* ── KPI CELL ── */

.kpi-cell {
  background: var(--color-black);
  padding: var(--space-8) var(--space-6);
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  transition: background 0.25s ease;
}

.kpi-strip--light .kpi-cell {
  background: var(--color-surface);
}

@media (hover: hover) {
  .kpi-cell:hover {
    background: var(--color-bg);
  }

  .kpi-strip--light .kpi-cell:hover {
    background: var(--color-white);
  }
}

/* ── KPI CELL — Value ── */

.kpi-cell__val {
  font-family: var(--font-titles);
  font-size: clamp(var(--text-3xl), 4vw, var(--text-5xl));
  font-weight: 900;
  line-height: 1;
  letter-spacing: -0.03em;
  color: var(--color-primary-light);
  font-variant-numeric: tabular-nums;
}

.kpi-strip--light .kpi-cell__val {
  color: var(--color-primary);
}

/* ── KPI CELL — Key ── */

.kpi-cell__key {
  font-family: var(--font-ui-mono);
  font-size: var(--text-xs);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.5);
}

.kpi-strip--light .kpi-cell__key {
  color: var(--color-text-muted);
}

/* ── PAGE CTA ── */

.page-cta {
  background: var(--color-black);
  color: var(--color-white);
  padding-block: var(--section-md);
  text-align: center;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

/* ── PAGE CTA — Eyebrow ── */

.page-cta__eyebrow {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-3);
  font-family: var(--font-ui-mono);
  font-size: var(--text-xs);
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--color-primary-light);
  margin-bottom: var(--space-6);
}

/* ── PAGE CTA — Title ── */

.page-cta__title {
  font-family: var(--font-titles);
  font-size: clamp(var(--text-4xl), 6vw, var(--text-6xl));
  font-weight: 900;
  line-height: 0.9;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--color-white);
  margin: 0 0 var(--space-10);
}

/* ── PAGE CTA — Nota ── */

.page-cta__note {
  margin-top: var(--space-3);
  margin-bottom: var(--space-10);
  font-family: var(--font-ui-mono);
  font-size: var(--text-xs);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.6);
}

/* ── PAGE CTA — Mobile ── */

@media (max-width: 480px) {
  .page-cta__title {
    font-size: clamp(1.75rem, 8vw, 2.25rem);
    letter-spacing: 0.02em;
  }
}

/* ── REDUCED MOTION ── */

@media (prefers-reduced-motion: reduce) {
  .page-hero::before { opacity: 1; animation: none; }
  .page-hero__scan { animation: none; opacity: 0; }
  .page-hero__ticker-inner { animation: none; }
  .page-hero__status { opacity: 1; animation: none; }
  .page-hero__status::before { animation: none; }
  .page-hero__eyebrow { opacity: 1; animation: none; }
  .page-hero__eyebrow::before { width: 2.5rem; animation: none; }
  .page-hero__title-inner { transform: none; filter: none; animation: none; }
  .page-hero__sub { opacity: 1; animation: none; }
  .page-hero__page-num { opacity: 1; animation: none; }
  .page-hero__coords { opacity: 1; animation: none; }
  .page-hero__deco { opacity: 1; animation: none; transform: translateY(-50%); }
}
