/* ─── Landing — modern editorial layout ─── */

.page-grid {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background-image:
    linear-gradient(var(--border) 1px, transparent 1px),
    linear-gradient(90deg, var(--border) 1px, transparent 1px);
  background-size: 80px 80px;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, black 20%, transparent 70%);
  opacity: 0.4;
}

/* Hero */
.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 8rem var(--page-pad) 6rem;
  overflow: hidden;
}

.hero-mesh {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}

.hero-mesh::before {
  content: '';
  position: absolute;
  width: 70vw;
  height: 70vw;
  max-width: 900px;
  top: -20%;
  right: -15%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(139, 124, 246, 0.18) 0%, transparent 65%);
  filter: blur(60px);
  animation: mesh-drift 20s ease-in-out infinite alternate;
}

.hero-mesh::after {
  content: '';
  position: absolute;
  width: 50vw;
  height: 50vw;
  max-width: 600px;
  bottom: -10%;
  left: -10%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(212, 168, 83, 0.08) 0%, transparent 65%);
  filter: blur(80px);
  animation: mesh-drift 26s ease-in-out infinite alternate-reverse;
}

@keyframes mesh-drift {
  to {
    transform: translate(5%, 8%) scale(1.08);
  }
}

.hero-grid {
  max-width: var(--max);
  margin: 0 auto;
  width: 100%;
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: clamp(3rem, 6vw, 5rem);
  align-items: center;
  position: relative;
  z-index: 1;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.45rem 0.9rem 0.45rem 0.55rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.04);
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: 1.75rem;
  backdrop-filter: blur(8px);
}

.hero-badge-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 12px var(--accent-glow);
  animation: pulse-dot 2.5s ease-in-out infinite;
}

@keyframes pulse-dot {
  0%,
  100% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0.6;
    transform: scale(0.85);
  }
}

.hero h1 {
  font-family: var(--font-display);
  font-size: clamp(2.25rem, 5vw, 3.75rem);
  font-weight: 500;
  line-height: 1.08;
  letter-spacing: -0.025em;
  margin: 0 0 1.5rem;
}

.hero h1 .line-accent {
  display: block;
  color: var(--warm-light);
  font-style: italic;
  font-weight: 400;
}

/* Word-level reveal targets — split by JS; plain text if JS never runs */
.hero h1 .word-wrap {
  display: inline-block;
  overflow: hidden;
  vertical-align: top;
}

.hero h1 .word {
  display: inline-block;
  will-change: transform;
}

.hero-lead {
  font-size: clamp(1rem, 1.8vw, 1.125rem);
  color: var(--text-secondary);
  max-width: 30rem;
  line-height: 1.75;
  margin: 0 0 2.25rem;
  font-weight: 400;
}

.hero-lead strong {
  color: var(--text);
  font-weight: 600;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: center;
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.95rem 1.5rem;
  background: var(--accent);
  color: #fff;
  font-weight: 600;
  font-size: 0.875rem;
  letter-spacing: -0.01em;
  border-radius: 999px;
  border: none;
  cursor: default;
  box-shadow: 0 4px 24px var(--accent-glow);
  transition:
    transform 0.35s var(--ease-out),
    box-shadow 0.35s,
    background 0.35s;
}

.btn-primary:hover {
  transform: translateY(-2px);
  background: var(--accent-bright);
  box-shadow: 0 8px 32px var(--accent-glow);
}

.btn-ghost {
  font-size: 0.85rem;
  color: var(--text-muted);
  letter-spacing: -0.01em;
}

.btn-ghost strong {
  color: var(--text-secondary);
  font-weight: 600;
}

.hero-visual {
  position: relative;
  display: flex;
  justify-content: center;
  perspective: 1200px;
}

.hero-visual-glow {
  position: absolute;
  width: 80%;
  height: 60%;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: radial-gradient(ellipse, rgba(139, 124, 246, 0.2) 0%, transparent 70%);
  filter: blur(40px);
  pointer-events: none;
}

.phone-frame {
  width: min(100%, 290px);
  aspect-ratio: 9 / 19.5;
  border-radius: 2.75rem;
  border: 1px solid var(--border-strong);
  background: var(--surface-solid);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.04),
    0 50px 100px -20px rgba(0, 0, 0, 0.7),
    0 0 80px rgba(139, 124, 246, 0.12);
  padding: 0.55rem;
  transform: rotateY(-8deg) rotateX(4deg);
  transition: transform 0.8s var(--ease-out);
  will-change: transform;
}

.phone-frame--photo {
  overflow: hidden;
}

.phone-frame--photo img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  border-radius: 2.35rem;
}

.scroll-hint {
  position: absolute;
  bottom: 2.5rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.6rem;
  color: var(--text-muted);
  font-size: 0.65rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  z-index: 1;
}

