/* ==========================================================================
   QUADRA — Institutional Homepage CSS (index.css)
   Standalone — zero dependency on overview.built.css or Apple localnav CSS.
   Apple.com aesthetic: dark, SF Pro, glassmorphism, bento grid, animations.
   ========================================================================== */

/* ── Reset & Base ──────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg:       #000;
  --surface:  #1d1d1f;
  --card:     rgba(29, 29, 31, 0.72);
  --border:   rgba(255,255,255,0.10);
  --cyan:     #00e5ff;
  --blue:     #2997ff;
  --purple:   #bf5af2;
  --green:    #30d158;
  --orange:   #ff9f0a;
  --red:      #ff453a;
  --t1:       #f5f5f7;
  --t2:       #86868b;
  --t3:       #6e6e73;
  --ease:     cubic-bezier(0.25, 0.1, 0.25, 1);
  --spring:   cubic-bezier(0.16, 1, 0.3, 1);
  --r-xl:     24px;
  --r-lg:     18px;
}

html { scroll-behavior: smooth; background: var(--bg); }

body {
  background: var(--bg);
  color: var(--t1);
  font-family: -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  line-height: 1.5;
}

a { color: inherit; text-decoration: none; }
ul { list-style: none; }
img { max-width: 100%; display: block; }

/* ── Global Nav ────────────────────────────────────────────────────────── */
.gnav {
  position: sticky;
  top: 0;
  z-index: 9999;
  height: 52px;
  background: rgba(0,0,0,0.82);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.gnav-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 22px;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.gnav-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--t1);
  flex-shrink: 0;
}
.gnav-mark {
  width: 24px;
  height: 24px;
  background: linear-gradient(135deg, var(--cyan) 0%, var(--blue) 100%);
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #000;
  font-weight: 900;
  font-size: 14px;
  box-shadow: 0 2px 10px rgba(0,229,255,0.4);
  flex-shrink: 0;
}
.gnav-mark.small { width: 20px; height: 20px; font-size: 11px; border-radius: 5px; }
.gnav-links {
  display: flex;
  gap: 28px;
  flex: 1;
  justify-content: center;
}
.gnav-links a {
  font-size: 12px;
  color: var(--t2);
  letter-spacing: -0.01em;
  transition: color 0.2s ease;
}
.gnav-links a:hover { color: var(--t1); }
.gnav-id {
  font-size: 12px;
  color: var(--t1);
  background: rgba(255,255,255,0.10);
  padding: 5px 14px;
  border-radius: 980px;
  border: 1px solid rgba(255,255,255,0.12);
  transition: background 0.2s ease;
  white-space: nowrap;
}
.gnav-id:hover { background: rgba(255,255,255,0.18); }

/* ── Hero ──────────────────────────────────────────────────────────────── */
.hero {
  padding: 140px 22px 100px;
  text-align: center;
  background:
    radial-gradient(ellipse 90% 55% at 50% -10%, rgba(0,229,255,0.14) 0%, transparent 70%),
    radial-gradient(ellipse 60% 40% at 80% 80%, rgba(41,151,255,0.08) 0%, transparent 70%),
    var(--bg);
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.015'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
  pointer-events: none;
  opacity: 0.5;
}
.hero-inner {
  position: relative;
  max-width: 800px;
  margin: 0 auto;
}
.eyebrow-label {
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--blue);
  margin-bottom: 18px;
}
.hero-headline {
  font-size: clamp(44px, 8vw, 88px);
  font-weight: 700;
  letter-spacing: -0.015em;
  line-height: 1.04;
  color: var(--t1);
  margin-bottom: 24px;
  background: linear-gradient(180deg, #fff 20%, #a1a1a6 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.hero-body {
  font-size: clamp(17px, 2.2vw, 21px);
  color: var(--t2);
  line-height: 1.5;
  max-width: 680px;
  margin: 0 auto 36px;
}
.hero-ctas {
  display: flex;
  gap: 14px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 28px;
}

/* Buttons */
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: linear-gradient(135deg, var(--cyan) 0%, var(--blue) 100%);
  color: #000;
  font-size: 15px;
  font-weight: 600;
  padding: 13px 26px;
  border-radius: 980px;
  transition: transform 0.25s var(--spring), box-shadow 0.25s var(--spring);
  box-shadow: 0 4px 24px rgba(0,229,255,0.25);
}
.btn-primary:hover {
  transform: scale(1.03) translateY(-1px);
  box-shadow: 0 8px 36px rgba(0,229,255,0.40);
}
.btn-ghost {
  display: inline-flex;
  align-items: center;
  background: rgba(255,255,255,0.10);
  color: var(--t1);
  font-size: 15px;
  font-weight: 400;
  padding: 13px 26px;
  border-radius: 980px;
  border: 1px solid rgba(255,255,255,0.14);
  transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}
