/* ============ Font ============ */
/* Inter is served from this domain instead of Google Fonts. Two reasons:
   it removes a 450 ms critical request chain through fonts.googleapis.com and
   fonts.gstatic.com, and no visitor IP is handed to a third party - which is
   the whole point of this product. Variable file, weights 400-900, latin only. */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('/assets/fonts/inter-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
                 U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122,
                 U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* ============ Variables ============ */
:root {
  --bg: #0A0A0A;
  --bg-elevated: #141414;
  --bg-card: #1A1A1A;
  --bg-subtle: #222;
  --border: #262626;
  --border-subtle: #1F1F1F;
  --text: #F5F5F5;
  --text-muted: #A3A3A3;
  --text-subtle: #8F8F8F;
  --accent: #F97316;
  --accent-bright: #FB923C;
  --accent-muted: #9A3412;
  --success: #10B981;
  --danger: #EF4444;
  --max: 1200px;
}

/* ============ Reset ============ */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  line-height: 1.5;
}
a { color: inherit; text-decoration: none; }
h1, h2, h3, h4 { margin: 0; line-height: 1.15; letter-spacing: -0.02em; }
p { margin: 0; }
ul { margin: 0; padding: 0; list-style: none; }
main {
  overflow: hidden;
  position: relative;
  z-index: 1;
}

/* ============ Ambient ============ */
.ambient {
  position: fixed;
  top: -300px;
  left: 50%;
  transform: translateX(-50%);
  width: 1200px;
  height: 900px;
  background:
    radial-gradient(circle at 30% 30%, rgba(249, 115, 22, 0.18), transparent 55%),
    radial-gradient(circle at 70% 40%, rgba(99, 102, 241, 0.12), transparent 55%);
  filter: blur(80px);
  z-index: 0;
  pointer-events: none;
}

/* ============ Nav ============ */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 32px;
  max-width: var(--max);
  margin: 0 auto;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  background: rgba(10, 10, 10, 0.7);
  border-bottom: 1px solid var(--border-subtle);
}
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 800; font-size: 18px; letter-spacing: -0.02em; }
.brand-mark { font-size: 22px; }
.nav-links { display: flex; gap: 32px; }
.nav-links a { color: var(--text-muted); font-size: 14px; font-weight: 500; transition: color 0.15s; }
.nav-links a:hover { color: var(--text); }
.nav-cta .btn { font-size: 14px; }

