/* ---------- Fonts ---------- */
@font-face {
  font-family: "Manrope";
  font-style: normal;
  font-weight: 200 800;
  font-display: swap;
  src: url("/fonts/manrope-variable.woff2") format("woff2");
}

/* ---------- Tokens ---------- */
:root {
  --bg: #faf6ee;
  --bg-alt: #f2ecdc;
  --surface: #ffffff;
  --ink: #171b26;
  --ink-soft: #545c70;
  --ink-faint: #8a8f9e;
  --line: #e6ddc6;
  --line-soft: #efe8d5;

  --accent: #2454e0;
  --accent-dark: #1c3fb0;
  --accent-ink: #ffffff;
  --accent-soft: #e8edfc;

  --gold: #c17f1f;
  --gold-soft: #f7ecd6;

  --radius-sm: 10px;
  --radius: 16px;
  --radius-lg: 24px;
  --max: 1160px;

  --shadow-sm: 0 1px 2px rgba(23, 27, 38, 0.06);
  --shadow: 0 12px 32px -12px rgba(23, 27, 38, 0.16);
  --shadow-lg: 0 24px 64px -20px rgba(23, 27, 38, 0.22);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #14161f;
    --bg-alt: #1a1d29;
    --surface: #1e2130;
    --ink: #f3f1e9;
    --ink-soft: #b3b6c4;
    --ink-faint: #767b8c;
    --line: #2c3040;
    --line-soft: #262939;

    --accent: #6f93ff;
    --accent-dark: #94aeff;
    --accent-ink: #10131c;
    --accent-soft: #232a47;

    --gold: #e0aa4e;
    --gold-soft: #35301f;

    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
    --shadow: 0 12px 32px -12px rgba(0, 0, 0, 0.5);
    --shadow-lg: 0 24px 64px -20px rgba(0, 0, 0, 0.6);
  }
}

/* ---------- Reset ---------- */
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: "Manrope", ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.6;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}

img, svg { display: block; max-width: 100%; }

a {
  color: var(--accent);
  text-decoration: none;
}
a:hover { color: var(--accent-dark); }

.wrap {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 24px;
}

::selection { background: var(--accent-soft); color: var(--ink); }

/* ---------- Typography ---------- */
h1, h2, h3, h4 {
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.15;
  margin: 0 0 16px;
  color: var(--ink);
}
h1 { font-size: clamp(2.1rem, 1.6rem + 2.2vw, 3.4rem); letter-spacing: -0.03em; }
h2 { font-size: clamp(1.6rem, 1.35rem + 1.1vw, 2.25rem); }
h3 { font-size: 1.2rem; margin-bottom: 8px; }

p { margin: 0 0 16px; }
.lede {
  color: var(--ink-soft);
  font-size: 1.15rem;
  line-height: 1.55;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--gold);
  margin: 0 0 14px;
}

mark {
  background: none;
  color: var(--gold);
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
  background: var(--accent);
  color: var(--accent-ink);
  padding: 13px 24px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.98rem;
  border: 1px solid transparent;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
  box-shadow: var(--shadow-sm);
}
.btn:hover { background: var(--accent-dark); color: var(--accent-ink); box-shadow: var(--shadow); }
.btn:active { transform: translateY(1px) scale(0.98); }
.btn svg { width: 17px; height: 17px; flex: none; }

.btn-ghost {
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--line);
  box-shadow: none;
}
.btn-ghost:hover { background: var(--surface); border-color: var(--ink-faint); color: var(--ink); box-shadow: var(--shadow-sm); }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  padding: 16px 0;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(10px) saturate(140%);
  -webkit-backdrop-filter: blur(10px) saturate(140%);
  border-bottom: 1px solid var(--line-soft);
}
.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}
.site-header .logo { display: flex; align-items: center; }
.site-header .logo img { height: 30px; width: auto; }

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .logo img,
  :root:not([data-theme="light"]) .footer-brand img {
    filter: invert(1) brightness(1.6);
  }
}
:root[data-theme="dark"] .logo img,
:root[data-theme="dark"] .footer-brand img {
  filter: invert(1) brightness(1.6);
}

