/* Design tokens */
:root {
  /* Light mode palette */
  --color-bg: #ffffff; /* page background */
  --color-bg-2: #f5f7fb; /* subtle section tint */
  --color-fg: #0a1a2b; /* navy for text */
  --color-fg-dim: #4b5b6e; /* muted body text */
  --color-accent: #1f5fcc; /* primary accent (calm navy/blue) */
  --radius-16: 16px;
  --radius-20: 20px;
  --shadow-1: 0 6px 20px rgba(10,26,43,.10);
  --shadow-2: 0 10px 28px rgba(10,26,43,.12);
  --space-1: 8px;  --space-2: 12px; --space-3: 16px; --space-4: 24px; --space-5: 32px; --space-6: 48px; --space-7: 72px; --space-8: 96px;
  /* Softer light-mode text shadow for hero */
  --text-glow: 0 0 18px rgba(0,0,0,.12), 0 0 44px rgba(0,0,0,.08);
}

/* Fluid type */
html { font-size: 16px; }
body { font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Ubuntu, Cantarell, Noto Sans, Helvetica, Arial, "Apple Color Emoji", "Segoe UI Emoji"; color: var(--color-fg); background: var(--color-bg); margin: 0; }
h1 { font-size: clamp(2rem, 3vw + 1rem, 3.5rem); letter-spacing: -0.02em; line-height: 1.1; margin: 0 0 var(--space-4); }
h2 { font-size: clamp(1.5rem, 1.5vw + 1rem, 2rem); letter-spacing: -0.01em; line-height: 1.2; margin: 0 0 var(--space-3); }
p { line-height: 1.65; color: var(--color-fg-dim); margin: 0 0 var(--space-3); }
a { color: var(--color-fg); text-decoration: none; }

/* Layout */
.container { width: min(1200px, 92%); margin: 0 auto; }
.section { padding: var(--space-8) 0; position: relative; }
.section.diagonal { clip-path: polygon(0 0, 100% 2%, 100% 98%, 0% 100%); background: linear-gradient(180deg, var(--color-bg-2), var(--color-bg)); }

/* Sticky glass nav */
.nav { position: sticky; top: 0; z-index: 50; backdrop-filter: blur(10px) saturate(130%); background: rgba(255,255,255,0.7); border-bottom: 1px solid rgba(10,26,43,0.08); }
.nav-inner { display: flex; align-items: center; justify-content: space-between; padding: var(--space-3) 0; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 600; }
.brand-dot { width: 12px; height: 12px; border-radius: 50%; background: var(--color-accent); box-shadow: 0 0 10px rgba(31,95,204,.45); }
.nav-links { display: flex; gap: 18px; }
.nav a { color: var(--color-fg-dim); padding: 8px 10px; border-radius: 10px; transition: color .2s ease, background .2s ease; }
.nav a:hover, .nav a.active { color: var(--color-fg); background: rgba(10,26,43,0.06); }

/* Hero */
.hero { position: relative; min-height: 78vh; display: grid; place-items: center; overflow: hidden; background:
  radial-gradient(900px 600px at 70% 20%, rgba(31,95,204,0.10), transparent 60%),
  linear-gradient(180deg, var(--color-bg), var(--color-bg-2)); }
