/* ============================================
   Later — Design System & Page Styles
   Kraken-inspired: white bg + brand-blue accent
   ============================================ */

/* --- Google Fonts --- */
@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@500;600;700;800&family=Figtree:wght@400;500;600&display=swap');

/* --- Design Tokens --- */
:root {
  /* Brand */
  --color-brand: oklch(58% 0.2 255);
  --color-brand-dark: oklch(48% 0.2 255);
  --color-brand-subtle: oklch(95% 0.04 255);

  /* AI / Intelligence */
  --color-ai: oklch(52% 0.22 285);
  --color-ai-subtle: oklch(94% 0.05 285);

  /* Privacy / Safe */
  --color-safe: oklch(62% 0.17 155);
  --color-safe-subtle: oklch(94% 0.04 155);

  /* Neutrals — cool blue-tinted */
  --color-text: oklch(15% 0.01 255);
  --color-text-secondary: oklch(45% 0.02 255);
  --color-text-muted: oklch(62% 0.02 255);
  --color-surface: oklch(99.5% 0.002 255);
  --color-surface-alt: oklch(97% 0.006 255);
  --color-border: oklch(90% 0.008 255);

  /* Typography */
  --font-display: 'Plus Jakarta Sans', -apple-system, 'SF Pro Display', 'PingFang SC', sans-serif;
  --font-body: 'Figtree', -apple-system, 'SF Pro Text', 'PingFang SC', sans-serif;

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

  /* Radius (Kraken: 12px buttons, not pill) */
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 12px;
  --radius-xl: 16px;
  --radius-pill: 9999px;

  /* Shadows — whisper level (Kraken style) */
  --shadow-subtle: 0 4px 24px oklch(0% 0 0 / 0.04);
  --shadow-card: 0 1px 4px oklch(0% 0 0 / 0.03), 0 4px 16px oklch(0% 0 0 / 0.04);

  /* Motion */
  --ease-out-quart: cubic-bezier(0.25, 1, 0.5, 1);
  --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
  --duration-fast: 150ms;
  --duration-normal: 300ms;
  --duration-slow: 500ms;
}

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  font-kerning: normal;
}

body {
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--color-text);
  background-color: var(--color-surface);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

a {
  color: var(--color-brand);
  text-decoration: none;
  transition: color var(--duration-fast) var(--ease-out-quart);
}
a:hover {
  color: var(--color-brand-dark);
}

/* --- Layout Container --- */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--space-6);
}

/* --- Typography --- */
.heading-xl {
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 5vw + 0.5rem, 3.5rem);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -1.5px;
  color: var(--color-text);
}

.heading-lg {
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 3vw + 0.5rem, 2.25rem);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.5px;
  color: var(--color-text);
}

.heading-md {
  font-family: var(--font-display);
  font-size: 1.375rem;
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: -0.25px;
  color: var(--color-text);
}

.text-body {
  font-family: var(--font-body);
  font-size: 1.125rem;
  font-weight: 400;
  line-height: 1.6;
  color: var(--color-text-secondary);
}

.text-sm {
  font-family: var(--font-body);
  font-size: 0.875rem;
  font-weight: 400;
  line-height: 1.5;
  color: var(--color-text-muted);
}

/* --- Pill Badge --- */
.badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-1) var(--space-3);
  border-radius: var(--radius-sm);
  font-family: var(--font-display);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}
.badge--brand {
  background: var(--color-brand-subtle);
  color: var(--color-brand);
}
.badge--ai {
  background: var(--color-ai-subtle);
  color: var(--color-ai);
}
.badge--safe {
  background: var(--color-safe-subtle);
  color: var(--color-safe);
}

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: 13px 24px;
  border-radius: var(--radius-lg);
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.4;
  border: none;
  cursor: pointer;
  transition: transform var(--duration-fast) var(--ease-out-quart),
              background var(--duration-fast) var(--ease-out-quart),
              box-shadow var(--duration-fast) var(--ease-out-quart);
  text-decoration: none;
}
.btn:active {
  transform: scale(0.97);
}

.btn--primary {
  background: var(--color-brand);
  color: white;
}
.btn--primary:hover {
  background: var(--color-brand-dark);
  color: white;
  box-shadow: var(--shadow-subtle);
}

.btn--white {
  background: white;
  color: var(--color-text);
  box-shadow: var(--shadow-card);
}
.btn--white:hover {
  box-shadow: var(--shadow-subtle);
  color: var(--color-text);
}

