/* ============================================================
   REST Mail — Ethereal Landing Page
   "Because the mail server protocol is old, and needs to take a REST..."

   Theme: Grey/white palette with warm golden accents.
   Visual metaphor: Legacy protocols ascending to heaven.
   ============================================================ */

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

:root {
  /* Palette — heavenly whites, warm greys, golden light */
  --bg-0: #f8f7f4;
  --bg-1: #ffffff;
  --bg-2: #f1f0ec;
  --bg-3: #e8e6e1;
  --surface: #ffffff;
  --surface-hover: #faf9f7;
  --border: #e0ded8;
  --border-light: #ece9e3;

  --text-0: #1a1714;
  --text-1: #3d3830;
  --text-2: #6b6560;
  --text-3: #9a9590;

  --gold: #c8963e;
  --gold-light: #daa84e;
  --gold-glow: rgba(200, 150, 62, 0.12);
  --gold-soft: rgba(200, 150, 62, 0.06);
  --amber: #e8a849;
  --amber-light: #f0c06a;

  --rest-accent: #5a7a4a;
  --rest-accent-light: #7a9a6a;
  --rest-glow: rgba(90, 122, 74, 0.1);

  --cloud-white: rgba(255, 255, 255, 0.85);
  --cloud-grey: rgba(240, 238, 232, 0.6);

  /* Typography */
  --font-serif: "Cormorant Garamond", "Georgia", "Times New Roman", serif;
  --font-sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-mono: "JetBrains Mono", "SF Mono", "Cascadia Code", "Fira Code", monospace;

  /* Spacing */
  --space-xs: 0.25rem;
  --space-sm: 0.5rem;
  --space-md: 1rem;
  --space-lg: 1.5rem;
  --space-xl: 2.5rem;
  --space-2xl: 4rem;
  --space-3xl: 6rem;
  --space-4xl: 8rem;

  /* Misc */
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --transition: 200ms ease;
  --shadow-soft: 0 2px 12px rgba(0, 0, 0, 0.04), 0 1px 4px rgba(0, 0, 0, 0.03);
  --shadow-card: 0 4px 24px rgba(0, 0, 0, 0.05), 0 1px 6px rgba(0, 0, 0, 0.03);
  --shadow-elevated: 0 8px 40px rgba(0, 0, 0, 0.08), 0 2px 12px rgba(0, 0, 0, 0.04);
}

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

body {
  font-family: var(--font-sans);
  background: var(--bg-0);
  color: var(--text-1);
  line-height: 1.7;
  overflow-x: hidden;
}

a {
  color: var(--gold);
  text-decoration: none;
  transition: color var(--transition);
}

a:hover {
  color: var(--gold-light);
}

a:focus-visible,
button:focus-visible,
.btn:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}

code {
  font-family: var(--font-mono);
  font-size: 0.85em;
  background: var(--bg-2);
  padding: 2px 6px;
  border-radius: var(--radius-sm);
  color: var(--text-0);
}

img { max-width: 100%; height: auto; }

.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 var(--space-lg);
}


/* ============================================================
   ASCENDING PROTOCOLS — background floating elements
   ============================================================ */
.ascending-protocols {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.ascending-ghost {
  position: absolute;
  font-family: var(--font-mono);
  font-weight: 600;
  color: rgba(0, 0, 0, 0.028);
  font-size: 1rem;
  letter-spacing: 0.15em;
  user-select: none;
  animation: floatUp linear infinite;
  will-change: transform, opacity;
}

@keyframes floatUp {
  0% {
    transform: translateY(100vh) rotate(-2deg);
    opacity: 0;
  }
  5% {
    opacity: 1;
  }
  90% {
    opacity: 1;
  }
  100% {
    transform: translateY(-10vh) rotate(2deg);
    opacity: 0;
  }
}


/* ============================================================
   NAVIGATION
   ============================================================ */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: rgba(248, 247, 244, 0.8);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s ease, background 0.3s ease, box-shadow 0.3s ease;
}

