/* ═══════════════════════════════════════════════════
   ASPOL — Design Tokens & Styles
   Deep navy institutional palette. Typography-driven.
   ═══════════════════════════════════════════════════ */

@import url('./base.css');

/* ── Type Scale ── */
:root {
  --text-xs:   clamp(0.75rem,  0.7rem  + 0.25vw, 0.875rem);
  --text-sm:   clamp(0.8125rem, 0.76rem + 0.3vw, 0.9375rem);
  --text-base: clamp(1rem,     0.95rem + 0.25vw, 1.125rem);
  --text-lg:   clamp(1.125rem, 1rem    + 0.75vw, 1.5rem);
  --text-xl:   clamp(1.5rem,   1.2rem  + 1.25vw, 2.25rem);
  --text-2xl:  clamp(2rem,     1.2rem  + 2.5vw,  3.5rem);
  --text-3xl:  clamp(2.5rem,   1rem    + 4vw,    5rem);
  --text-hero: clamp(3rem,     0.5rem  + 7vw,    8rem);

  /* ── Spacing (4px base) ── */
  --space-1:  0.25rem;
  --space-2:  0.5rem;
  --space-3:  0.75rem;
  --space-4:  1rem;
  --space-6:  1.5rem;
  --space-8:  2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;
  --space-16: 4rem;
  --space-20: 5rem;
  --space-24: 6rem;
  --space-32: 8rem;

  /* ── Fonts ── */
  --font-display: 'Switzer', 'Helvetica Neue', sans-serif;
  --font-body: 'Switzer', 'Helvetica Neue', sans-serif;
  --font-mono: 'JetBrains Mono', 'Consolas', monospace;

  /* ── Easing ── */
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in: cubic-bezier(0.4, 0, 1, 1);
  --transition-interactive: 180ms cubic-bezier(0.16, 1, 0.3, 1);

  /* ── Content widths ── */
  --content-narrow: 640px;
  --content-default: 960px;
  --content-wide: 1200px;

  /* ── Palette ── */
  --color-bg:          #080B12;
  --color-surface:     #0D1117;
  --color-surface-2:   #131921;
  --color-border:      #1E2736;
  --color-text:        #C8CDD6;
  --color-text-muted:  #6B7484;
  --color-text-faint:  #3A4458;
  --color-primary:     #4A7BF7;
  --color-primary-hover: #6B94FF;
  --color-accent:      #1A2744;
  --color-accent-line: #253554;

  --navy-deep:   #060911;
  --navy-mid:    #0A0F1A;
  --navy-light:  #111827;
}

/* ── Body ── */
body {
  background: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-body);
  overflow-x: hidden;
}

.page-container {
  max-width: var(--content-wide);
  margin: 0 auto;
  padding: 0 clamp(var(--space-6), 5vw, var(--space-16));
}

/* ══════════════════════════
   HERO
   ══════════════════════════ */

.hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: clamp(var(--space-16), 10vw, var(--space-24)) 0 clamp(var(--space-8), 4vw, var(--space-12));
}

/* Logo group: icon above wordmark, centered */
.hero__logo-group {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-3);
  margin-bottom: var(--space-4);
}

/* Icon: abstract geometric A mark */
.hero__icon {
  opacity: 0;
  animation: iconReveal 0.5s var(--ease-out) 0.1s forwards;
}

@keyframes iconReveal {
  0% { opacity: 0; transform: translateY(4px); }
  100% { opacity: 1; transform: translateY(0); }
}

.hero__icon svg {
  width: 52px;
  height: 52px;
}

/* Ambient pulse on the icon after full sequence settles */
@keyframes iconPulse {
  0%, 100% { opacity: 0.85; filter: brightness(1); }
  50% { opacity: 1; filter: brightness(1.15); }
}

.hero__icon--settled .hero__icon-svg {
  animation: iconPulse 4s ease-in-out infinite;
}

/* Wordmark: letters appear one by one with varied flicker timing */
.hero__wordmark {
  font-family: var(--font-display);
  font-size: var(--text-3xl);
  font-weight: 600;
  letter-spacing: 0.06em;
  color: #E8ECF2;
  display: flex;
  overflow: hidden;
}

/* Custom A — slightly heavier, acts as the brand letter */
.hero__letter--a {
  font-weight: 700;
  color: var(--color-primary);
}

.hero__letter {
  opacity: 0;
  display: inline-block;
  animation: letterIn 0.35s var(--ease-out) forwards;
  /* Starts at 0.35s (overlapping icon fade-in) with per-letter stagger + jitter */
  animation-delay: calc(0.35s + var(--i) * 0.09s + var(--jitter));
}