.btn--ghost {
  background: transparent;
  color: var(--color-text-secondary);
  padding: 13px 16px;
}
.btn--ghost:hover {
  color: var(--color-brand);
}

.btn--disabled {
  opacity: 0.5;
  cursor: not-allowed;
  pointer-events: none;
}

/* --- Navigation --- */
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-4) 0;
  border-bottom: 1px solid var(--color-border);
}

.nav__brand {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  text-decoration: none;
  color: var(--color-text);
}
.nav__brand-icon {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-md);
}
.nav__brand-name {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: -0.5px;
}

.nav__links {
  display: flex;
  align-items: center;
  gap: var(--space-8);
  list-style: none;
}
.nav__link {
  font-family: var(--font-body);
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--color-text-secondary);
  text-decoration: none;
  transition: color var(--duration-fast) var(--ease-out-quart);
}
.nav__link:hover {
  color: var(--color-text);
}
.nav__cta {
  padding: 9px 18px;
  font-size: 0.875rem;
}

/* --- Sections --- */
.section {
  padding: var(--space-24) 0;
}
.section--alt {
  background: var(--color-surface-alt);
}
.section--brand {
  background: var(--color-brand);
  color: white;
}

.section__badge {
  margin-bottom: var(--space-6);
}
.section__title {
  margin-bottom: var(--space-4);
}
.section__desc {
  max-width: 580px;
}

/* --- Hero --- */
.hero {
  padding: var(--space-24) 0 var(--space-20);
  min-height: 75vh;
  display: flex;
  align-items: center;
}
.hero__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-16);
  align-items: center;
}
.hero__content {
  max-width: 560px;
}
.hero__tagline {
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 500;
  color: var(--color-text-muted);
  margin-bottom: var(--space-4);
  letter-spacing: 0.5px;
  text-transform: uppercase;
}
.hero__title {
  margin-bottom: var(--space-6);
}
.hero__title .typed-word {
  color: var(--color-brand);
  display: inline-block;
  min-width: 180px;
}
.hero__subtitle {
  margin-bottom: var(--space-10);
  font-size: 1.25rem;
  line-height: 1.6;
  color: var(--color-text-secondary);
}
.hero__actions {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  flex-wrap: wrap;
}

.hero__visual {
  display: flex;
  justify-content: center;
  align-items: center;
}
.hero__app-icon {
  width: 280px;
  height: 280px;
  filter: drop-shadow(0 12px 40px oklch(58% 0.2 255 / 0.25));
  transition: transform var(--duration-slow) var(--ease-out-quart),
              filter var(--duration-slow) var(--ease-out-quart);
}
.hero__app-icon:hover {
  transform: translateY(-8px) scale(1.03);
  filter: drop-shadow(0 18px 50px oklch(58% 0.2 255 / 0.35));
}

/* --- Focus Section --- */
.focus__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-16);
  align-items: center;
}
.focus__content {
  max-width: 500px;
}
.focus__desc {
  margin-bottom: var(--space-6);
}

/* --- Phone Stack Showcase --- */
.phone-stack {
  position: relative;
  width: 100%;
  max-width: 440px;
  height: 520px;
  margin: 0 auto;
}
.phone-stack__device {
  position: absolute;
  width: 250px;
  border-radius: 36px;
  box-shadow: 0 24px 80px oklch(0% 0 0 / 0.15), 0 0 0 8px oklch(12% 0.01 255);
  overflow: hidden;
  background: black;
  transition: transform var(--duration-slow) var(--ease-out-quart);
}
.phone-stack__device img {
  width: 100%;
  display: block;
}
.phone-stack__device--1 {
  top: 0;
  left: 0;
  transform: rotate(-4deg);
  z-index: 1;
}
.phone-stack__device--2 {
  bottom: 0;
  right: 0;
  transform: rotate(4deg);
  z-index: 2;
}
.phone-stack:hover .phone-stack__device--1 {
  transform: rotate(-6deg) translateX(-10px) translateY(-10px);
}
.phone-stack:hover .phone-stack__device--2 {
  transform: rotate(6deg) translateX(10px) translateY(10px);
}

