/* ============================================================
   ADMISSIBLE LABS — Design System
   base.css — linked by every page
   ============================================================ */

/* --- Google Fonts ----------------------------------------- */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=DM+Mono:wght@300;400;500&display=swap');

/* --- CSS Reset -------------------------------------------- */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

img, picture, video, canvas, svg {
  display: block;
  max-width: 100%;
}

input, button, textarea, select {
  font: inherit;
}

a {
  color: inherit;
  text-decoration: none;
}

ul, ol {
  list-style: none;
}

/* --- CSS Variables ---------------------------------------- */
:root {
  /* Backgrounds */
  --bg-primary:    #0B1120;
  --bg-secondary:  #0F1729;
  --bg-tertiary:   #141D32;
  --bg-light:      #F7F8FA;

  /* Accents */
  --green:         #00E676;
  --green-dim:     rgba(0, 230, 118, 0.10);
  --green-glow:    rgba(0, 230, 118, 0.25);
  --teal:          #00C9A7;
  --violet:        #a78bfa;
  --red:           #ef4444;

  /* Text */
  --text-primary:     #FFFFFF;
  --text-secondary:   rgba(255, 255, 255, 0.65);
  --text-tertiary:    rgba(255, 255, 255, 0.40);
  --text-on-light:    #1A1D2E;
  --text-on-light-dim:#6B7084;

  /* Border */
  --border:        rgba(255, 255, 255, 0.08);

  /* Typography */
  --font-body:     'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono:     'DM Mono', 'Courier New', monospace;

  /* Spacing */
  --container-max:   1200px;
  --container-pad:   48px;
  --section-pad:     120px 0;
  --gap-xl:          64px;
  --gap-lg:          48px;
  --gap-md:          32px;
  --gap-sm:          20px;
  --gap-xs:          12px;

  /* Nav */
  --nav-height:      64px;

  /* Radius */
  --radius-sm:       6px;
  --radius-md:       10px;
  --radius-lg:       16px;

  /* Transitions */
  --ease-out:        cubic-bezier(0.16, 1, 0.3, 1);
  --duration:        0.5s;
}

/* --- Body ------------------------------------------------- */
body {
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 400;
  line-height: 1.7;
  color: var(--text-primary);
  background: var(--bg-primary);
  overflow-x: hidden;
  position: relative;
}

/* Dot grid background overlay */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image: radial-gradient(circle 1px, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
  background-size: 28px 28px;
}

/* Scroll progress bar */
.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 2px;
  width: 0%;
  background: var(--green);
  z-index: 10000;
  transition: none;
}

/* --- Container -------------------------------------------- */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding-left: var(--container-pad);
  padding-right: var(--container-pad);
  position: relative;
  z-index: 1;
}

/* --- Section base ----------------------------------------- */
section {
  padding: var(--section-pad);
  position: relative;
}

/* --- Navigation ------------------------------------------- */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--nav-height);
  z-index: 1000;
  background: rgba(11, 17, 32, 0.80);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  transition: background 0.3s ease;
}

.nav .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}

/* Logo */
.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  color: var(--text-primary);
  text-decoration: none;
}

.nav-logo-mark {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  background: var(--green);
  border-radius: 4px;
  color: var(--bg-primary);
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 0.85rem;
  line-height: 1;
}

/* Nav links — hidden, replaced by drawer */
.nav-links {
  display: none;
}

.nav-cta {
  margin-left: 8px;
}

/* Hamburger — always visible */
.nav-hamburger {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 28px;
  height: 28px;
  cursor: pointer;
  background: none;
  border: none;
  padding: 0;
  z-index: 1001;
}

.nav-hamburger span {
  display: block;
  width: 100%;
  height: 1.5px;
  background: var(--text-primary);
  border-radius: 2px;
  transition: transform 0.3s cubic-bezier(0.4,0,0.2,1), opacity 0.3s ease;
}

.nav-hamburger.open span:nth-child(1) {
  transform: translateY(6.5px) rotate(45deg);
}

.nav-hamburger.open span:nth-child(2) {
  opacity: 0;
}

.nav-hamburger.open span:nth-child(3) {
  transform: translateY(-6.5px) rotate(-45deg);
}