.nav.scrolled {
  border-bottom-color: var(--border);
  background: rgba(248, 247, 244, 0.95);
  box-shadow: 0 1px 8px rgba(0, 0, 0, 0.04);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}

.nav-logo {
  font-family: var(--font-serif);
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--text-0);
  letter-spacing: -0.01em;
}

.nav-logo:hover { color: var(--text-0); }

.nav-links {
  display: flex;
  align-items: center;
  gap: var(--space-xl);
}

.nav-links a {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-3);
  transition: color var(--transition);
  letter-spacing: 0.01em;
}

.nav-links a:hover {
  color: var(--text-0);
}

.nav-cta {
  padding: 8px 20px;
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 0.8125rem !important;
  color: var(--text-1) !important;
  transition: all var(--transition) !important;
}

.nav-cta:hover {
  border-color: var(--gold);
  color: var(--gold) !important;
  background: var(--gold-soft);
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}

.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text-1);
  border-radius: 1px;
  transition: all 0.25s ease;
}


/* ============================================================
   HERO — the heavenly memorial
   ============================================================ */
.hero {
  position: relative;
  padding: calc(72px + var(--space-4xl)) 0 var(--space-4xl);
  min-height: 100vh;
  display: flex;
  align-items: center;
  overflow: hidden;
  background:
    radial-gradient(ellipse 80% 60% at 50% 30%, rgba(255, 255, 255, 1) 0%, transparent 70%),
    radial-gradient(ellipse 60% 50% at 50% 80%, rgba(200, 150, 62, 0.06) 0%, transparent 60%),
    linear-gradient(180deg, #faf9f6 0%, var(--bg-0) 100%);
}

/* Sunbeam */
.hero-sunbeam {
  position: absolute;
  top: -20%;
  left: 50%;
  transform: translateX(-50%);
  width: 400px;
  height: 120%;
  background: linear-gradient(
    180deg,
    rgba(218, 168, 78, 0.08) 0%,
    rgba(218, 168, 78, 0.03) 40%,
    transparent 70%
  );
  clip-path: polygon(40% 0%, 60% 0%, 75% 100%, 25% 100%);
  pointer-events: none;
  z-index: 0;
}

/* Clouds */
.hero-clouds {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 1;
}

.cloud {
  position: absolute;
  border-radius: 50%;
  background: radial-gradient(ellipse at center, rgba(255, 255, 255, 0.6) 0%, rgba(255, 255, 255, 0) 70%);
  filter: blur(30px);
}

.cloud-1 {
  width: 600px;
  height: 200px;
  top: 8%;
  left: -10%;
  animation: cloudDrift 30s ease-in-out infinite;
}

.cloud-2 {
  width: 500px;
  height: 160px;
  top: 5%;
  right: -5%;
  animation: cloudDrift 25s ease-in-out infinite reverse;
}

.cloud-3 {
  width: 400px;
  height: 140px;
  top: 15%;
  left: 30%;
  animation: cloudDrift 35s ease-in-out infinite;
  animation-delay: -10s;
}

.cloud-4 {
  width: 300px;
  height: 120px;
  bottom: 20%;
  left: 5%;
  animation: cloudDrift 28s ease-in-out infinite reverse;
  animation-delay: -5s;
}

.cloud-5 {
  width: 350px;
  height: 130px;
  bottom: 15%;
  right: 10%;
  animation: cloudDrift 32s ease-in-out infinite;
  animation-delay: -15s;
}

@keyframes cloudDrift {
  0%, 100% { transform: translateX(0); }
  50% { transform: translateX(40px); }
}

.hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  max-width: 760px;
  margin: 0 auto;
}

/* The "memorial" epitaph for protocols */
.hero-epitaph {
  margin-bottom: var(--space-xl);
}

.epitaph-cross {
  font-size: 2rem;
  color: var(--text-3);
  margin-bottom: var(--space-sm);
  opacity: 0.5;
}

