/* ═══════════════════════════════════════════════════════════════
   Thoth — Landing page
   css/style.css
   Design: Deep Obsidian, Warm Papyrus, Blue Accents
   ═══════════════════════════════════════════════════════════════ */

/* ── Tokens ───────────────────────────────────────────────────── */
:root {
  /* Deep obsidian base — sophisticated dark slate */
  --bg:          #0c0f14;
  --surface:     #141820;
  
  --border:      rgba(255, 255, 255, 0.07);
  --border-mid:  rgba(255, 255, 255, 0.13);
  
  /* Warm papyrus foreground — still Egyptian, not clinical white */
  --fg:          #f0e6d6;
  --muted:       rgba(240, 230, 214, 0.55);
  --faint:       rgba(240, 230, 214, 0.18);
  
  /* Blue Accent — slightly richer */
  --accent:       #5088be;
  --accent-bright:#6da3d8;
  --accent-dim:   rgba(80, 136, 190, 0.15);
  --accent-glow:  rgba(80, 136, 190, 0.35);
  
  --font:        'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-title:  'Marcellus', Georgia, 'Times New Roman', serif;
  --max-w:       1200px;
  --nav-h:       64px;
}

/* ── Reset ────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  scroll-snap-type: y proximity;
}
img  { display: block; max-width: 100%; }
a    { text-decoration: none; }

body {
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

h1, h2, h3, h4 {
  font-family: var(--font-title);
  letter-spacing: -0.01em;
  font-weight: 400;
}

/* ── Nav ──────────────────────────────────────────────────────── */
.site-nav {
  position: fixed;
  inset: 0 0 auto;
  z-index: 100;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  padding: 0 clamp(20px, 4vw, 48px);
  border-bottom: 1px solid transparent;
  transition: background 0.3s, border-color 0.3s, backdrop-filter 0.3s;
}

.site-nav.scrolled {
  background: rgba(12, 15, 20, 0.88);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom-color: var(--border);
}

.nav-inner {
  width: 100%;
  max-width: var(--max-w);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-brand {
  display: flex;
  align-items: center;
  font-family: var(--font-title);
  font-size: 1.2rem;
  color: var(--fg);
  text-decoration: none;
  letter-spacing: 0.04em;
  transition: opacity 0.15s;
}
.nav-brand:hover { opacity: 0.75; }

.nav-cta {
  font-size: 0.82rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: var(--muted);
  border: 1px solid var(--border-mid);
  border-radius: 999px;
  padding: 7px 18px;
  transition: color 0.15s, border-color 0.15s, background 0.15s;
}
.nav-cta:hover {
  color: var(--fg);
  border-color: var(--accent);
  background: var(--accent);
}

/* ── Hero ─────────────────────────────────────────────────────── */
.hero {
  position: relative;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  overflow: hidden;
  scroll-snap-align: start;
  padding: calc(var(--nav-h) + 80px) 0 100px;
}

/* Ambient glow behind content */
.hero-glow {
  position: absolute;
  top: 8%;
  left: 50%;
  transform: translateX(-50%);
  width: 800px;
  height: 600px;
  background: radial-gradient(ellipse, var(--accent-glow) 0%, rgba(80,136,190,0.08) 40%, transparent 70%);
  pointer-events: none;
  z-index: 0;
  filter: blur(60px);
}

/* Centered text content */
.hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  max-width: 680px;
  margin: 0 auto;
  padding: 0 48px;
}

.hero-brand {
  width: 160px;
  height: 160px;
  object-fit: contain;
  margin-bottom: 32px;
  filter: drop-shadow(0 4px 32px rgba(80,136,190,0.2));
  animation: brandFloat 6s ease-in-out infinite;
}

@keyframes brandFloat {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-6px); }
}

.hero-eyebrow {
  font-family: var(--font);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent-bright);
  margin-bottom: 28px;
}

.hero-title {
  font-family: var(--font-title);
  font-size: clamp(2.4rem, 5vw, 4.2rem);
  font-weight: 400;
  letter-spacing: -0.01em;
  line-height: 1.1;
  color: var(--fg);
  margin-bottom: 20px;
  white-space: nowrap;
}

.hero-sub {
  font-family: var(--font);
  font-size: clamp(0.95rem, 1.3vw, 1.08rem);
  line-height: 1.75;
  color: var(--muted);
  max-width: 620px;
  margin-bottom: 40px;
}

