/* ═══════════════════════════════════════════════
   GRANTMATCH: INSTITUTIONAL GRID ARCHITECTURE
   ═══════════════════════════════════════════════ */

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  border-radius: 0px !important;
}

:root {
  --ink: #1e1410;
  --slate-dark: #2a1f14;
  --slate-mid: #5a6a7a;
  --slate-light: #c9bfaf;
  --surface: #f6f1e8;
  --white: #ffffff;
  --pine: #3d5a73;
  --pine-light: #4a6d8c;
  --gold: #c9a84c;

  --font-serif: 'Fraunces', serif;
  --font-sans: 'Inter', sans-serif;

  --border-structural: 1px solid var(--slate-light);
  --border-heavy: 2px solid var(--ink);
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-sans);
  color: var(--ink);
  background-color: var(--surface);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

a {
  text-decoration: none;
  color: inherit;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 40px;
}

/* ── Typography ──────────────────────────────── */
h1,
h2,
h3,
h4,
h5 {
  font-family: var(--font-serif);
  font-weight: 900;
  color: var(--ink);
  letter-spacing: -0.02em;
}

/* ── Buttons ─────────────────────────────────── */
.btn-solid {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  background-color: var(--pine);
  color: var(--white);
  font-family: var(--font-sans);
  font-weight: 700;
  padding: 12px 24px;
  border: 2px solid var(--pine);
  position: relative;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  cursor: pointer;
}

.btn-solid:hover {
  background-color: var(--ink);
  border-color: var(--ink);
  transform: translateY(-2px);
  box-shadow: 4px 4px 0px 0px var(--gold);
}

.btn-outline {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  background-color: transparent;
  color: var(--ink);
  font-family: var(--font-sans);
  font-weight: 700;
  padding: 12px 24px;
  border: 2px solid var(--ink);
  position: relative;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  cursor: pointer;
}

.btn-outline:hover {
  background-color: var(--ink);
  color: var(--white);
  transform: translateY(-2px);
  box-shadow: 4px 4px 0px 0px var(--gold);
}

.btn-text {
  font-weight: 700;
  color: var(--slate-mid);
  padding: 12px;
  transition: color 0.15s;
}

.btn-text:hover {
  color: var(--ink);
}

.btn-large {
  padding: 16px 32px;
  font-size: 1.1rem;
}

.btn-full {
  width: 100%;
}

/* ═══════════════════════════════════════════════
   HEADER
   ═══════════════════════════════════════════════ */
.system-header {
  background-color: var(--white);
  border-bottom: var(--border-heavy);
  position: sticky;
  top: 0;
  z-index: 100;
}

.grid-header {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  height: 72px;
  gap: 40px;
}

.brand-block {
  display: flex;
  align-items: center;
  gap: 12px;
}

.logo-mark {
  background-color: var(--ink);
  color: var(--white);
  font-family: var(--font-serif);
  font-weight: 900;
  padding: 4px 8px;
  font-size: 1.2rem;
}

.brand-name {
  font-family: var(--font-serif);
  font-weight: 900;
  font-size: 1.2rem;
}

.system-nav {
  display: flex;
  gap: 24px;
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--slate-mid);
}

.system-nav a:hover {
  color: var(--ink);
}

.auth-block {
  display: flex;
  gap: 16px;
  align-items: center;
}

/* ═══════════════════════════════════════════════
   HERO
   ═══════════════════════════════════════════════ */
.hero-deployment {
  background-color: var(--white);
  border-bottom: var(--border-heavy);
  padding: 80px 0;
  background-image:
    linear-gradient(to right, rgba(42, 31, 20, 0.04) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(42, 31, 20, 0.04) 1px, transparent 1px);
  background-size: 40px 40px;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1fr 400px;
  gap: 64px;
  align-items: center;
}

.status-indicator {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--gold);
  border: 1px solid var(--gold);
  padding: 4px 12px;
  margin-bottom: 24px;
}

