/* ==========================================================================
   Oxygen Advisor — design system
   Concept: "Breathe easier about money" — calm, fresh, trustworthy.
   ========================================================================== */

:root {
  --bg: oklch(0.985 0.006 225);
  --surface: oklch(1 0 0);
  --ink: oklch(0.22 0.022 245);
  --ink-soft: oklch(0.42 0.02 240);
  --muted: oklch(0.55 0.018 235);

  --primary: oklch(0.42 0.075 210);
  --primary-deep: oklch(0.30 0.06 215);
  --accent: oklch(0.70 0.13 200);
  --accent-2: oklch(0.86 0.09 175);
  --glow: oklch(0.78 0.15 200 / 0.5);

  --line: oklch(0.90 0.01 225);
  --line-strong: oklch(0.82 0.015 225);

  --radius: 18px;
  --radius-lg: 26px;
  --shadow-sm: 0 1px 2px oklch(0.2 0.02 240 / 0.06);
  --shadow-md: 0 10px 30px -12px oklch(0.25 0.03 240 / 0.18);
  --shadow-lg: 0 30px 60px -24px oklch(0.25 0.04 240 / 0.28);

  --font-display: 'Fraunces', Georgia, serif;
  --font-body: 'Manrope', system-ui, -apple-system, Segoe UI, sans-serif;

  --shell: 1120px;
  --header-h: 72px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 16px);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.7;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img, svg { display: block; max-width: 100%; }
a { color: inherit; }
h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.12;
  letter-spacing: -0.01em;
  margin: 0;
  color: var(--ink);
}

.shell { width: min(var(--shell), 100% - 40px); margin-inline: auto; }

[hidden] { display: none !important; }

::selection { background: var(--accent-2); color: var(--primary-deep); }

/* Scrollbar */
::-webkit-scrollbar { width: 12px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--line-strong); border-radius: 99px; border: 3px solid var(--bg); }
::-webkit-scrollbar-thumb:hover { background: var(--accent); }

/* ==========================================================================
   Header / nav
   ========================================================================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: oklch(0.985 0.006 225 / 0.82);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s var(--ease), background 0.3s var(--ease);
}
.site-header.is-scrolled { border-bottom-color: var(--line); }

.header__inner {
  height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  text-decoration: none;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 21px;
  color: var(--ink);
  letter-spacing: -0.01em;
}
.brand__mark {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 13px;
  color: var(--surface);
  background: linear-gradient(135deg, var(--primary), var(--accent));
  box-shadow: 0 6px 18px -6px oklch(0.45 0.09 210 / 0.7);
  animation: breathe 4s ease-in-out infinite;
}
.brand__mark svg { width: 24px; height: 24px; }
.brand__text em { font-style: italic; color: var(--primary); }

@keyframes breathe {
  0%, 100% { transform: scale(1); box-shadow: 0 6px 18px -6px oklch(0.45 0.09 210 / 0.7); }
  50% { transform: scale(1.07); box-shadow: 0 8px 26px -6px oklch(0.6 0.12 200 / 0.8); }
}

.site-nav { display: flex; align-items: center; gap: 26px; }
.site-nav a {
  text-decoration: none;
  font-weight: 600;
  font-size: 15px;
  color: var(--ink-soft);
  transition: color 0.2s var(--ease);
}
.site-nav a:hover, .site-nav a.is-active { color: var(--primary); }
.site-nav a.is-active { position: relative; }
.site-nav a.is-active::after {
  content: '';
  position: absolute;
  left: 0; right: 0; bottom: -8px;
  height: 2px;
  background: var(--primary);
  border-radius: 2px;
}

.nav-cta {
  margin-left: 6px;
  padding: 9px 18px;
  border-radius: 99px;
  background: var(--ink);
  color: var(--surface) !important;
  transition: transform 0.2s var(--ease), background 0.2s var(--ease);
}
.nav-cta:hover { background: var(--primary); transform: translateY(-1px); }

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  width: 44px;
  height: 44px;
  padding: 10px;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  background: var(--surface);
  cursor: pointer;
}
.nav-toggle span { height: 2px; background: var(--ink); border-radius: 2px; transition: transform 0.25s var(--ease), opacity 0.2s; }
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.mobile-menu {
  position: absolute;
  top: var(--header-h);
  left: 0; right: 0;
  padding: 12px 20px 22px;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  box-shadow: var(--shadow-md);
  display: flex;
  flex-direction: column;
}
.mobile-menu a {
  padding: 14px 4px;
  text-decoration: none;
  font-weight: 600;
  color: var(--ink);
  border-bottom: 1px solid var(--line);
}
.mobile-menu a:last-child { border-bottom: none; }

/* Progress bar */
.progress {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 3px;
  z-index: 60;
  background: transparent;
  pointer-events: none;
}
.progress span {
  display: block;
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  transition: width 0.1s linear;
}