/* Floating device screenshot below the text */
.hero-device {
  position: relative;
  z-index: 1;
  margin-top: 48px;
  width: calc(100% - 96px);
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--border-mid);
  box-shadow:
    0 24px 80px rgba(0,0,0,0.5),
    0 0 0 1px rgba(255,255,255,0.05),
    0 0 120px rgba(80,136,190,0.1);
}

.hero-device-img {
  width: 100%;
  height: auto;
  display: block;
}

.hero-scroll-hint {
  position: absolute;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  opacity: 0.4;
  animation: hintBob 2.2s ease-in-out infinite;
}
.hero-scroll-hint svg {
  width: 20px;
  height: 20px;
  color: var(--fg);
}
@keyframes hintBob {
  0%, 100% { transform: translateX(-50%) translateY(0); opacity: 0.4; }
  50%       { transform: translateX(-50%) translateY(5px); opacity: 0.7; }
}

@media (max-width: 600px) {
  .hero { padding: calc(var(--nav-h) + 48px) 0 60px; }
  .hero-content { padding: 0 24px; }
  .hero-brand { width: 110px; height: 110px; }
  .hero-title { font-size: clamp(2rem, 9vw, 3rem); }
  .hero-device { margin-top: 32px; width: calc(100% - 48px); }
}

/* ── Primary Button ───────────────────────────────────────────── */
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font);
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: #ffffff;
  background: var(--accent);
  border: none;
  border-radius: 999px;
  padding: 14px 28px;
  cursor: pointer;
  transition: background 0.2s, box-shadow 0.2s, transform 0.15s;
  box-shadow: 0 0 0 0 var(--accent-glow);
}
.btn-primary:hover {
  background: var(--accent-bright);
  box-shadow: 0 4px 24px var(--accent-glow);
  transform: translateY(-1px);
}
.btn-primary:active { transform: translateY(0); }

/* ── Feature Carousel ─────────────────────────────────────────── */
.features {
  padding: clamp(60px, 8vw, 120px) 0 0;
  scroll-snap-align: start;
}

.feat-row-title {
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 auto 20px;
  max-width: min(820px, 60vw);
  padding-left: 20px;
}

.feat-stage {
  --card-w: min(820px, 60vw);
  --card-h: calc(var(--card-w) * 9 / 16);
  --card-gap: 28px;
  --left-pad: calc(50% - var(--card-w) / 2);
  position: relative;
  max-width: 1400px;
  margin: 0 auto;
  height: var(--card-h);
  overflow: hidden;
}

.feat-stage-mask {
  position: absolute;
  inset: 0;
  mask-image: linear-gradient(to right, transparent 0%, black 12%, black 88%, transparent 100%);
  -webkit-mask-image: linear-gradient(to right, transparent 0%, black 12%, black 88%, transparent 100%);
}

.feat-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 5;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.15);
  background: rgba(12,15,20,0.65);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: rgba(240,230,214,0.85);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s, border-color 0.2s, opacity 0.3s, transform 0.2s;
}
.feat-nav svg { width: 22px; height: 22px; }
.feat-nav:hover {
  background: rgba(255,255,255,0.10);
  border-color: rgba(255,255,255,0.28);
  transform: translateY(-50%) scale(1.08);
}
.feat-nav--left { left: 12px; }
.feat-nav--right { right: 12px; left: auto; }
.feat-nav.hidden { opacity: 0; pointer-events: none; }

.feat-ribbon {
  position: absolute;
  top: 0;
  left: var(--left-pad);
  display: flex;
  gap: var(--card-gap);
  transition: transform 0.45s cubic-bezier(0.22, 1, 0.36, 1);
}

.feat-rcard {
  flex: 0 0 var(--card-w);
  height: var(--card-h);
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  border: 2px solid var(--border);
  transition: opacity 0.35s ease, border-color 0.25s, transform 0.25s;
}
.feat-rcard img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.feat-rcard-scrim {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(12,15,20,0.6) 0%, transparent 60%);
  pointer-events: none;
}
.feat-rcard.under-hero { opacity: 0; pointer-events: none; }
.feat-rcard:not(.under-hero) {
  opacity: 0.35;
  border-color: rgba(255,255,255,0.07);
}

.feat-hero {
  position: absolute;
  top: 0;
  left: var(--left-pad);
  width: var(--card-w);
  height: var(--card-h);
  border-radius: 12px;
  overflow: hidden;
  z-index: 2;
}

.feat-hero-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 0.6s ease;
}
.feat-hero-img.active { opacity: 1; }

.feat-hero-scrim {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    linear-gradient(to top, rgba(12,15,20,0.85) 0%, rgba(12,15,20,0.25) 40%, transparent 65%),
    linear-gradient(to right, rgba(12,15,20,0.3) 0%, transparent 45%);
}