.hero-narrative h1 {
  font-size: 4rem;
  line-height: 1.05;
  margin-bottom: 24px;
}

.lead-text {
  font-size: 1.25rem;
  color: var(--slate-mid);
  margin-bottom: 40px;
  max-width: 540px;
}

.action-matrix {
  display: flex;
  gap: 16px;
}

/* High-Density Data Panel */
.hero-data-density {
  border: var(--border-heavy);
  background-color: var(--surface);
}

.data-header {
  display: flex;
  justify-content: space-between;
  padding: 16px;
  background-color: var(--ink);
  color: var(--white);
  font-weight: 700;
  font-size: 0.85rem;
  text-transform: uppercase;
}

.data-row {
  display: flex;
  justify-content: space-between;
  padding: 16px;
  border-bottom: var(--border-structural);
  font-size: 0.9rem;
}

.data-row:last-child {
  border-bottom: none;
}

.data-key {
  font-weight: 500;
  color: var(--slate-mid);
}

.data-value {
  font-weight: 700;
}

.highlight-row {
  background-color: var(--ink);
  color: var(--white);
  position: relative;
  overflow: hidden;
}

.highlight-row .data-key {
  color: rgba(255, 255, 255, .7);
}

.highlight-row .data-value {
  color: var(--white);
}

.highlight-row::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 50%;
  height: 100%;
  background: linear-gradient(to right, transparent, rgba(255, 255, 255, 0.07), transparent);
  animation: data-sweep 3s infinite;
}

@keyframes data-sweep {
  100% {
    left: 200%;
  }
}

/* ═══════════════════════════════════════════════
   PAS FRAMEWORK
   ═══════════════════════════════════════════════ */
.analytical-framework {
  padding: 80px 0;
  background-color: var(--surface);
  border-bottom: var(--border-heavy);
  background-image:
    linear-gradient(to right, rgba(42, 31, 20, 0.04) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(42, 31, 20, 0.04) 1px, transparent 1px);
  background-size: 40px 40px;
}

.framework-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  border: var(--border-heavy);
  background-color: var(--white);
}

.framework-module {
  padding: 40px;
  border-right: var(--border-structural);
  transition: background-color 0.3s ease, box-shadow 0.3s ease;
}

.framework-module:last-child {
  border-right: none;
}

.framework-module:hover {
  background-color: var(--surface);
  box-shadow: inset 4px 0 0 0 var(--gold);
}

.module-label {
  font-size: 0.75rem;
  font-weight: 800;
  text-transform: uppercase;
  color: var(--slate-mid);
  margin-bottom: 16px;
  letter-spacing: 0.05em;
}

.framework-module h3 {
  font-size: 1.5rem;
  margin-bottom: 16px;
}

.framework-module p {
  color: var(--slate-mid);
  font-size: 0.95rem;
}

.active-solution {
  background-color: var(--pine);
  color: var(--white);
}

.active-solution .module-label,
.active-solution p,
.active-solution h3 {
  color: var(--white);
}

.active-solution:hover {
  background-color: var(--pine) !important;
  box-shadow: none !important;
}

/* ═══════════════════════════════════════════════
   INFRASTRUCTURE MATRIX
   ═══════════════════════════════════════════════ */
.infrastructure-matrix {
  padding: 100px 0;
  background-color: var(--white);
  border-bottom: var(--border-heavy);
}

.section-title {
  font-size: 2.5rem;
  margin-bottom: 48px;
}

.matrix-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  border: var(--border-heavy);
}

.matrix-cell {
  padding: 40px;
  border-right: var(--border-heavy);
  border-bottom: var(--border-heavy);
  transition: background-color 0.25s ease;
}

.matrix-cell:nth-child(even) {
  border-right: none;
}

.matrix-cell:nth-last-child(-n+2) {
  border-bottom: none;
}

.matrix-cell:hover {
  background-color: var(--pine);
}

.matrix-cell:hover .cell-identifier,
.matrix-cell:hover h4,
.matrix-cell:hover p {
  color: var(--white);
}

