/* ============================================
   STEEV V3 — Shared Base Styles
   Applied to ALL pages (blog, tools, exercises, etc.)
   ============================================ */

/* === VARIABLES === */
:root {
  --yellow: #FACC15;
  --yellow-hover: #EAB308;
  --yellow-dim: rgba(250,204,21,0.08);
  --yellow-glow: rgba(250,204,21,0.25);
  --bg: #000;
  --bg-2: #0A0A0A;
  --surface: rgba(255,255,255,0.04);
  --glass: rgba(255,255,255,0.05);
  --glass-border: rgba(255,255,255,0.07);
  --text: #fff;
  --text-2: rgba(255,255,255,0.5);
  --text-3: rgba(255,255,255,0.3);
  --green: #30D158;
  --blue: #0A84FF;
  --red: #FF453A;
  --font: 'Space Grotesk', -apple-system, BlinkMacSystemFont, sans-serif;
  --mono: 'JetBrains Mono', 'SF Mono', monospace;
  --ease: cubic-bezier(.25,.46,.45,.94);
  --ease-out: cubic-bezier(.16,1,.3,1);
  --ease-spring: cubic-bezier(.34,1.56,.64,1);
  --max-w: 1120px;
}

/* === RESET === */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }
body {
  font-family: var(--font); background: var(--bg); color: var(--text);
  line-height: 1.6; overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
a:hover { text-decoration: none; }
a.btn-yellow, a.cta-btn, a.btn-primary, a.btn-hero { color: #000; }
a.btn-dark, a.btn-outline { color: var(--text); }
img { max-width: 100%; display: block; }

/* === FILM GRAIN === */
body::after {
  content: ''; position: fixed; inset: 0; z-index: 9999; pointer-events: none; opacity: .018;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 512 512' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.65' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 256px;
}

/* === NAV — floating pill === */
.nav {
  position: fixed; top: 12px; left: 50%; transform: translateX(-50%);
  z-index: 100; width: calc(100% - 32px); max-width: 800px;
  background: rgba(30,30,30,.45);
  backdrop-filter: saturate(180%) blur(40px); -webkit-backdrop-filter: saturate(180%) blur(40px);
  border: 1px solid rgba(255,255,255,.07); border-radius: 20px;
  transition: all .5s var(--ease);
}
.nav.scrolled { background: rgba(20,20,20,.88); border-color: rgba(255,255,255,.05); }
.nav-inner {
  padding: 0 20px; height: 56px; display: flex; align-items: center; justify-content: space-between;
}
.nav-logo { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.nav-logo img { width: 30px; height: 30px; border-radius: 8px; }
.nav-logo-icon {
  width: 30px; height: 30px; background: var(--yellow); border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 15px; color: #000;
}
.nav-logo span { font-weight: 700; font-size: 16px; letter-spacing: 1.5px; color: var(--text); }
.nav-links { display: flex; align-items: center; gap: 28px; list-style: none; }
.nav-links a {
  font-size: 13px; font-weight: 500; color: var(--text-2); transition: color .3s;
  text-decoration: none; white-space: nowrap;
}
.nav-links a:hover { color: var(--text); }
.nav-cta {
  background: var(--yellow); color: #000; font-weight: 700; font-size: 13px;
  padding: 8px 18px; border-radius: 12px; border: none; cursor: pointer;
  transition: all .3s var(--ease); text-decoration: none; white-space: nowrap;
}
.nav-cta:hover {
  background: var(--yellow-hover); transform: scale(1.04);
  box-shadow: 0 4px 24px var(--yellow-glow); text-decoration: none;
}
.nav-mobile-toggle {
  display: none; background: none; border: none; color: var(--text);
  font-size: 22px; cursor: pointer; padding: 4px;
}

/* Mobile menu */
.mobile-menu {
  display: none; position: fixed; top: 76px; left: 16px; right: 16px; z-index: 99;
  background: rgba(20,20,20,.95); backdrop-filter: blur(40px); -webkit-backdrop-filter: blur(40px);
  border: 1px solid var(--glass-border); border-radius: 20px;
  padding: 24px; flex-direction: column; gap: 20px; align-items: center;
}
.mobile-menu.open { display: flex; }
.mobile-menu a {
  font-size: 17px; font-weight: 600; color: var(--text); transition: color .2s; text-decoration: none;
}
.mobile-menu a:hover { color: var(--yellow); text-decoration: none; }

/* === BUTTONS === */
.btn-primary, .btn-hero {
  background: var(--yellow); color: #000; font-family: var(--font);
  font-weight: 700; font-size: 16px; padding: 16px 40px; border-radius: 16px;
  border: none; cursor: pointer; display: inline-flex; align-items: center; gap: 10px;
  transition: all .4s var(--ease); position: relative; overflow: hidden; text-decoration: none;
}
.btn-primary::after, .btn-hero::after {
  content: ''; position: absolute; top: -50%; left: -50%; width: 200%; height: 200%;
  background: conic-gradient(transparent, rgba(255,255,255,.25), transparent);
  animation: btnSpin 3s linear infinite; opacity: 0; transition: opacity .3s;
}
.btn-primary:hover::after, .btn-hero:hover::after { opacity: 1; }
.btn-primary:hover, .btn-hero:hover {
  transform: translateY(-3px) scale(1.02); text-decoration: none;
  box-shadow: 0 12px 40px var(--yellow-glow);
}
@keyframes btnSpin { from { transform: rotate(0); } to { transform: rotate(360deg); } }
.btn-primary > span, .btn-hero > span { position: relative; z-index: 1; display: flex; align-items: center; gap: 10px; }

.btn-secondary, .btn-ghost {
  background: rgba(255,255,255,.06); color: var(--text); font-family: var(--font);
  font-weight: 600; font-size: 16px; padding: 16px 36px; border-radius: 16px;
  border: 1px solid rgba(255,255,255,.08); cursor: pointer; text-decoration: none;
  backdrop-filter: blur(10px); transition: all .4s var(--ease);
  display: inline-flex; align-items: center; gap: 8px;
}
.btn-secondary:hover, .btn-ghost:hover {
  background: rgba(255,255,255,.1); border-color: rgba(255,255,255,.15);
  transform: translateY(-3px); text-decoration: none;
}

/* === FOOTER === */
.footer {
  padding: 64px 0 32px; border-top: 1px solid rgba(255,255,255,.04); background: var(--bg);
}
.footer-inner, .footer-grid {
  max-width: var(--max-w); margin: 0 auto; padding: 0 24px;
}
.footer-top, .footer-grid-row {
  display: flex; justify-content: space-between; gap: 48px; margin-bottom: 48px;
}
.footer-brand { max-width: 260px; }
.footer-logo { display: flex; align-items: center; gap: 8px; margin-bottom: 14px; }
.footer-logo img { width: 28px; height: 28px; border-radius: 7px; }
.footer-logo span { font-weight: 700; font-size: 15px; letter-spacing: 1px; }
.footer-desc { font-size: 13px; color: var(--text-3); line-height: 1.7; margin-bottom: 20px; }
.footer-socials { display: flex; gap: 8px; }
.social-link, .social-btn {
  width: 36px; height: 36px; background: var(--glass); border: 1px solid var(--glass-border);
  border-radius: 10px; display: flex; align-items: center; justify-content: center;
  color: var(--text-3); cursor: pointer; transition: all .3s; text-decoration: none;
}
.social-link:hover, .social-btn:hover {
  border-color: rgba(250,204,21,.2); color: var(--yellow);
  transform: translateY(-2px); text-decoration: none;
}
.footer-col h4, .footer-heading {
  font-size: 11px; font-weight: 600; text-transform: uppercase;
  letter-spacing: 2px; color: var(--text-3); margin-bottom: 16px;
}
.footer-col ul { list-style: none; }
.footer-col li { margin-bottom: 10px; }
.footer-col a { font-size: 13px; color: var(--text-2); transition: color .2s; text-decoration: none; }
.footer-col a:hover { color: var(--yellow); text-decoration: none; }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,.04); padding-top: 24px;
  display: flex; justify-content: space-between; align-items: center;
}
.footer-copy { font-family: var(--mono); font-size: 11px; color: var(--text-3); }
.footer-legal { display: flex; gap: 24px; }
.footer-legal a { font-size: 12px; color: var(--text-3); transition: color .2s; text-decoration: none; }
.footer-legal a:hover { color: var(--text-2); }

/* === SCROLL ANIMATIONS === */
.reveal {
  opacity: 0; transform: translateY(50px);
  transition: opacity .8s var(--ease-out), transform .8s var(--ease-out);
}
.reveal.vis { opacity: 1; transform: translateY(0); }
.rd1 { transition-delay: .1s; } .rd2 { transition-delay: .2s; }
.rd3 { transition-delay: .3s; } .rd4 { transition-delay: .4s; }
/* Legacy class support */
.animate { opacity: 0; transform: translateY(24px); transition: opacity .6s ease, transform .6s ease; }
.animate.visible { opacity: 1; transform: translateY(0); }

/* === SECTIONS === */
.section { padding: 140px 0; position: relative; }
.section-alt {
  background: rgba(255,255,255,.015);
  border-top: 1px solid rgba(255,255,255,.04);
  border-bottom: 1px solid rgba(255,255,255,.04);
}
.container { max-width: var(--max-w); margin: 0 auto; padding: 0 24px; }
.container-sm { max-width: 800px; margin: 0 auto; padding: 0 24px; }
.section-label, .s-label {
  font-family: var(--mono); font-size: 11px; font-weight: 600;
  color: var(--yellow); text-transform: uppercase; letter-spacing: 3px;
  margin-bottom: 16px; text-align: center;
}
.section-title, .s-title {
  font-size: clamp(30px, 4.5vw, 50px); font-weight: 700;
  letter-spacing: -1.5px; text-align: center; margin-bottom: 20px; line-height: 1.1;
}
.section-subtitle, .s-sub {
  font-size: 17px; color: var(--text-2); text-align: center;
  max-width: 520px; margin: 0 auto 64px; line-height: 1.7;
}

/* === GLASSMORPHISM CARDS === */
.glass-card {
  background: var(--glass); border: 1px solid var(--glass-border);
  border-radius: 24px; padding: 32px 28px; position: relative; overflow: hidden;
  transition: all .5s var(--ease);
  backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
}
.glass-card:hover {
  border-color: rgba(250,204,21,.12); transform: translateY(-4px);
  box-shadow: 0 20px 60px rgba(0,0,0,.3);
}

/* === LEGACY BUTTON COMPAT === */
.btn-yellow, .cta-btn {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--yellow); color: #000; font-family: var(--font);
  font-weight: 700; font-size: 16px; padding: 14px 32px; border-radius: 14px;
  border: none; cursor: pointer; text-decoration: none;
  transition: all .3s var(--ease);
}
.btn-yellow:hover, .cta-btn:hover {
  background: var(--yellow-hover); transform: translateY(-2px);
  box-shadow: 0 8px 32px var(--yellow-glow); text-decoration: none;
}
.btn-dark {
  display: inline-flex; align-items: center; gap: 8px;
  background: rgba(255,255,255,.06); color: var(--text); font-family: var(--font);
  font-weight: 600; font-size: 16px; padding: 14px 32px; border-radius: 14px;
  border: 1px solid var(--glass-border); cursor: pointer; text-decoration: none;
  transition: all .3s var(--ease);
}
.btn-dark:hover {
  background: rgba(255,255,255,.1); border-color: rgba(255,255,255,.15);
  transform: translateY(-2px); text-decoration: none;
}
.btn-outline {
  display: inline-flex; align-items: center;
  background: transparent; color: var(--text); font-family: var(--font);
  font-weight: 600; font-size: 14px; padding: 12px 24px; border-radius: 12px;
  border: 1px solid var(--glass-border); cursor: pointer; text-decoration: none;
  transition: all .3s var(--ease);
}
.btn-outline:hover {
  border-color: rgba(250,204,21,.2); color: var(--yellow); text-decoration: none;
}

