/* ================================================================
   ALYT — marketing site
   Palette derived from the brand mark:
   deep #0E4E8E · signal #1E9CD7 · ice #A8E0E8 · charcoal #4A4A52
   ================================================================ */

:root {
  --paper: #fbfbfd;
  --ink: #17171b;
  --charcoal: #4a4a52;
  --muted: #7c7c86;
  --deep: #0e4e8e;
  --signal: #1e9cd7;
  --ice: #a8e0e8;
  --night: #0a0f16;
  --line: rgba(23, 23, 27, 0.08);
  --radius: 22px;
  --wrap: 1140px;
  --font-display: "Space Grotesk", "Helvetica Neue", sans-serif;
  --font-body: "Inter", -apple-system, "Segoe UI", sans-serif;
  --font-mono: "JetBrains Mono", "SF Mono", monospace;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.65;
  color: var(--charcoal);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img { max-width: 100%; display: block; }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  color: var(--ink);
  letter-spacing: -0.02em;
  line-height: 1.08;
  text-wrap: balance;
}

h1 { font-size: clamp(2.6rem, 6.5vw, 4.9rem); font-weight: 700; }
h2 { font-size: clamp(1.9rem, 4vw, 3.1rem); font-weight: 600; margin-bottom: 0.6em; }
h3 { font-size: 1.35rem; font-weight: 600; }
h4 { font-size: 1.06rem; font-weight: 600; }

a { color: inherit; }

:focus-visible {
  outline: 2px solid var(--signal);
  outline-offset: 3px;
  border-radius: 4px;
}

::selection { background: var(--ice); color: var(--ink); }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 24px; }

.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--deep);
  margin-bottom: 1.1rem;
}

.eyebrow-light { color: var(--ice); }

.lede {
  font-size: 1.18rem;
  max-width: 640px;
  margin-bottom: 2.6rem;
}

.muted { color: var(--muted); }
.accent {
  background: linear-gradient(100deg, var(--deep) 10%, var(--signal) 55%, #63c2e4 90%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* ---------------- buttons ---------------- */

.btn {
  display: inline-block;
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 500;
  padding: 0.85em 1.7em;
  border-radius: 999px;
  text-decoration: none;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.btn-ink {
  background: var(--ink);
  color: #fff;
}
.btn-ink:hover {
  background: var(--deep);
  transform: translateY(-1px);
  box-shadow: 0 10px 28px rgba(14, 78, 142, 0.28);
}

.btn-ghost {
  color: var(--ink);
  box-shadow: inset 0 0 0 1.5px rgba(23, 23, 27, 0.18);
}
.btn-ghost:hover { box-shadow: inset 0 0 0 1.5px var(--signal); color: var(--deep); }

.btn-sm { font-size: 0.88rem; padding: 0.6em 1.25em; }

/* ---------------- nav ---------------- */

.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 50;
  background: rgba(251, 251, 253, 0.72);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.25s ease;
}
.nav.scrolled { border-bottom-color: var(--line); }

.nav-inner {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 24px;
  height: 60px;
  display: flex;
  align-items: center;
  gap: 32px;
}

.nav-logo img { height: 24px; width: auto; }

.nav-links {
  display: flex;
  gap: 26px;
  margin-left: auto;
}
.nav-links a {
  font-size: 0.92rem;
  color: var(--charcoal);
  text-decoration: none;
  transition: color 0.15s ease;
}
.nav-links a:hover { color: var(--ink); }

/* ---------------- hero ---------------- */

.hero {
  padding: 150px 24px 0;
  text-align: center;
  overflow: clip;
}

.hero-mark {
  position: relative;
  width: 96px;
  height: 92px;
  margin: 0 auto 2.2rem;
  animation: mark-float 7s ease-in-out 2.2s infinite;
}
.mark-piece {
  position: absolute;
  inset: 0;
  width: 100%;
}
/* each piece shows one 120° sector of the mark; visible by default so the
   logo can never be lost — the arrival animation only runs once JS confirms */
.piece-a { clip-path: polygon(50% 50%, -5% -5%, 105% -5%); }
.piece-b { clip-path: polygon(50% 50%, 105% -5%, 105% 105%, 50% 105%); }
.piece-c { clip-path: polygon(50% 50%, 50% 105%, -5% 105%, -5% -5%); }
.js-anim .piece-a { animation: arrive-a 0.8s cubic-bezier(0.2, 0.7, 0.2, 1) 0.1s backwards; }
.js-anim .piece-b { animation: arrive-b 0.8s cubic-bezier(0.2, 0.7, 0.2, 1) 0.32s backwards; }
.js-anim .piece-c { animation: arrive-c 0.8s cubic-bezier(0.2, 0.7, 0.2, 1) 0.54s backwards; }

@keyframes arrive-a { from { opacity: 0; transform: translate(0, -26px); } to { opacity: 1; transform: none; } }
@keyframes arrive-b { from { opacity: 0; transform: translate(24px, 14px); } to { opacity: 1; transform: none; } }
@keyframes arrive-c { from { opacity: 0; transform: translate(-24px, 14px); } to { opacity: 1; transform: none; } }
@keyframes mark-float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-7px); }
}

