/* -------------------------------------------
   CUSTOM PROPERTIES - CONCEPT 2 LIGHT THEME
   ------------------------------------------- */
:root {
  --c-bg: #FBFCFE;
  --c-bg-elevated: #FFFFFF;
  --c-bg-glass: rgba(251, 252, 254, 0.75);
  --c-surface: #F2F5F9;
  --c-surface-warm: #EDF1F7;
  --c-border: rgba(24, 95, 165, 0.10);
  --c-border-hover: rgba(24, 95, 165, 0.22);
  --c-text: #0A1628;
  --c-text-secondary: #3A4A5C;
  --c-text-muted: #6B7D92;
  --c-text-dim: #9BAFC4;
  --c-accent: #185FA5;
  --c-accent-hover: #1252A0;
  --c-accent-light: #378ADD;
  --c-accent-pale: #E6F1FB;
  --c-accent-glow: rgba(24, 95, 165, 0.06);
  --c-deep: #0C447C;
  --c-white: #FFFFFF;

  --font-display: 'Instrument Serif', Georgia, serif;
  --font-body: 'Plus Jakarta Sans', system-ui, sans-serif;
  --font-mono: 'Geist Mono', 'SF Mono', monospace;

  --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);

  --space-xs: clamp(0.25rem, 0.5vw, 0.5rem);
  --space-sm: clamp(0.5rem, 1vw, 1rem);
  --space-md: clamp(1rem, 2vw, 2rem);
  --space-lg: clamp(2rem, 4vw, 4rem);
  --space-xl: clamp(3rem, 6vw, 6rem);
  --space-2xl: clamp(4rem, 10vw, 10rem);
}

/* -------------------------------------------
   RESET & BASE
   ------------------------------------------- */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; scrollbar-color: var(--c-accent) var(--c-surface); }
body {
  font-family: var(--font-body);
  background: var(--c-bg);
  color: var(--c-text);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
button { font: inherit; cursor: pointer; border: none; background: none; color: inherit; }

/* -------------------------------------------
   SUBTLE GRAIN OVERLAY
   ------------------------------------------- */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 9999;
  pointer-events: none;
  opacity: 0.018;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-repeat: repeat;
  background-size: 200px;
}

/* -------------------------------------------
   SCROLL-DRIVEN ANIMATIONS
   ------------------------------------------- */
@keyframes fade-up {
  from { opacity: 0; transform: translateY(40px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

.reveal {
  opacity: 0;
  transform: translateY(40px);
  animation: fade-up 0.8s var(--ease-out-expo) forwards;
  animation-timeline: view();
  animation-range: entry 0% entry 40%;
}
.reveal-delay-1 { animation-delay: 0.1s; }
.reveal-delay-2 { animation-delay: 0.2s; }
.reveal-delay-3 { animation-delay: 0.3s; }
.reveal-delay-4 { animation-delay: 0.4s; }

@supports not (animation-timeline: view()) {
  .reveal { animation: fade-up 0.8s var(--ease-out-expo) forwards; }
  .reveal-delay-1 { animation-delay: 0.15s; }
  .reveal-delay-2 { animation-delay: 0.3s; }
  .reveal-delay-3 { animation-delay: 0.45s; }
  .reveal-delay-4 { animation-delay: 0.6s; }
}

/* -------------------------------------------
   LAYOUT
   ------------------------------------------- */
.container {
  width: min(90%, 1200px);
  margin-inline: auto;
}
.section {
  padding-block: var(--space-2xl);
  position: relative;
}

/* -------------------------------------------
   NAVIGATION
   ------------------------------------------- */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  padding: var(--space-sm) 0;
  transition: background 0.4s, backdrop-filter 0.4s, box-shadow 0.4s;
}
.nav.scrolled {
  background: var(--c-bg-glass);
  backdrop-filter: blur(20px) saturate(1.4);
  -webkit-backdrop-filter: blur(20px) saturate(1.4);
  box-shadow: 0 1px 0 var(--c-border);
}
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-xs) 0;
}
.nav-logo {
  display: flex;
  align-items: center;
  gap: 12px;
}
.nav-logo svg, .logo-mark { width: 36px; height: 36px; flex-shrink: 0; }
.nav-wordmark {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 1.1rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--c-text);
}
.nav-links {
  display: flex;
  align-items: center;
  gap: clamp(1.5rem, 3vw, 3rem);
  list-style: none;
}
.nav-links a {
  font-size: 0.82rem;
  font-weight: 400;
  letter-spacing: 0.06em;
  color: var(--c-text-muted);
  transition: color 0.3s;
  text-transform: uppercase;
}
.nav-links a:hover { color: var(--c-accent); }
.nav-cta {
  font-size: 0.82rem !important;
  font-weight: 500 !important;
  letter-spacing: 0.06em;
  color: var(--c-white) !important;
  background: var(--c-accent);
  padding: 0.55em 1.4em;
  border-radius: 6px;
  transition: background 0.3s, transform 0.3s;
}
.nav-cta:hover {
  background: var(--c-accent-hover) !important;
  transform: translateY(-1px);
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 4px;
}
.nav-toggle span {
  display: block;
  width: 22px;
  height: 1.5px;
  background: var(--c-text);
}
@media (max-width: 768px) {
  .nav-toggle { display: flex; }
  .nav-links {
    position: fixed;
    inset: 0;
    flex-direction: column;
    justify-content: center;
    background: var(--c-bg);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s;
  }
  .nav-links.open { opacity: 1; pointer-events: all; }
  .nav-links a { font-size: 1.2rem; }
}