/* ============ Buttons ============ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 15px;
  transition: transform 0.15s, opacity 0.15s, background 0.15s;
  border: 1px solid transparent;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn-primary {
  background: var(--accent);
  color: var(--bg);
}
.btn-primary:hover { background: var(--accent-bright); }
.btn-ghost {
  background: transparent;
  color: var(--text);
  border-color: var(--border);
}
.btn-ghost:hover { background: var(--bg-card); }

.store-btn {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 12px 20px;
  border-radius: 16px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text);
  transition: transform 0.15s, background 0.15s;
}
.store-btn:hover { background: var(--bg-subtle); transform: translateY(-1px); }
.store-btn.large { padding: 14px 24px; }
.store-icon { width: 24px; height: 24px; }
.store-btn.large .store-icon { width: 28px; height: 28px; }
.store-lines { display: flex; flex-direction: column; align-items: flex-start; line-height: 1.15; }
.store-sub { font-size: 10px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.06em; }
.store-main { font-size: 16px; font-weight: 700; }
.store-btn.large .store-main { font-size: 18px; }

.cta-row { display: flex; gap: 12px; flex-wrap: wrap; }
.cta-row.centered { justify-content: center; }

/* ============ Common ============ */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: 999px;
  background: rgba(249, 115, 22, 0.1);
  border: 1px solid rgba(249, 115, 22, 0.25);
  color: var(--accent);
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.gradient-text {
  background: linear-gradient(90deg, #F97316 0%, #FB923C 50%, #EAB308 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.section-header {
  max-width: 720px;
  margin: 0 auto 56px;
  text-align: center;
  padding: 0 24px;
}
.section-header h2 {
  font-size: clamp(32px, 5vw, 52px);
  font-weight: 800;
  margin-top: 18px;
  margin-bottom: 18px;
}
.section-header p {
  color: var(--text-muted);
  font-size: 18px;
}

/* ============ Hero ============ */
.hero {
  position: relative;
  max-width: var(--max);
  margin: 0 auto;
  padding: 80px 32px 100px;
  z-index: 1;
}
.hero-inner {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 60px;
  align-items: center;
}
.hero-copy h1 {
  font-size: clamp(42px, 6vw, 72px);
  font-weight: 900;
  margin: 20px 0 24px;
  letter-spacing: -0.03em;
}
.lead {
  color: var(--text-muted);
  font-size: 20px;
  max-width: 520px;
  margin-bottom: 36px;
}
.hero-meta {
  display: flex;
  gap: 24px;
  align-items: center;
  margin-top: 40px;
  padding-top: 24px;
  border-top: 1px solid var(--border-subtle);
}
.meta-item { display: flex; flex-direction: column; }
.meta-item strong {
  font-size: 24px;
  font-weight: 800;
  color: var(--text);
  letter-spacing: -0.02em;
}
.meta-item span { font-size: 12px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.06em; }
.meta-divider { width: 1px; height: 36px; background: var(--border); }

/* ============ Phone mockup ============ */
.hero-mockup { display: flex; justify-content: center; align-items: center; }

.phone {
  width: 320px;
  height: 660px;
  background: #050505;
  border-radius: 46px;
  border: 2px solid #2a2a2a;
  padding: 12px;
  box-shadow:
    0 50px 100px -30px rgba(0, 0, 0, 0.8),
    0 0 0 1px rgba(255, 255, 255, 0.04) inset,
    0 30px 80px -20px rgba(249, 115, 22, 0.15);
  position: relative;
  transform: rotate(-2deg);
}
.phone-notch {
  position: absolute;
  top: 14px;
  left: 50%;
  transform: translateX(-50%);
  width: 110px;
  height: 28px;
  background: #050505;
  border-radius: 999px;
  z-index: 2;
}
.phone-screen {
  background: var(--bg);
  height: 100%;
  border-radius: 34px;
  padding: 48px 18px 18px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.app-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  padding: 0 6px 4px;
}
.app-date { font-size: 10px; font-weight: 600; color: var(--text-subtle); text-transform: uppercase; letter-spacing: 0.1em; }
.app-title { font-size: 24px; font-weight: 800; margin-top: 3px; }
.app-plus {
  width: 36px; height: 36px;
  border-radius: 999px;
  background: var(--accent);
  color: var(--bg);
  display: flex; align-items: center; justify-content: center;
  font-size: 22px; font-weight: 700;
}

.progress-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 16px;
  position: relative;
}
.progress-label { font-size: 9px; color: var(--text-subtle); text-transform: uppercase; letter-spacing: 0.1em; font-weight: 600; }
.progress-pct { font-size: 30px; font-weight: 800; margin-top: 2px; }
.progress-bar {
  margin-top: 10px;
  height: 6px;
  background: var(--bg-subtle);
  border-radius: 999px;
  overflow: hidden;
}
.progress-fill { height: 100%; background: var(--accent); border-radius: 999px; }
.progress-count {
  position: absolute;
  right: 16px;
  top: 16px;
  font-size: 11px;
  color: var(--text-muted);
}

.habits-label { font-size: 9px; color: var(--text-subtle); text-transform: uppercase; letter-spacing: 0.1em; font-weight: 600; padding: 4px 6px 0; }

.habit-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 18px;
  position: relative;
  overflow: hidden;
}
.habit-card.done::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--accent);
  opacity: 0.06;
}
.habit-emoji {
  width: 42px; height: 42px;
  border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  font-size: 20px;
}
.habit-emoji.blue { background: rgba(59, 130, 246, 0.18); }
.habit-emoji.orange { background: rgba(249, 115, 22, 0.18); }
.habit-emoji.purple { background: rgba(168, 85, 247, 0.18); }

.habit-info { flex: 1; min-width: 0; }
.habit-name { font-size: 13px; font-weight: 600; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.habit-meta { font-size: 10px; color: var(--text-muted); margin-top: 2px; }

.habit-check {
  width: 32px; height: 32px;
  border-radius: 999px;
  border: 2px solid var(--border);
}
.habit-check.done {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--bg);
  display: flex; align-items: center; justify-content: center;
  font-size: 14px; font-weight: 800;
}

/* ============ Features ============ */
.features {
  position: relative;
  max-width: var(--max);
  margin: 0 auto;
  padding: 100px 32px;
  z-index: 1;
}
.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.feature-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 22px;
  padding: 28px;
  transition: transform 0.2s, border-color 0.2s;
}
.feature-card:hover {
  border-color: var(--accent-muted);
  transform: translateY(-4px);
}
.feature-icon {
  width: 52px; height: 52px;
  border-radius: 16px;
  background: color-mix(in srgb, var(--c) 18%, transparent);
  display: flex; align-items: center; justify-content: center;
  font-size: 28px;
  margin-bottom: 20px;
}
.feature-card h3 {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 10px;
}
.feature-card p {
  color: var(--text-muted);
  font-size: 15px;
  line-height: 1.55;
}