/* --- AI Section --- */
.ai__items-vertical {
  display: flex;
  flex-direction: column;
  gap: var(--space-8);
}
.ai__item-vert {
  border-left: 2px solid var(--color-border);
  padding-left: var(--space-4);
}
.ai__item-number {
  font-family: var(--font-display);
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--color-ai);
  margin-bottom: var(--space-2);
  letter-spacing: 0.5px;
}
.ai__item-title {
  font-family: var(--font-display);
  font-size: 1.125rem;
  font-weight: 700;
  letter-spacing: -0.25px;
  color: var(--color-text);
  margin-bottom: var(--space-2);
}
.ai__item-desc {
  font-size: 0.9375rem;
  line-height: 1.6;
  color: var(--color-text-secondary);
}

/* --- Privacy Section --- */
.privacy__content {
  max-width: 640px;
}
.privacy__desc {
  margin-bottom: var(--space-6);
}
.privacy__markers {
  display: flex;
  gap: var(--space-8);
  flex-wrap: wrap;
}
.privacy__marker {
  font-family: var(--font-display);
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--color-safe);
  display: flex;
  align-items: center;
  gap: var(--space-2);
}
.privacy__marker::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--color-safe);
}

/* --- Features Grid --- */
.features__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-2) var(--space-16);
  margin-top: var(--space-10);
}
.features__item {
  display: flex;
  align-items: baseline;
  gap: var(--space-3);
  padding: var(--space-4) 0;
  border-bottom: 1px solid var(--color-border);
}
.features__item-dash {
  color: var(--color-text-muted);
  font-weight: 500;
  flex-shrink: 0;
}
.features__item-text {
  font-size: 1rem;
  font-weight: 500;
  color: var(--color-text);
}

/* --- CTA Section --- */
.cta {
  padding: var(--space-20) 0;
  text-align: center;
}
.cta .heading-lg {
  color: white;
  margin-bottom: var(--space-3);
}
.cta__sub {
  color: oklch(90% 0.04 255);
  font-size: 1.125rem;
  margin-bottom: var(--space-10);
}
.cta .typed-word {
  color: oklch(90% 0.08 255);
}

/* --- Footer --- */
.footer {
  padding: var(--space-8) 0;
  border-top: 1px solid var(--color-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.footer__copy {
  font-size: 0.8125rem;
  color: var(--color-text-muted);
}
.footer__links {
  display: flex;
  gap: var(--space-6);
  list-style: none;
}
.footer__link {
  font-size: 0.8125rem;
  color: var(--color-text-muted);
  text-decoration: none;
}
.footer__link:hover {
  color: var(--color-text);
}

/* --- Scroll Animations --- */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity var(--duration-slow) var(--ease-out-quart),
              transform var(--duration-slow) var(--ease-out-quart);
}
.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}
.reveal-delay-1 { transition-delay: 80ms; }
.reveal-delay-2 { transition-delay: 160ms; }
.reveal-delay-3 { transition-delay: 240ms; }

/* --- Reduced Motion --- */
@media (prefers-reduced-motion: reduce) {
  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
  .phone-stack__device {
    transform: none !important;
  }
}

/* --- Responsive --- */
@media (max-width: 1024px) {
  .hero__grid {
    grid-template-columns: 1fr;
    gap: var(--space-12);
  }
  .hero__visual {
    order: -1;
  }
  .hero__app-icon {
    width: 160px;
    height: 160px;
    border-radius: 36px;
  }
  .hero__content {
    text-align: center;
    max-width: 100%;
  }
  .hero__actions {
    justify-content: center;
  }
  .focus__grid {
    grid-template-columns: 1fr;
    gap: var(--space-10);
  }
  .focus__content {
    max-width: 100%;
    text-align: center;
  }
  .phone-stack {
    height: 480px;
    margin-top: var(--space-8);
  }
  .phone-stack__device {
    width: 220px;
  }
  .features__grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .section {
    padding: var(--space-16) 0;
  }
  .hero {
    padding: var(--space-16) 0 var(--space-12);
    min-height: auto;
  }
  .hero__title .typed-word {
    min-width: 120px;
  }
  .nav__links {
    gap: var(--space-4);
  }
  .nav__link {
    display: none;
  }
  .privacy__markers {
    flex-direction: column;
    gap: var(--space-3);
  }
  .footer {
    flex-direction: column;
    gap: var(--space-4);
    text-align: center;
  }
  .phone-stack {
    height: 400px;
  }
  .phone-stack__device {
    width: 180px;
  }
}