.cell-identifier {
  font-family: var(--font-serif);
  font-size: 2rem;
  font-weight: 900;
  color: var(--slate-light);
  margin-bottom: 16px;
}

.matrix-cell h4 {
  font-size: 1.25rem;
  margin-bottom: 12px;
}

.matrix-cell p {
  color: var(--slate-mid);
  font-size: 0.95rem;
}

/* ═══════════════════════════════════════════════
   LICENSING ARCHITECTURE (PRICING)
   ═══════════════════════════════════════════════ */
.licensing-architecture {
  padding: 100px 0;
  background-color: var(--surface);
  border-bottom: var(--border-heavy);
}

.pricing-table {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border: var(--border-heavy);
  background-color: var(--white);
}

.pricing-col {
  padding: 40px;
  border-right: var(--border-heavy);
  display: flex;
  flex-direction: column;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.pricing-col:last-child {
  border-right: none;
}

.pricing-col:hover {
  transform: translateY(-4px);
  box-shadow: 8px 8px 0px 0px var(--gold);
  z-index: 10;
}

.active-tier {
  background-color: var(--ink);
  color: var(--white);
  position: relative;
}

.active-tier h3,
.active-tier .price-block {
  color: var(--white);
}

.tier-flag {
  position: absolute;
  top: 0;
  right: 0;
  background-color: var(--gold);
  color: var(--ink);
  font-size: 0.7rem;
  font-weight: 800;
  text-transform: uppercase;
  padding: 6px 12px;
}

.tier-header {
  margin-bottom: 32px;
}

.tier-header h3 {
  font-size: 1.2rem;
  margin-bottom: 8px;
}

.price-block {
  font-family: var(--font-sans);
  font-size: 3rem;
  font-weight: 800;
  letter-spacing: -0.05em;
  line-height: 1;
}

.price-block span {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--slate-mid);
  text-transform: uppercase;
  letter-spacing: 0;
  display: block;
  margin-top: 8px;
}

.tier-specs {
  margin-bottom: 40px;
  flex-grow: 1;
  border-top: var(--border-structural);
}

.spec-item {
  padding: 16px 0;
  border-bottom: var(--border-structural);
  font-size: 0.9rem;
  font-weight: 500;
}

.active-tier .spec-item {
  border-color: rgba(255, 255, 255, 0.1);
}

.active-tier .price-block span {
  color: var(--slate-light);
}

/* ═══════════════════════════════════════════════
   FOOTER
   ═══════════════════════════════════════════════ */
.compliance-footer {
  background-color: var(--ink);
  color: var(--white);
  padding: 64px 0 32px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 80px;
  padding-bottom: 48px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  margin-bottom: 24px;
}

.footer-primary p {
  margin-top: 16px;
  color: var(--slate-light);
  font-size: 0.9rem;
  max-width: 300px;
}

.footer-links {
  display: flex;
  gap: 80px;
}

.link-group h5 {
  color: var(--white);
  font-family: var(--font-sans);
  font-size: 0.8rem;
  text-transform: uppercase;
  margin-bottom: 16px;
  letter-spacing: 0.05em;
}

.link-group a {
  display: block;
  color: var(--slate-light);
  font-size: 0.9rem;
  margin-bottom: 8px;
}

.link-group a:hover {
  color: var(--white);
}

.footer-meta {
  display: flex;
  justify-content: space-between;
  font-size: 0.8rem;
  color: var(--slate-mid);
  font-weight: 600;
  text-transform: uppercase;
}

/* ═══════════════════════════════════════════════
   HOW IT WORKS
   ═══════════════════════════════════════════════ */
.how-it-works-section {
  padding: 100px 0;
  background-color: var(--white);
  border-bottom: var(--border-heavy);
}

.section-sub {
  font-size: 1.1rem;
  color: var(--slate-mid);
  margin-top: -32px;
  margin-bottom: 64px;
  max-width: 560px;
}

.hiw-item {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: center;
  padding: 56px 0;
  border-top: var(--border-structural);
}

