/* DocAgenda landing — local CSS only (no Tailwind CDN) */

@font-face {
  font-family: 'Geist';
  src: url('../../assets/brand/Geist-Regular.ttf') format('truetype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Geist';
  src: url('../../assets/brand/Geist-Medium.ttf') format('truetype');
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Geist';
  src: url('../../assets/brand/Geist-Bold.ttf') format('truetype');
  font-weight: 600 700;
  font-style: normal;
  font-display: swap;
}

:root {
  --brand-primary: oklch(55% 0.18 250);
  --surface-dark: oklch(12% 0.02 250);
  --text-main: oklch(98% 0.01 250);
  --text-muted: oklch(70% 0.02 250);
  --accent-blue: #3b82f6;
  --accent-blue-soft: #60a5fa;
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: 'Geist', system-ui, sans-serif;
  background-color: var(--surface-dark);
  color: var(--text-main);
  overflow-x: hidden;
}

a {
  color: inherit;
  text-decoration: none;
}

.doc-page {
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
}

.doc-accent {
  color: var(--accent-blue);
}

/* ── Nav ─────────────────────────────────────────────────── */
.doc-nav {
  position: fixed;
  top: 1.5rem;
  left: 50%;
  z-index: 50;
  width: 92%;
  max-width: 64rem;
  transform: translateX(-50%);
}

.doc-nav__pill {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.75rem 1.5rem;
  border-radius: 999px;
}

.glass-nav {
  background: rgba(255, 255, 255, 0.03);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.doc-nav__back {
  flex-shrink: 0;
  font-size: 0.875rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.7);
  transition: color 160ms ease;
}

.doc-nav__back:hover {
  color: #fff;
}

.doc-nav__back:focus-visible {
  outline: 2px solid rgba(255, 255, 255, 0.6);
  outline-offset: 2px;
}

.doc-nav__brand {
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.04em;
}

.doc-nav__links {
  display: none;
  align-items: center;
  gap: 1.5rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.6);
}

.doc-nav__links a:hover {
  color: #fff;
}

@media (min-width: 768px) {
  .doc-nav__links {
    display: flex;
  }
}

.doc-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: none;
  border-radius: 999px;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  text-align: center;
}

.doc-btn--soon {
  flex-shrink: 0;
  padding: 0.5rem 1.25rem;
  background: #fff;
  color: #000;
  font-size: 0.875rem;
  opacity: 0.9;
  cursor: not-allowed;
}

.doc-btn--primary {
  width: 100%;
  padding: 1.25rem 2.5rem;
  background: #2563eb;
  color: #fff;
  font-size: 1.125rem;
  font-weight: 600;
  box-shadow: 0 10px 24px rgba(37, 99, 235, 0.2);
  transition: background 160ms ease, transform 160ms ease;
}

.doc-btn--primary:hover {
  background: #3b82f6;
  transform: scale(1.03);
}

@media (min-width: 640px) {
  .doc-btn--primary {
    width: auto;
  }
}

.doc-btn--cta {
  padding: 1.5rem 3rem;
  background: #fff;
  color: #000;
  font-size: 1.5rem;
  opacity: 0.9;
  cursor: not-allowed;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.35);
}

/* Lang switch */
.lang-switch {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 0;
  border: none;
  background: transparent;
  padding: 2px 0;
  cursor: pointer;
  font: inherit;
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: rgba(255, 255, 255, 0.85);
  flex-shrink: 0;
  line-height: 1;
}

.lang-switch__opt {
  opacity: 0.5;
  min-width: 1.35em;
  text-align: center;
  user-select: none;
}

.lang-switch:not(.is-en) .lang-switch__opt:first-child,
.lang-switch.is-en .lang-switch__opt:last-child {
  opacity: 1;
}

.lang-switch__track {
  position: relative;
  width: 40px;
  height: 22px;
  border-radius: 999px;
  background: #0a0f18;
  flex-shrink: 0;
  box-sizing: border-box;
}

.lang-switch__knob {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #fff;
  border: 1px solid #0a0f18;
  box-sizing: border-box;
  transition: transform 180ms var(--ease-out);
}

.lang-switch.is-en .lang-switch__knob,
.lang-switch[aria-checked='true'] .lang-switch__knob {
  transform: translateX(18px);
}

.lang-switch:focus-visible {
  outline: 2px solid rgba(255, 255, 255, 0.7);
  outline-offset: 3px;
  border-radius: 4px;
}

/* ── Hero ────────────────────────────────────────────────── */
.doc-hero-section {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 8rem 1.5rem 4rem;
  overflow: hidden;
}

.doc-hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.doc-hero-mesh {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 70% 50% at 20% 30%, rgba(37, 99, 235, 0.28), transparent 60%),
    radial-gradient(ellipse 50% 40% at 80% 20%, rgba(96, 165, 250, 0.12), transparent 55%),
    radial-gradient(ellipse 60% 50% at 50% 80%, rgba(15, 23, 42, 0.9), transparent 70%),
    linear-gradient(160deg, #0a0c10 0%, #0f172a 45%, #0a0c10 100%);
  filter: grayscale(0.35) contrast(1.1);
  opacity: 0.95;
}