/* Side drawer — slides in from left */
.side-drawer {
  position: fixed;
  top: 0;
  bottom: 0;
  left: -290px;
  width: 280px;
  background: rgba(8, 12, 24, 0.98);
  backdrop-filter: blur(40px);
  -webkit-backdrop-filter: blur(40px);
  border-right: 1px solid var(--border);
  z-index: 998;
  display: flex;
  flex-direction: column;
  padding: 100px 32px 40px;
  gap: 4px;
  transition: left 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.side-drawer.open {
  left: 0;
}

.side-drawer a {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 400;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-secondary);
  text-decoration: none;
  padding: 14px 16px;
  border-radius: 6px;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  gap: 12px;
}

.side-drawer a:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.03);
}

.side-drawer a.active {
  color: var(--green);
  background: rgba(0, 230, 118, 0.05);
  border-left: 2px solid var(--green);
}

.side-drawer .drawer-divider {
  height: 1px;
  background: linear-gradient(90deg, var(--border), transparent);
  margin: 12px 0;
}

.side-drawer .drawer-cta {
  margin-top: auto;
  background: var(--green);
  color: var(--bg-primary);
  font-weight: 600;
  text-align: center;
  justify-content: center;
  border-radius: 8px;
  padding: 14px 20px;
}

.side-drawer .drawer-cta:hover {
  background: var(--green);
  color: var(--bg-primary);
  box-shadow: 0 0 0 3px var(--green-glow);
}

/* Backdrop overlay when drawer is open */
.drawer-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 997;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s ease;
}

.drawer-backdrop.open {
  opacity: 1;
  pointer-events: all;
}

/* Legacy mobile-menu — keep for pages not yet updated */
.mobile-menu {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(11, 17, 32, 0.97);
  backdrop-filter: blur(30px);
  -webkit-backdrop-filter: blur(30px);
  z-index: 999;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 32px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s ease;
}

.mobile-menu.open {
  display: flex;
  opacity: 1;
  pointer-events: all;
}

.mobile-menu a {
  font-size: 1.5rem;
  font-weight: 500;
  color: var(--text-secondary);
  transition: color 0.25s ease;
}

.mobile-menu a:hover {
  color: var(--text-primary);
}

/* --- Buttons ---------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 28px;
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-size: 0.88rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
  border: none;
  text-decoration: none;
  line-height: 1;
}

.btn-primary {
  background: var(--green);
  color: var(--bg-primary);
}

.btn-primary:hover {
  background: #33eb91;
  box-shadow: 0 0 30px var(--green-glow);
  transform: translateY(-1px);
}

.btn-ghost {
  background: transparent;
  color: var(--text-primary);
  border: 1px solid var(--border);
}

.btn-ghost:hover {
  border-color: rgba(255, 255, 255, 0.20);
  background: rgba(255, 255, 255, 0.04);
  transform: translateY(-1px);
}

.btn-sm {
  padding: 8px 18px;
  font-size: 0.82rem;
}

/* Arrow in buttons / links */
.btn .arrow,
.link-arrow .arrow {
  transition: transform 0.3s ease;
}

.btn:hover .arrow,
.link-arrow:hover .arrow {
  transform: translateX(3px);
}

/* Text link with arrow */
.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--green);
  transition: gap 0.3s ease;
}

.link-arrow:hover {
  gap: 10px;
}

/* --- Typography ------------------------------------------- */
.overline {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.28em;
  color: var(--green);
  margin-bottom: 16px;
  display: block;
}

.section-title {
  font-size: clamp(1.8rem, 3.5vw, 2.8rem);
  font-weight: 600;
  line-height: 1.15;
  color: var(--text-primary);
  margin-bottom: 20px;
}

.section-sub {
  font-size: 1.05rem;
  font-weight: 400;
  line-height: 1.7;
  color: var(--text-secondary);
  max-width: 680px;
}

.section-header {
  margin-bottom: var(--gap-xl);
}

.section-header-center {
  text-align: center;
  margin-bottom: var(--gap-xl);
}

.section-header-center .section-sub {
  margin-left: auto;
  margin-right: auto;
}

/* --- Light Section ---------------------------------------- */
.section-light {
  background: var(--bg-light);
}

.section-light .section-title {
  color: var(--text-on-light);
}

.section-light .section-sub {
  color: var(--text-on-light-dim);
}

.section-light .overline {
  color: #0d9e5e;
}

/* Remove dot grid on light sections */
.section-light::before {
  display: none;
}