.btn-ghost:hover {
  background: rgba(255,255,255,0.18);
  border-color: rgba(255,255,255,0.25);
  transform: scale(1.02);
}

.badge-row {
  display: flex;
  gap: 8px;
  justify-content: center;
  flex-wrap: wrap;
}
.badge {
  font-size: 11px;
  font-weight: 500;
  color: var(--t3);
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.08);
  padding: 5px 12px;
  border-radius: 980px;
}

/* ── Sections ──────────────────────────────────────────────────────────── */
.section {
  padding: 100px 22px;
  border-top: 1px solid rgba(255,255,255,0.07);
}
.section-alt { background: rgba(255,255,255,0.018); }
.section-inner { max-width: 1200px; margin: 0 auto; }
.section-header { text-align: center; margin-bottom: 64px; }
.section-headline {
  font-size: clamp(32px, 5vw, 60px);
  font-weight: 700;
  letter-spacing: -0.015em;
  line-height: 1.07;
  margin-bottom: 14px;
}
.section-body {
  font-size: clamp(15px, 2vw, 18px);
  color: var(--t2);
  max-width: 600px;
  margin: 0 auto;
  line-height: 1.55;
}
.gradient-text {
  background: linear-gradient(180deg, #fff 0%, #a1a1a6 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.cyan-text  { color: var(--cyan); }
.cyan-label { color: var(--cyan); }
.purple-text { color: var(--purple); }

/* ── Bento Grid ────────────────────────────────────────────────────────── */
.bento {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  grid-template-rows: auto;
  gap: 14px;
}

.bento-card {
  background: var(--card);
  backdrop-filter: blur(20px);
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  padding: 44px;
  overflow: hidden;
  position: relative;
  transition: transform 0.4s var(--spring), border-color 0.4s ease;
  cursor: default;
  display: flex;
  flex-direction: column;
  gap: 0;
}
a.bento-card { cursor: pointer; }
.bento-card:hover { transform: translateY(-5px); }

.bento-full {
  grid-column: 1 / -1;
  flex-direction: row;
  justify-content: space-between;
  align-items: center;
  gap: 40px;
  min-height: 300px;
}
.bento-half { min-height: 260px; }

/* Card color accents */
.bento-cyan  { border-color: rgba(0,229,255,0.18); background: radial-gradient(circle at 80% 20%, rgba(0,229,255,0.12) 0%, var(--card) 65%); }
.bento-cyan:hover  { border-color: rgba(0,229,255,0.35); box-shadow: 0 12px 50px rgba(0,229,255,0.12); }
.bento-purple { background: radial-gradient(circle at 20% 80%, rgba(191,90,242,0.10) 0%, var(--card) 65%); }
.bento-purple:hover { border-color: rgba(191,90,242,0.28); }
.bento-green  { background: radial-gradient(circle at 80% 80%, rgba(48,209,88,0.10) 0%, var(--card) 65%); }
.bento-green:hover  { border-color: rgba(48,209,88,0.28); }
.bento-orange { background: radial-gradient(circle at 20% 20%, rgba(255,159,10,0.10) 0%, var(--card) 65%); }
.bento-orange:hover { border-color: rgba(255,159,10,0.28); }
.bento-blue   { background: radial-gradient(circle at 80% 20%, rgba(41,151,255,0.10) 0%, var(--card) 65%); }
.bento-blue:hover   { border-color: rgba(41,151,255,0.28); }

.bento-content { flex: 1; }
.bento-tag {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.10em;
  color: var(--blue);
  margin-bottom: 10px;
}
.purple-tag { color: var(--purple); }
.green-tag  { color: var(--green); }
.orange-tag { color: var(--orange); }
.blue-tag   { color: var(--blue); }

.bento-name {
  font-size: clamp(26px, 4vw, 44px);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 12px;
  color: var(--t1);
  line-height: 1.1;
}
.bento-desc {
  font-size: 15px;
  color: var(--t2);
  line-height: 1.55;
  max-width: 520px;
  margin-bottom: 24px;
}
.bento-link {
  font-size: 14px;
  color: var(--blue);
  font-weight: 500;
  transition: gap 0.2s ease;
}
a.bento-card:hover .bento-link { text-decoration: underline; }

/* Mini matrix visual */
.bento-visual { flex-shrink: 0; }
.mini-matrix {
  width: 200px;
  height: 160px;
  background:
    repeating-linear-gradient(
      0deg,
      rgba(0,229,255,0.08) 0px, rgba(0,229,255,0.08) 1px,
      transparent 1px, transparent 22px
    ),
    repeating-linear-gradient(
      90deg,
      rgba(0,229,255,0.08) 0px, rgba(0,229,255,0.08) 1px,
      transparent 1px, transparent 22px
    );
  border-radius: 12px;
  position: relative;
  overflow: hidden;
}
.mini-matrix::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 35% 40%, rgba(0,229,255,0.35) 0 4px, transparent 4px),
              radial-gradient(circle at 70% 60%, rgba(41,151,255,0.35) 0 4px, transparent 4px),
              radial-gradient(circle at 55% 25%, rgba(0,229,255,0.28) 0 3px, transparent 3px),
              radial-gradient(circle at 20% 75%, rgba(48,209,88,0.28) 0 3px, transparent 3px),
              radial-gradient(circle at 85% 30%, rgba(191,90,242,0.28) 0 3px, transparent 3px);
}