/* ============ Showcase ============ */
.showcase {
  max-width: var(--max);
  margin: 0 auto;
  padding: 80px 32px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: center;
  position: relative;
  z-index: 1;
}
.showcase-copy h2 {
  font-size: clamp(32px, 4vw, 48px);
  font-weight: 800;
  margin: 18px 0;
}
.showcase-copy p {
  color: var(--text-muted);
  font-size: 18px;
  margin-bottom: 24px;
}
.check-list li {
  padding: 10px 0;
  color: var(--text);
  font-size: 16px;
  padding-left: 32px;
  position: relative;
}
.check-list li::before {
  content: '✓';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 22px; height: 22px;
  border-radius: 999px;
  background: var(--accent);
  color: var(--bg);
  display: flex; align-items: center; justify-content: center;
  font-size: 12px;
  font-weight: 800;
}

.showcase-mockup { display: flex; justify-content: center; }
.mini-phone {
  width: 360px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 32px;
  padding: 32px;
  box-shadow: 0 40px 80px -30px rgba(0, 0, 0, 0.6);
}
.ring-container {
  position: relative;
  width: 220px;
  height: 220px;
  margin: 0 auto;
}
.rings { width: 100%; height: 100%; transform: rotate(-90deg); }
.ring-bg { fill: none; stroke-width: 18; }
.ring { fill: none; stroke-width: 18; stroke-linecap: round; }
.ring-center {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}
.ring-pct { font-size: 40px; font-weight: 800; }
.ring-sub { font-size: 10px; color: var(--text-subtle); letter-spacing: 0.12em; font-weight: 600; margin-top: 2px; }

.achievement-row {
  display: flex;
  gap: 10px;
  justify-content: center;
  margin-top: 28px;
}
.ach {
  width: 48px; height: 48px;
  border-radius: 14px;
  background: rgba(249, 115, 22, 0.14);
  display: flex; align-items: center; justify-content: center;
  font-size: 22px;
}
.ach.locked {
  background: var(--bg-subtle);
  opacity: 0.55;
  font-size: 16px;
}

/* ============ Privacy ============ */
.privacy-section {
  max-width: var(--max);
  margin: 0 auto;
  padding: 80px 32px;
  position: relative;
  z-index: 1;
}
.privacy-card {
  background:
    linear-gradient(135deg, rgba(16, 185, 129, 0.06), rgba(99, 102, 241, 0.06));
  border: 1px solid var(--border);
  border-radius: 32px;
  padding: 64px 48px;
  text-align: center;
}
.privacy-badge {
  display: inline-block;
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.3);
  color: var(--success);
  font-size: 12px;
  font-weight: 700;
  padding: 6px 14px;
  border-radius: 999px;
  letter-spacing: 0.06em;
}
.privacy-card h2 {
  font-size: clamp(32px, 4vw, 48px);
  margin: 18px 0;
}
.privacy-card > p {
  color: var(--text-muted);
  font-size: 17px;
  max-width: 620px;
  margin: 0 auto 32px;
  line-height: 1.6;
}
.privacy-stats {
  display: flex;
  justify-content: center;
  gap: 56px;
  margin: 40px 0;
}
.stat { display: flex; flex-direction: column; align-items: center; }
.stat strong {
  font-size: 36px;
  font-weight: 900;
  background: linear-gradient(90deg, var(--success), #34D399);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.stat span {
  color: var(--text-muted);
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 500;
}

/* ============ Download ============ */
.download {
  max-width: var(--max);
  margin: 0 auto;
  padding: 40px 32px 120px;
  position: relative;
  z-index: 1;
}
.download-card {
  background:
    radial-gradient(circle at 50% 0%, rgba(249, 115, 22, 0.18), transparent 60%),
    var(--bg-card);
  border: 1px solid rgba(249, 115, 22, 0.3);
  border-radius: 32px;
  padding: 72px 48px;
  text-align: center;
}
.download-card h2 {
  font-size: clamp(32px, 5vw, 56px);
  font-weight: 900;
  margin-bottom: 18px;
}
.download-card p {
  color: var(--text-muted);
  font-size: 18px;
  margin-bottom: 36px;
}

/* ============ Footer ============ */
.footer {
  border-top: 1px solid var(--border);
  padding: 60px 32px 30px;
  position: relative;
  z-index: 1;
}
.footer-inner {
  max-width: var(--max);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
  padding-bottom: 40px;
}
.footer-brand .brand { margin-bottom: 12px; }
.footer-tag { color: var(--text-muted); font-size: 14px; }
.footer-col h4 {
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-subtle);
  margin-bottom: 14px;
  font-weight: 700;
}
.footer-col a {
  display: block;
  color: var(--text-muted);
  font-size: 14px;
  padding: 6px 0;
  transition: color 0.15s;
}
.footer-col a:hover { color: var(--text); }
.footer-bottom {
  max-width: var(--max);
  margin: 0 auto;
  padding-top: 24px;
  border-top: 1px solid var(--border-subtle);
  color: var(--text-subtle);
  font-size: 13px;
}