.hero .eyebrow { color: var(--muted); }

.hero-sub {
  font-size: 1.22rem;
  max-width: 620px;
  margin: 1.6rem auto 2.2rem;
}

.hero-cta {
  display: flex;
  gap: 14px;
  justify-content: center;
  flex-wrap: wrap;
}

.hero-media {
  max-width: 1240px;
  margin: 4.5rem auto 0;
}
.hero-media img {
  width: 100%;
  border-radius: var(--radius) var(--radius) 0 0;
  box-shadow: 0 -20px 80px rgba(14, 78, 142, 0.12);
}

/* ---------------- sections ---------------- */

.section { padding: 120px 0; }
.section-tight { padding: 96px 0; }

.section h2 { max-width: 22ch; }

.section-voice h2,
.section-voice .lede,
.section-voice .eyebrow,
.section-cta { text-align: center; }
.section-voice h2 { margin-inline: auto; }
.section-voice .lede { margin-inline: auto; }

/* story */

.story-grid {
  display: grid;
  grid-template-columns: 1.25fr 1fr;
  gap: 72px;
  margin-top: 3rem;
  align-items: start;
}

.story-copy p { margin-bottom: 1.2em; }
.story-copy em { color: var(--deep); font-style: italic; }
.story-copy strong { color: var(--ink); }

.timeline {
  list-style: none;
  border-left: 2px solid var(--line);
}
.timeline li {
  position: relative;
  padding: 0 0 1.5rem 28px;
  display: flex;
  flex-direction: column;
}
.timeline li::before {
  content: "";
  position: absolute;
  left: -6px;
  top: 7px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--paper);
  border: 2px solid var(--signal);
}
.timeline .t-now::before { background: var(--signal); box-shadow: 0 0 0 5px rgba(30, 156, 215, 0.18); }
.t-year {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  color: var(--deep);
}
.t-what { font-size: 0.95rem; }
.t-now .t-what { color: var(--ink); font-weight: 600; }

/* pillars — each card keyed to one face of the mark */

.pillars {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
  margin-top: 3rem;
}

.pillar {
  border-radius: var(--radius);
  padding: 34px 30px 38px;
  background: #fff;
  border: 1px solid var(--line);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.pillar::before {
  content: "";
  display: block;
  width: 44px;
  height: 5px;
  border-radius: 999px;
  margin-bottom: 1.5rem;
  background: var(--face);
}
.pillar:hover { transform: translateY(-4px); box-shadow: 0 18px 44px rgba(23, 23, 27, 0.08); }
.pillar h3 { margin-bottom: 0.7rem; }
.pillar p { font-size: 0.98rem; }
.pillar-deep { --face: var(--deep); }
.pillar-signal { --face: var(--signal); }
.pillar-ice { --face: var(--ice); }

/* split layout */

.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 72px;
  align-items: center;
}

.split-media img {
  width: 100%;
  border-radius: var(--radius);
  box-shadow: 0 24px 70px rgba(23, 23, 27, 0.14);
}

.split-copy p { margin-bottom: 1.2em; max-width: 52ch; }

/* spec list */

.spec-list {
  list-style: none;
  margin-top: 1.8rem;
  border-top: 1px solid var(--line);
}
.spec-list li {
  display: flex;
  gap: 20px;
  padding: 0.8rem 0;
  border-bottom: 1px solid var(--line);
}
.spec-k {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--deep);
  min-width: 108px;
  padding-top: 0.25em;
}
.spec-v { color: var(--ink); font-weight: 500; }