/* === STICKY MOBILE CTA === */
.mobile-sticky-cta {
  display: none; position: fixed; bottom: 0; left: 0; right: 0; z-index: 999;
  padding: 12px 20px; padding-bottom: max(12px, env(safe-area-inset-bottom));
  background: rgba(0,0,0,.9); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
  border-top: 1px solid var(--glass-border);
  transform: translateY(100%); transition: transform .3s var(--ease);
}

/* === CONTENT PAGES (blog, tools) === */
.content { max-width: 720px; margin: 48px auto; padding: 0 32px 80px; }
.content h1 { font-size: 32px; font-weight: 700; margin: 12px 0 8px; line-height: 1.3; color: var(--text); }
.content h2 { font-size: 20px; font-weight: 600; margin-top: 40px; margin-bottom: 12px; color: var(--yellow); }
.content h3 { font-size: 17px; font-weight: 600; margin-top: 28px; margin-bottom: 8px; color: var(--text); }
.content p, .content li { color: var(--text-2); margin-bottom: 12px; }
.content ul, .content ol { padding-left: 24px; margin-bottom: 16px; }
.content strong { color: var(--text); }
.content blockquote {
  border-left: 3px solid var(--yellow); padding-left: 16px;
  margin: 20px 0; font-style: italic; color: var(--text-2);
}
.content a { color: var(--yellow); text-decoration: none; transition: opacity .2s; }
.content a:hover { opacity: .8; }
.content img { border-radius: 12px; margin: 20px 0; }
.content code {
  font-family: var(--mono); font-size: 14px; background: rgba(255,255,255,.06);
  padding: 2px 6px; border-radius: 4px;
}
.content pre {
  background: rgba(255,255,255,.04); border: 1px solid var(--glass-border);
  border-radius: 12px; padding: 20px; overflow-x: auto; margin: 20px 0;
}
.content pre code { background: none; padding: 0; }

