/* ═══════════════════════════════════════════════════════════════
   HERO — split layout
   Left:   GRC monogram + headline + CTAs + terminal log
   Right:  Annex A control lattice (interactive heat-map)
   ═══════════════════════════════════════════════════════════════ */

.hero {
  background: var(--authority);
  min-height: 96vh;
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
  padding: 72px 0 64px;
}
.hero-bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background-image:
    radial-gradient(ellipse 70% 60% at  8%   0%, rgba(30, 90,168,0.42), transparent 60%),
    radial-gradient(ellipse 60% 50% at 92% 100%, rgba(14, 61,122,0.55), transparent 55%);
}
.hero-grid-bg {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.035) 1px, transparent 1px);
  background-size: 72px 72px;
  mask-image:        radial-gradient(ellipse at 50% 50%, #000 30%, transparent 80%);
  -webkit-mask-image: radial-gradient(ellipse at 50% 50%, #000 30%, transparent 80%);
  animation: gridDrift 80s linear infinite;
}
@keyframes gridDrift {
  from { background-position: 0 0; }
  to   { background-position: 72px 72px; }
}
.hero-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(70px);
  pointer-events: none;
  opacity: 0.35;
}
.hero-orb.a {
  width: 420px; height: 420px;
  background: radial-gradient(circle, #1E5AA8, transparent 70%);
  top: -140px; right: 38%;
  animation: orbA 16s ease-in-out infinite;
}
.hero-orb.b {
  width: 340px; height: 340px;
  background: radial-gradient(circle, rgba(46,204,113,0.25), transparent 70%);
  bottom: -120px; left: 18%;
  animation: orbB 20s ease-in-out infinite;
}
@keyframes orbA { 0%,100% { transform: translate(0,0); } 50% { transform: translate(-40px, 30px); } }
@keyframes orbB { 0%,100% { transform: translate(0,0); } 50% { transform: translate( 40px,-30px); } }

.hero-layout {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: 64px;
  align-items: center;
}
/* Grid items must be allowed to shrink below their content's
   min-content width — otherwise the lattice domain-tabs (which use
   white-space: nowrap) push the column wider than the viewport on mobile. */
.hero-layout > * { min-width: 0; }
.lattice-card    { min-width: 0; }

@media (max-width: 1024px) {
  .hero-layout { grid-template-columns: 1fr; gap: 48px; }
}
.hero-left { max-width: 600px; }

/* GRC monogram */
.grc-mono {
  font-weight: 900;
  font-size: 84px;
  letter-spacing: -3.5px;
  line-height: 1;
  margin-bottom: 20px;
  display: inline-flex;
}
.grc-mono span { display: inline-block; }
.grc-mono .g { color: var(--white);  animation: letterIn 0.7s var(--ease-out) 0.10s both; }
.grc-mono .r { color: var(--trust);  animation: letterIn 0.7s var(--ease-out) 0.25s both; }
.grc-mono .c { color: var(--growth); animation: letterIn 0.7s var(--ease-out) 0.40s both; position: relative; }
@keyframes letterIn {
  from { opacity: 0; transform: translateY(30px) scale(0.9); filter: blur(8px); }
  to   { opacity: 1; transform: none; filter: blur(0); }
}
.grc-mono .c::after {
  content: "";
  position: absolute;
  bottom: 8px; right: -6px;
  width: 9px; height: 9px;
  border-radius: 50%;
  background: var(--growth);
  box-shadow: 0 0 22px var(--growth);
  opacity: 0;
  animation: dotIn 0.5s var(--ease-out) 1s both,
             dotPulse 2.5s ease-in-out 1.5s infinite;
}
@keyframes dotIn { to { opacity: 1; } }
@keyframes dotPulse {
  0%, 100% { transform: scale(1);   opacity: 1; }
  50%      { transform: scale(1.4); opacity: 0.5; }
}

.hero .accent-rule { animation: drawRule 0.8s var(--ease-out) 0.55s both; }
.hero h1 {
  font-weight: 800;
  font-size: 46px;
  line-height: 1.08;
  color: var(--white);
  letter-spacing: -1px;
  max-width: 620px;
  margin-bottom: 22px;
  text-wrap: balance;
  animation: fadeUp 0.8s var(--ease-out) 0.70s both;
}
.hero .sub {
  font-weight: 300;
  font-size: 18px;
  line-height: 1.55;
  color: rgba(255,255,255,0.7);
  max-width: 540px;
  margin-bottom: 32px;
  animation: fadeUp 0.8s var(--ease-out) 0.85s both;
}
.hero-cta-row {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  animation: fadeUp 0.8s var(--ease-out) 1.00s both;
}
.hero .footnote {
  font-size: 12px;
  color: rgba(255,255,255,0.4);
  margin-top: 26px;
  letter-spacing: 0.2px;
  animation: fadeUp 0.8s var(--ease-out) 1.15s both;
}
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: none; }
}

@media (max-width: 768px) {
  .hero { min-height: auto; padding: 56px 0 48px; }
  .grc-mono { font-size: 60px; letter-spacing: -2px; }
  .hero h1 { font-size: 30px; }
  .hero .sub { font-size: 16px; }
}