.site-nav { display: flex; align-items: center; gap: 8px; }
.site-nav a {
  color: var(--ink-soft);
  font-weight: 600;
  font-size: 0.95rem;
  padding: 9px 14px;
  border-radius: 999px;
  transition: background 0.15s ease, color 0.15s ease;
}
.site-nav a:hover { background: var(--surface); color: var(--ink); box-shadow: var(--shadow-sm); }

.header-actions { display: flex; align-items: center; gap: 6px; }

.nav-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
  cursor: pointer;
  flex: none;
}
.nav-toggle svg { width: 20px; height: 20px; }
.nav-toggle .icon-close { display: none; }
body.nav-open .nav-toggle .icon-menu { display: none; }
body.nav-open .nav-toggle .icon-close { display: block; }

/* ---------- Hero ---------- */
.hero { padding: 64px 0 88px; overflow: hidden; }
.hero .wrap {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 56px;
  align-items: center;
}
.hero-copy { max-width: 560px; }
.hero h1 { margin-bottom: 20px; }
.hero .lede { max-width: 460px; margin-bottom: 32px; }
.hero-ctas { display: flex; flex-wrap: wrap; gap: 12px; }

.hero-visual { position: relative; min-height: 420px; }

.channel-panel {
  position: relative;
  background: linear-gradient(155deg, var(--surface), var(--bg-alt));
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-lg);
  padding: 28px;
  box-shadow: var(--shadow-lg);
  max-width: 420px;
  margin: 0 auto;
}
.channel-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
.channel-card {
  background: var(--surface);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-sm);
  padding: 18px 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  box-shadow: var(--shadow-sm);
}
.channel-card .icon-badge { width: 34px; height: 34px; }
.channel-card span { font-weight: 700; font-size: 0.92rem; }

.icon-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: var(--accent-soft);
  color: var(--accent);
  flex: none;
}
.icon-badge svg { width: 19px; height: 19px; }
.icon-badge.gold { background: var(--gold-soft); color: var(--gold); }
.icon-badge.lg { width: 52px; height: 52px; border-radius: 14px; }
.icon-badge.lg svg { width: 24px; height: 24px; }

.live-badge {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 92px;
  height: 92px;
  border-radius: 999px;
  background: var(--ink);
  color: var(--bg);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  box-shadow: var(--shadow-lg);
  border: 4px solid var(--bg);
}
.live-badge .dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: #37d67a;
}
.live-badge strong { font-size: 0.82rem; font-weight: 800; }
.live-badge small { font-size: 0.62rem; color: var(--ink-faint); letter-spacing: 0.04em; }

.hero-photo {
  position: absolute;
  top: -8%;
  left: -8%;
  width: 46%;
  margin: 0;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  border: 6px solid var(--surface);
  transform: rotate(-4deg);
  z-index: 1;
}
.hero-photo img { display: block; width: 100%; height: 100%; aspect-ratio: 4 / 3; object-fit: cover; }

.float-chip {
  position: absolute;
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--surface);
  border: 1px solid var(--line-soft);
  border-radius: 999px;
  padding: 8px 14px 8px 10px;
  box-shadow: var(--shadow);
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--ink-soft);
}
.float-chip .icon-badge { width: 26px; height: 26px; border-radius: 8px; }
.float-chip .icon-badge svg { width: 14px; height: 14px; }
.float-chip.c1 { top: 4%; left: -6%; }
.float-chip.c2 { top: 12%; right: -10%; }
.float-chip.c3 { bottom: 8%; left: -10%; }
.float-chip.c4 { bottom: -2%; right: -4%; }

@media (prefers-reduced-motion: no-preference) {
  .float-chip { animation: float 6s ease-in-out infinite; }
  .float-chip.c2 { animation-delay: -1.5s; }
  .float-chip.c3 { animation-delay: -3s; }
  .float-chip.c4 { animation-delay: -4.5s; }
  .live-badge .dot { animation: pulse 2.2s ease-in-out infinite; }
}
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}
@keyframes pulse {
  0%, 100% { opacity: 1; box-shadow: 0 0 0 0 rgba(55, 214, 122, 0.5); }
  50% { opacity: 0.7; box-shadow: 0 0 0 6px rgba(55, 214, 122, 0); }
}