/* Varied flicker: each letter has slightly different timing via --jitter */
@keyframes letterIn {
  0%   { opacity: 0; filter: blur(6px); }
  45%  { opacity: 1; filter: blur(0); }
  55%  { opacity: 0.2; filter: blur(1px); }
  70%  { opacity: 0.9; filter: blur(0); }
  80%  { opacity: 0.4; }
  90%  { opacity: 1; }
  95%  { opacity: 0.7; }
  100% { opacity: 1; filter: blur(0); }
}

/* Tagline */
.hero__tagline {
  font-family: var(--font-body);
  font-size: var(--text-lg);
  font-weight: 300;
  letter-spacing: 0.02em;
  color: #8B95A8;
  opacity: 0;
  animation: fadeIn 0.8s var(--ease-out) 1.2s forwards;
}

/* ══════════════════════════
   ERAS — Three-column grid
   ══════════════════════════ */

.eras {
  padding: clamp(var(--space-8), 4vw, var(--space-12)) 0;
  border-top: 1px solid var(--color-border);
}

.eras__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  align-items: start;
}

.era {
  padding: var(--space-6) var(--space-8);
  border-right: 1px solid var(--color-border);
}

.era:first-child {
  padding-left: 0;
}

.era:last-child {
  border-right: none;
  padding-right: 0;
}

.era__label {
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  font-weight: 500;
  letter-spacing: 0.05em;
  color: var(--color-primary);
  display: block;
  margin-bottom: var(--space-3);
}

.era__heading {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: 500;
  color: #E8ECF2;
  margin-bottom: var(--space-3);
  line-height: 1.25;
}

.era__body {
  font-size: var(--text-sm);
  line-height: 1.7;
  color: var(--color-text);
}

.era__body strong {
  color: #E8ECF2;
  font-weight: 500;
}

/* ══════════════════════════
   CODA
   ══════════════════════════ */

.coda {
  padding: clamp(var(--space-10), 6vw, var(--space-16)) var(--space-6);
  text-align: center;
  border-top: 1px solid var(--color-border);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-6);
}

.coda__statement {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: 400;
  color: #E8ECF2;
  line-height: 1.4;
  max-width: 32ch;
}

.coda__mark {
  opacity: 0.6;
}

/* ══════════════════════════
   FOOTER
   ══════════════════════════ */

.site-footer {
  padding: var(--space-6);
  text-align: center;
  border-top: 1px solid var(--color-border);
  display: flex;
  justify-content: center;
}

.site-footer__copy {
  font-size: var(--text-xs);
  color: #9BA3B2;
}

/* ══════════════════════════
   AMBIENT BACKGROUND
   ══════════════════════════ */

.ambient-glow {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: -1;
  overflow: hidden;
}

.ambient-glow__orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(120px);
  opacity: 0.08;
}

.ambient-glow__orb--1 {
  width: 600px;
  height: 600px;
  background: #1a3a6e;
  top: -200px;
  right: -100px;
}

.ambient-glow__orb--2 {
  width: 500px;
  height: 500px;
  background: #0f2b5c;
  bottom: 20%;
  left: -150px;
}

.ambient-glow__orb--3 {
  width: 400px;
  height: 400px;
  background: #162d54;
  top: 50%;
  right: 20%;
  opacity: 0.05;
}

/* ══════════════════════════
   KEYFRAMES
   ══════════════════════════ */

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* ══════════════════════════
   RESPONSIVE
   ══════════════════════════ */

@media (max-width: 768px) {
  .hero__wordmark {
    font-size: var(--text-2xl);
    letter-spacing: 0.04em;
  }

  .hero__icon svg {
    width: 44px;
    height: 44px;
  }

  .hero__tagline {
    font-size: var(--text-base);
  }

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

  .era {
    padding: var(--space-6) 0;
    border-right: none;
    border-bottom: 1px solid var(--color-border);
  }

  .era:first-child { padding-top: 0; }
  .era:last-child { border-bottom: none; padding-bottom: 0; }

  .coda__statement {
    font-size: var(--text-lg);
  }
}

@media (max-width: 480px) {
  .hero__wordmark {
    font-size: var(--text-xl);
    letter-spacing: 0.02em;
  }

  .hero__logo-group {
    gap: var(--space-2);
  }

  .hero__icon svg {
    width: 40px;
    height: 40px;
  }
}
