/* ============================================
   LAYERD — Landing Page
   Pure Black & White. Intelligent Publishing.
   10/10 High Fidelity
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Abril+Fatface&family=Inter:wght@300;400;500;600;700;800&family=Playfair+Display:ital,wght@0,400;0,500;0,600;0,700;1,400;1,500&display=swap');

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

:root {
  --black: #000000;
  --white: #ffffff;
  --off-white: #fafafa;
  --gray-50: #f8f8f8;
  --gray-100: #f0f0f0;
  --gray-200: #e0e0e0;
  --gray-300: #c0c0c0;
  --gray-400: #999999;
  --gray-500: #777777;
  --gray-600: #555555;
  --gray-700: #333333;
  --gray-800: #1a1a1a;
  --gray-850: #141414;
  --gray-900: #0d0d0d;

  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-serif: 'Playfair Display', Georgia, 'Times New Roman', serif;

  --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-out-quart: cubic-bezier(0.25, 1, 0.5, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);

  --max-width: 1200px;
  --section-padding: clamp(80px, 12vw, 160px);
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

body {
  background-color: var(--black);
  color: var(--white);
  font-family: var(--font-sans);
  line-height: 1.6;
  overflow-x: hidden;
}

::selection {
  background: var(--white);
  color: var(--black);
}

a {
  color: inherit;
  text-decoration: none;
}

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

/* --- Navigation --- */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: 0 clamp(1.5rem, 4vw, 3rem);
  height: 72px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: all 0.5s var(--ease-out-expo);
}

.nav--scrolled {
  background-color: rgba(0, 0, 0, 0.9);
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.nav__logo {
  font-family: 'Abril Fatface', var(--font-serif);
  font-size: 1.125rem;
  font-weight: 400;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  position: relative;
}

.nav__logo::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 100%;
  height: 1px;
  background: var(--white);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.4s var(--ease-out-expo);
}

.nav__logo:hover::after {
  transform: scaleX(1);
  transform-origin: left;
}

.nav__cta {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 0.6rem 1.5rem;
  border: 1.5px solid rgba(255, 255, 255, 0.25);
  border-radius: 100px;
  transition: all 0.4s var(--ease-out-expo);
  cursor: pointer;
  position: relative;
  overflow: hidden;
}

.nav__cta::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--white);
  transform: translateY(100%);
  transition: transform 0.4s var(--ease-out-expo);
  z-index: -1;
}

.nav__cta:hover {
  color: var(--black);
  border-color: var(--white);
}

.nav__cta:hover::before {
  transform: translateY(0);
}

/* --- Hero Section --- */
.hero {
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 6rem 2rem 4rem;
  position: relative;
  overflow: hidden;
}

/* Subtle radial glow */
.hero::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -55%);
  width: 800px;
  height: 800px;
  background: radial-gradient(
    circle,
    rgba(255, 255, 255, 0.03) 0%,
    transparent 70%
  );
  pointer-events: none;
}

.hero__overline {
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--gray-500);
  margin-bottom: 2.5rem;
  opacity: 0;
  transform: translateY(24px);
  animation: fadeUp 1s var(--ease-out-expo) 0.3s forwards;
  position: relative;
}

.hero__overline::before,
.hero__overline::after {
  content: '—';
  margin: 0 0.75em;
  color: var(--gray-700);
}

.hero__headline {
  font-family: var(--font-serif);
  font-size: clamp(2.75rem, 7.5vw, 7rem);
  font-weight: 400;
  line-height: 1.05;
  letter-spacing: -0.035em;
  max-width: 850px;
  opacity: 0;
  transform: translateY(40px);
  animation: fadeUp 1.2s var(--ease-out-expo) 0.5s forwards;
}

.hero__headline em {
  font-style: italic;
  display: inline;
}

.hero__subline {
  font-size: clamp(0.9375rem, 1.8vw, 1.125rem);
  font-weight: 300;
  color: var(--gray-500);
  max-width: 460px;
  margin-top: 2.5rem;
  line-height: 1.8;
  letter-spacing: 0.01em;
  opacity: 0;
  transform: translateY(24px);
  animation: fadeUp 1s var(--ease-out-expo) 0.8s forwards;
}

.hero__scroll-indicator {
  position: absolute;
  bottom: 2.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  opacity: 0;
  animation: fadeUp 1s var(--ease-out-expo) 1.4s forwards;
}

.hero__scroll-indicator span {
  font-size: 0.625rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gray-700);
}

.hero__scroll-line {
  width: 1px;
  height: 48px;
  position: relative;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.06);
}

.hero__scroll-line::after {
  content: '';
  position: absolute;
  top: -100%;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(to bottom, transparent, var(--gray-400), transparent);
  animation: scrollLine 2.4s ease-in-out infinite;
}

/* --- Divider --- */
.section-divider {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  height: 1px;
  background: linear-gradient(
    to right,
    transparent,
    rgba(255, 255, 255, 0.08),
    transparent
  );
}

/* --- Evolution Section --- */
.evolution {
  padding: var(--section-padding) 2rem;
  position: relative;
}