/* --- Scroll Reveal ---------------------------------------- */
.reveal {
  opacity: 0;
  transform: translateY(32px);
  transition: opacity 0.7s var(--ease-out), transform 0.7s var(--ease-out);
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

.reveal-d1 { transition-delay: 0.08s; }
.reveal-d2 { transition-delay: 0.16s; }
.reveal-d3 { transition-delay: 0.24s; }
.reveal-d4 { transition-delay: 0.32s; }

/* --- Cards ------------------------------------------------ */
.card {
  background: var(--bg-tertiary);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 36px;
  transition: transform 0.4s var(--ease-out), box-shadow 0.4s var(--ease-out), border-color 0.4s ease;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.25);
  border-color: rgba(255, 255, 255, 0.12);
}

.card-number {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--text-tertiary);
  margin-bottom: 16px;
  display: block;
}

.card-title {
  font-size: 1.15rem;
  font-weight: 600;
  margin-bottom: 12px;
  line-height: 1.3;
}

.card-text {
  font-size: 0.92rem;
  color: var(--text-secondary);
  line-height: 1.65;
}

/* --- Proof Cards ------------------------------------------ */
.proof-card {
  background: var(--bg-tertiary);
  border: 1px solid var(--border);
  border-top: 2px solid var(--green);
  border-radius: var(--radius-md);
  padding: 32px 28px;
  text-align: center;
}

.proof-card-metric {
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.1;
  margin-bottom: 8px;
}

.proof-card-label {
  font-size: 0.82rem;
  color: var(--text-secondary);
  font-weight: 400;
}

/* Light variant for proof cards */
.section-light .proof-card {
  background: #FFFFFF;
  border-color: rgba(0, 0, 0, 0.06);
  border-top-color: var(--green);
}

.section-light .proof-card-metric {
  color: var(--text-on-light);
}

.section-light .proof-card-label {
  color: var(--text-on-light-dim);
}

/* --- Grid layouts ----------------------------------------- */
.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--gap-md);
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--gap-md);
}

.grid-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--gap-md);
}

/* --- Footer ----------------------------------------------- */
.footer {
  background: var(--bg-secondary);
  border-top: 1px solid var(--border);
  padding: 72px 0 40px;
  position: relative;
  z-index: 1;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr repeat(3, 1fr);
  gap: var(--gap-lg);
  margin-bottom: var(--gap-xl);
}

.footer-brand {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.footer-brand-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  color: var(--text-primary);
}

.footer-brand-text {
  font-size: 0.85rem;
  color: var(--text-tertiary);
  line-height: 1.6;
  max-width: 280px;
}

.footer-col-title {
  font-size: 0.72rem;
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--text-tertiary);
  margin-bottom: 20px;
  font-weight: 400;
}

.footer-link {
  display: block;
  font-size: 0.88rem;
  color: var(--text-secondary);
  padding: 5px 0;
  transition: color 0.25s ease;
}

.footer-link:hover {
  color: var(--text-primary);
}

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 32px;
  border-top: 1px solid var(--border);
}

.footer-copy {
  font-size: 0.78rem;
  color: var(--text-tertiary);
}

.footer-legal {
  display: flex;
  gap: 24px;
}

.footer-legal a {
  font-size: 0.78rem;
  color: var(--text-tertiary);
  transition: color 0.25s ease;
}

.footer-legal a:hover {
  color: var(--text-secondary);
}

/* --- Status indicator ------------------------------------- */
.status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  padding: 4px 10px;
  border-radius: 100px;
  font-weight: 400;
}

.status-live {
  color: var(--green);
  background: var(--green-dim);
}

.status-live::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--green);
  animation: pulse-dot 2s ease infinite;
}

.status-platform {
  color: var(--violet);
  background: rgba(167, 139, 250, 0.10);
}