/* Hero terminal log */
.hero-terminal {
  margin-top: 28px;
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 1.7;
  color: rgba(255,255,255,0.62);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 6px;
  background: rgba(0,0,0,0.18);
  padding: 14px 16px 14px 44px;
  position: relative;
  animation: fadeUp 0.8s var(--ease-out) 1.30s both;
  max-width: 520px;
}
.hero-terminal::before {
  content: "";
  position: absolute;
  top: 14px; left: 14px;
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--growth);
  box-shadow: 0 0 10px var(--growth);
  animation: dotPulse 2s ease-in-out infinite;
}
.hero-log-line { display: block; min-height: 1.7em; }
.hero-log-line .tok-time { color: rgba(255,255,255,0.35); }
.hero-log-line .tok-ok   { color: var(--growth); }
.hero-log-line .tok-key  { color: #8EB8F0; }

/* ── Annex A control lattice (right hero) ───────────────────── */
.lattice-wrap {
  position: relative;
  animation: panelIn 1s var(--ease-out) 0.5s both;
}
@keyframes panelIn {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: none; }
}
.lattice-card {
  background: linear-gradient(180deg, rgba(255,255,255,0.07), rgba(255,255,255,0.02));
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 18px;
  padding: 24px;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 40px 90px -45px rgba(0,0,0,0.6),
              inset 0 1px 0 rgba(255,255,255,0.06);
}
.lattice-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}
.lattice-title {
  font-weight: 700;
  font-size: 11px;
  color: var(--white);
  letter-spacing: 2.5px;
  text-transform: uppercase;
  display: flex;
  align-items: center;
  gap: 10px;
}
.lattice-title::before {
  content: "";
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--growth);
  box-shadow: 0 0 10px var(--growth);
  animation: dotPulse 2s ease-in-out infinite;
}
.lattice-meta {
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: rgba(255,255,255,0.4);
}
.lattice-sub {
  font-size: 11px;
  color: rgba(255,255,255,0.5);
  margin-bottom: 18px;
  line-height: 1.5;
}

.lattice-domain-tabs {
  display: flex;
  gap: 4px;
  padding: 4px;
  background: rgba(0,0,0,0.2);
  border-radius: 100px;
  margin-bottom: 18px;
  overflow-x: auto;
}
.lattice-domain-tabs::-webkit-scrollbar { display: none; }
.lattice-domain-tabs button {
  flex: 1;
  padding: 8px 10px;
  font-size: 10px;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  font-weight: 600;
  color: rgba(255,255,255,0.5);
  border-radius: 100px;
  transition: color 0.2s ease, background-color 0.2s ease;
  white-space: nowrap;
}
.lattice-domain-tabs button.active {
  background: rgba(46,204,113,0.18);
  color: var(--white);
}
.lattice-domain-tabs button:hover:not(.active) { color: rgba(255,255,255,0.85); }

.lattice-grid {
  display: grid;
  grid-template-columns: repeat(11, 1fr);
  gap: 3px;
  margin-bottom: 18px;
  position: relative;
  aspect-ratio: 11 / 7;
}
.lattice-cell {
  background: rgba(255,255,255,0.05);
  border-radius: 2px;
  position: relative;
  transition: background-color 0.4s ease, transform 0.2s ease;
  cursor: pointer;
}
.lattice-cell:hover {
  background: rgba(255,255,255,0.14);
  transform: scale(1.15);
  z-index: 2;
}
.lattice-cell.lit       { background: rgba(46, 204,113,0.50); box-shadow: 0 0 8px rgba(46, 204,113,0.40); }
.lattice-cell.lit-trust { background: rgba(30,  90,168,0.70); box-shadow: 0 0 8px rgba(30,  90,168,0.40); }
.lattice-cell.lit-amber { background: rgba(255,176, 60,0.60); box-shadow: 0 0 8px rgba(255,176, 60,0.40); }
.lattice-cell[data-tip]:hover::after {
  content: attr(data-tip);
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  background: var(--ink);
  color: var(--white);
  font-size: 10px;
  padding: 5px 8px;
  border-radius: 3px;
  white-space: nowrap;
  z-index: 3;
}

/* lattice cell legend */
.lattice-legend {
  display: flex;
  gap: 18px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}
.lattice-legend-item {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 9px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  font-weight: 600;
  color: rgba(255,255,255,0.55);
}
.lattice-swatch {
  width: 10px;
  height: 10px;
  border-radius: 2px;
  display: inline-block;
}
.sw-met     { background: rgba(46, 204,113,0.50); box-shadow: 0 0 4px rgba(46, 204,113,0.40); }
.sw-partial { background: rgba(255,176, 60,0.60); box-shadow: 0 0 4px rgba(255,176, 60,0.40); }
.sw-gap     { background: rgba(255,255,255,0.10); border: 1px solid rgba(255,255,255,0.18); }

.lattice-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-top: 14px;
}
.lattice-stat-box {
  padding: 12px 14px;
  background: rgba(0,0,0,0.15);
  border-radius: 6px;
}
.lattice-stat-val {
  font-weight: 800;
  font-size: 20px;
  color: var(--white);
  letter-spacing: -0.4px;
  font-family: var(--font-mono);
}
.lattice-stat-val .u {
  color: rgba(255,255,255,0.45);
  font-weight: 500;
  font-size: 12px;
  margin-left: 1px;
}
.lattice-stat-lbl {
  font-size: 9px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: rgba(255,255,255,0.4);
  font-weight: 600;
  margin-top: 4px;
}