.doc-hero-fade {
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, transparent, rgba(10, 12, 16, 0.8) 55%, #0a0c10);
}

.doc-hero {
  position: relative;
  z-index: 10;
  display: grid;
  gap: 40px;
  align-items: center;
  justify-items: center;
  width: 100%;
  max-width: 72rem;
  margin-inline: auto;
  text-align: center;
}

.doc-hero__copy {
  max-width: 40rem;
}

.hero-h1 {
  margin: 0 0 1.5rem;
  font-size: clamp(2.5rem, 5vw, 4.5rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.05;
  text-wrap: balance;
}

.doc-hero__sub {
  margin: 0 0 2.5rem;
  max-width: 42rem;
  font-size: clamp(1.125rem, 2vw, 1.25rem);
  font-weight: 400;
  line-height: 1.55;
  color: rgba(255, 255, 255, 0.6);
  text-wrap: pretty;
}

.doc-hero__btns {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

.doc-hero__visual {
  display: grid;
  place-items: center;
}

@media (min-width: 640px) {
  .doc-hero__btns {
    flex-direction: row;
  }
}

@media (min-width: 900px) {
  .doc-hero {
    grid-template-columns: minmax(0, 1.1fr) minmax(260px, 0.75fr);
    text-align: left;
    justify-items: stretch;
  }

  .doc-hero__copy {
    justify-self: end;
    text-align: left;
  }

  .doc-hero__visual {
    justify-self: start;
  }

  .doc-hero__btns {
    justify-content: flex-start;
  }
}

/* Hero entrance — transform only (LCP text paints immediately) */
.hero-enter {
  animation: hero-rise 700ms var(--ease-out) both;
}

.doc-hero__copy .hero-enter:nth-child(1) {
  animation-delay: 40ms;
}
.doc-hero__copy .hero-enter:nth-child(2) {
  animation-delay: 100ms;
}
.doc-hero__copy .hero-enter:nth-child(3) {
  animation-delay: 160ms;
}
.doc-hero__visual.hero-enter {
  animation-delay: 220ms;
}

@keyframes hero-rise {
  from {
    transform: translateY(12px);
  }
  to {
    transform: translateY(0);
  }
}

.landing-eyebrow {
  display: block;
  margin-bottom: 8px;
  color: var(--accent-blue-soft);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.landing-section-inner {
  width: min(1120px, 100%);
  margin-inline: auto;
}

.landing-story__lead {
  margin: 1rem 0 0;
  max-width: 42rem;
  font-size: 1.125rem;
  color: rgba(255, 255, 255, 0.5);
  line-height: 1.55;
}

/* Story: single phone dock + arrows */
.landing-story {
  padding: 56px 24px;
}

.landing-story__heading {
  max-width: 38rem;
  margin-bottom: 32px;
}

.landing-story__heading h2 {
  font-size: clamp(2rem, 4vw, 3.25rem);
  line-height: 1.08;
  letter-spacing: -0.03em;
  margin-bottom: 0;
  font-weight: 700;
}

.landing-story__stage {
  display: grid;
  gap: 28px;
  align-items: center;
  padding: 24px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 24px;
}

.landing-story__phone-slot {
  order: -1;
  display: grid;
  place-items: center;
  min-height: 340px;
}

.landing-story__copy {
  display: grid;
  gap: 12px;
  align-content: start;
  min-height: 12rem;
}

.landing-story__number {
  color: var(--accent-blue-soft);
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.landing-story__copy h3 {
  font-size: clamp(1.375rem, 3vw, 2rem);
  line-height: 1.15;
  letter-spacing: -0.02em;
  text-wrap: balance;
  font-weight: 700;
  color: #f8fafc;
  margin: 0;
}

.landing-story__copy p {
  color: rgba(255, 255, 255, 0.6);
  max-width: 42ch;
  line-height: 1.6;
  margin: 0;
}

.landing-story__nav {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 8px;
}

.landing-story__arrow {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.06);
  color: #f8fafc;
  font-size: 1.125rem;
  cursor: pointer;
  line-height: 1;
}

.landing-story__arrow:hover {
  border-color: var(--accent-blue-soft);
  color: var(--accent-blue-soft);
}

.landing-story__arrow:focus-visible {
  outline: 2px solid var(--accent-blue-soft);
  outline-offset: 2px;
}

.landing-story__dots {
  display: flex;
  gap: 6px;
  flex: 1;
  justify-content: center;
  flex-wrap: wrap;
}

.landing-story__dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.2);
}

.landing-story__dot.is-active {
  background: var(--accent-blue-soft);
  width: 20px;
}

.landing-pixel {
  position: relative;
  width: min(100%, 290px);
  padding: 9px;
  border: 5px solid #0f172a;
  border-radius: 34px;
  background: #0f172a;
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.45);
  transition:
    opacity 0.55s var(--ease-out),
    transform 0.55s var(--ease-out),
    filter 0.55s var(--ease-out);
}