.epitaph-protocols {
  display: flex;
  justify-content: center;
  gap: var(--space-xl);
}

.protocol-ghost {
  font-family: var(--font-mono);
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  color: var(--text-3);
  opacity: 0.6;
  position: relative;
  padding-bottom: 4px;
  animation: gentleFloat 6s ease-in-out infinite;
}

.protocol-ghost[data-protocol="IMAP"] {
  animation-delay: -2s;
}

.protocol-ghost[data-protocol="POP3"] {
  animation-delay: -4s;
}

@keyframes gentleFloat {
  0%, 100% { transform: translateY(0); opacity: 0.6; }
  50% { transform: translateY(-6px); opacity: 0.4; }
}

.hero-title {
  font-family: var(--font-serif);
  font-size: clamp(3.5rem, 10vw, 6.5rem);
  font-weight: 700;
  color: var(--text-0);
  line-height: 1.0;
  letter-spacing: -0.03em;
  margin-bottom: var(--space-md);
}

.hero-tagline {
  font-family: var(--font-serif);
  font-size: clamp(1.125rem, 2.5vw, 1.5rem);
  font-style: italic;
  color: var(--text-2);
  margin-bottom: var(--space-xl);
  font-weight: 400;
}

.hero-subtitle {
  font-size: clamp(0.9375rem, 1.5vw, 1.0625rem);
  color: var(--text-2);
  max-width: 580px;
  margin: 0 auto var(--space-xl);
  line-height: 1.8;
}

.hero-actions {
  display: flex;
  gap: var(--space-md);
  justify-content: center;
  flex-wrap: wrap;
}


/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 32px;
  border-radius: 999px;
  font-size: 0.9375rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
  border: 1px solid transparent;
  letter-spacing: 0.01em;
}

.btn svg {
  flex-shrink: 0;
}

.btn-primary {
  background: var(--gold);
  color: #fff;
  border-color: var(--gold);
  box-shadow: 0 2px 12px rgba(200, 150, 62, 0.25);
}

.btn-primary:hover {
  background: var(--gold-light);
  border-color: var(--gold-light);
  color: #fff;
  box-shadow: 0 4px 20px rgba(200, 150, 62, 0.35);
  transform: translateY(-1px);
}

.btn-ghost {
  background: var(--bg-1);
  color: var(--text-1);
  border-color: var(--border);
  box-shadow: var(--shadow-soft);
}

.btn-ghost:hover {
  border-color: var(--text-3);
  color: var(--text-0);
  box-shadow: var(--shadow-card);
  transform: translateY(-1px);
}


/* ============================================================
   SECTION HEADER — Roman numerals, serif titles
   ============================================================ */
.section-header {
  text-align: center;
  margin-bottom: var(--space-3xl);
}

.section-number {
  display: inline-block;
  font-family: var(--font-serif);
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--gold);
  letter-spacing: 0.15em;
  margin-bottom: var(--space-sm);
  position: relative;
}

.section-number::before,
.section-number::after {
  content: "";
  display: inline-block;
  width: 32px;
  height: 1px;
  background: var(--border);
  vertical-align: middle;
  margin: 0 12px;
}

.section-header h2 {
  font-family: var(--font-serif);
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 600;
  color: var(--text-0);
  letter-spacing: -0.02em;
  line-height: 1.15;
  margin-bottom: var(--space-sm);
}

.section-desc {
  font-size: 1.0625rem;
  color: var(--text-2);
  max-width: 560px;
  margin: 0 auto;
  line-height: 1.7;
}


/* ============================================================
   2. WHAT IS REST MAIL?
   ============================================================ */
.what-section {
  padding: var(--space-4xl) 0;
  background: var(--bg-1);
  position: relative;
}

.what-section::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--border), transparent);
}

.what-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-3xl);
  max-width: 900px;
  margin: 0 auto;
}

