/* ==========================================================================
   Synthexeo — Homepage styles (loaded after main.css, homepage only)
   Reuses the tokens from main.css: --navy, --orange, --bg, --border, ...
   ========================================================================== */

:root { --amber: #FFB347; }

/* ─── Scroll-reveal (only active when JS is on) ─── */
html.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity .65s ease, transform .65s ease; }
html.js .reveal.in { opacity: 1; transform: none; }
html.js .reveal.d1 { transition-delay: .08s; }
html.js .reveal.d2 { transition-delay: .16s; }
html.js .reveal.d3 { transition-delay: .24s; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  html.js .reveal { opacity: 1; transform: none; transition: none; }
  *, *::before, *::after { animation: none !important; }
}

.home-container { max-width: 1200px; margin: 0 auto; padding: 0 32px; }
.home-section { padding: 92px 0; scroll-margin-top: 64px; }
.home-section.alt { background: #fff; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.footer { margin-top: 0; }

/* ─── Section headings ─── */
.section-head { max-width: 680px; margin-bottom: 52px; }
.section-head.center { text-align: center; margin-left: auto; margin-right: auto; }
.section-head.split { max-width: none; display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.kicker {
  display: inline-block; font-size: 12.5px; font-weight: 700; letter-spacing: .14em;
  text-transform: uppercase; color: var(--orange); margin-bottom: 12px;
}
.section-head h2 {
  font-size: clamp(28px, 3.4vw, 40px); line-height: 1.12; letter-spacing: -.02em;
  font-weight: 800; color: var(--navy); margin-bottom: 14px;
}
.section-head p { color: var(--text-muted); font-size: 17px; line-height: 1.65; }
.text-link { font-weight: 700; font-size: 15px; color: var(--navy); display: inline-flex; gap: 6px; align-items: center; white-space: nowrap; }
.text-link span { transition: transform .2s; }
.text-link:hover span { transform: translateX(4px); }
.text-link:hover { color: var(--orange); }

/* ─── Mobile nav (the shared header hides its links under 900px) ─── */
.nav-toggle {
  display: none; margin-left: auto; width: 42px; height: 42px; border-radius: 10px;
  background: rgba(255,255,255,.08); color: #fff; align-items: center; justify-content: center;
}
.nav-toggle:hover { background: rgba(255,255,255,.16); }
.mobile-nav {
  display: none; position: fixed; top: var(--header-h); left: 0; right: 0; z-index: 99;
  background: var(--navy); padding: 10px 20px 22px; border-top: 1px solid rgba(255,255,255,.08);
  box-shadow: 0 24px 40px rgba(0,0,0,.3); flex-direction: column;
}
.mobile-nav.open { display: flex; }
.mobile-nav a { color: rgba(255,255,255,.88); font-weight: 600; font-size: 16px; padding: 14px 8px; border-bottom: 1px solid rgba(255,255,255,.07); }
.mobile-nav a:last-child { border-bottom: none; }
.mobile-nav a:hover { color: var(--orange); }
@media (max-width: 900px) {
  .nav-toggle { display: inline-flex; }
}

/* ─── Hero ─── */
.home-hero {
  position: relative; isolation: isolate; overflow: hidden; color: #fff; padding: 76px 0 72px;
  background:
    radial-gradient(1100px 520px at 10% -12%, rgba(255,107,53,.14), transparent 60%),
    radial-gradient(900px 560px at 96% 8%, rgba(37,99,235,.30), transparent 60%),
    linear-gradient(160deg, #0A2540 0%, #0c2d50 55%, #081a2e 100%);
}
.home-hero::before {
  content: ''; position: absolute; inset: 0; z-index: -1;
  background-image:
    linear-gradient(rgba(255,255,255,.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.05) 1px, transparent 1px);
  background-size: 48px 48px;
  -webkit-mask-image: radial-gradient(ellipse 75% 70% at 50% 35%, #000 25%, transparent 78%);
          mask-image: radial-gradient(ellipse 75% 70% at 50% 35%, #000 25%, transparent 78%);
}
.hero-inner {
  max-width: 1200px; margin: 0 auto; padding: 0 32px;
  display: grid; grid-template-columns: minmax(0, 1.08fr) minmax(0, .92fr); gap: 56px; align-items: center;
}
.eyebrow {
  display: inline-flex; align-items: center; gap: 10px; padding: 7px 16px 7px 12px; margin-bottom: 26px;
  border-radius: 999px; background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.14);
  color: #FFD3C2; font-size: 13px; font-weight: 600; letter-spacing: .2px;
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
}
.pulse { width: 8px; height: 8px; border-radius: 50%; background: var(--orange); box-shadow: 0 0 0 0 rgba(255,107,53,.6); animation: pulse 2s infinite; }
@keyframes pulse { 70% { box-shadow: 0 0 0 10px rgba(255,107,53,0); } 100% { box-shadow: 0 0 0 0 rgba(255,107,53,0); } }

.home-hero h1 { font-size: clamp(40px, 5.4vw, 66px); line-height: 1.04; letter-spacing: -.025em; font-weight: 800; margin-bottom: 22px; text-wrap: balance; }
.home-hero h1 em, .hero-year {
  font-style: normal; color: var(--orange);
  background: linear-gradient(90deg, #FF6B35, #FFB347); -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
}
.hero-lead { font-size: clamp(16px, 1.6vw, 19px); color: rgba(255,255,255,.78); max-width: 540px; margin-bottom: 34px; line-height: 1.65; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 46px; }
.home-hero .btn-primary { box-shadow: 0 12px 30px -10px rgba(255,107,53,.7); }
.btn-ghost-light { background: rgba(255,255,255,.06); color: #fff; border: 1.5px solid rgba(255,255,255,.28); }
.btn-ghost-light:hover { background: rgba(255,255,255,.14); border-color: #fff; }

.hero-stats-row {
  display: grid; grid-template-columns: repeat(4, auto); justify-content: start; gap: 14px 38px;
  padding-top: 28px; border-top: 1px solid rgba(255,255,255,.14); max-width: 560px;
}
.stat-value { font-size: 30px; font-weight: 800; line-height: 1; letter-spacing: -.01em; }
.stat-label { font-size: 12px; color: rgba(255,255,255,.55); margin-top: 8px; text-transform: uppercase; letter-spacing: .09em; }

/* Hero visual: topic-cluster map */
.hero-visual {
  position: relative; border-radius: 28px; padding: 10px;
  background: linear-gradient(145deg, rgba(255,255,255,.09), rgba(255,255,255,.02));
  border: 1px solid rgba(255,255,255,.13);
  box-shadow: 0 40px 80px -30px rgba(0,0,0,.65);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
}
.hero-visual svg { display: block; width: 100%; height: auto; }
.vis-ring { fill: none; stroke: rgba(255,255,255,.09); stroke-width: 1.2; }
.vis-spoke { stroke: rgba(255,255,255,.18); stroke-width: 1.4; }
.vis-line { fill: none; stroke: rgba(255,255,255,.26); stroke-width: 1.4; stroke-dasharray: 4 7; animation: flow 22s linear infinite; }
@keyframes flow { to { stroke-dashoffset: -220; } }
.vis-core-pulse { fill: none; stroke: rgba(255,107,53,.55); stroke-width: 2; transform-box: fill-box; transform-origin: center; animation: corepulse 3.2s ease-out infinite; }
@keyframes corepulse { 0% { transform: scale(1); opacity: .9; } 100% { transform: scale(1.9); opacity: 0; } }
.vis-node rect { fill: #0e3159; stroke-width: 1.4; }
.vis-node text { fill: #fff; font: 600 13px/1 'Inter', -apple-system, sans-serif; dominant-baseline: central; }
.vis-core-label { fill: #fff; font: 800 21px/1 'Inter', -apple-system, sans-serif; text-anchor: middle; }
.vis-core-year { fill: rgba(255,255,255,.88); font: 700 11px/1 'Inter', -apple-system, sans-serif; letter-spacing: .18em; text-anchor: middle; }

/* Hero side column: community card (Telegram QR + links) above the topic map */
.hero-side { display: flex; flex-direction: column; gap: 18px; min-width: 0; }
.hero-visual { order: 2; }
.join-card { order: 1; }

.join-card {
  display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 16px 20px; align-items: center;
  padding: 18px 20px 18px 18px; border-radius: 22px; color: #fff;
  background: linear-gradient(145deg, rgba(255,255,255,.12), rgba(255,255,255,.04));
  border: 1px solid rgba(255,255,255,.18);
  box-shadow: 0 30px 60px -30px rgba(0,0,0,.6);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
}
.join-qr {
  display: block; width: 148px; height: 148px; border-radius: 16px; overflow: hidden; background: #fff;
  box-shadow: 0 10px 24px -10px rgba(0,0,0,.55); transition: transform .25s ease;
}
.join-qr:hover, .join-qr:focus-visible { transform: scale(1.04); outline: none; }
.join-qr img { display: block; width: 100%; height: 100%; }
.join-kicker { display: block; font-size: 11.5px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--amber); margin-bottom: 6px; }
.join-title { font-size: 18px; line-height: 1.25; font-weight: 800; letter-spacing: -.01em; margin-bottom: 8px; }
.join-body p { font-size: 13.5px; line-height: 1.55; color: rgba(255,255,255,.76); }
.join-scan { display: block; margin-top: 8px; font-size: 12px; color: rgba(255,255,255,.5); }
.join-actions { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }

/* Social buttons (Telegram / WhatsApp) — dark text on bright brand colours for contrast */
.btn-social {
  justify-content: center; gap: 9px; padding: 12px 16px; font-size: 14.5px; font-weight: 700; color: #04223A; border-radius: 12px; white-space: nowrap;
  box-shadow: 0 10px 22px -12px rgba(0,0,0,.55);
}
.btn-social .soc-ico { flex-shrink: 0; }
.btn-social:hover, .btn-social:focus-visible { filter: brightness(1.07); transform: translateY(-2px); box-shadow: 0 16px 28px -14px rgba(0,0,0,.6); outline: none; }
.btn-tg { background: #2AABEE; }
.btn-wa { background: #25D366; }

/* ─── Course cards ─── */
.paths-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; }
.path-card {
  --c: #2563EB; position: relative; display: flex; flex-direction: column; gap: 10px; overflow: hidden;
  padding: 28px 26px 24px; background: #fff; border: 1px solid var(--border); border-radius: 18px;
  transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}
.path-card::before { content: ''; position: absolute; left: 0; right: 0; top: 0; height: 4px; background: var(--c); }
.path-card::after {
  content: ''; position: absolute; right: -70px; top: -70px; width: 200px; height: 200px; border-radius: 50%;
  background: radial-gradient(circle, rgba(37,99,235,.14), transparent 70%);
  background: radial-gradient(circle, color-mix(in srgb, var(--c) 20%, transparent), transparent 70%);
  opacity: 0; transition: opacity .3s; pointer-events: none;
}
.path-card:hover, .path-card:focus-visible { transform: translateY(-5px); box-shadow: 0 24px 46px -20px rgba(10,37,64,.32); border-color: #cfd8e6; border-color: color-mix(in srgb, var(--c) 38%, var(--border)); outline: none; }
.path-card:hover::after, .path-card:focus-visible::after { opacity: 1; }
.path-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; position: relative; z-index: 1; }
.path-icon {
  width: 50px; height: 50px; display: grid; place-items: center; font-size: 25px; border-radius: 15px;
  background: #F3F4F6; background: color-mix(in srgb, var(--c) 12%, #fff);
}
.path-badge {
  font-size: 11.5px; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; padding: 5px 11px; border-radius: 999px;
  color: var(--c); background: #F3F4F6;
  color: color-mix(in srgb, var(--c) 78%, #000); background: color-mix(in srgb, var(--c) 10%, #fff);
}
.path-card h3 { font-size: 19px; line-height: 1.25; font-weight: 700; color: var(--navy); position: relative; z-index: 1; }
.path-card p { font-size: 14.5px; color: var(--text-muted); line-height: 1.6; position: relative; z-index: 1; }
.path-meta { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 13px; color: var(--text-muted); margin-top: 4px; position: relative; z-index: 1; }
.path-meta span + span::before { content: '·'; margin-right: 14px; color: var(--text-light); }
.path-progress { margin-top: 8px; position: relative; z-index: 1; }
.path-progress-label { display: flex; justify-content: space-between; font-size: 12px; color: var(--text-muted); margin-bottom: 6px; }
.path-progress .progress-bar-wrap { margin-bottom: 0; }
.path-link {
  margin-top: auto; padding-top: 14px; font-size: 14px; font-weight: 700; display: inline-flex; gap: 6px; align-items: center;
  color: var(--c); color: color-mix(in srgb, var(--c) 82%, #000); position: relative; z-index: 1;
}
.path-link span { transition: transform .2s; }
.path-card:hover .path-link span { transform: translateX(4px); }

/* ─── How it works ─── */
.steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.step { padding: 32px 28px; border-radius: 18px; background: var(--bg); border: 1px solid var(--border); }
.step-num {
  width: 42px; height: 42px; border-radius: 13px; display: grid; place-items: center; margin-bottom: 20px;
  font-weight: 800; color: #fff; background: linear-gradient(135deg, #FF6B35, #ff9a5b); box-shadow: 0 10px 20px -8px rgba(255,107,53,.65);
}
.step h3 { font-size: 19px; color: var(--navy); margin-bottom: 8px; font-weight: 700; }
.step p { color: var(--text-muted); font-size: 15px; line-height: 1.65; }

/* ─── What you'll master ─── */
.feature-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; }
.feature {
  --c: #2563EB; padding: 30px 28px; border-radius: 18px; background: #fff; border: 1px solid var(--border);
  border-left: 4px solid var(--c); transition: transform .25s ease, box-shadow .25s ease;
}
.feature:hover { transform: translateY(-4px); box-shadow: 0 20px 40px -22px rgba(10,37,64,.3); }
.feature-icon { width: 52px; height: 52px; display: grid; place-items: center; font-size: 26px; border-radius: 15px; margin-bottom: 18px; background: #F3F4F6; background: color-mix(in srgb, var(--c) 12%, #fff); }
.feature h3 { font-size: 18px; font-weight: 700; color: var(--navy); margin-bottom: 8px; }
.feature p { font-size: 15px; color: var(--text-muted); line-height: 1.65; }

/* ─── Free tools ─── */
.tools-grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 22px; }
.tools-grid .tool-link-card { grid-column: span 2; }
.tools-grid .tool-link-card:nth-child(4) { grid-column: 2 / span 2; }
.tools-grid .tool-link-card:nth-child(5) { grid-column: 4 / span 2; }
.tool-link-card {
  display: flex; flex-direction: column; gap: 8px; padding: 26px; border-radius: 18px;
  background: var(--bg); border: 1px solid var(--border); transition: transform .25s ease, box-shadow .25s ease, background .25s;
}
.tool-link-card:hover, .tool-link-card:focus-visible { transform: translateY(-4px); background: #fff; box-shadow: 0 20px 40px -22px rgba(10,37,64,.3); outline: none; }
.tool-link-icon { font-size: 28px; line-height: 1; margin-bottom: 6px; }
.tool-link-card h3 { font-size: 17px; font-weight: 700; color: var(--navy); }
.tool-link-card p { font-size: 14.5px; color: var(--text-muted); line-height: 1.6; }
.tool-link-card .tl-more { margin-top: auto; padding-top: 10px; font-size: 14px; font-weight: 700; color: var(--orange); }
.tool-link-card .tl-more span { display: inline-block; transition: transform .2s; }
.tool-link-card:hover .tl-more span { transform: translateX(4px); }

/* ─── CTA ─── */
.cta-card {
  position: relative; isolation: isolate; overflow: hidden; text-align: center; color: #fff;
  padding: 76px 32px; border-radius: 28px;
  background:
    radial-gradient(700px 320px at 15% 0%, rgba(255,107,53,.30), transparent 62%),
    radial-gradient(700px 360px at 90% 100%, rgba(37,99,235,.35), transparent 62%),
    linear-gradient(135deg, #0A2540, #14375f);
  box-shadow: 0 40px 80px -40px rgba(10,37,64,.7);
}
.cta-card h2 { font-size: clamp(28px, 3.6vw, 42px); font-weight: 800; letter-spacing: -.02em; line-height: 1.12; margin-bottom: 14px; }
.cta-card p { font-size: 17px; color: rgba(255,255,255,.76); max-width: 520px; margin: 0 auto 32px; line-height: 1.65; }
.cta-card .cta-row { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; }
.btn-white { background: #fff; color: var(--navy); }
.btn-white:hover { background: #eef3fa; transform: translateY(-1px); box-shadow: 0 10px 24px -8px rgba(0,0,0,.4); }

/* ─── Responsive ─── */
@media (max-width: 1040px) {
  .paths-grid, .feature-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tools-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tools-grid .tool-link-card,
  .tools-grid .tool-link-card:nth-child(4),
  .tools-grid .tool-link-card:nth-child(5) { grid-column: auto; }
}
@media (max-width: 960px) {
  /* single column: copy → community card → stats → topic map */
  .hero-inner { display: flex; flex-direction: column; align-items: stretch; gap: 0; }
  .hero-copy, .hero-side { display: contents; }
  .eyebrow { order: 1; align-self: flex-start; }
  .home-hero h1 { order: 2; }
  .hero-lead { order: 3; }
  .hero-cta { order: 4; margin-bottom: 30px; }
  .join-card { order: 5; max-width: 640px; margin-bottom: 40px; }
  .hero-stats-row { order: 6; margin-bottom: 44px; }
  .hero-visual { order: 7; max-width: 520px; margin: 0 auto; width: 100%; }
  .home-hero { padding: 64px 0 64px; }
  .home-section { padding: 68px 0; }
}
@media (max-width: 800px) {
  .steps { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .home-container, .hero-inner { padding: 0 20px; }
  .paths-grid, .feature-grid { grid-template-columns: 1fr; }
  .hero-stats-row { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px; }
  .hero-cta .btn-lg { width: 100%; justify-content: center; }
  /* on a phone the visitor can't scan their own screen — the buttons are what matter */
  .join-card { grid-template-columns: 1fr; padding: 18px; }
  .join-qr, .join-scan, .lbl-x { display: none; }
  .btn-social { padding: 12px 10px; }
  .home-hero { padding: 44px 0 56px; }
  .eyebrow { margin-bottom: 20px; }
  .hero-lead { margin-bottom: 26px; }
  .hero-cta { margin-bottom: 24px; }
  .section-head { margin-bottom: 36px; }
  .cta-card { padding: 56px 22px; border-radius: 22px; }
  .tools-grid { grid-template-columns: 1fr; }
}