/* ============ Legal pages ============ */
.legal {
  max-width: 760px;
  margin: 0 auto;
  padding: 60px 32px 100px;
  position: relative;
  z-index: 1;
}
.legal .back-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--text-muted);
  font-size: 14px;
  margin-bottom: 40px;
  transition: color 0.15s;
}
.legal .back-link:hover { color: var(--text); }
.legal h1 {
  font-size: clamp(36px, 5vw, 56px);
  font-weight: 900;
  margin-bottom: 16px;
}
.legal .updated { color: var(--text-muted); font-size: 15px; margin-bottom: 48px; }
.legal h2 {
  font-size: 24px;
  font-weight: 700;
  margin-top: 48px;
  margin-bottom: 16px;
  padding-top: 24px;
  border-top: 1px solid var(--border-subtle);
}
.legal h2:first-of-type { border-top: none; padding-top: 0; }
.legal p, .legal li {
  color: var(--text-muted);
  font-size: 16px;
  line-height: 1.75;
  margin-bottom: 16px;
}
.legal strong { color: var(--text); font-weight: 600; }
.legal ul { padding-left: 24px; margin-bottom: 24px; }
.legal ul li { list-style: disc; padding-left: 8px; margin-bottom: 10px; }
.legal a { color: var(--accent); text-decoration: underline; }
.legal a:hover { color: var(--accent-bright); }
.legal .tldr {
  background: rgba(16, 185, 129, 0.08);
  border: 1px solid rgba(16, 185, 129, 0.2);
  border-radius: 16px;
  padding: 20px 24px;
  margin-bottom: 40px;
}
.legal .tldr strong { color: var(--success); }
.legal .tldr p { color: var(--text); margin: 4px 0 0; }

/* ============ Responsive ============ */
@media (max-width: 900px) {
  .nav-links { display: none; }
  .hero { padding: 40px 20px 60px; }
  .hero-inner { grid-template-columns: 1fr; gap: 40px; text-align: center; }
  .hero-copy .eyebrow { margin: 0 auto; }
  .lead { margin: 0 auto 30px; }
  .cta-row { justify-content: center; }
  .hero-meta { justify-content: center; }
  .features, .showcase, .privacy-section, .download { padding-left: 20px; padding-right: 20px; }
  .feature-grid { grid-template-columns: 1fr; }
  .showcase { grid-template-columns: 1fr; gap: 40px; text-align: center; }
  .check-list li { text-align: left; }
  .privacy-stats { flex-direction: column; gap: 30px; }
  .privacy-card { padding: 40px 24px; }
  .download-card { padding: 48px 24px; }
  .footer-inner { grid-template-columns: 1fr 1fr; gap: 30px; }
  .phone { transform: none; }
}

@media (max-width: 500px) {
  .phone { width: 280px; height: 580px; }
  .nav { padding: 14px 20px; }
  .nav-cta .btn { padding: 8px 14px; font-size: 13px; }
  .footer-inner { grid-template-columns: 1fr; }
}

/* ============ Hero on-load ============ */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}
.hero-copy > * {
  animation: fadeInUp 0.7s cubic-bezier(0.16, 1, 0.3, 1) both;
}
.hero-copy > *:nth-child(1) { animation-delay: 0.05s; }
.hero-copy > *:nth-child(2) { animation-delay: 0.15s; }
.hero-copy > *:nth-child(3) { animation-delay: 0.25s; }
.hero-copy > *:nth-child(4) { animation-delay: 0.35s; }
.hero-copy > *:nth-child(5) { animation-delay: 0.45s; }
.hero-mockup {
  animation: fadeInUp 0.9s 0.2s cubic-bezier(0.16, 1, 0.3, 1) both;
}