.scroll-hint span {
  width: 1px;
  height: 2.5rem;
  background: linear-gradient(to bottom, var(--accent-dim), transparent);
  animation: scroll-pulse 2s ease-in-out infinite;
}

@keyframes scroll-pulse {
  0%,
  100% {
    opacity: 0.35;
    transform: scaleY(0.75);
  }
  50% {
    opacity: 1;
    transform: scaleY(1);
  }
}

/* Marquee */
.marquee-section {
  border-block: 1px solid var(--border);
  padding: 1.1rem 0;
  overflow: hidden;
  background: var(--bg-elevated);
  position: relative;
  z-index: 1;
}

.marquee-track {
  display: flex;
  width: max-content;
  animation: marquee 45s linear infinite;
}

.marquee-track:hover {
  animation-play-state: paused;
}

/* JS takes over the loop (scroll-velocity-reactive); CSS keyframes are the fallback */
.marquee-track.gsap-driven {
  animation: none;
}

@keyframes marquee {
  to {
    transform: translateX(-50%);
  }
}

.marquee-item {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0 2.5rem;
  white-space: nowrap;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-muted);
  letter-spacing: -0.01em;
}

.marquee-item .native {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 500;
  color: var(--warm-light);
  letter-spacing: 0;
}

.marquee-dot {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: var(--border-strong);
}

/* Sections */
.section {
  padding: clamp(5rem, 12vw, 9rem) var(--page-pad);
  max-width: var(--max);
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

.section--wide {
  max-width: none;
}

.section-header {
  margin-bottom: clamp(2.5rem, 5vw, 4rem);
}

.section-header.center {
  text-align: center;
  max-width: 42rem;
  margin-left: auto;
  margin-right: auto;
}

.section-index {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent-bright);
  margin-bottom: 1.25rem;
  font-variant-numeric: tabular-nums;
}

.section-index::after {
  content: '';
  width: 2.5rem;
  height: 1px;
  background: linear-gradient(90deg, var(--accent-dim), transparent);
}

.section-header.center .section-index::after {
  display: none;
}

.section-title {
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 3.5vw, 2.65rem);
  font-weight: 500;
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin: 0 0 1.25rem;
}

.section-desc {
  color: var(--text-secondary);
  font-size: 1.05rem;
  line-height: 1.7;
  max-width: 36rem;
  letter-spacing: -0.01em;
}

.section-header.center .section-desc {
  margin: 0 auto;
}

.reveal {
  opacity: 0;
  transform: translateY(32px);
  transition:
    opacity 0.8s var(--ease-out),
    transform 0.8s var(--ease-out);
}

.reveal.is-visible {
  opacity: 1;
  transform: none;
}

.reveal-stagger > * {
  opacity: 0;
  transform: translateY(24px);
  transition:
    opacity 0.7s var(--ease-out),
    transform 0.7s var(--ease-out);
}

.reveal-stagger.is-visible > *:nth-child(1) {
  transition-delay: 0.05s;
}
.reveal-stagger.is-visible > *:nth-child(2) {
  transition-delay: 0.1s;
}
.reveal-stagger.is-visible > *:nth-child(3) {
  transition-delay: 0.15s;
}
.reveal-stagger.is-visible > *:nth-child(4) {
  transition-delay: 0.2s;
}
.reveal-stagger.is-visible > *:nth-child(5) {
  transition-delay: 0.25s;
}
.reveal-stagger.is-visible > *:nth-child(6) {
  transition-delay: 0.3s;
}
.reveal-stagger.is-visible > *:nth-child(7) {
  transition-delay: 0.35s;
}
.reveal-stagger.is-visible > *:nth-child(8) {
  transition-delay: 0.4s;
}
.reveal-stagger.is-visible > *:nth-child(9) {
  transition-delay: 0.45s;
}

.reveal-stagger.is-visible > * {
  opacity: 1;
  transform: none;
}

/* Core language grid — Greek / Latin / Syriac */
.lang-core-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}

.lang-core-card {
  padding: 2.25rem 1.75rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  text-align: left;
  transition:
    border-color 0.35s,
    transform 0.45s var(--ease-out),
    background 0.35s;
  position: relative;
  overflow: hidden;
}

.lang-core-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(139, 124, 246, 0.09) 0%, transparent 65%);
  opacity: 0;
  transition: opacity 0.4s;
}

.lang-core-card:hover {
  border-color: rgba(139, 124, 246, 0.3);
  transform: translateY(-4px);
  background: var(--surface-hover);
}

.lang-core-card:hover::before {
  opacity: 1;
}

.lang-core-card .eyebrow {
  position: relative;
  display: block;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--warm-light);
  margin-bottom: 1.1rem;
}

.lang-core-card .native {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 500;
  color: var(--text);
  margin-bottom: 0.35rem;
  line-height: 1.15;
  position: relative;
}