.what-problem, .what-solution {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.what-problem.visible, .what-solution.visible {
  opacity: 1;
  transform: translateY(0);
}

.what-solution {
  transition-delay: 0.15s;
}

.what-problem h3,
.what-solution h3 {
  font-family: var(--font-serif);
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--text-0);
  margin-bottom: var(--space-md);
}

.what-problem p,
.what-solution p {
  color: var(--text-2);
  line-height: 1.8;
  margin-bottom: var(--space-md);
}

.what-problem p:last-child,
.what-solution p:last-child {
  margin-bottom: 0;
}

.what-problem h3 {
  color: var(--text-3);
}

.what-solution h3 {
  color: var(--rest-accent);
}


/* ============================================================
   3. HOW IT WORKS — Architecture flow
   ============================================================ */
.how-section {
  padding: var(--space-4xl) 0;
  background:
    radial-gradient(ellipse 70% 50% at 50% 0%, rgba(200, 150, 62, 0.04) 0%, transparent 50%),
    var(--bg-0);
}

.arch-flow {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: 0;
  margin-bottom: var(--space-3xl);
  overflow-x: auto;
  padding: var(--space-lg) 0;
}

.flow-column {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
  min-width: 160px;
  flex: 0 1 200px;
}

.flow-header {
  font-family: var(--font-serif);
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text-3);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding-bottom: var(--space-sm);
  border-bottom: 1px solid var(--border);
  margin-bottom: var(--space-xs);
  text-align: center;
}

.flow-card {
  padding: 16px 18px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--bg-1);
  box-shadow: var(--shadow-soft);
  transition: all 0.3s ease;
  text-align: center;
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.5s ease, transform 0.5s ease, border-color var(--transition), box-shadow 0.3s ease;
}

.flow-card.visible {
  opacity: 1;
  transform: translateY(0);
}

.flow-card:hover {
  box-shadow: var(--shadow-card);
  transform: translateY(-2px);
}

.flow-card-icon {
  margin-bottom: var(--space-sm);
  color: var(--text-3);
}

.flow-card-title {
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text-0);
  margin-bottom: 2px;
}

.flow-card-detail {
  font-size: 0.75rem;
  color: var(--text-3);
}

.flow-card-legacy {
  border-color: var(--border);
}

.flow-card-gateway {
  border-color: var(--border);
  background: var(--bg-2);
}

.flow-card-core {
  border-color: var(--gold);
  background: var(--gold-soft);
  box-shadow: 0 4px 24px rgba(200, 150, 62, 0.08);
}

.flow-card-core:hover {
  box-shadow: 0 8px 32px rgba(200, 150, 62, 0.12);
}

.flow-arrows {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
  padding-top: 40px;
  min-width: 80px;
  max-width: 100px;
  align-items: center;
  justify-content: flex-start;
}

.flow-arrow {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  height: 72px;
  justify-content: center;
}

.flow-arrow-label {
  font-family: var(--font-mono);
  font-size: 0.625rem;
  letter-spacing: 0.06em;
  color: var(--text-3);
  text-transform: uppercase;
}

.flow-arrow-line {
  width: 48px;
  height: 2px;
  background: var(--border);
  position: relative;
}

.flow-arrow-line::after {
  content: "";
  position: absolute;
  right: -4px;
  top: -3px;
  width: 8px;
  height: 8px;
  border-right: 2px solid var(--border);
  border-top: 2px solid var(--border);
  transform: rotate(45deg);
}

.flow-arrow-line-rest {
  background: var(--gold);
}

.flow-arrow-line-rest::after {
  border-color: var(--gold);
}

/* Three domains */
.domains-demo {
  max-width: 800px;
  margin: 0 auto;
  text-align: center;
}

.domains-demo h3 {
  font-family: var(--font-serif);
  font-size: 1.375rem;
  font-weight: 600;
  color: var(--text-0);
  margin-bottom: var(--space-xl);
}

.domains-grid {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-md);
  flex-wrap: wrap;
  margin-bottom: var(--space-lg);
}