/* Article-specific */
.article-tag {
  font-family: var(--mono); font-size: 11px; color: var(--yellow);
  text-transform: uppercase; letter-spacing: .5px;
}
.article-meta {
  font-family: var(--mono); font-size: 13px; color: var(--text-2); margin-bottom: 40px;
}
.article-cta {
  margin-top: 48px; padding: 36px; background: var(--glass);
  border: 1px solid var(--glass-border); border-radius: 20px; text-align: center;
  transition: border-color .3s;
}
.article-cta:hover { border-color: rgba(250,204,21,.12); }
.article-cta-text { color: var(--text); font-size: 18px; font-weight: 600; margin-bottom: 16px; }
.article-cta-btn {
  display: inline-block; background: var(--yellow); color: #000;
  font-family: var(--font); font-weight: 700; font-size: 16px;
  padding: 14px 32px; border-radius: 14px; text-decoration: none;
  transition: all .3s var(--ease);
}
.article-cta-btn:hover {
  background: var(--yellow-hover); transform: translateY(-2px);
  box-shadow: 0 8px 32px var(--yellow-glow); text-decoration: none;
}

/* Read-also / related articles */
.read-also { margin-top: 40px; padding-top: 32px; border-top: 1px solid var(--glass-border); }
.read-also h2 { font-size: 16px; margin-top: 0; }
.read-also ul { list-style: none; padding: 0; }
.read-also li { margin-bottom: 8px; }
.read-also a { font-size: 15px; color: var(--yellow); }
.sources { margin-top: 40px; }
.sources h2 { font-size: 16px; }
.sources li { font-size: 13px; color: var(--text-2); margin-bottom: 6px; }