/* -------------------------------------------
   HERO
   ------------------------------------------- */
.hero {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

/* Topographic contour background */
.hero-topo {
  position: absolute;
  inset: 0;
  opacity: 0.045;
  mask-image: radial-gradient(ellipse 70% 60% at 50% 45%, black 20%, transparent 70%);
  -webkit-mask-image: radial-gradient(ellipse 70% 60% at 50% 45%, black 20%, transparent 70%);
  overflow: hidden;
}
.hero-topo svg {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 140%;
  height: 140%;
  animation: topo-drift 40s linear infinite;
}
@keyframes topo-drift {
  0% { transform: translate(-50%, -50%) rotate(0deg); }
  100% { transform: translate(-50%, -50%) rotate(360deg); }
}

/* Soft glow */
.hero-glow {
  position: absolute;
  width: 700px;
  height: 700px;
  top: 30%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: radial-gradient(circle, var(--c-accent-pale) 0%, transparent 65%);
  pointer-events: none;
  opacity: 0.5;
  animation: glow-pulse 8s ease-in-out infinite alternate;
}
@keyframes glow-pulse {
  0% { opacity: 0.35; transform: translate(-50%, -50%) scale(1); }
  100% { opacity: 0.6; transform: translate(-50%, -50%) scale(1.1); }
}

.hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  padding-top: 6rem;
}
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 400;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--c-accent);
  border: 1px solid var(--c-border);
  padding: 0.4em 1.2em;
  border-radius: 100px;
  margin-bottom: var(--space-lg);
  background: var(--c-accent-pale);
  animation: fade-up 0.8s var(--ease-out-expo) 0.2s both;
}
.hero-badge::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--c-accent);
  box-shadow: 0 0 8px rgba(24, 95, 165, 0.4);
  animation: pulse-dot 2s ease-in-out infinite;
}
@keyframes pulse-dot {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

.hero h1 {
  font-family: var(--font-display);
  font-size: clamp(3rem, 8vw, 7.5rem);
  font-weight: 400;
  line-height: 0.95;
  letter-spacing: -0.02em;
  color: var(--c-text);
  margin-bottom: var(--space-md);
  animation: fade-up 1s var(--ease-out-expo) 0.4s both;
}
.hero h1 em {
  font-style: italic;
  color: var(--c-accent);
}
.hero-sub {
  font-size: clamp(1rem, 1.8vw, 1.35rem);
  font-weight: 300;
  color: var(--c-text-secondary);
  max-width: 580px;
  margin-inline: auto;
  line-height: 1.7;
  margin-bottom: var(--space-lg);
  animation: fade-up 1s var(--ease-out-expo) 0.6s both;
}
.hero-actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
  animation: fade-up 1s var(--ease-out-expo) 0.8s both;
}
.btn-primary {
  font-size: 0.9rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: var(--c-white);
  background: var(--c-accent);
  padding: 0.85em 2.2em;
  border-radius: 8px;
  transition: all 0.3s var(--ease-out-expo);
  position: relative;
  overflow: hidden;
}
.btn-primary::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, transparent 40%, rgba(255,255,255,0.18) 50%, transparent 60%);
  transform: translateX(-100%);
  transition: transform 0.6s;
}
.btn-primary:hover::after { transform: translateX(100%); }
.btn-primary:hover { background: var(--c-accent-hover); transform: translateY(-2px); box-shadow: 0 8px 24px rgba(24, 95, 165, 0.18); }

