/* ============================================================
   CALCULATORSLY — global.css
   Shared tokens, reset, header, footer, ad slots
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Bebas+Neue&family=IBM+Plex+Mono:wght@300;400;500;600&family=IBM+Plex+Sans:wght@400;500;600&display=swap');

/* ── Tokens ─────────────────────────────────────────────── */
:root {
  --bg:           #F4F2EE;
  --bg-card:      #FDFCFA;
  --bg-dark:      #1C1F26;
  --ink:          #1A1C21;
  --ink-mid:      #5A5C63;
  --ink-soft:     #9A9CA3;
  --ink-inv:      #F4F2EE;
  --border:       #E0DDD7;
  --border-dark:  #2E3240;
  --font-display: 'Bebas Neue', Impact, sans-serif;
  --font-mono:    'IBM Plex Mono', 'Courier New', monospace;
  --font-body:    'IBM Plex Sans', system-ui, sans-serif;
  --theme-color:  #3A7BD5;
  --theme-light:  #E3ECFA;
  --radius:       6px;
  --shadow:       0 2px 12px rgba(0,0,0,0.07);
  --shadow-lg:    0 8px 32px rgba(0,0,0,0.10);
}

/* ── Reset ───────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { font-size: 16px; scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  background-color: var(--bg);
  color: var(--ink);
  line-height: 1.6;
  min-height: 100vh;
  /* subtle graph-paper texture */
  background-image:
    linear-gradient(rgba(26,28,33,0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(26,28,33,0.03) 1px, transparent 1px);
  background-size: 24px 24px;
}

a { color: var(--theme-color); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; display: block; }

/* ── Site Header ─────────────────────────────────────────── */
.site-header {
  background: var(--bg-dark);
  border-bottom: 1px solid var(--border-dark);
  position: sticky;
  top: 0;
  z-index: 100;
}

.site-header .inner {
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 24px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.site-logo {
  font-family: var(--font-display);
  font-size: 1.6rem;
  letter-spacing: 0.04em;
  color: var(--ink-inv);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 8px;
}

.site-logo .logo-accent {
  color: var(--theme-color);
}

.site-logo:hover { text-decoration: none; }

.site-nav {
  display: flex;
  gap: 28px;
  align-items: center;
}

.site-nav a {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-soft);
  text-decoration: none;
  transition: color 0.15s;
}

.site-nav a:hover { color: var(--ink-inv); text-decoration: none; }

/* ── Site Footer ─────────────────────────────────────────── */
.site-footer {
  background: var(--bg-dark);
  border-top: 1px solid var(--border-dark);
  padding: 48px 24px 32px;
  margin-top: 80px;
}

.site-footer .inner {
  max-width: 1160px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 40px;
}

.footer-brand .site-logo {
  font-size: 1.4rem;
  margin-bottom: 10px;
  display: inline-flex;
}

.footer-brand p {
  font-size: 0.82rem;
  color: var(--ink-soft);
  line-height: 1.7;
  max-width: 240px;
  font-family: var(--font-mono);
}

.footer-col h4 {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin-bottom: 14px;
}

.footer-col ul { list-style: none; }

.footer-col ul li { margin-bottom: 8px; }

.footer-col ul li a {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: #6A6E7A;
  text-decoration: none;
  transition: color 0.15s;
}

.footer-col ul li a:hover { color: var(--ink-inv); }

.footer-bottom {
  max-width: 1160px;
  margin: 32px auto 0;
  padding-top: 24px;
  border-top: 1px solid var(--border-dark);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.footer-bottom p {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--ink-soft);
}

/* ── Ad Slots ────────────────────────────────────────────── */
/* DELETE THIS LINE when AdSense is live: */
.ad-slot { display: none !important; }

.ad-slot {
  background: var(--bg);
  border: 1px dashed var(--border);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--ink-soft);
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.ad-slot-rect  { width: 300px; height: 250px; }
.ad-slot-leader { width: 728px; height: 90px; max-width: 100%; }
.ad-slot-mobile { width: 320px; height: 50px; display: none; }

/* ── Utility ─────────────────────────────────────────────── */
.visually-hidden {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

/* ── Responsive ──────────────────────────────────────────── */
@media (max-width: 900px) {
  .site-nav { display: none; }

  .site-footer .inner {
    grid-template-columns: 1fr 1fr;
  }

  .footer-bottom {
    flex-direction: column;
    gap: 8px;
    text-align: center;
  }

  .ad-slot-leader { display: none; }
  .ad-slot-mobile { display: flex; }
}

@media (max-width: 560px) {
  .site-footer .inner {
    grid-template-columns: 1fr;
  }
}