.domain-card {
  padding: var(--space-lg) var(--space-xl);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--bg-1);
  box-shadow: var(--shadow-soft);
  min-width: 140px;
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

.domain-card.visible {
  opacity: 1;
  transform: translateY(0);
}

.domain-card-rest {
  border-color: var(--gold);
  background: var(--gold-soft);
  box-shadow: 0 4px 20px rgba(200, 150, 62, 0.1);
}

.domain-name {
  font-family: var(--font-mono);
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-0);
  margin-bottom: 4px;
}

.domain-type {
  font-size: 0.6875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-3);
  margin-bottom: 2px;
}

.domain-type-rest {
  color: var(--gold);
}

.domain-desc {
  font-size: 0.75rem;
  color: var(--text-3);
}

.domain-arrow {
  color: var(--text-3);
  flex-shrink: 0;
}

.domain-arrow-upgrade {
  color: var(--gold);
}

.domains-caption {
  max-width: 620px;
  margin: 0 auto;
  font-size: 0.9375rem;
  color: var(--text-2);
  line-height: 1.7;
}


/* ============================================================
   4. THE RESTMAIL PROTOCOL
   ============================================================ */
.protocol-section {
  padding: var(--space-4xl) 0;
  background: var(--bg-1);
  position: relative;
}

.protocol-section::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--border), transparent);
}

.protocol-steps {
  max-width: 720px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: var(--space-2xl);
}

.protocol-step {
  display: flex;
  gap: var(--space-xl);
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.protocol-step.visible {
  opacity: 1;
  transform: translateY(0);
}

.step-number {
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--gold);
  border-radius: 50%;
  font-family: var(--font-serif);
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--gold);
  background: var(--gold-soft);
}

.step-content {
  flex: 1;
  min-width: 0;
}

.step-content h3 {
  font-family: var(--font-serif);
  font-size: 1.375rem;
  font-weight: 600;
  color: var(--text-0);
  margin-bottom: var(--space-sm);
}

.step-content p {
  color: var(--text-2);
  line-height: 1.7;
  margin-bottom: var(--space-md);
}

.step-code {
  background: var(--text-0);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-card);
}

.step-code pre {
  padding: 20px 24px;
  overflow-x: auto;
}

.step-code code {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: #e2dfd8;
  line-height: 1.7;
  background: transparent;
  padding: 0;
  border-radius: 0;
}


/* ============================================================
   5. FEATURES
   ============================================================ */
.features-section {
  padding: var(--space-4xl) 0;
  background:
    radial-gradient(ellipse 60% 40% at 30% 50%, rgba(200, 150, 62, 0.03) 0%, transparent 50%),
    radial-gradient(ellipse 60% 40% at 70% 50%, rgba(90, 122, 74, 0.03) 0%, transparent 50%),
    var(--bg-0);
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-lg);
}

.feature-card {
  padding: var(--space-xl) var(--space-xl) var(--space-lg);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  background: var(--bg-1);
  box-shadow: var(--shadow-soft);
  transition: all 0.3s ease;
  opacity: 0;
  transform: translateY(16px);
}

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

.feature-card:hover {
  border-color: var(--gold);
  box-shadow: var(--shadow-elevated);
  transform: translateY(-4px);
}

.feature-icon-wrap {
  width: 52px;
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-md);
  background: var(--gold-soft);
  border: 1px solid var(--gold-glow);
  margin-bottom: var(--space-md);
  color: var(--gold);
}

.feature-card h3 {
  font-family: var(--font-serif);
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text-0);
  margin-bottom: var(--space-sm);
}

.feature-card p {
  font-size: 0.9rem;
  color: var(--text-2);
  line-height: 1.7;
}


/* ============================================================
   6. ARCHITECTURE — Tech stack
   ============================================================ */
.architecture-section {
  padding: var(--space-4xl) 0;
  background: var(--bg-1);
  position: relative;
}

.architecture-section::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--border), transparent);
}

.stack-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-lg);
}