.btn-secondary {
  font-size: 0.9rem;
  font-weight: 400;
  letter-spacing: 0.04em;
  color: var(--c-text-secondary);
  border: 1px solid var(--c-border-hover);
  padding: 0.85em 2.2em;
  border-radius: 8px;
  transition: all 0.3s;
}
.btn-secondary:hover {
  border-color: var(--c-accent);
  color: var(--c-accent);
  background: var(--c-accent-pale);
}

.scroll-indicator {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  color: var(--c-text-dim);
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  animation: fade-in 1s 1.5s both;
}
.scroll-line {
  width: 1px;
  height: 40px;
  background: linear-gradient(to bottom, var(--c-accent), transparent);
  animation: scroll-pulse 2s ease-in-out infinite;
}
@keyframes scroll-pulse {
  0%, 100% { opacity: 1; transform: scaleY(1); }
  50% { opacity: 0.3; transform: scaleY(0.6); }
}

/* -------------------------------------------
   FEATURES SECTION
   ------------------------------------------- */
.features { position: relative; }
.features::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 1px;
  height: 120px;
  background: linear-gradient(to bottom, transparent, var(--c-border-hover), transparent);
}

.section-label {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 400;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--c-accent);
  margin-bottom: var(--space-sm);
}
.section-title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4.5vw, 3.5rem);
  font-weight: 400;
  line-height: 1.1;
  margin-bottom: var(--space-md);
  color: var(--c-text);
}
.section-title em {
  font-style: italic;
  color: var(--c-accent);
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr));
  gap: 1px;
  background: var(--c-border);
  border: 1px solid var(--c-border);
  border-radius: 16px;
  overflow: hidden;
  margin-top: var(--space-lg);
}
.feature-card {
  background: var(--c-bg-elevated);
  padding: clamp(1.5rem, 3vw, 2.5rem);
  position: relative;
  transition: background 0.4s;
}
.feature-card:hover { background: var(--c-surface); }
.feature-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--c-accent-light), transparent);
  opacity: 0;
  transition: opacity 0.4s;
}
.feature-card:hover::before { opacity: 1; }

.feature-icon {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border: 1px solid var(--c-border);
  border-radius: 10px;
  margin-bottom: var(--space-sm);
  color: var(--c-accent);
  font-size: 1.1rem;
  background: var(--c-accent-pale);
}
.feature-card h3 {
  font-family: var(--font-body);
  font-size: 1.05rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  letter-spacing: 0.01em;
  color: var(--c-text);
}
.feature-card p {
  font-size: 0.88rem;
  color: var(--c-text-muted);
  line-height: 1.65;
}

/* -------------------------------------------
   POLIS PRODUCT SECTION
   ------------------------------------------- */
.polis { position: relative; }
.polis-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-lg);
  align-items: center;
  margin-top: var(--space-lg);
}
@media (max-width: 768px) {
  .polis-grid { grid-template-columns: 1fr; }
}
.polis-visual {
  position: relative;
  aspect-ratio: 4/3;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid var(--c-border);
  background: var(--c-text);
}
.polis-terminal {
  position: absolute;
  inset: 0;
  padding: 1.5rem;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  line-height: 2;
  color: #8899AA;
  overflow: hidden;
}
.polis-terminal .ln { color: #556677; user-select: none; margin-right: 1.5em; opacity: 0.4; }
.polis-terminal .kw { color: #85B7EB; }
.polis-terminal .str { color: #5DCAA5; }
.polis-terminal .cm { color: #556677; font-style: italic; }
.polis-terminal .fn { color: #B5D4F4; }
.polis-terminal .op { color: #8899AA; }

.polis-visual::after {
  content: '';
  position: absolute;
  bottom: -20%;
  right: 10%;
  width: 200px;
  height: 200px;
  background: radial-gradient(circle, rgba(24, 95, 165, 0.12), transparent 70%);
  pointer-events: none;
}

.polis-info h3 {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 3.5vw, 2.8rem);
  font-weight: 400;
  margin-bottom: var(--space-sm);
  color: var(--c-text);
}
.polis-info h3 em { font-style: italic; color: var(--c-accent); }
.polis-info p {
  color: var(--c-text-secondary);
  margin-bottom: var(--space-md);
  font-size: 0.95rem;
  line-height: 1.7;
}
.polis-features-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
.polis-features-list li {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.88rem;
  color: var(--c-text-secondary);
}
.polis-features-list li::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--c-accent);
  flex-shrink: 0;
}

/* -------------------------------------------
   METRICS
   ------------------------------------------- */
.metrics {
  border-top: 1px solid var(--c-border);
  border-bottom: 1px solid var(--c-border);
  padding-block: var(--space-xl);
  background: var(--c-surface);
}
.metrics-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-md);
  text-align: center;
}
@media (max-width: 640px) {
  .metrics-grid { grid-template-columns: repeat(2, 1fr); }
}
.metric-value {
  font-family: var(--font-display);
  font-size: clamp(2.2rem, 5vw, 3.5rem);
  font-weight: 400;
  color: var(--c-accent);
  line-height: 1;
  margin-bottom: 0.3rem;
}
.metric-label {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--c-text-muted);
}