/* ── Technology Section ────────────────────────────────────────────────── */
.tech-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: center;
}
.tech-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 24px;
}
.tech-list li {
  font-size: 15px;
  color: var(--t2);
  padding-left: 20px;
  position: relative;
  line-height: 1.5;
}
.tech-list li::before {
  content: '✓';
  position: absolute;
  left: 0;
  color: var(--cyan);
  font-weight: 700;
}
.tech-copy .section-headline { text-align: left; }
.tech-copy .section-body { max-width: 100%; margin: 0; }
.tech-copy .eyebrow-label { text-align: left; }

.tech-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
.stat-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 32px 24px;
  text-align: center;
  transition: border-color 0.3s ease, transform 0.3s var(--spring);
}
.stat-card:hover {
  border-color: rgba(0,229,255,0.28);
  transform: translateY(-3px);
}
.stat-number {
  font-size: 52px;
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1;
  margin-bottom: 6px;
}
.stat-label {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--t3);
}

/* ── Footer ────────────────────────────────────────────────────────────── */
.site-footer {
  background: var(--bg);
  border-top: 1px solid rgba(255,255,255,0.08);
  padding: 56px 22px 32px;
}
.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 24px;
}
.footer-top {
  display: flex;
  align-items: center;
  gap: 12px;
}
.footer-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 600;
  color: var(--t1);
}
.footer-tagline {
  font-size: 13px;
  color: var(--t3);
  margin-left: 8px;
}
.footer-links {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
}
.footer-links a {
  font-size: 13px;
  color: var(--t2);
  transition: color 0.2s ease;
}
.footer-links a:hover { color: var(--t1); }
.footer-legal {
  border-top: 1px solid rgba(255,255,255,0.06);
  padding-top: 20px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.footer-legal p {
  font-size: 12px;
  color: var(--t3);
  line-height: 1.6;
}

/* ── Responsive ────────────────────────────────────────────────────────── */
@media (max-width: 900px) {
  .bento { grid-template-columns: 1fr; }
  .bento-full { flex-direction: column; min-height: auto; }
  .mini-matrix { width: 100%; height: 120px; }
  .tech-split { grid-template-columns: 1fr; gap: 48px; }
  .tech-stats { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px) {
  .gnav-links { display: none; }
  .hero { padding: 100px 22px 72px; }
  .hero-ctas { flex-direction: column; align-items: center; }
  .btn-primary, .btn-ghost { width: 100%; max-width: 320px; justify-content: center; }
  .section { padding: 72px 22px; }
  .bento-card { padding: 30px; }
  .stat-number { font-size: 40px; }
}