/* ==========================================================================
   Hero
   ========================================================================== */
.hero {
  position: relative;
  overflow: hidden;
  padding: 96px 0 84px;
  background:
    radial-gradient(1200px 600px at 85% -10%, oklch(0.9 0.08 195 / 0.55), transparent 60%),
    radial-gradient(900px 500px at 0% 10%, oklch(0.9 0.07 160 / 0.35), transparent 55%),
    var(--bg);
}
.hero__bg { position: absolute; inset: 0; pointer-events: none; }
.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(46px);
  opacity: 0.6;
  mix-blend-mode: multiply;
  animation: float 14s ease-in-out infinite;
}
.orb--1 { width: 420px; height: 420px; top: -120px; right: 6%; background: var(--glow); }
.orb--2 { width: 320px; height: 320px; bottom: -80px; left: 2%; background: oklch(0.8 0.1 160 / 0.55); animation-delay: -4s; }
.orb--3 { width: 200px; height: 200px; top: 40%; left: 55%; background: oklch(0.88 0.09 185 / 0.6); animation-delay: -8s; }

@keyframes float {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(30px, -26px) scale(1.05); }
  66% { transform: translate(-22px, 20px) scale(0.96); }
}

.hero__inner { position: relative; max-width: 860px; }
.hero__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--primary);
  margin: 0 0 24px;
}
.hero__eyebrow .dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 4px oklch(0.7 0.13 200 / 0.22);
}

.hero__title {
  font-size: clamp(44px, 8vw, 84px);
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.02;
}
.grad {
  background: linear-gradient(100deg, var(--primary) 0%, var(--accent) 60%, var(--accent-2) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

.hero__sub {
  font-size: clamp(17px, 2.4vw, 21px);
  color: var(--ink-soft);
  max-width: 620px;
  margin: 26px 0 0;
}

.hero__actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 34px; }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 14px 26px;
  border-radius: 99px;
  font-weight: 700;
  font-size: 15px;
  text-decoration: none;
  transition: transform 0.2s var(--ease), box-shadow 0.2s var(--ease), background 0.2s var(--ease);
}
.btn--primary { background: var(--primary); color: var(--surface); box-shadow: 0 12px 30px -10px oklch(0.42 0.075 210 / 0.6); }
.btn--primary:hover { background: var(--primary-deep); transform: translateY(-2px); }
.btn--ghost { background: transparent; color: var(--ink); border: 1px solid var(--line-strong); }
.btn--ghost:hover { border-color: var(--primary); color: var(--primary); transform: translateY(-2px); }

.hero__stats {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 34px;
  margin: 52px 0 0;
  padding: 28px 0 0;
  border-top: 1px solid var(--line);
}
.hero__stats li { display: flex; flex-direction: column; gap: 2px; }
.hero__stats strong { font-family: var(--font-display); font-size: 30px; font-weight: 600; color: var(--ink); }
.hero__stats span { font-size: 13px; color: var(--muted); }

/* ==========================================================================
   Sections & cards
   ========================================================================== */
.section { padding: 88px 0; }
.section__head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 30px;
  margin-bottom: 44px;
}
.section__title { font-size: clamp(30px, 4vw, 44px); letter-spacing: -0.02em; margin-top: 10px; }
.section__lead { max-width: 380px; color: var(--ink-soft); font-size: 16px; }

.kicker {
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--primary);
}
.kicker a { text-decoration: none; }
.kicker--light { color: var(--accent-2); }

.grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.card {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease), border-color 0.35s var(--ease);
}
.card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
  border-color: var(--line-strong);
}
.card__link { display: block; text-decoration: none; height: 100%; }
.card__thumb {
  position: relative;
  height: 200px;
  overflow: hidden;
  background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
}
.card__img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.55s var(--ease);
}
.card:hover .card__img { transform: scale(1.06); }
.card__num {
  position: absolute;
  top: 14px; right: 16px;
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 600;
  color: #fff;
  padding: 4px 11px;
  border-radius: 99px;
  background: oklch(0.2 0.02 240 / 0.5);
  backdrop-filter: blur(4px);
}
.card__body { padding: 22px 22px 26px; display: flex; flex-direction: column; gap: 10px; }
.card__meta { display: flex; align-items: center; justify-content: space-between; font-size: 13px; color: var(--muted); }
.card__meta time { font-size: 13px; }
.card__title { font-size: 21px; letter-spacing: -0.01em; line-height: 1.18; }
.card__excerpt { color: var(--ink-soft); font-size: 15px; margin: 0; flex: 1; }
.card__cta {
  margin-top: 6px;
  font-weight: 700;
  font-size: 14px;
  color: var(--primary);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.card__cta span { transition: transform 0.3s var(--ease); }
.card:hover .card__cta span { transform: translateX(4px); }

/* ==========================================================================
   Band
   ========================================================================== */
.band {
  padding: 76px 0;
  background: linear-gradient(135deg, var(--primary-deep), var(--primary));
  color: var(--surface);
}
.band__inner {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 40px;
  align-items: center;
}
.band__title { color: var(--surface); font-size: clamp(28px, 4vw, 40px); letter-spacing: -0.02em; margin-top: 12px; }
.band__text { color: oklch(0.88 0.02 210); font-size: 17px; }
.band__text a { color: var(--accent-2); }

/* ==========================================================================
   Post / article
   ========================================================================== */
.post__hero {
  padding: 72px 0 56px;
  background:
    radial-gradient(1000px 420px at 50% -60%, oklch(0.88 0.08 195 / 0.5), transparent 60%),
    var(--bg);
  border-bottom: 1px solid var(--line);
}
.post__hero-inner { max-width: 820px; }
.post__title { font-size: clamp(34px, 5.6vw, 56px); letter-spacing: -0.025em; margin-top: 16px; line-height: 1.08; }
.post__meta { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 15px; margin-top: 20px; }
.post__meta .sep { opacity: 0.5; }

.post__layout {
  display: grid;
  grid-template-columns: 220px minmax(0, 720px);
  gap: 56px;
  padding: 48px 0 88px;
  align-items: start;
}

/* TOC */
.toc { position: sticky; top: calc(var(--header-h) + 28px); }
.toc__label {
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 14px;
}
.toc__nav { display: flex; flex-direction: column; gap: 2px; border-left: 1px solid var(--line-strong); }
.toc__nav a {
  padding: 7px 0 7px 16px;
  font-size: 13.5px;
  color: var(--ink-soft);
  text-decoration: none;
  border-left: 2px solid transparent;
  margin-left: -1px;
  transition: color 0.2s var(--ease), border-color 0.2s var(--ease);
}
.toc__nav a:hover { color: var(--primary); }
.toc__nav a.is-active { color: var(--primary); border-left-color: var(--primary); font-weight: 700; }
.toc__nav a[data-level="3"] { padding-left: 30px; font-size: 12.5px; }

/* Prose */
.post__body { min-width: 0; }
.post__body h2 {
  font-size: clamp(26px, 3.4vw, 34px);
  margin: 48px 0 16px;
  padding-top: 4px;
}
.post__body h3 { font-size: 22px; margin: 36px 0 12px; }
.post__body h4 { font-size: 18px; margin: 28px 0 10px; }
.post__body p { margin: 0 0 20px; color: var(--ink-soft); font-size: 17px; }
.post__body ul, .post__body ol { margin: 0 0 22px; padding-left: 0; list-style: none; }
.post__body li {
  position: relative;
  padding-left: 28px;
  margin-bottom: 12px;
  color: var(--ink-soft);
  font-size: 17px;
}
.post__body ul li::before {
  content: '';
  position: absolute;
  left: 2px; top: 11px;
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--accent);
}
.post__body ol { counter-reset: n; }
.post__body ol li { counter-increment: n; }
.post__body ol li::before {
  content: counter(n);
  position: absolute;
  left: 0; top: 1px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 15px;
  color: var(--primary);
}
.post__body strong { color: var(--ink); font-weight: 700; }

.post__body .note {
  margin: 32px 0;
  padding: 20px 24px;
  background: oklch(0.95 0.03 195 / 0.6);
  border: 1px solid oklch(0.88 0.04 200);
  border-left: 3px solid var(--accent);
  border-radius: 12px;
  color: var(--ink-soft);
  font-size: 15.5px;
}

.post__end {
  text-align: center;
  color: var(--muted);
  letter-spacing: 6px;
  margin: 48px 0;
}