/* ============ Scroll reveal ============ */
.reveal {
  opacity: 0;
  transform: translateY(32px);
  transition:
    opacity 0.9s cubic-bezier(0.16, 1, 0.3, 1),
    transform 0.9s cubic-bezier(0.16, 1, 0.3, 1);
  transition-delay: var(--reveal-delay, 0s);
  will-change: opacity, transform;
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}
.reveal-scale {
  opacity: 0;
  transform: scale(0.94);
  transition:
    opacity 0.9s cubic-bezier(0.16, 1, 0.3, 1),
    transform 0.9s cubic-bezier(0.16, 1, 0.3, 1);
  transition-delay: var(--reveal-delay, 0s);
}
.reveal-scale.visible {
  opacity: 1;
  transform: scale(1);
}
.reveal-left {
  opacity: 0;
  transform: translateX(-40px);
  transition:
    opacity 0.9s cubic-bezier(0.16, 1, 0.3, 1),
    transform 0.9s cubic-bezier(0.16, 1, 0.3, 1);
  transition-delay: var(--reveal-delay, 0s);
}
.reveal-left.visible {
  opacity: 1;
  transform: translateX(0);
}
.reveal-right {
  opacity: 0;
  transform: translateX(40px);
  transition:
    opacity 0.9s cubic-bezier(0.16, 1, 0.3, 1),
    transform 0.9s cubic-bezier(0.16, 1, 0.3, 1);
  transition-delay: var(--reveal-delay, 0s);
}
.reveal-right.visible {
  opacity: 1;
  transform: translateX(0);
}

/* ============ Nav scroll state ============ */
.nav {
  transition: background 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}
.nav.scrolled {
  background: rgba(10, 10, 10, 0.92);
  border-bottom-color: var(--border);
  box-shadow: 0 4px 24px -14px rgba(0, 0, 0, 0.7);
}

/* ============ Phone parallax float ============ */
.phone {
  will-change: transform;
  transition: transform 0.1s linear;
}

/* ============ Feature card hover ============ */
.feature-card {
  position: relative;
  overflow: hidden;
}
.feature-card::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(
    circle at var(--mx, 50%) var(--my, 50%),
    rgba(249, 115, 22, 0.08),
    transparent 45%
  );
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}
.feature-card:hover::after { opacity: 1; }

/* ============ Progress rings scroll animation ============ */
.rings .ring {
  transition: stroke-dashoffset 1.4s cubic-bezier(0.16, 1, 0.3, 1);
}
.rings:not(.animate) .ring-1 { stroke-dashoffset: 553; }
.rings:not(.animate) .ring-2 { stroke-dashoffset: 427; }
.rings:not(.animate) .ring-3 { stroke-dashoffset: 302; }
.rings.animate .ring-1 { transition-delay: 0s; }
.rings.animate .ring-2 { transition-delay: 0.12s; }
.rings.animate .ring-3 { transition-delay: 0.24s; }

/* ============ Achievement pop ============ */
.achievement-row .ach {
  opacity: 0;
  transform: scale(0.7) translateY(8px);
  transition:
    opacity 0.5s cubic-bezier(0.34, 1.56, 0.64, 1),
    transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.showcase-mockup.visible .achievement-row .ach {
  opacity: 1;
  transform: scale(1) translateY(0);
}
.showcase-mockup.visible .achievement-row .ach:nth-child(1) { transition-delay: 0.8s; }
.showcase-mockup.visible .achievement-row .ach:nth-child(2) { transition-delay: 0.9s; }
.showcase-mockup.visible .achievement-row .ach:nth-child(3) { transition-delay: 1.0s; }
.showcase-mockup.visible .achievement-row .ach:nth-child(4) { transition-delay: 1.1s; }
.showcase-mockup.visible .achievement-row .ach:nth-child(5) { transition-delay: 1.2s; }
.achievement-row .ach.locked { opacity: 0.55 !important; }

/* ============ Cookie consent banner ============ */
.consent-banner {
  position: fixed;
  left: 16px;
  right: 16px;
  bottom: 16px;
  z-index: 100;
  max-width: 760px;
  margin: 0 auto;
  background: rgba(20, 20, 20, 0.96);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 20px 24px;
  box-shadow:
    0 20px 60px -20px rgba(0, 0, 0, 0.8),
    0 0 0 1px rgba(255, 255, 255, 0.03) inset;
  opacity: 0;
  transform: translateY(20px);
  animation: consentIn 0.5s 0.15s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}
@keyframes consentIn {
  to { opacity: 1; transform: translateY(0); }
}
.consent-banner.consent-hidden {
  animation: consentOut 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}
@keyframes consentOut {
  to { opacity: 0; transform: translateY(20px); }
}
.consent-inner {
  display: flex;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
}
.consent-text {
  flex: 1;
  min-width: 240px;
}
.consent-text strong {
  display: block;
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 4px;
}
.consent-text span {
  display: block;
  color: var(--text-muted);
  font-size: 13.5px;
  line-height: 1.55;
}
.consent-text a {
  color: var(--accent);
  text-decoration: underline;
}
.consent-text a:hover { color: var(--accent-bright); }
.consent-buttons {
  display: flex;
  gap: 10px;
  flex-shrink: 0;
}
.consent-btn {
  appearance: none;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text);
  padding: 10px 20px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  transition: transform 0.15s ease, background 0.15s ease, border-color 0.15s ease;
}
.consent-btn:hover { transform: translateY(-1px); }
.consent-decline { background: var(--bg-subtle); }
.consent-decline:hover { background: var(--bg-elevated); }
.consent-accept {
  background: var(--accent);
  color: var(--bg);
  border-color: var(--accent);
}
.consent-accept:hover { background: var(--accent-bright); border-color: var(--accent-bright); }
.consent-manage-link {
  color: var(--accent);
  background: none;
  border: none;
  padding: 0;
  font: inherit;
  cursor: pointer;
  text-decoration: underline;
}
.consent-manage-link:hover { color: var(--accent-bright); }
@media (max-width: 600px) {
  .consent-banner {
    left: 10px;
    right: 10px;
    bottom: 10px;
    padding: 16px 18px;
    border-radius: 18px;
  }
  .consent-buttons {
    width: 100%;
  }
  .consent-buttons .consent-btn {
    flex: 1;
  }
}