.lang-core-card .english {
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--text-secondary);
  letter-spacing: -0.01em;
  position: relative;
  margin-bottom: 1.1rem;
}

.lang-core-card .detail {
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.6;
  position: relative;
  border-top: 1px solid var(--border);
  padding-top: 1rem;
}

/* Expanding languages — honest "growing" strip, not equal billing with core */
.lang-expanding {
  margin-top: clamp(2.5rem, 5vw, 3.5rem);
}

.lang-expanding-label {
  display: flex;
  align-items: baseline;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
  font-size: 0.82rem;
  color: var(--text-muted);
}

.lang-expanding-label strong {
  color: var(--text-secondary);
  font-weight: 600;
}

.lang-expanding-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.lang-chip {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
  padding: 0.7rem 1.1rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: transparent;
  transition: border-color 0.3s, background 0.3s;
}

.lang-chip:hover {
  border-color: var(--border-strong);
  background: var(--surface);
}

.lang-chip .native {
  font-family: var(--font-display);
  font-size: 1rem;
  color: var(--warm-light);
}

.lang-chip .english {
  font-size: 0.78rem;
  color: var(--text-muted);
}

/* Bento */
.bento {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 0.85rem;
}

.bento-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: clamp(1.5rem, 3vw, 2.25rem);
  position: relative;
  overflow: hidden;
  transition:
    border-color 0.35s,
    transform 0.4s var(--ease-out);
}

.bento-card:hover {
  border-color: rgba(139, 124, 246, 0.25);
  transform: translateY(-2px);
}

.bento-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(139, 124, 246, 0.4), transparent);
  opacity: 0;
  transition: opacity 0.35s;
}

.bento-card:hover::before {
  opacity: 1;
}

.bento-card h3 {
  font-family: var(--font-ui);
  font-size: 1.05rem;
  font-weight: 600;
  margin: 0 0 0.65rem;
  color: var(--text);
  letter-spacing: -0.015em;
}

.bento-card p {
  margin: 0;
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.65;
}

.bento-card .num {
  font-family: var(--font-ui);
  font-size: clamp(2.25rem, 4vw, 3.25rem);
  font-weight: 600;
  color: var(--accent-bright);
  line-height: 1;
  margin-bottom: 0.5rem;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
}

.bento-span-8 {
  grid-column: span 8;
}
.bento-span-6 {
  grid-column: span 6;
}
.bento-span-4 {
  grid-column: span 4;
}

/* Pull-quote interludes — real patristic text, cited, bilingual where sourced */
.pull-quote-section {
  padding: clamp(5rem, 11vw, 8rem) var(--page-pad);
  max-width: 52rem;
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

.pull-quote {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 0.25rem 1.25rem;
}

.pull-quote-cap {
  flex: none;
  font-family: var(--font-display);
  font-size: clamp(4rem, 9vw, 6.5rem);
  line-height: 0.8;
  font-weight: 500;
  color: var(--ink-bright);
  padding-top: 0.4rem;
}

.pull-quote-body {
  flex: 1 1 auto;
  min-width: 0;
}

.pull-quote-text {
  font-family: var(--font-display);
  font-size: clamp(1.35rem, 2.6vw, 1.85rem);
  font-weight: 400;
  font-style: italic;
  line-height: 1.45;
  letter-spacing: -0.01em;
  color: var(--text);
  margin: 0;
}

.pull-quote-text .first-word-rest {
  /* the remainder of the first word, set beside the drop cap */
}

.pull-quote-translation {
  font-family: var(--font-display);
  font-size: clamp(0.95rem, 1.6vw, 1.1rem);
  color: var(--text-muted);
  margin: 0.9rem 0 0;
  line-height: 1.6;
}

.pull-quote-cite {
  display: block;
  margin-top: 1.5rem;
  font-family: var(--font-ui);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.pull-quote-cite::before {
  content: '— ';
  color: var(--ink-bright);
}

/* Authors */
.authors-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: center;
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 var(--page-pad);
}

.author-pill {
  padding: 0.5rem 1rem;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-secondary);
  border: 1px solid var(--border);
  background: var(--surface);
  transition:
    color 0.2s,
    border-color 0.2s,
    background 0.2s;
  letter-spacing: -0.01em;
}

.author-pill:hover {
  color: var(--text);
  border-color: rgba(139, 124, 246, 0.3);
  background: var(--surface-hover);
}

/* Screenshots */
.screenshot-wrap {
  position: relative;
}

.screenshot-wrap::before,
.screenshot-wrap::after {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  width: clamp(2rem, 8vw, 6rem);
  z-index: 2;
  pointer-events: none;
}

.screenshot-wrap::before {
  left: 0;
  background: linear-gradient(90deg, var(--bg) 0%, transparent 100%);
}