/* ---------- Section rhythm ---------- */
section { padding: 72px 0; }
.section-head { max-width: 620px; margin: 0 0 40px; }
.section-head.center { margin-left: auto; margin-right: auto; text-align: center; }
.section-head p { color: var(--ink-soft); }

/* ---------- Services (bento) ---------- */
.services-grid { background: var(--bg-alt); border-top: 1px solid var(--line-soft); border-bottom: 1px solid var(--line-soft); }

.bento {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-auto-flow: dense;
  gap: 18px;
}
.card {
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  padding: 26px;
  color: var(--ink);
  box-shadow: var(--shadow-sm);
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: var(--line); color: var(--ink); }
.card-thumb {
  display: block;
  margin: -26px -26px 18px;
  border-radius: var(--radius) var(--radius) 0 0;
  overflow: hidden;
  aspect-ratio: 16 / 9;
}
.card-thumb img { display: block; width: 100%; height: 100%; object-fit: cover; }
.card .icon-badge { margin-bottom: 16px; }
.card p { color: var(--ink-soft); font-size: 0.96rem; margin: 0; flex: 1; }
.card .card-arrow {
  margin-top: 18px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 700;
  font-size: 0.88rem;
  color: var(--accent);
}
.card .card-arrow svg { width: 15px; height: 15px; transition: transform 0.15s ease; }
.card:hover .card-arrow svg { transform: translateX(3px); }

.bento .card:nth-child(6n+1) { grid-column: span 2; background: linear-gradient(155deg, var(--surface), var(--accent-soft)); }

.note { color: var(--ink-soft); margin-top: 28px; font-size: 0.95rem; }

/* ---------- How it works ---------- */
.how .wrap { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: 56px; align-items: start; }
.steps { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.steps li {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 20px;
  padding: 22px 0;
  border-bottom: 1px solid var(--line-soft);
}
.steps li:last-child { border-bottom: none; }
.step-num {
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--gold);
  font-variant-numeric: tabular-nums;
}
.steps h3 { margin-bottom: 6px; }
.steps p { color: var(--ink-soft); margin: 0; font-size: 0.96rem; }

.how-visual {
  background: var(--bg-alt);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-lg);
  padding: 32px;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 18px;
}
.how-visual .chip-row { display: flex; flex-wrap: wrap; gap: 10px; }
.how-visual .chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--surface);
  border: 1px solid var(--line-soft);
  border-radius: 999px;
  padding: 8px 14px;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--ink-soft);
  box-shadow: var(--shadow-sm);
}
.how-visual .chip .icon-badge { width: 22px; height: 22px; border-radius: 7px; }
.how-visual .chip .icon-badge svg { width: 12px; height: 12px; }
.how-visual h4 { margin: 0; font-size: 1rem; }
.how-visual p { color: var(--ink-soft); font-size: 0.92rem; margin: 0; }