/* ============ Reduced motion ============ */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .reveal, .reveal-scale, .reveal-left, .reveal-right {
    opacity: 1 !important;
    transform: none !important;
  }
}

/* ==========================================================================
   Below: styles added for the content pages (blog, about, contact, FAQ, 404).
   Same tokens as the landing page, nothing new invented.
   ========================================================================== */

/* ============ Mobile menu ============ */
/* The old markup simply hid .nav-links under 900px with no replacement, so on a
   phone there was no way to reach any page but the one you landed on. Mobile is
   where most of the traffic is, so the links now fold into a panel instead. */
.nav-toggle {
  display: none;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text);
  cursor: pointer;
  padding: 0;
  align-items: center;
  justify-content: center;
}
.nav-toggle span,
.nav-toggle span::before,
.nav-toggle span::after {
  display: block;
  width: 16px;
  height: 2px;
  border-radius: 2px;
  background: currentColor;
  transition: transform 0.2s ease, opacity 0.2s ease;
}
.nav-toggle span { position: relative; }
.nav-toggle span::before,
.nav-toggle span::after {
  content: '';
  position: absolute;
  left: 0;
}
.nav-toggle span::before { top: -5px; }
.nav-toggle span::after { top: 5px; }
.nav-toggle[aria-expanded='true'] span { background: transparent; }
.nav-toggle[aria-expanded='true'] span::before { transform: translateY(5px) rotate(45deg); }
.nav-toggle[aria-expanded='true'] span::after { transform: translateY(-5px) rotate(-45deg); }

.nav-panel { display: none; }

@media (max-width: 900px) {
  .nav-toggle { display: inline-flex; }
  .nav-cta { display: none; }
  .nav-panel {
    display: block;
    position: fixed;
    top: 68px;
    left: 12px;
    right: 12px;
    z-index: 60;
    background: rgba(18, 18, 18, 0.98);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 10px;
    box-shadow: 0 24px 60px -24px rgba(0, 0, 0, 0.9);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s;
  }
  .nav-panel.open { opacity: 1; visibility: visible; transform: translateY(0); }
  .nav-panel a {
    display: block;
    padding: 13px 14px;
    border-radius: 12px;
    color: var(--text);
    font-size: 15px;
    font-weight: 500;
  }
  .nav-panel a:hover { background: var(--bg-card); }
  .nav-panel .btn {
    justify-content: center;
    margin-top: 6px;
    width: 100%;
  }
}

/* ============ Inner page header ============ */
.page-hero {
  max-width: 860px;
  margin: 0 auto;
  padding: 72px 32px 40px;
  position: relative;
  z-index: 1;
}
.page-hero.center { text-align: center; }
.page-hero h1 {
  font-size: clamp(36px, 5.5vw, 60px);
  font-weight: 900;
  letter-spacing: -0.03em;
  margin: 18px 0 20px;
}
.page-hero .lead { font-size: 19px; margin-bottom: 0; max-width: 680px; }
.page-hero.center .lead { margin-left: auto; margin-right: auto; }