/* -------------------------------------------
   CTA SECTION
   ------------------------------------------- */
.cta-section {
  text-align: center;
  position: relative;
}
.cta-section::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 50% 80% at 50% 100%, var(--c-accent-pale), transparent);
  pointer-events: none;
}
.cta-section h2 {
  font-family: var(--font-display);
  font-size: clamp(2.2rem, 5vw, 4rem);
  font-weight: 400;
  margin-bottom: var(--space-sm);
  position: relative;
  color: var(--c-text);
}
.cta-section h2 em { font-style: italic; color: var(--c-accent); }
.cta-section p {
  color: var(--c-text-secondary);
  max-width: 500px;
  margin-inline: auto;
  margin-bottom: var(--space-lg);
  font-size: 1rem;
  position: relative;
}
.cta-actions { position: relative; }

.email-capture {
  display: flex;
  gap: 0;
  max-width: 460px;
  margin-inline: auto;
  border: 1px solid var(--c-border-hover);
  border-radius: 10px;
  overflow: hidden;
  background: var(--c-bg-elevated);
  transition: border-color 0.3s, box-shadow 0.3s;
}
.email-capture:focus-within {
  border-color: var(--c-accent);
  box-shadow: 0 0 0 3px var(--c-accent-pale);
}
.email-capture input {
  flex: 1;
  padding: 0.9em 1.2em;
  background: transparent;
  border: none;
  outline: none;
  color: var(--c-text);
  font-family: var(--font-body);
  font-size: 0.9rem;
}
.email-capture input::placeholder { color: var(--c-text-dim); }
.email-capture button {
  padding: 0.9em 1.8em;
  background: var(--c-accent);
  color: var(--c-white);
  font-weight: 500;
  font-size: 0.85rem;
  letter-spacing: 0.03em;
  transition: background 0.3s;
  white-space: nowrap;
}
.email-capture button:hover { background: var(--c-accent-hover); }

/* -------------------------------------------
   FOOTER
   ------------------------------------------- */
.footer {
  border-top: 1px solid var(--c-border);
  padding-block: var(--space-xl) var(--space-lg);
  background: var(--c-surface);
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr repeat(3, 1fr);
  gap: var(--space-lg);
}
@media (max-width: 768px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 480px) {
  .footer-grid { grid-template-columns: 1fr; }
}
.footer-brand p {
  color: var(--c-text-muted);
  font-size: 0.82rem;
  line-height: 1.7;
  margin-top: 1rem;
  max-width: 280px;
}
.footer-col h4 {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--c-text-secondary);
  margin-bottom: 1rem;
}
.footer-col ul { list-style: none; }
.footer-col li { margin-bottom: 0.6rem; }
.footer-col a {
  font-size: 0.85rem;
  color: var(--c-text-muted);
  transition: color 0.3s;
}
.footer-col a:hover { color: var(--c-accent); }
.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: var(--space-xl);
  padding-top: var(--space-md);
  border-top: 1px solid var(--c-border);
  font-size: 0.75rem;
  color: var(--c-text-muted);
  flex-wrap: wrap;
  gap: 1rem;
}
.footer-bottom-links {
  display: flex;
  gap: 1.5rem;
  list-style: none;
}
.footer-bottom-links a {
  color: var(--c-text-muted);
  transition: color 0.3s;
}
.footer-bottom-links a:hover { color: var(--c-accent); }