.status-designed {
  color: var(--text-secondary);
  background: rgba(255, 255, 255, 0.06);
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

/* --- Utility ---------------------------------------------- */
.text-center { text-align: center; }
.text-green  { color: var(--green); }
.text-dim    { color: var(--text-secondary); }
.mt-sm { margin-top: var(--gap-sm); }
.mt-md { margin-top: var(--gap-md); }
.mt-lg { margin-top: var(--gap-lg); }
.mt-xl { margin-top: var(--gap-xl); }

/* --- Responsive ------------------------------------------- */

/* Tablet: 1024px */
@media (max-width: 1024px) {
  :root {
    --container-pad: 32px;
    --section-pad: 88px 0;
  }

  .grid-4 {
    grid-template-columns: repeat(2, 1fr);
  }

  .footer-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Mobile menu trigger: 768px */
@media (max-width: 768px) {
  :root {
    --container-pad: 24px;
    --section-pad: 72px 0;
  }

  /* nav-links already hidden, hamburger already visible at all sizes */

  .grid-2,
  .grid-3 {
    grid-template-columns: 1fr;
  }

  .grid-4 {
    grid-template-columns: repeat(2, 1fr);
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: var(--gap-md);
  }

  .footer-bottom {
    flex-direction: column;
    gap: 16px;
    text-align: center;
  }

  .card {
    padding: 28px;
  }
}

/* Small mobile: 480px */
@media (max-width: 480px) {
  :root {
    --container-pad: 18px;
    --section-pad: 56px 0;
  }

  .grid-4 {
    grid-template-columns: 1fr;
  }

  .btn {
    width: 100%;
    justify-content: center;
  }

  .card {
    padding: 24px;
  }
}

/* ---- Cookie consent banner ---- */
.cookie-banner {
  position: fixed;
  left: 16px;
  right: 16px;
  bottom: 16px;
  z-index: 9999;
  background: var(--bg-secondary);
  color: var(--text-primary);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.45);
  font-family: var(--font-body);
}

.cookie-banner-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 16px 20px;
  flex-wrap: wrap;
}

.cookie-banner-copy {
  flex: 1 1 320px;
  font-size: 0.9rem;
  line-height: 1.55;
  color: var(--text-secondary);
}

.cookie-banner-copy strong {
  color: var(--text-primary);
  font-weight: 600;
}

.cookie-banner-copy a {
  color: var(--green);
  text-decoration: underline;
}

.cookie-banner-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.cookie-btn {
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 600;
  padding: 10px 16px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-primary);
  cursor: pointer;
  transition: background 0.2s var(--ease-out), border-color 0.2s var(--ease-out);
}

.cookie-btn-secondary:hover {
  background: var(--bg-tertiary);
  border-color: rgba(255, 255, 255, 0.18);
}

.cookie-btn-primary {
  background: var(--green);
  border-color: var(--green);
  color: #001209;
}

.cookie-btn-primary:hover {
  background: #00ff85;
  border-color: #00ff85;
}

@media (max-width: 640px) {
  .cookie-banner-inner {
    flex-direction: column;
    align-items: stretch;
  }
  .cookie-banner-actions {
    justify-content: flex-end;
  }
}

/* ---- Legal page (Privacy / Terms / Cookies) ---- */
.legal-page {
  padding: 140px 0 80px;
  background: radial-gradient(ellipse 70% 50% at 50% 0%, rgba(0,230,118,0.05) 0%, transparent 65%);
}

.legal-page h1 {
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin-bottom: 16px;
}

.legal-meta {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-tertiary);
  margin-bottom: 48px;
}

.legal-body {
  max-width: 760px;
  font-size: 1rem;
  line-height: 1.75;
  color: var(--text-secondary);
}

.legal-body h2 {
  color: var(--text-primary);
  font-size: 1.4rem;
  font-weight: 600;
  margin: 48px 0 14px;
  letter-spacing: -0.01em;
}

.legal-body h3 {
  color: var(--text-primary);
  font-size: 1.08rem;
  font-weight: 600;
  margin: 28px 0 10px;
}

.legal-body p,
.legal-body li {
  margin-bottom: 12px;
}

.legal-body ul,
.legal-body ol {
  padding-left: 20px;
  margin-bottom: 16px;
}

.legal-body a {
  color: var(--green);
  text-decoration: underline;
}

.legal-body strong {
  color: var(--text-primary);
  font-weight: 600;
}

.legal-body table {
  width: 100%;
  border-collapse: collapse;
  margin: 16px 0 24px;
  font-size: 0.9rem;
}

.legal-body th,
.legal-body td {
  text-align: left;
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}

.legal-body th {
  color: var(--text-primary);
  font-weight: 600;
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.legal-body code {
  font-family: var(--font-mono);
  font-size: 0.88em;
  padding: 1px 6px;
  background: var(--bg-tertiary);
  border: 1px solid var(--border);
  border-radius: 4px;
  color: var(--text-primary);
}