.breadcrumbs {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  font-size: 13px;
  color: var(--text-subtle);
  margin-bottom: 8px;
}
.breadcrumbs a { color: var(--text-muted); }
.breadcrumbs a:hover { color: var(--text); }
.breadcrumbs .sep { color: var(--border); }

/* ============ Prose ============ */
.article {
  max-width: 760px;
  margin: 0 auto;
  padding: 0 32px 100px;
  position: relative;
  z-index: 1;
}
.article-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  color: var(--text-subtle);
  font-size: 14px;
  margin-bottom: 32px;
}
.article-cover {
  width: 100%;
  height: auto;
  aspect-ratio: 1200 / 630;
  object-fit: cover;
  border-radius: 20px;
  border: 1px solid var(--border);
  margin-bottom: 44px;
  display: block;
}

.prose > * + * { margin-top: 22px; }
.prose p,
.prose li {
  color: var(--text-muted);
  font-size: 17px;
  line-height: 1.75;
}
.prose h2 {
  font-size: 30px;
  font-weight: 800;
  color: var(--text);
  margin-top: 56px;
  padding-top: 28px;
  border-top: 1px solid var(--border-subtle);
}
.prose h3 {
  font-size: 21px;
  font-weight: 700;
  color: var(--text);
  margin-top: 38px;
}
.prose strong { color: var(--text); font-weight: 600; }
.prose a { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
.prose a:hover { color: var(--accent-bright); }
.prose ul, .prose ol { padding-left: 24px; }
.prose ul li { list-style: disc; margin-top: 10px; padding-left: 6px; }
.prose ol li { list-style: decimal; margin-top: 10px; padding-left: 6px; }
.prose blockquote {
  border-left: 3px solid var(--accent);
  padding: 4px 0 4px 22px;
  color: var(--text);
  font-size: 19px;
  line-height: 1.6;
}
.prose figure { margin: 0; }
.prose figcaption {
  color: var(--text-subtle);
  font-size: 14px;
  margin-top: 10px;
}

.callout {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  border-radius: 14px;
  padding: 20px 24px;
}
.callout p { color: var(--text); font-size: 16px; }
.callout p + p { margin-top: 10px; }

.keytakeaway {
  background: rgba(16, 185, 129, 0.07);
  border: 1px solid rgba(16, 185, 129, 0.22);
  border-radius: 16px;
  padding: 22px 26px;
}
.keytakeaway h2 {
  border: none;
  padding: 0;
  margin: 0 0 10px;
  font-size: 15px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--success);
}
.keytakeaway p { color: var(--text); font-size: 16px; }

/* Inline app plug at the end of an article. Deliberately quiet. */
.article-cta {
  margin-top: 56px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 28px;
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}
.article-cta div { flex: 1; min-width: 220px; }
.article-cta h2 {
  border: none;
  padding: 0;
  margin: 0 0 6px;
  font-size: 20px;
  font-weight: 700;
}
.article-cta p { color: var(--text-muted); font-size: 15px; }