.feat-hero-info {
  position: absolute;
  bottom: 0;
  left: 0;
  z-index: 2;
  padding: clamp(16px, 2.5vw, 28px);
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.3s ease, transform 0.3s ease;
}
.feat-hero-info.fading { opacity: 0; transform: translateY(8px); }

.feat-tag {
  display: block;
  font-size: clamp(0.8rem, 1vw, 1.05rem);
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent-bright);
  margin-bottom: 8px;
}

.feat-hero-title {
  font-family: var(--font-title);
  font-size: clamp(1.4rem, 2.6vw, 2.4rem);
  font-weight: 400;
  letter-spacing: -0.01em;
  line-height: 1.15;
  color: var(--fg);
}
.feat-hero-title.dark {
  color: #1a1a1a;
}

.feat-hero-border {
  position: absolute;
  inset: 0;
  z-index: 3;
  border-radius: 12px;
  box-shadow: inset 0 0 0 2px rgba(255,255,255,0.12);
  transition: box-shadow 0.3s;
  pointer-events: none;
}
.feat-hero:hover .feat-hero-border { box-shadow: inset 0 0 0 2px rgba(255,255,255,0.25); }

.feat-desc-wrap { max-width: 1400px; margin: 0 auto; }
.feat-desc-area {
  margin: 0 auto;
  max-width: min(820px, 60vw);
  padding: 24px 20px clamp(40px, 5vw, 60px);
  opacity: 1;
  transform: translateX(0);
  transition: opacity 0.35s ease, transform 0.35s ease;
}
.feat-desc-area.fading-right { opacity: 0; transform: translateX(-40px); }
.feat-desc-area.fading-left { opacity: 0; transform: translateX(40px); }

.feat-desc { font-size: clamp(0.95rem, 1.1vw, 1.1rem); line-height: 1.72; color: var(--muted); }

/* ── Secondary Grid ──────────────────────────────────────────── */
.features-grid {
  border-top: 1px solid var(--border);
  padding: clamp(48px, 6vw, 80px) 0;
}
.features-grid-header { max-width: var(--max-w); margin: 0 auto; padding: 0 clamp(20px, 4vw, 64px) 36px; }
.features-grid-title { font-size: clamp(1rem, 1.5vw, 1.2rem); font-weight: 600; color: var(--muted); }

.grid-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  padding: 0 clamp(20px, 4vw, 64px);
}
.grid-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 32px 28px;
  transition: border-color 0.25s, background 0.25s;
}
.grid-card:hover { border-color: var(--border-mid); background: rgba(255,255,255,0.05); }
.grid-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 52px; height: 52px;
  border-radius: 14px;
  background: var(--accent-dim);
  color: var(--accent-bright);
  margin-bottom: 20px;
}
.grid-title { font-size: 1.05rem; font-weight: 600; color: var(--fg); margin-bottom: 10px; }
.grid-desc { font-size: 0.85rem; line-height: 1.7; color: var(--muted); }

/* ── Security Section ────────────────────────────────────────── */
.security-section {
  border-top: 1px solid var(--border);
  padding: clamp(64px, 8vw, 120px) clamp(20px, 4vw, 64px);
}
.security-inner { max-width: var(--max-w); margin: 0 auto; }
.security-header { text-align: center; margin-bottom: clamp(40px, 5vw, 64px); }
.security-lock {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px; height: 48px;
  border-radius: 14px;
  background: var(--accent-dim);
  color: var(--accent-bright);
  margin-bottom: 20px;
}
.security-eyebrow { font-size: 0.7rem; font-weight: 600; letter-spacing: 0.18em; text-transform: uppercase; color: var(--accent-bright); margin-bottom: 16px; }
.security-title { font-size: clamp(1.6rem, 2.6vw, 2.4rem); font-weight: 700; color: var(--fg); margin-bottom: 16px; }
.security-sub { font-size: 1rem; line-height: 1.7; color: var(--muted); max-width: 520px; margin: 0 auto; }

.security-pillars { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.security-pillar { background: var(--surface); border: 1px solid var(--border); border-radius: 16px; padding: 28px 24px; }
.security-pillar-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px; height: 44px;
  border-radius: 12px;
  background: var(--accent-dim);
  color: var(--accent-bright);
  margin-bottom: 16px;
}
.security-pillar-title { font-size: 0.95rem; font-weight: 600; color: var(--fg); margin-bottom: 10px; }
.security-pillar-desc { font-size: 0.82rem; line-height: 1.7; color: var(--muted); }