.hiw-item:first-of-type {
  border-top: var(--border-heavy);
}

.hiw-reverse {
  direction: rtl;
}

.hiw-reverse>* {
  direction: ltr;
}

.hiw-num {
  font-family: var(--font-serif);
  font-size: 3.5rem;
  font-weight: 900;
  color: var(--slate-light);
  line-height: 1;
  margin-bottom: 16px;
}

.hiw-text h3 {
  font-size: 1.75rem;
  margin-bottom: 16px;
}

.hiw-text p {
  color: var(--slate-mid);
  font-size: 0.95rem;
  line-height: 1.7;
}

.hero-logo-block {
  padding: 20px 16px 0;
  text-align: center;
  background-color: var(--surface);
}

.hiw-shot {
  border: var(--border-heavy);
  overflow: hidden;
  box-shadow: 6px 6px 0 0 var(--gold);
}

.hiw-shot img {
  display: block;
  width: 100%;
  height: auto;
  margin-top: -8px;
  /* crop old app header from screenshots */
  cursor: zoom-in;
  transition: opacity 0.15s;
}

.hiw-shot img:hover {
  opacity: 0.92;
}

/* ── Lightbox ───────────────────────────────── */
.gf-lightbox {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(30, 20, 16, 0.93);
  z-index: 9999;
  align-items: center;
  justify-content: center;
  cursor: zoom-out;
  padding: 32px;
}

.gf-lightbox.open {
  display: flex;
}

.gf-lightbox img {
  max-width: 92vw;
  max-height: 88vh;
  object-fit: contain;
  border: 3px solid var(--gold);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.7);
  cursor: default;
  animation: lb-in 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  clip-path: inset(20px 0 0 0);
  /* crop old app header */
}

@keyframes lb-in {
  from {
    opacity: 0;
    transform: scale(0.92);
  }

  to {
    opacity: 1;
    transform: scale(1);
  }
}

.gf-lightbox-close {
  position: fixed;
  top: 20px;
  right: 28px;
  color: var(--white);
  font-size: 2.4rem;
  font-weight: 300;
  line-height: 1;
  cursor: pointer;
  opacity: 0.8;
  transition: opacity 0.15s;
  z-index: 10000;
  background: none;
  border: none;
  padding: 4px 10px;
}

.gf-lightbox-close:hover {
  opacity: 1;
}

.gf-lightbox-hint {
  position: fixed;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%);
  color: rgba(255, 255, 255, 0.5);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  pointer-events: none;
}

/* ═══════════════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════════════ */
@media (max-width: 1024px) {
  .hiw-item {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .hiw-reverse {
    direction: ltr;
  }

  .hero-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .framework-grid {
    grid-template-columns: 1fr;
  }

  .framework-module {
    border-right: none;
    border-bottom: var(--border-structural);
  }

  .matrix-grid {
    grid-template-columns: 1fr;
  }

  .matrix-cell {
    border-right: none;
    border-bottom: var(--border-heavy);
  }

  .matrix-cell:last-child {
    border-bottom: none;
  }

  .pricing-table {
    grid-template-columns: repeat(2, 1fr);
  }

  .pricing-col {
    border-right: var(--border-heavy);
    border-bottom: var(--border-heavy);
  }

  .pricing-col:nth-child(even) {
    border-right: none;
  }

  .pricing-col:nth-last-child(-n+2) {
    border-bottom: none;
  }
}

@media (max-width: 768px) {
  .system-nav {
    display: none;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .footer-links {
    flex-direction: column;
    gap: 40px;
  }

  .hero-narrative h1 {
    font-size: 2.8rem;
  }

  .action-matrix {
    flex-direction: column;
  }

  .container {
    padding: 0 20px;
  }

  .pricing-table {
    grid-template-columns: 1fr;
  }

  .pricing-col {
    border-right: none;
    border-bottom: var(--border-heavy);
  }

  .pricing-col:last-child {
    border-bottom: none;
  }
}