/* voice */

.feature-media { margin: 3.4rem 0; }
.feature-media img {
  width: 100%;
  border-radius: var(--radius);
  box-shadow: 0 24px 70px rgba(23, 23, 27, 0.14);
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 40px 34px;
  text-align: left;
}
.feature h4 { margin-bottom: 0.55rem; }
.feature p { font-size: 0.93rem; }

/* dark section */

.section-dark {
  background:
    radial-gradient(1100px 500px at 78% 12%, rgba(14, 78, 142, 0.35), transparent 65%),
    var(--night);
}
.section-dark h2 { color: #fff; }
.section-dark p { color: rgba(255, 255, 255, 0.72); }
.spec-list-light { border-top-color: rgba(255, 255, 255, 0.14); }
.spec-list-light li { border-bottom-color: rgba(255, 255, 255, 0.14); }
.spec-list-light .spec-k { color: var(--signal); }
.spec-list-light .spec-v { color: #fff; }

/* chips */

.chips {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  max-width: 860px;
}
.chips li {
  font-family: var(--font-mono);
  font-size: 0.84rem;
  padding: 0.55em 1.1em;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--charcoal);
  transition: border-color 0.2s ease, color 0.2s ease, transform 0.2s ease;
}
.chips li:hover { border-color: var(--signal); color: var(--deep); transform: translateY(-2px); }

/* developers */

.dev-list { list-style: none; }
.dev-list li {
  padding: 1.05rem 0 1.05rem 34px;
  border-bottom: 1px solid var(--line);
  position: relative;
  font-size: 0.98rem;
}
.dev-list li:first-child { border-top: 1px solid var(--line); }
.dev-list li::before {
  content: "";
  position: absolute;
  left: 4px;
  top: 1.45rem;
  width: 12px;
  height: 12px;
  background: url("/assets/brand/alyt-mark.png") center / contain no-repeat;
}
.dev-list strong { color: var(--ink); }

/* cta */

.section-cta {
  padding: 140px 0;
  background:
    radial-gradient(900px 420px at 50% 115%, rgba(168, 224, 232, 0.35), transparent 70%),
    linear-gradient(var(--paper), #f0f6f9);
}
.cta-wrap { display: flex; flex-direction: column; align-items: center; }
.cta-mark { margin-bottom: 1.6rem; }
.section-cta .lede { text-align: center; margin-inline: auto; }

/* footer */

.footer {
  background: var(--night);
  padding: 72px 0 48px;
}
.footer-inner { display: flex; flex-direction: column; align-items: flex-start; gap: 18px; }
.footer-payoff {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ice);
}
.footer-links { display: flex; flex-wrap: wrap; gap: 22px; margin-top: 10px; }
.footer-links a {
  color: rgba(255, 255, 255, 0.65);
  font-size: 0.9rem;
  text-decoration: none;
}
.footer-links a:hover { color: #fff; }
.footer-fine { color: rgba(255, 255, 255, 0.35); font-size: 0.82rem; margin-top: 18px; }

/* ---------------- reveal on scroll ---------------- */

.reveal {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 0.7s ease, transform 0.7s cubic-bezier(0.2, 0.7, 0.2, 1);
}
.reveal.in { opacity: 1; transform: none; }

/* ---------------- responsive ---------------- */

@media (max-width: 960px) {
  .story-grid, .split { grid-template-columns: 1fr; gap: 44px; }
  .section-dark .split { display: flex; flex-direction: column-reverse; }
  .pillars { grid-template-columns: 1fr; }
  .feature-grid { grid-template-columns: 1fr 1fr; }
  .nav-links { display: none; }
  .section { padding: 84px 0; }
  .hero { padding-top: 120px; }
}

@media (max-width: 560px) {
  .feature-grid { grid-template-columns: 1fr; }
  body { font-size: 16px; }
  .hero-media { margin-top: 3rem; }
  /* the 21:9 hero becomes a strip on phones — crop taller, keep the device */
  .hero-media img {
    aspect-ratio: 4 / 3;
    object-fit: cover;
    object-position: 58% center;
  }
}

/* ---------------- reduced motion ---------------- */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .mark-piece { animation: none; opacity: 1; }
  .hero-mark { animation: none; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .btn, .pillar, .chips li { transition: none; }
}