.landing-pixel.is-dimmed {
  opacity: 0.22;
  transform: scale(0.96);
  filter: blur(1px);
  pointer-events: none;
}

.landing-pixel--story {
  opacity: 0;
  transform: translateY(12px) scale(0.97);
  pointer-events: none;
}

.landing-pixel--story.is-visible {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

.landing-story.is-story-active .landing-story__stage {
  border-color: rgba(96, 165, 250, 0.35);
}

.landing-pixel::before {
  position: absolute;
  top: 8px;
  left: 50%;
  z-index: 1;
  width: 82px;
  height: 22px;
  border-radius: 0 0 16px 16px;
  background: #0f172a;
  content: '';
  transform: translateX(-50%);
}

.landing-pixel__speaker {
  position: absolute;
  top: 16px;
  left: 50%;
  z-index: 2;
  width: 31px;
  height: 4px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.15);
  transform: translateX(-50%);
}

.landing-pixel__screen {
  overflow: hidden;
  border-radius: 23px;
  background: #111827;
}

.landing-pixel img {
  display: block;
  width: 100%;
  height: auto;
  transition: opacity 0.25s ease-out;
  aspect-ratio: 360 / 780;
}

.landing-pixel img.is-fading {
  opacity: 0.35;
}

@media (min-width: 800px) {
  .landing-story {
    padding: 72px 24px;
  }

  .landing-story__stage {
    grid-template-columns: minmax(260px, 0.85fr) minmax(0, 1fr);
    gap: 40px;
    padding: 36px;
    min-height: 520px;
  }

  .landing-story__phone-slot {
    order: 0;
    min-height: 480px;
  }

  .landing-story__phone-slot .landing-pixel {
    width: min(100%, 310px);
  }
}

/* ── AI section ──────────────────────────────────────────── */
.doc-ai {
  padding: 6rem 1.5rem;
  background: rgba(255, 255, 255, 0.05);
}

.doc-ai__inner {
  max-width: 48rem;
  margin-inline: auto;
  display: grid;
  gap: 2rem;
}

.doc-ai__title {
  margin: 0;
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.03em;
}

.doc-ai__body {
  margin: 0;
  font-size: 1.25rem;
  color: rgba(255, 255, 255, 0.6);
  text-wrap: pretty;
  line-height: 1.55;
}

.doc-ai__list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 1rem;
  color: rgba(255, 255, 255, 0.8);
}

.doc-ai__list li {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.doc-ai__link {
  color: #60a5fa;
  font-weight: 500;
}

.doc-ai__link:hover {
  color: #93c5fd;
}

/* ── Marquee ─────────────────────────────────────────────── */
.doc-marquee {
  display: flex;
  align-items: center;
  padding: 5rem 0;
  border-block: 1px solid rgba(255, 255, 255, 0.05);
  overflow: hidden;
  white-space: nowrap;
}

.marquee-container {
  display: flex;
  width: max-content;
  font-size: clamp(2.5rem, 6vw, 3.75rem);
  font-weight: 900;
  color: rgba(255, 255, 255, 0.1);
  text-transform: uppercase;
  letter-spacing: -0.04em;
  animation: marquee 40s linear infinite;
}

.marquee-container span {
  margin-inline: 2.5rem;
}

@keyframes marquee {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(-50%);
  }
}

/* ── Footer ──────────────────────────────────────────────── */
.doc-footer {
  position: relative;
  padding: 8rem 1.5rem 3rem;
  text-align: center;
}

.doc-footer__cta {
  max-width: 56rem;
  margin-inline: auto;
}

.doc-footer__title {
  margin: 0 0 3rem;
  font-size: clamp(2.5rem, 8vw, 6rem);
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1.05;
  text-wrap: balance;
}

.doc-footer__grid {
  display: grid;
  gap: 3rem;
  max-width: 80rem;
  margin: 12rem auto 0;
  padding-top: 3rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  text-align: left;
  font-size: 0.875rem;
  color: rgba(255, 255, 255, 0.4);
}

@media (min-width: 768px) {
  .doc-footer__grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.doc-footer__brand {
  margin-bottom: 1rem;
  font-size: 1.125rem;
  font-weight: 700;
  color: #fff;
}

.doc-footer__heading {
  margin-bottom: 0.5rem;
  font-weight: 700;
  color: #fff;
}

.doc-footer__col {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.doc-footer__col a:hover {
  color: #fff;
}

.doc-footer__copy {
  margin-top: 3rem;
  text-align: center;
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.2);
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .hero-enter {
    animation: none;
  }

  .lang-switch__knob,
  .doc-btn--primary {
    transition: none;
  }

  .doc-btn--primary:hover {
    transform: none;
  }

  .landing-pixel,
  .landing-pixel img {
    transition: none;
  }

  .landing-pixel.is-dimmed {
    opacity: 0.35;
    filter: none;
    transform: none;
  }

  .landing-pixel--story {
    opacity: 1;
    transform: none;
  }

  .marquee-container {
    animation: none;
  }
}