.screenshot-wrap::after {
  right: 0;
  background: linear-gradient(270deg, var(--bg) 0%, transparent 100%);
}

.screenshot-gallery {
  display: flex;
  gap: 1.5rem;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding: 1rem var(--page-pad) 2rem;
  margin: 0;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.screenshot-gallery::-webkit-scrollbar {
  display: none;
}

.screenshot-card {
  flex: 0 0 min(240px, 68vw);
  scroll-snap-align: center;
  margin: 0;
}

.screenshot-frame {
  border-radius: 1.85rem;
  border: 1px solid var(--border-strong);
  background: var(--surface-solid);
  box-shadow: 0 32px 64px -24px rgba(0, 0, 0, 0.6);
  overflow: hidden;
  aspect-ratio: 9 / 19.5;
  transition: transform 0.5s var(--ease-out);
}

.screenshot-card:hover .screenshot-frame {
  transform: translateY(-6px) scale(1.02);
}

.screenshot-frame img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
}

.screenshot-card figcaption {
  margin-top: 1rem;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-muted);
  text-align: center;
}

/* Stats */
.stats-band {
  border-block: 1px solid var(--border);
  padding: clamp(3.5rem, 7vw, 5.5rem) var(--page-pad);
  background: var(--bg-elevated);
  position: relative;
  z-index: 1;
}

.stats-grid {
  max-width: var(--max);
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
}

.stat-item {
  text-align: center;
  padding: 0 1.5rem;
  border-right: 1px solid var(--border);
}

.stat-item:last-child {
  border-right: none;
}

.stat-item strong {
  display: block;
  font-family: var(--font-ui);
  font-size: clamp(2.25rem, 4.5vw, 3.5rem);
  font-weight: 600;
  color: var(--text);
  line-height: 1;
  margin-bottom: 0.6rem;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
}

.stat-item span {
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--text-muted);
  letter-spacing: -0.01em;
  line-height: 1.4;
  display: block;
  max-width: 10rem;
  margin: 0 auto;
}

/* Audience */
.audience-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.85rem;
}

.audience-card {
  padding: 2rem 1.75rem;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  background: var(--surface);
  transition:
    border-color 0.35s,
    transform 0.4s var(--ease-out);
}

.audience-card:hover {
  border-color: rgba(139, 124, 246, 0.25);
  transform: translateY(-3px);
}

.audience-card-num {
  font-family: var(--font-ui);
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--accent-bright);
  margin-bottom: 1.25rem;
  font-variant-numeric: tabular-nums;
}

.audience-card h3 {
  font-family: var(--font-ui);
  font-size: 1.05rem;
  font-weight: 600;
  margin: 0 0 0.65rem;
  color: var(--text);
  letter-spacing: -0.015em;
}

.audience-card p {
  margin: 0;
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.65;
}

/* CTA */
.cta-section {
  text-align: center;
  padding: clamp(6rem, 14vw, 11rem) var(--page-pad);
  position: relative;
  z-index: 1;
}

.cta-card {
  max-width: 52rem;
  margin: 0 auto;
  padding: clamp(3rem, 6vw, 4.5rem) clamp(2rem, 5vw, 3.5rem);
  border-radius: var(--radius-xl);
  border: 1px solid var(--border);
  background:
    radial-gradient(ellipse 80% 60% at 50% 0%, rgba(139, 124, 246, 0.12) 0%, transparent 60%),
    var(--surface);
  position: relative;
  overflow: hidden;
}

.cta-card::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(135deg, rgba(139, 124, 246, 0.35), transparent 40%, rgba(212, 168, 83, 0.15));
  mask:
    linear-gradient(#fff 0 0) content-box,
    linear-gradient(#fff 0 0);
  mask-composite: exclude;
  -webkit-mask-composite: xor;
  pointer-events: none;
}

.cta-section h2 {
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 500;
  margin: 0 0 1rem;
  letter-spacing: -0.02em;
  position: relative;
}

.cta-section p {
  color: var(--text-secondary);
  font-size: 1.05rem;
  max-width: 30rem;
  margin: 0 auto 2rem;
  line-height: 1.65;
  position: relative;
}

@media (max-width: 1024px) {
  .bento-span-8,
  .bento-span-6,
  .bento-span-4 {
    grid-column: span 12;
  }

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

  .stat-item {
    border-right: none;
    border-bottom: none;
  }

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

@media (max-width: 768px) {
  .hero-grid {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .hero-badge {
    margin-left: auto;
    margin-right: auto;
  }

  .hero-lead {
    margin-left: auto;
    margin-right: auto;
  }

  .hero-actions {
    justify-content: center;
  }

  .hero-visual {
    order: -1;
  }

  .phone-frame {
    width: 220px;
    transform: none;
  }

  .scroll-hint {
    display: none;
  }

  .lang-core-grid {
    grid-template-columns: 1fr;
  }

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