/* ---------- Blog list (home) ---------- */
.post-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}
.post-card {
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  padding: 22px;
  background: var(--surface);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.post-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.post-thumb {
  display: block;
  margin: -22px -22px 4px;
  border-radius: var(--radius) var(--radius) 0 0;
  overflow: hidden;
  aspect-ratio: 16 / 9;
}
.post-thumb img { display: block; width: 100%; height: 100%; object-fit: cover; }
.post-card .post-eyebrow { font-size: 0.78rem; font-weight: 700; color: var(--ink-faint); text-transform: uppercase; letter-spacing: 0.06em; }
.post-card h3 { margin: 0; font-size: 1.05rem; color: var(--ink); }
.post-card p { margin: 0; color: var(--ink-soft); font-size: 0.92rem; }

.post-row-list { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
.latest .section-head { display: flex; align-items: flex-end; justify-content: space-between; max-width: none; gap: 20px; }
.latest .section-head .lede { margin: 0; }
.link-arrow { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; white-space: nowrap; }
.link-arrow svg { width: 15px; height: 15px; }

/* ---------- CTA band ---------- */
.cta-band {
  background: #171b26;
  color: #faf6ee;
  border-radius: var(--radius-lg);
  margin: 0 24px;
  padding: 64px 40px;
}
.cta-band .wrap { max-width: var(--max); padding: 0; display: flex; align-items: center; justify-content: space-between; gap: 32px; flex-wrap: wrap; }
.cta-band h2 { color: #faf6ee; margin-bottom: 8px; }
.cta-band p { color: rgba(250, 246, 238, 0.68); margin: 0; max-width: 440px; }
.cta-band .btn { background: #2454e0; color: #ffffff; box-shadow: none; }
.cta-band .btn:hover { background: #3a68f0; }

/* ---------- Footer ---------- */
.site-footer {
  border-top: 1px solid var(--line-soft);
  padding: 56px 0 28px;
  margin-top: 40px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 32px;
  padding-bottom: 40px;
}
.footer-brand img { height: 26px; margin-bottom: 14px; }
.footer-brand p { color: var(--ink-soft); font-size: 0.92rem; max-width: 280px; }
.footer-col h4 { font-size: 0.82rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--ink-faint); margin-bottom: 14px; }
.footer-col ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.footer-col a { color: var(--ink-soft); font-size: 0.94rem; }
.footer-col a:hover { color: var(--ink); }
.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding-top: 24px;
  border-top: 1px solid var(--line-soft);
  color: var(--ink-faint);
  font-size: 0.85rem;
  flex-wrap: wrap;
}

/* ---------- Page header (list/single generic) ---------- */
.page-header { padding: 56px 0 40px; }
.page-header h1 { max-width: 700px; }
.page-header .content { color: var(--ink-soft); max-width: 640px; }

.listing { padding-top: 0; padding-bottom: 72px; }

/* ---------- Single article ---------- */
.single { padding: 56px 0 72px; }
.single .meta { color: var(--ink-faint); font-size: 0.9rem; margin-top: -8px; }
.single-image {
  margin: 0 0 32px;
  max-width: 700px;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow);
  border: 1px solid var(--line-soft);
}
.single-image img { display: block; width: 100%; height: auto; }
.single .content { max-width: 700px; }
.single .content h2 { margin-top: 40px; }
.single .content ul, .single .content ol { padding-left: 22px; color: var(--ink-soft); }
.single .content li { margin-bottom: 8px; }
.single .content strong { color: var(--ink); }

.cta-box {
  margin-top: 48px;
  padding: 32px;
  background: var(--bg-alt);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-lg);
  max-width: 700px;
}
.cta-box h3 { margin-top: 0; }
.cta-box p { color: var(--ink-soft); }

/* ---------- Reveal-on-scroll ---------- */
@media (prefers-reduced-motion: no-preference) {
  [data-reveal] {
    opacity: 0;
    transform: translateY(18px);
    transition: opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1), transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
  }
  [data-reveal].is-visible { opacity: 1; transform: none; }
}

/* ---------- Responsive ---------- */
@media (max-width: 980px) {
  .hero .wrap { grid-template-columns: 1fr; gap: 48px; }
  .hero-visual { min-height: 360px; max-width: 420px; margin: 0 auto; }
  .how .wrap { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 860px) {
  .site-nav { display: none; }
  .nav-toggle { display: inline-flex; }
  body.nav-open .site-nav {
    display: flex;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    background: var(--bg);
    border-bottom: 1px solid var(--line-soft);
    padding: 12px 24px 20px;
    gap: 4px;
    box-shadow: var(--shadow);
  }
  body.nav-open .site-nav a { padding: 12px 4px; border-radius: 0; }

  .bento { grid-template-columns: repeat(2, 1fr); }
  .bento .card:nth-child(6n+1) { grid-column: span 2; }
  .post-row { grid-template-columns: 1fr; }
  .cta-band { margin: 0 16px; padding: 40px 28px; }
  .cta-band .wrap { flex-direction: column; align-items: flex-start; }
}

@media (max-width: 640px) {
  section { padding: 52px 0; }
  .hero { padding: 40px 0 56px; }
  .bento { grid-template-columns: 1fr; }
  .bento .card:nth-child(6n+1) { grid-column: span 1; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 28px 20px; }
  .footer-brand { grid-column: span 2; }
  .float-chip { display: none; }
  .hero-photo { display: none; }
  .header-actions .btn span { display: none; }
}