.evolution__header {
  text-align: center;
  margin-bottom: clamp(4rem, 8vw, 7rem);
}

.evolution__label {
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--gray-600);
  margin-bottom: 1.5rem;
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.8s var(--ease-out-expo);
}

.evolution__label.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.evolution__title {
  font-family: var(--font-serif);
  font-size: clamp(1.75rem, 4vw, 3rem);
  font-weight: 400;
  letter-spacing: -0.02em;
  color: var(--gray-300);
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.8s var(--ease-out-expo) 0.1s;
}

.evolution__title.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Timeline */
.timeline {
  max-width: 780px;
  margin: 0 auto;
  position: relative;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 50%;
  top: 0;
  bottom: 0;
  width: 1px;
  background: linear-gradient(
    to bottom,
    transparent 0%,
    rgba(255, 255, 255, 0.06) 8%,
    rgba(255, 255, 255, 0.1) 50%,
    rgba(255, 255, 255, 0.06) 92%,
    transparent 100%
  );
  transform: translateX(-50%);
}

.timeline__era {
  display: flex;
  align-items: center;
  padding: 2.5rem 0;
  position: relative;
  opacity: 0;
  transform: translateY(50px);
  transition: all 1s var(--ease-out-expo);
}

.timeline__era.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.timeline__era:nth-child(odd) {
  flex-direction: row;
  text-align: right;
  padding-right: calc(50% + 2.5rem);
}

.timeline__era:nth-child(even) {
  flex-direction: row-reverse;
  text-align: left;
  padding-left: calc(50% + 2.5rem);
}

.timeline__dot {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--gray-800);
  border: 1.5px solid var(--gray-700);
  transition: all 0.6s var(--ease-out-expo) 0.2s;
  z-index: 2;
}

.timeline__era.is-visible .timeline__dot {
  background: var(--white);
  border-color: var(--white);
  box-shadow: 0 0 16px rgba(255, 255, 255, 0.12);
}

.timeline__era--current .timeline__dot {
  width: 14px;
  height: 14px;
  border-width: 2px;
}

.timeline__era--current.is-visible .timeline__dot {
  box-shadow: 
    0 0 20px rgba(255, 255, 255, 0.2),
    0 0 40px rgba(255, 255, 255, 0.05);
}

.timeline__year {
  font-size: 0.625rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gray-700);
  margin-bottom: 0.375rem;
  transition: color 0.6s ease;
}

.timeline__era.is-visible .timeline__year {
  color: var(--gray-500);
}

.timeline__era-name {
  font-family: var(--font-serif);
  font-size: 1.5rem;
  font-weight: 400;
  margin-bottom: 0.5rem;
  color: var(--gray-400);
  letter-spacing: -0.01em;
}

.timeline__era--current .timeline__era-name {
  color: var(--white);
  font-size: 1.875rem;
  font-weight: 500;
}

.timeline__description {
  font-size: 0.8125rem;
  font-weight: 300;
  color: var(--gray-600);
  line-height: 1.7;
  max-width: 280px;
}

.timeline__era:nth-child(odd) .timeline__description {
  margin-left: auto;
}

.timeline__era--current .timeline__description {
  color: var(--gray-400);
}

/* --- Features Section --- */
.features {
  padding: var(--section-padding) 2rem;
}

.features__grid {
  max-width: var(--max-width);
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.04);
}

.feature {
  background: var(--black);
  padding: clamp(2rem, 4vw, 3.5rem) clamp(1.5rem, 3vw, 2.5rem);
  text-align: center;
  position: relative;
  opacity: 0;
  transform: translateY(40px);
  transition: all 0.8s var(--ease-out-expo);
  cursor: default;
}

.feature.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.feature::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(
    circle at center,
    rgba(255, 255, 255, 0.02),
    transparent 70%
  );
  opacity: 0;
  transition: opacity 0.5s ease;
}

.feature:hover::after {
  opacity: 1;
}

.feature__icon {
  width: 48px;
  height: 48px;
  margin: 0 auto 1.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  font-size: 1.25rem;
  color: var(--gray-500);
  transition: all 0.4s var(--ease-out-expo);
}

.feature:hover .feature__icon {
  color: var(--white);
  border-color: rgba(255, 255, 255, 0.2);
  transform: translateY(-2px);
}

.feature__name {
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--white);
  margin-bottom: 0.875rem;
}

.feature__detail {
  font-size: 0.8125rem;
  font-weight: 300;
  color: var(--gray-600);
  line-height: 1.75;
}

/* --- Statement/Manifesto Section --- */
.statement {
  padding: var(--section-padding) 2rem;
  display: flex;
  justify-content: center;
  align-items: center;
  text-align: center;
  position: relative;
}

.statement::before {
  content: '"';
  position: absolute;
  top: clamp(40px, 8vw, 100px);
  left: 50%;
  transform: translateX(-50%);
  font-family: var(--font-serif);
  font-size: clamp(4rem, 10vw, 8rem);
  color: rgba(255, 255, 255, 0.03);
  pointer-events: none;
}