.hero .content { position: relative; z-index: 2; text-align: center; padding: var(--space-6) 0; }
.hero .content h1, .hero .content .subhead { text-shadow: var(--text-glow); }
.subhead { color: var(--color-fg-dim); font-size: clamp(1.05rem, .6vw + 1rem, 1.25rem); margin-bottom: var(--space-5); }
.cta-row { display: flex; gap: 12px; justify-content: center; }
.btn { display: inline-flex; align-items: center; gap: 10px; padding: 12px 18px; border-radius: var(--radius-20); border: 1px solid rgba(10,26,43,.12); background: #ffffff; color: var(--color-fg); transition: transform .2s ease, background .2s ease, border-color .2s ease; box-shadow: var(--shadow-1); }
.btn.primary { background: linear-gradient(180deg, #2d6eea, var(--color-accent)); color: #fff; border-color: rgba(31,95,204,0.35); }
.btn:hover { transform: translateY(-2px); background: #f7fafc; }
.btn.primary:hover { filter: brightness(1.04); }
.btn .arrow { transition: transform .2s ease; }
.btn:hover .arrow { transform: translateX(3px); }
/* Apply subtle halo to hero CTAs only (light mode) */
.hero .content .btn { filter: drop-shadow(0 6px 20px rgba(10,26,43,.12)); }

/* SVG graph background behind cards, faded at center for readability */
.graph-bg { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 0; opacity: .65; pointer-events: none; }
.graph-bg { filter: saturate(110%); }
.graph-bg { mask-image: radial-gradient(60% 50% at 50% 45%, rgba(0,0,0,.15), rgba(0,0,0,1)); }
.graph-bg { -webkit-mask-image: radial-gradient(60% 50% at 50% 45%, rgba(0,0,0,.15), rgba(0,0,0,1)); }
.graph-bg line { stroke: rgba(10,26,43,0.20); stroke-width: 1.8; stroke-linecap: round; }
/* circle fill is set inline; keep rule minimal */
.graph-group { will-change: transform; }

/* Floating cards using screenshots */
.hero-cards { position: absolute; inset: 0; pointer-events: none; }
.card { position: absolute; width: min(460px, 38vw); border-radius: var(--radius-20); overflow: hidden; box-shadow: var(--shadow-2); opacity: .9; filter: saturate(105%); }
.card img { display: block; width: 100%; height: auto; }
.card.a { top: 12%; left: 6%; transform: rotate(-3deg); animation: driftA 16s ease-in-out infinite; }
.card.b { bottom: 8%; right: 8%; transform: rotate(2deg); width: min(520px, 42vw); animation: driftB 18s ease-in-out infinite; }
.card.c { top: 56%; left: 22%; transform: rotate(-1deg); width: min(380px, 32vw); animation: driftC 20s ease-in-out infinite; }

@keyframes driftA { 0%,100% { transform: translateY(0) rotate(-3deg); } 50% { transform: translateY(-10px) rotate(-2deg); } }
@keyframes driftB { 0%,100% { transform: translateY(0) rotate(2deg); } 50% { transform: translateY(12px) rotate(3deg); } }
@keyframes driftC { 0%,100% { transform: translateY(0) rotate(-1deg); } 50% { transform: translateY(-8px) rotate(0deg); } }

@media (prefers-reduced-motion: reduce) {
  .card { animation: none !important; }
}

/* Tech pattern overlay */
.pattern { position: absolute; inset: 0; background-image: radial-gradient(circle at 1px 1px, rgba(10,26,43,0.06) 1px, transparent 1px); background-size: 20px 20px; mask-image: linear-gradient(180deg, rgba(0,0,0,0.9), rgba(0,0,0,0.2)); pointer-events: none; }

/* Feature grid */
.features { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--space-5); margin-top: var(--space-6); }
.feature { background: #ffffff; border: 1px solid rgba(10,26,43,0.08); border-radius: var(--radius-16); padding: var(--space-4); box-shadow: var(--shadow-1); }
.feature h3 { margin: 0 0 8px; font-size: 1.05rem; }
.muted { color: var(--color-fg-dim); }

@media (max-width: 980px) {
  .features { grid-template-columns: 1fr; }
  .card.a { top: 10%; left: 50%; transform: translateX(-60%) rotate(-3deg); }
  .card.b { right: 4%; width: 70vw; }
  .card.c { left: 8%; width: 60vw; }
}

/* Footer */
footer { color: var(--color-fg-dim); border-top: 1px solid rgba(10,26,43,0.08); background: #ffffff; padding: var(--space-5) 0; }

/* Article list */
.articles { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: var(--space-5); }
.article-card { background: #ffffff; border: 1px solid rgba(10,26,43,0.08); padding: var(--space-4); border-radius: var(--radius-16); transition: transform .2s ease, box-shadow .2s ease; box-shadow: var(--shadow-1); }
.article-card:hover { transform: translateY(-3px); }

@media (max-width: 980px) { .articles { grid-template-columns: 1fr; } }

/* Forms */
form { display: grid; gap: var(--space-4); max-width: 640px; }
label { font-weight: 600; color: var(--color-fg); margin-bottom: 6px; display: inline-block; }
input, select, textarea { width: 100%; padding: 12px 14px; border-radius: 12px; border: 1px solid rgba(10,26,43,0.16); background: #ffffff; color: var(--color-fg); outline: none; }
input:focus, select:focus, textarea:focus { border-color: rgba(31,95,204,.6); box-shadow: 0 0 0 3px rgba(31,95,204,.18); }
.helper { color: var(--color-fg-dim); font-size: .9rem; }

/* Utilities */
.tag { display: inline-block; padding: 4px 10px; border-radius: 999px; background: rgba(31,95,204,.12); border: 1px solid rgba(31,95,204,.28); color: #0a3e9c; font-size: .85rem; }
.spacer { height: var(--space-6); }