/* Breadcrumb */
.breadcrumb {
  font-family: var(--mono); font-size: 12px; color: var(--text-3);
  margin-bottom: 16px; display: flex; gap: 8px; align-items: center;
}
.breadcrumb a { color: var(--text-3); transition: color .2s; }
.breadcrumb a:hover { color: var(--yellow); }
.breadcrumb span { opacity: .4; }

/* === TOOL PAGES === */
.tool-container { max-width: 680px; margin: 0 auto; padding: 32px 24px 80px; }
.tool-input {
  width: 100%; padding: 14px 18px; border-radius: 14px;
  border: 1px solid var(--glass-border); background: var(--glass);
  color: var(--text); font-family: var(--font); font-size: 16px;
  transition: border-color .3s, box-shadow .3s; outline: none;
}
.tool-input:focus {
  border-color: rgba(250,204,21,.3);
  box-shadow: 0 0 0 3px rgba(250,204,21,.08);
}
.tool-input::placeholder { color: var(--text-3); }
select.tool-input { cursor: pointer; appearance: none; }
.tool-result {
  background: var(--glass); border: 1px solid var(--glass-border);
  border-radius: 20px; padding: 28px; margin-top: 24px;
}
.tool-label {
  font-family: var(--mono); font-size: 11px; font-weight: 600;
  color: var(--text-3); text-transform: uppercase; letter-spacing: 1px;
  margin-bottom: 8px;
}
.tool-value {
  font-family: var(--mono); font-size: 36px; font-weight: 700; color: var(--yellow);
}