.statement__text {
  font-family: var(--font-serif);
  font-size: clamp(1.5rem, 3.5vw, 2.5rem);
  font-weight: 400;
  line-height: 1.5;
  letter-spacing: -0.015em;
  max-width: 680px;
  color: var(--gray-400);
  opacity: 0;
  transform: translateY(40px);
  transition: all 1.2s var(--ease-out-expo);
}

.statement__text.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.statement__text em {
  color: var(--white);
  font-style: italic;
}

/* --- CTA Section --- */
.cta {
  padding: 4rem 2rem var(--section-padding);
  text-align: center;
}

.cta__headline {
  font-family: var(--font-serif);
  font-size: clamp(2.25rem, 5.5vw, 4.5rem);
  font-weight: 400;
  letter-spacing: -0.03em;
  margin-bottom: 1.25rem;
  opacity: 0;
  transform: translateY(24px);
  transition: all 0.8s var(--ease-out-expo);
}

.cta__headline.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.cta__sub {
  font-size: 0.9375rem;
  font-weight: 300;
  color: var(--gray-500);
  margin-bottom: 3.5rem;
  letter-spacing: 0.01em;
  opacity: 0;
  transform: translateY(16px);
  transition: all 0.8s var(--ease-out-expo) 0.15s;
}

.cta__sub.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.cta__buttons {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
  opacity: 0;
  transform: translateY(16px);
  transition: all 0.8s var(--ease-out-expo) 0.3s;
}

.cta__buttons.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.625rem;
  font-family: var(--font-sans);
  font-size: 0.8125rem;
  font-weight: 600;
  padding: 0.875rem 2rem;
  border-radius: 100px;
  border: 1.5px solid;
  cursor: pointer;
  transition: all 0.4s var(--ease-out-expo);
  position: relative;
  overflow: hidden;
}

.btn__icon {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.btn--primary {
  background: var(--white);
  color: var(--black);
  border-color: var(--white);
}

.btn--primary:hover {
  background: var(--gray-200);
  transform: translateY(-1px);
  box-shadow: 0 8px 24px rgba(255, 255, 255, 0.06);
}

.btn--secondary {
  background: transparent;
  color: var(--white);
  border-color: rgba(255, 255, 255, 0.2);
}

.btn--secondary:hover {
  border-color: rgba(255, 255, 255, 0.5);
  transform: translateY(-1px);
}

/* --- Footer --- */
.footer {
  padding: 2rem clamp(1.5rem, 4vw, 3rem);
  border-top: 1px solid rgba(255, 255, 255, 0.04);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.footer__left {
  font-size: 0.6875rem;
  color: var(--gray-700);
  letter-spacing: 0.04em;
  font-weight: 400;
}

.footer__right {
  display: flex;
  gap: 2rem;
}

.footer__link {
  font-size: 0.6875rem;
  color: var(--gray-600);
  letter-spacing: 0.04em;
  font-weight: 400;
  transition: color 0.3s ease;
  position: relative;
}

.footer__link::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 100%;
  height: 1px;
  background: var(--white);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.3s var(--ease-out-expo);
}

.footer__link:hover {
  color: var(--white);
}

.footer__link:hover::after {
  transform: scaleX(1);
  transform-origin: left;
}

/* --- Animations --- */
@keyframes fadeUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes scrollLine {
  0% { top: -100%; }
  100% { top: 200%; }
}

/* --- Stagger children --- */
.feature:nth-child(1) { transition-delay: 0s; }
.feature:nth-child(2) { transition-delay: 0.1s; }
.feature:nth-child(3) { transition-delay: 0.2s; }
.feature:nth-child(4) { transition-delay: 0.3s; }

.timeline__era:nth-child(1) { transition-delay: 0s; }
.timeline__era:nth-child(2) { transition-delay: 0.12s; }
.timeline__era:nth-child(3) { transition-delay: 0.24s; }
.timeline__era:nth-child(4) { transition-delay: 0.36s; }
.timeline__era:nth-child(5) { transition-delay: 0.48s; }

/* --- Responsive --- */
@media (max-width: 900px) {
  .features__grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .nav {
    height: 60px;
  }

  .hero {
    padding: 5rem 1.25rem 4rem;
  }

  .timeline::before {
    left: 20px;
  }

  .timeline__era:nth-child(odd),
  .timeline__era:nth-child(even) {
    flex-direction: row;
    text-align: left;
    padding-left: 48px;
    padding-right: 0;
  }

  .timeline__era:nth-child(odd) .timeline__description {
    margin-left: 0;
  }

  .timeline__dot {
    left: 20px;
  }

  .footer {
    flex-direction: column;
    gap: 1.25rem;
    text-align: center;
    padding: 2rem 1.5rem;
  }

  .footer__right {
    gap: 1.5rem;
  }

  .statement::before {
    display: none;
  }
}

@media (max-width: 480px) {
  .features__grid {
    grid-template-columns: 1fr;
  }

  .hero__overline::before,
  .hero__overline::after {
    display: none;
  }

  .hero__headline {
    font-size: 2.5rem;
  }

  .btn {
    width: 100%;
    justify-content: center;
  }
}

/* --- Grain overlay for texture --- */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.015'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 9999;
  opacity: 0.4;
}