.stack-card {
  padding: var(--space-xl);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  background: var(--bg-0);
  box-shadow: var(--shadow-soft);
  transition: all 0.3s ease;
  opacity: 0;
  transform: translateY(16px);
}

.stack-card.visible {
  opacity: 1;
  transform: translateY(0);
}

.stack-card:hover {
  box-shadow: var(--shadow-card);
  transform: translateY(-3px);
}

.stack-icon {
  margin-bottom: var(--space-md);
  color: var(--text-3);
}

.stack-card h3 {
  font-family: var(--font-serif);
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text-0);
  margin-bottom: var(--space-sm);
}

.stack-card p {
  font-size: 0.875rem;
  color: var(--text-2);
  line-height: 1.7;
}


/* ============================================================
   7. ABOUT
   ============================================================ */
.about-section {
  padding: var(--space-4xl) 0;
  background:
    radial-gradient(ellipse 70% 50% at 50% 100%, rgba(200, 150, 62, 0.04) 0%, transparent 50%),
    var(--bg-0);
}

.about-content {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: var(--space-3xl);
  max-width: 860px;
  margin: 0 auto;
}

.about-text p {
  color: var(--text-2);
  line-height: 1.8;
  margin-bottom: var(--space-lg);
  font-size: 1.0625rem;
}

.about-text p:last-child {
  margin-bottom: 0;
}

.about-meta {
  display: flex;
  flex-direction: column;
  gap: var(--space-lg);
  padding-top: var(--space-sm);
}

.about-meta-item {
  padding-bottom: var(--space-lg);
  border-bottom: 1px solid var(--border-light);
}

.about-meta-item:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.about-meta-label {
  font-family: var(--font-serif);
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-3);
  margin-bottom: 4px;
}

.about-meta-value {
  font-size: 1rem;
  color: var(--text-0);
  font-weight: 500;
}

.about-meta-value a {
  color: var(--gold);
}


/* ============================================================
   8. FOOTER
   ============================================================ */
.footer {
  padding: var(--space-3xl) 0 var(--space-xl);
  background: var(--text-0);
  color: rgba(255, 255, 255, 0.5);
}

.footer-inner {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: var(--space-2xl);
  flex-wrap: wrap;
  gap: var(--space-xl);
}

.footer-logo {
  font-family: var(--font-serif);
  font-size: 1.5rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.9);
  margin-bottom: var(--space-sm);
}

.footer-brand p {
  font-size: 0.875rem;
  color: rgba(255, 255, 255, 0.4);
  font-style: italic;
  max-width: 320px;
}

.footer-links {
  display: flex;
  gap: var(--space-xl);
}

.footer-links a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.875rem;
  color: rgba(255, 255, 255, 0.5);
  transition: color var(--transition);
}

.footer-links a:hover {
  color: rgba(255, 255, 255, 0.9);
}

.footer-links svg {
  flex-shrink: 0;
}

.footer-bottom {
  padding-top: var(--space-xl);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  text-align: center;
}

.footer-bottom p {
  font-size: 0.8125rem;
  color: rgba(255, 255, 255, 0.3);
}

.footer-bottom strong {
  font-weight: 600;
  color: rgba(255, 255, 255, 0.5);
}


/* ============================================================
   ANIMATIONS & SCROLL EFFECTS
   ============================================================ */

/* Stagger feature cards */
.features-grid .feature-card:nth-child(2) { transition-delay: 0.06s; }
.features-grid .feature-card:nth-child(3) { transition-delay: 0.12s; }
.features-grid .feature-card:nth-child(4) { transition-delay: 0.18s; }
.features-grid .feature-card:nth-child(5) { transition-delay: 0.24s; }
.features-grid .feature-card:nth-child(6) { transition-delay: 0.30s; }
.features-grid .feature-card:nth-child(7) { transition-delay: 0.36s; }
.features-grid .feature-card:nth-child(8) { transition-delay: 0.42s; }
.features-grid .feature-card:nth-child(9) { transition-delay: 0.48s; }