/* === RESPONSIVE === */
@media (max-width: 768px) {
  /* Nav */
  .nav { top: 8px; width: calc(100% - 16px); border-radius: 16px; }
  .nav-inner { height: 50px; padding: 0 16px; }
  .nav-links { display: none; }
  .nav-mobile-toggle { display: block; }
  .nav-cta { font-size: 12px; padding: 6px 14px; border-radius: 10px; }
  .mobile-menu { top: 66px; left: 12px; right: 12px; padding: 20px; gap: 16px; border-radius: 16px; }
  .mobile-menu a { font-size: 16px; }

  /* Sections */
  .section { padding: 64px 0; }
  .container { padding: 0 20px; }
  .section-title, .s-title { font-size: clamp(24px, 6vw, 32px); }
  .section-subtitle, .s-sub { font-size: 14px; margin-bottom: 32px; }
  .section-label, .s-label { font-size: 10px; letter-spacing: 2px; }

  /* Content pages (blog, tools) */
  .content { padding: 0 20px 60px; margin-top: 32px; }
  .content h1 { font-size: 24px; }
  .content h2 { font-size: 18px; }

  /* Buttons */
  .btn-primary, .btn-hero { font-size: 15px; padding: 14px 24px; border-radius: 14px; }
  .btn-secondary, .btn-ghost { font-size: 15px; padding: 14px 24px; border-radius: 14px; }

  /* Footer */
  .footer { padding: 40px 0 32px; }
  .footer-top, .footer-grid-row { flex-direction: column; gap: 24px; }
  .footer-bottom { flex-direction: column; gap: 12px; text-align: center; }
  .footer-desc { font-size: 12px; }
  .footer-col h4, .footer-heading { font-size: 10px; margin-bottom: 12px; }
  .footer-col a { font-size: 12px; }
  .footer-col li { margin-bottom: 8px; }
  .social-link, .social-btn { width: 32px; height: 32px; }

  /* Sticky CTA */
  .mobile-sticky-cta { display: block; }
  footer { padding-bottom: 80px; }

  /* Tools */
  .tool-container { padding: 24px 20px 60px; }
  .tool-value { font-size: 28px; }

  /* Article CTA */
  .article-cta { padding: 24px; }
  .article-cta-text { font-size: 16px; }
  .article-cta-btn { font-size: 14px; padding: 12px 24px; }

  /* Prevent horizontal scroll */
  body { overflow-x: hidden; }
  * { max-width: 100vw; }
  .container, .content, .tool-container { overflow-x: hidden; }
}

/* === A11Y === */
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible {
  outline: 2px solid var(--yellow); outline-offset: 2px;
}
.skip-link:focus { top: 0; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    transition-duration: .01ms !important;
  }
  .orb, .hero-orb { display: none; }
}
</style>