/* ============ Blog index ============ */
.post-grid {
  max-width: var(--max);
  margin: 0 auto;
  padding: 20px 32px 100px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  position: relative;
  z-index: 1;
}
.post-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 22px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.2s, border-color 0.2s;
}
.post-card:hover { transform: translateY(-4px); border-color: var(--accent-muted); }
.post-card img {
  width: 100%;
  /* height: auto обязателен. Атрибут height="630" в разметке браузер применяет
     как стиль, и он перебивает aspect-ratio: картинка вытягивалась на все
     630 пикселей вместо пропорциональной высоты. */
  height: auto;
  aspect-ratio: 1200 / 630;
  object-fit: cover;
  display: block;
  border-bottom: 1px solid var(--border);
}
.post-card-body { padding: 24px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.post-card h2,
.post-card h3 { font-size: 20px; font-weight: 700; line-height: 1.3; }
.post-card p { color: var(--text-muted); font-size: 15px; line-height: 1.55; flex: 1; }
.post-card .post-date { color: var(--text-subtle); font-size: 13px; }

/* Флагманская карточка во всю ширину. Высоту задаём явно: без неё картинка
   тянулась до собственных 630 пикселей и карточка выходила вдвое выше нужного. */
.post-card.featured {
  grid-column: span 3;
  flex-direction: row;
  height: 400px;
}
.post-card.featured img {
  width: 46%;
  height: 100%;
  aspect-ratio: auto;
  border-bottom: none;
  border-right: 1px solid var(--border);
}
.post-card.featured .post-card-body { padding: 40px; justify-content: center; }
.post-card.featured h2,
.post-card.featured h3 { font-size: 30px; }
.post-card.featured p { font-size: 17px; flex: 0; }

/* ============ FAQ ============ */
.faq-list {
  max-width: 800px;
  margin: 0 auto;
  padding: 20px 32px 60px;
  position: relative;
  z-index: 1;
}
.faq-item {
  border-bottom: 1px solid var(--border-subtle);
}
.faq-item summary {
  list-style: none;
  cursor: pointer;
  padding: 24px 44px 24px 0;
  font-size: 18px;
  font-weight: 600;
  color: var(--text);
  position: relative;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: '+';
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 24px;
  font-weight: 400;
  color: var(--accent);
  transition: transform 0.2s ease;
}
.faq-item[open] summary::after { content: '\2212'; }
.faq-item summary:hover { color: var(--accent-bright); }
.faq-answer { padding: 0 0 26px; }
.faq-answer p {
  color: var(--text-muted);
  font-size: 16px;
  line-height: 1.72;
}
.faq-answer p + p { margin-top: 14px; }
.faq-answer a { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }

/* ============ Contact ============ */
.contact-grid {
  max-width: 900px;
  margin: 0 auto;
  padding: 20px 32px 100px;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  position: relative;
  z-index: 1;
}
.contact-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 22px;
  padding: 30px;
}
.contact-card h2 { font-size: 19px; font-weight: 700; margin-bottom: 10px; }
.contact-card p { color: var(--text-muted); font-size: 15px; line-height: 1.65; }
.contact-card a.mail {
  display: inline-block;
  margin-top: 14px;
  color: var(--accent);
  font-size: 16px;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
  word-break: break-word;
}
.contact-card a.mail:hover { color: var(--accent-bright); }
.contact-note { grid-column: span 2; }

/* ============ About ============ */
.about-stats {
  max-width: 900px;
  margin: 0 auto;
  padding: 10px 32px 20px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  position: relative;
  z-index: 1;
}
.about-stat {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 22px;
  text-align: center;
}
.about-stat strong { display: block; font-size: 28px; font-weight: 800; }
.about-stat span {
  display: block;
  margin-top: 4px;
  color: var(--text-muted);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.07em;
}

/* ============ 404 ============ */
.notfound {
  max-width: 640px;
  margin: 0 auto;
  padding: 100px 32px 120px;
  text-align: center;
  position: relative;
  z-index: 1;
}
.notfound .code {
  font-size: clamp(72px, 14vw, 130px);
  font-weight: 900;
  letter-spacing: -0.05em;
  line-height: 1;
}
.notfound h1 { font-size: clamp(26px, 4vw, 36px); font-weight: 800; margin: 18px 0 14px; }
.notfound p { color: var(--text-muted); font-size: 17px; margin-bottom: 32px; }
.notfound-links {
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
}

/* ============ Related posts ============ */
.related {
  max-width: 760px;
  margin: 0 auto;
  padding: 0 32px 100px;
  position: relative;
  z-index: 1;
}
.related h2 {
  font-size: 15px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-subtle);
  margin-bottom: 20px;
}
.related-list { display: grid; gap: 12px; }
.related-list a {
  display: block;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 20px 24px;
  transition: border-color 0.2s, transform 0.2s;
}
.related-list a:hover { border-color: var(--accent-muted); transform: translateY(-2px); }
.related-list strong { display: block; font-size: 17px; font-weight: 600; margin-bottom: 4px; }
.related-list span { color: var(--text-muted); font-size: 14px; }

/* ============ Responsive for the new blocks ============ */
@media (max-width: 900px) {
  .page-hero { padding: 48px 20px 30px; }
  .article, .related { padding-left: 20px; padding-right: 20px; }
  .post-grid { grid-template-columns: 1fr; padding: 16px 20px 70px; }
  .post-card.featured { grid-column: span 1; flex-direction: column; height: auto; }
  .post-card.featured img { width: 100%; height: auto; aspect-ratio: 1200 / 630; border-right: none; border-bottom: 1px solid var(--border); }
  .post-card.featured .post-card-body { padding: 24px; }
  .post-card.featured h2,
  .post-card.featured h3 { font-size: 22px; }
  .post-card.featured p { font-size: 15px; }
  .contact-grid { grid-template-columns: 1fr; padding: 16px 20px 70px; }
  .contact-note { grid-column: span 1; }
  .about-stats { grid-template-columns: repeat(2, 1fr); padding-left: 20px; padding-right: 20px; }
  .faq-list { padding: 16px 20px 50px; }
  .prose h2 { font-size: 25px; margin-top: 44px; }
  .article-cta { padding: 22px; }
}