/* ── CTA Section ──────────────────────────────────────────────── */
.cta-section { padding: clamp(60px, 8vw, 120px) clamp(20px, 4vw, 64px); display: flex; justify-content: center; }
.cta-card {
  position: relative;
  overflow: hidden;
  width: 100%;
  max-width: 720px;
  background: var(--surface);
  border: 1px solid var(--border-mid);
  border-radius: 24px;
  padding: clamp(40px, 6vw, 80px) clamp(32px, 5vw, 72px);
  text-align: center;
  box-shadow: 0 32px 80px rgba(0,0,0,0.5);
}
.cta-glow {
  position: absolute;
  bottom: -80px; left: 50%;
  transform: translateX(-50%);
  width: 60%;
  height: 200px;
  background: radial-gradient(ellipse, var(--accent-glow) 0%, transparent 70%);
  pointer-events: none;
}
.cta-eyebrow { font-size: 0.7rem; font-weight: 600; letter-spacing: 0.18em; text-transform: uppercase; color: var(--accent-bright); margin-bottom: 20px; }
.cta-title { font-size: clamp(2rem, 4vw, 3.2rem); font-weight: 700; color: var(--fg); margin-bottom: 20px; }
.cta-body { font-size: 0.95rem; line-height: 1.75; color: var(--muted); max-width: 480px; margin: 0 auto 36px; }

/* ── Footer ───────────────────────────────────────────────────── */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 32px clamp(20px, 4vw, 64px);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  justify-content: center;
}
.footer-row {
  display: flex;
  align-items: center;
  gap: 12px;
}
.footer-sep { color: var(--faint); }
.footer-copy { font-size: 0.8rem; color: var(--muted); }
.footer-link {
  font-size: 0.78rem;
  color: var(--muted);
  transition: color 0.15s;
}
.footer-link:hover { color: var(--fg); }

/* ── Legal Pages (Privacy / Terms) ────────────────────────────── */
.legal-page {
  max-width: 1000px;
  margin: 0 auto;
  padding: calc(var(--nav-h) + 80px) clamp(24px, 5vw, 64px) 100px;
}
.legal-title {
  font-family: var(--font-title);
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 400;
  letter-spacing: -0.01em;
  color: var(--fg);
  margin-bottom: 8px;
}
.legal-updated {
  font-size: 0.82rem;
  color: var(--muted);
  margin-bottom: 48px;
}
.legal-section {
  margin-bottom: 36px;
}
.legal-section h2 {
  font-family: var(--font-title);
  font-size: 1.3rem;
  font-weight: 600;
  color: var(--fg);
  margin-bottom: 12px;
}
.legal-section h3 {
  font-family: var(--font);
  font-size: 1rem;
  font-weight: 600;
  color: var(--fg);
  margin-top: 20px;
  margin-bottom: 8px;
}
.legal-section p {
  font-size: 0.92rem;
  line-height: 1.75;
  color: var(--muted);
  margin-bottom: 12px;
}
.legal-section ul {
  list-style: disc;
  padding-left: 24px;
  margin-bottom: 12px;
}
.legal-section li {
  font-size: 0.92rem;
  line-height: 1.75;
  color: var(--muted);
  margin-bottom: 4px;
}
.legal-section a {
  color: var(--accent-bright);
  text-decoration: underline;
  text-underline-offset: 2px;
  transition: color 0.15s;
}
.legal-section a:hover { color: var(--fg); }
.legal-section strong { color: var(--fg); }
.legal-summary {
  margin-top: 48px;
  padding: 24px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
}
.legal-summary p {
  font-size: 0.95rem;
  line-height: 1.7;
  color: var(--muted);
  margin: 0;
}
.legal-summary strong { color: var(--accent-bright); }

/* ── Responsive ───────────────────────────────────────────────── */
@media (max-width: 768px) {
  .feat-stage { --card-w: 75vw; }
  .feat-hero-title { font-size: 1.15rem; }
  .feat-row-title { max-width: 75vw; }
  .feat-desc-area { max-width: 100%; padding: 20px 16px 40px; }
  .grid-inner { grid-template-columns: 1fr; }
  .grid-card { padding: 24px 20px; }
  .security-pillars { grid-template-columns: 1fr; }
  .feat-stage::before, .feat-stage::after { display: none; }
}
@media (min-width: 769px) and (max-width: 1024px) {
  .feat-stage { --card-w: min(540px, 50vw); }
  .feat-row-title { max-width: min(540px, 50vw); }
  .grid-inner { grid-template-columns: repeat(2, 1fr); }
  .security-pillars { grid-template-columns: repeat(2, 1fr); }
}