.post-nav {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-top: 24px;
  padding-top: 32px;
  border-top: 1px solid var(--line);
}
.post-nav__link {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  text-decoration: none;
  transition: border-color 0.25s var(--ease), transform 0.25s var(--ease);
}
.post-nav__link:hover { border-color: var(--primary); transform: translateY(-2px); }
.post-nav__link span { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); }
.post-nav__link strong { font-family: var(--font-display); font-weight: 600; font-size: 17px; line-height: 1.25; }
.post-nav__link--next { text-align: right; }

/* ==========================================================================
   Page (about / disclaimer / privacy)
   ========================================================================== */
.page__hero {
  padding: 72px 0 48px;
  background:
    radial-gradient(900px 380px at 50% -60%, oklch(0.88 0.08 195 / 0.5), transparent 60%),
    var(--bg);
  border-bottom: 1px solid var(--line);
}
.page__title { font-size: clamp(34px, 5.6vw, 56px); letter-spacing: -0.025em; }
.page__body { padding: 48px 0 88px; }
.prose { max-width: 720px; }
.prose h2 { font-size: clamp(24px, 3vw, 30px); margin: 40px 0 14px; }
.prose h3 { font-size: 20px; margin: 32px 0 10px; }
.prose p { color: var(--ink-soft); margin: 0 0 18px; }
.prose ul { padding-left: 0; list-style: none; margin: 0 0 20px; }
.prose li { position: relative; padding-left: 24px; margin-bottom: 10px; color: var(--ink-soft); }
.prose li::before { content: ''; position: absolute; left: 2px; top: 11px; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); }
.prose strong { color: var(--ink); }

/* ==========================================================================
   Footer
   ========================================================================== */
.site-footer {
  background: oklch(0.16 0.02 235);
  color: oklch(0.86 0.015 220);
  padding: 72px 0 30px;
}
.site-footer a { color: inherit; }
.footer__grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr;
  gap: 40px;
  padding-bottom: 44px;
  border-bottom: 1px solid oklch(1 0 0 / 0.1);
}
.footer__brand .brand { color: var(--surface); margin-bottom: 14px; }
.footer__tagline { font-family: var(--font-display); font-size: 18px; color: var(--surface); margin: 0 0 8px; }
.footer__note { color: oklch(0.72 0.02 225); font-size: 14.5px; max-width: 320px; margin: 0; }
.footer__col { display: flex; flex-direction: column; gap: 10px; }
.footer__col h3 { color: var(--surface); font-size: 14px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; margin-bottom: 4px; }
.footer__col a { text-decoration: none; font-size: 15px; color: oklch(0.72 0.02 225); transition: color 0.2s var(--ease); }
.footer__col a:hover { color: var(--accent-2); }
.footer__bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding-top: 26px;
  font-size: 13.5px;
  color: oklch(0.68 0.02 225);
}
.footer__bottom p { margin: 0; }
.footer__disclaimer { text-align: right; max-width: 380px; }

/* ==========================================================================
   Reveal animation
   ========================================================================== */
[data-reveal] {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
  transition-delay: calc(var(--i, 0) * 60ms);
}
[data-reveal].is-visible { opacity: 1; transform: none; }

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

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 960px) {
  .grid { grid-template-columns: repeat(2, 1fr); }
  .post__layout { grid-template-columns: 1fr; gap: 28px; }
  .toc { position: static; display: none; }
  .band__inner { grid-template-columns: 1fr; }
  .footer__grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 680px) {
  .site-nav { display: none; }
  .nav-toggle { display: flex; }
  .hero { padding: 64px 0 60px; }
  .hero__stats { gap: 24px; }
  .grid { grid-template-columns: 1fr; }
  .section { padding: 60px 0; }
  .section__head { flex-direction: column; align-items: flex-start; }
  .footer__grid { grid-template-columns: 1fr; }
  .footer__bottom { flex-direction: column; text-align: left; align-items: flex-start; }
  .footer__disclaimer { text-align: left; }
  .post-nav { grid-template-columns: 1fr; }
  .post-nav__link--next { text-align: left; }
}

/* Back to top */
.back-top {
  position: fixed;
  right: 22px; bottom: 22px;
  width: 46px; height: 46px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: none;
  background: var(--primary);
  color: var(--surface);
  cursor: pointer;
  opacity: 0;
  transform: translateY(12px);
  pointer-events: none;
  transition: opacity 0.3s var(--ease), transform 0.3s var(--ease), background 0.2s;
  box-shadow: var(--shadow-md);
  z-index: 40;
}
.back-top.is-visible { opacity: 1; transform: none; pointer-events: auto; }
.back-top:hover { background: var(--primary-deep); }