/* Stagger stack cards */
.stack-grid .stack-card:nth-child(2) { transition-delay: 0.06s; }
.stack-grid .stack-card:nth-child(3) { transition-delay: 0.12s; }
.stack-grid .stack-card:nth-child(4) { transition-delay: 0.18s; }
.stack-grid .stack-card:nth-child(5) { transition-delay: 0.24s; }
.stack-grid .stack-card:nth-child(6) { transition-delay: 0.30s; }

/* Stagger protocol steps */
.protocol-steps .protocol-step:nth-child(2) { transition-delay: 0.1s; }
.protocol-steps .protocol-step:nth-child(3) { transition-delay: 0.2s; }

/* Stagger domain cards */
.domains-grid .domain-card:nth-child(3) { transition-delay: 0.08s; }
.domains-grid .domain-card:nth-child(5) { transition-delay: 0.16s; }

/* Stagger flow cards */
.arch-flow .flow-card:nth-child(2) { transition-delay: 0.06s; }


/* ============================================================
   NO-JS FALLBACK
   ============================================================ */
html:not(.js-ready) .feature-card,
html:not(.js-ready) .stack-card,
html:not(.js-ready) .flow-card,
html:not(.js-ready) .domain-card,
html:not(.js-ready) .protocol-step,
html:not(.js-ready) .what-problem,
html:not(.js-ready) .what-solution {
  opacity: 1;
  transform: none;
}


/* ============================================================
   REDUCED MOTION
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }

  .feature-card,
  .stack-card,
  .flow-card,
  .domain-card,
  .protocol-step,
  .what-problem,
  .what-solution,
  .ascending-ghost {
    opacity: 1;
    transform: none;
  }
}


/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1024px) {
  .features-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .stack-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .arch-flow {
    flex-direction: column;
    align-items: center;
  }

  .flow-column {
    width: 100%;
    max-width: 300px;
  }

  .flow-arrows {
    flex-direction: row;
    padding: 0;
    max-width: 300px;
    width: 100%;
    justify-content: space-around;
    min-width: unset;
  }

  .flow-arrow {
    height: auto;
  }

  .flow-arrow-line {
    width: 32px;
    height: 2px;
    transform: rotate(90deg);
  }

  .about-content {
    grid-template-columns: 1fr;
    gap: var(--space-xl);
  }
}

@media (max-width: 768px) {
  .nav-links {
    display: none;
    position: absolute;
    top: 72px;
    left: 0;
    right: 0;
    flex-direction: column;
    background: rgba(248, 247, 244, 0.98);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
    padding: var(--space-lg);
    gap: var(--space-md);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.06);
  }

  .nav-links.open {
    display: flex;
  }

  .nav-toggle {
    display: flex;
  }

  .what-grid {
    grid-template-columns: 1fr;
    gap: var(--space-xl);
  }

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

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

  .domains-grid {
    flex-direction: column;
  }

  .domain-arrow {
    transform: rotate(90deg);
  }

  .protocol-step {
    flex-direction: column;
    gap: var(--space-md);
  }

  .footer-inner {
    flex-direction: column;
    gap: var(--space-lg);
  }

  .footer-links {
    flex-direction: column;
    gap: var(--space-md);
  }

  .hero-title {
    font-size: clamp(2.75rem, 9vw, 4.5rem);
  }
}

@media (max-width: 480px) {
  .hero-actions {
    flex-direction: column;
    align-items: center;
  }

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

  .epitaph-protocols {
    gap: var(--space-lg);
  }

  .step-code pre {
    padding: 16px;
  }

  .step-code code {
    font-size: 0.7rem;
  }
}


/* ============================================================
   UTILITY
   ============================================================ */
::selection {
  background: rgba(200, 150, 62, 0.2);
  color: var(--text-0);
}

::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: var(--bg-0);
}

::-webkit-scrollbar-thumb {
  background: var(--bg-3);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--text-3);
}
