/* ============================================================
   fonAkademisi — Shared Stylesheet
   ============================================================ */

/* ── SELF-HOSTED FONTS ── */
/* JetBrains Mono is loaded via <link> in each HTML <head> — no @import needed here */

/* Geist — variable font, covers wght 100–900 */
@font-face {
  font-family: 'Geist';
  font-style:  normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('/fonts/geist-latin-ext-variable.woff2') format('woff2');
  unicode-range: U+0100-02AF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
                 U+02DC, U+0300-0301, U+0303-0304, U+0308, U+0329, U+1E00-1EFF,
                 U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Geist';
  font-style:  normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('/fonts/geist-latin-variable.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
                 U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122,
                 U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* Instrument Serif — weight 400, normal + italic */
@font-face {
  font-family: 'Instrument Serif';
  font-style:  normal;
  font-weight: 400;
  font-display: swap;
  src: url('/fonts/instrument-serif-latin-ext-400-normal.woff2') format('woff2');
  unicode-range: U+0100-02AF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
                 U+02DC, U+0300-0301, U+0303-0304, U+0308, U+0329, U+1E00-1EFF,
                 U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Instrument Serif';
  font-style:  normal;
  font-weight: 400;
  font-display: swap;
  src: url('/fonts/instrument-serif-latin-400-normal.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
                 U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122,
                 U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Instrument Serif';
  font-style:  italic;
  font-weight: 400;
  font-display: swap;
  src: url('/fonts/instrument-serif-latin-ext-400-italic.woff2') format('woff2');
  unicode-range: U+0100-02AF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
                 U+02DC, U+0300-0301, U+0303-0304, U+0308, U+0329, U+1E00-1EFF,
                 U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Instrument Serif';
  font-style:  italic;
  font-weight: 400;
  font-display: swap;
  src: url('/fonts/instrument-serif-latin-400-italic.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
                 U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122,
                 U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* Newsreader — weight 400, normal + italic */
@font-face {
  font-family: 'Newsreader';
  font-style:  normal;
  font-weight: 400;
  font-display: swap;
  src: url('/fonts/newsreader-latin-ext-400-normal.woff2') format('woff2');
  unicode-range: U+0100-02AF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
                 U+02DC, U+0300-0301, U+0303-0304, U+0308, U+0329, U+1E00-1EFF,
                 U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Newsreader';
  font-style:  normal;
  font-weight: 400;
  font-display: swap;
  src: url('/fonts/newsreader-latin-400-normal.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
                 U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122,
                 U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Newsreader';
  font-style:  italic;
  font-weight: 400;
  font-display: swap;
  src: url('/fonts/newsreader-latin-ext-400-italic.woff2') format('woff2');
  unicode-range: U+0100-02AF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
                 U+02DC, U+0300-0301, U+0303-0304, U+0308, U+0329, U+1E00-1EFF,
                 U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Newsreader';
  font-style:  italic;
  font-weight: 400;
  font-display: swap;
  src: url('/fonts/newsreader-latin-400-italic.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
                 U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122,
                 U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

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

:root {
  /* Brand palette */
  --green-dark:    #1b5e30;
  --green-mid:     #42b869;
  --green-light:   #a5d6a7;
  --cream:         #f4f0e6;
  --cream-dark:    #e8e2d4;
  --text:          #1c2e22;
  --muted:         #5a7a62;
  --border:        #c8ddc0;

  /* Semantic palette */
  --positive:      #10B981;
  --positive-bg:   #d1fae5;
  --negative:      #EF4444;
  --negative-bg:   #fee2e2;
  --warn:          #f59e0b;
  --neutral:       #6B7280;
  --neutral-bg:    #f3f4f6;

  /* Accent tokens — for "Yeni" pins and featured-article badges only */
  --accent-brass:      #b08530;
  --accent-brass-soft: #e8d9b0;

  /* Shadows */
  --shadow-sm:     0 2px 8px rgba(27,94,48,.06);
  --shadow-md:     0 4px 20px rgba(27,94,48,.10);
  --shadow-lg:     0 8px 40px rgba(27,94,48,.13);

  /* Typography */
  --font-display:  'Instrument Serif', Georgia, serif;
  --font-ui:       'Geist', 'Inter', sans-serif;
  --font-body:     'Geist', 'Inter', sans-serif;
  --font-mono:     'JetBrains Mono', 'Roboto Mono', monospace;

  /* Type scale (base 16px) */
  --fs-3xs:  0.5625rem;   /* 9px  */
  --fs-2xs:  0.625rem;    /* 10px */
  --fs-xs:   0.6875rem;   /* 11px */
  --fs-sm:   0.75rem;     /* 12px */
  --fs-nav:  0.8125rem;   /* 13px */
  --fs-md:   0.9375rem;   /* 15px */
  --fs-base: 1rem;        /* 16px */
  --fs-lg:   1.125rem;    /* 18px */
  --fs-xl:   1.5rem;      /* 24px */
  --fs-2xl:  2rem;        /* 32px */
  --fs-3xl:  2.5rem;      /* 40px */

  /* Surface (light mode) */
  --bg:            #f4f0e6;
  --bg-card:       rgba(255,255,255,0.72);
  --bg-nav:        rgba(244,240,230,0.85);
  --surface:       #ffffff;
  --surface-hover: #f8f8f8;

  /* Glass effect */
  --glass-blur:    12px;
  --glass-border:  rgba(255,255,255,0.35);
  --glass-shadow:  0 8px 32px rgba(27,94,48,.10);

  /* Transitions */
  --transition-fast:  .15s ease;
  --transition-base:  .2s ease;
  --transition-slow:  .35s ease;
}

/* ── DARK MODE ── */
[data-theme="dark"] {
  --cream:         #0f1a13;
  --cream-dark:    #162110;
  --bg:            #0f1a13;
  --bg-card:       rgba(22,33,16,0.75);
  --bg-nav:        rgba(15,26,19,0.85);
  --surface:       #1a2e1e;
  --surface-hover: #1f3624;
  --text:          #e8f5e9;
  --muted:         #7aaa85;
  --border:        #2a4a30;
  --glass-border:  rgba(255,255,255,0.08);
  --glass-shadow:  0 8px 32px rgba(0,0,0,.35);
  --shadow-sm:     0 2px 8px rgba(0,0,0,.25);
  --shadow-md:     0 4px 20px rgba(0,0,0,.35);
  --shadow-lg:     0 8px 40px rgba(0,0,0,.45);
  --positive-bg:   rgba(16,185,129,0.15);
  --negative-bg:   rgba(239,68,68,0.15);
  --neutral-bg:    rgba(107,114,128,0.15);
}

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  transition: background var(--transition-slow), color var(--transition-slow);
}

/* ── UTILITY: MONO NUMBERS ── */
.num, .mono {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  letter-spacing: -.02em;
}

/* ── UTILITY: GLASS CARD ── */
.glass-card {
  background: var(--bg-card);
  backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));
  border: 1px solid var(--glass-border);
  box-shadow: var(--glass-shadow);
  border-radius: 12px;
  transition: box-shadow var(--transition-base), transform var(--transition-base);
}
.glass-card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-1px);
}

/* ── UTILITY: SEMANTIC COLORS ── */
.text-positive { color: var(--positive) !important; }
.text-negative { color: var(--negative) !important; }
.text-neutral  { color: var(--neutral)  !important; }
.bg-positive   { background: var(--positive-bg) !important; color: var(--positive) !important; }
.bg-negative   { background: var(--negative-bg) !important; color: var(--negative) !important; }
.bg-neutral    { background: var(--neutral-bg)  !important; color: var(--neutral)  !important; }

/* ── NAV ── */
nav {
  position: sticky; top: 0; z-index: 100;
  background: var(--bg-nav);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border-bottom: 1px solid var(--glass-border);
  box-shadow: 0 1px 0 var(--glass-border), var(--shadow-sm);
  padding: 0 3rem;
  display: flex; align-items: center; justify-content: space-between;
  height: 72px;
  transition: background var(--transition-slow), border-color var(--transition-slow);
  view-transition-name: site-nav; /* stays put across page transitions */
}
nav::after {
  content: '';
  position: absolute; bottom: 0; left: 0; right: 0; height: 1px;
  background: linear-gradient(90deg, transparent, var(--green-mid), transparent);
  opacity: .18;
  pointer-events: none;
}

/* Dark mode toggle button */
.dark-toggle {
  width: 36px; height: 36px;
  border-radius: 8px;
  border: 1.5px solid var(--border);
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  font-size: var(--fs-base);
  transition: background var(--transition-fast), border-color var(--transition-fast), transform var(--transition-fast);
  flex-shrink: 0;
}
.dark-toggle:hover {
  background: var(--cream-dark);
  border-color: var(--green-mid);
  transform: rotate(12deg);
}

.nav-logo {
  display: flex; align-items: center; gap: 10px;
  text-decoration: none;
}
.brand-logo { height: 34px; width: auto; display: block; }
.nav-icon {
  width: 36px; height: 36px; border-radius: 10px;
  background: var(--green-dark);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.nav-wordmark {
  font-family: var(--font-ui);
  font-size: var(--fs-lg); font-weight: 900;
  color: var(--green-dark); letter-spacing: -.02em;
}
.nav-wordmark span { color: var(--green-mid); }

.nav-links {
  display: flex; align-items: center; gap: 4px;
  list-style: none;
}
.nav-links a {
  font-size: var(--fs-nav); font-weight: 500; color: var(--muted);
  text-decoration: none; padding: 8px 14px;
  border-radius: 6px; transition: background .15s, color .15s;
  letter-spacing: .01em; white-space: nowrap;
}
.nav-links a:hover { background: var(--cream-dark); color: var(--green-dark); transition: background var(--transition-fast), color var(--transition-fast); }
.nav-links a.active { color: var(--green-dark); font-weight: 600; }

.nav-cta {
  background: var(--green-dark) !important;
  color: var(--cream) !important;
  padding: 8px 18px !important;
  border-radius: 4px !important;
  letter-spacing: .02em !important;
}
.nav-cta:hover { background: #154a26 !important; }

/* ── HAMBURGER ── */
.hamburger {
  display: none;
  flex-direction: column; gap: 5px;
  background: none; border: none;
  cursor: pointer; padding: 4px;
}
.hamburger span {
  display: block; width: 22px; height: 2px;
  background: var(--green-dark); border-radius: 2px;
  transition: transform .2s, opacity .2s;
}
.hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ── BUTTONS ── */
.btn-primary {
  background: var(--green-dark); color: var(--cream);
  font-family: var(--font-body); font-size: var(--fs-nav); font-weight: 600;
  padding: 13px 28px; border-radius: 4px; border: none;
  text-decoration: none; cursor: pointer;
  letter-spacing: .04em; text-transform: uppercase;
  transition: background .2s, box-shadow .2s, transform .1s;
  display: inline-block;
}
.btn-primary:hover {
  background: #154a26;
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
}

.btn-outline {
  background: transparent; color: var(--green-dark);
  font-family: var(--font-body); font-size: var(--fs-nav); font-weight: 600;
  padding: 12px 28px; border-radius: 4px;
  border: 1.5px solid var(--green-dark);
  text-decoration: none; cursor: pointer;
  letter-spacing: .04em; text-transform: uppercase;
  transition: background .2s, box-shadow .2s;
  display: inline-block;
}
.btn-outline:hover { background: var(--cream-dark); box-shadow: var(--shadow-sm); }

.btn-ghost {
  background: rgba(255,255,255,.1); color: var(--cream);
  font-family: var(--font-body); font-size: var(--fs-nav); font-weight: 600;
  padding: 12px 28px; border-radius: 4px;
  border: 1px solid rgba(255,255,255,.25);
  text-decoration: none; cursor: pointer;
  letter-spacing: .04em; text-transform: uppercase;
  transition: background .2s;
  display: inline-block;
}
.btn-ghost:hover { background: rgba(255,255,255,.2); }

/* ── FOOTER ── */
footer {
  background: #0d3320;
  padding: 5rem 3rem 2.5rem;
}

.footer-grid {
  max-width: 1100px; margin: 0 auto;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 3rem;
  padding-bottom: 3rem;
  border-bottom: 1px solid rgba(255,255,255,.08);
}

.footer-brand .footer-brand-logo { height: 32px; width: auto; display: block; margin-bottom: 1rem; }
.footer-wordmark {
  font-family: var(--font-ui);
  font-size: var(--fs-md); font-weight: 900;
  color: var(--cream);
}
.footer-wordmark span { color: #81c784; }
.footer-tagline { font-size: var(--fs-nav); color: #6aaa78; line-height: 1.7; margin-top: .5rem; max-width: 240px; }

.footer-col-title {
  font-family: var(--font-body);
  font-size: var(--fs-2xs); font-weight: 700;
  letter-spacing: .14em; text-transform: uppercase;
  color: #4a7a52; margin-bottom: 1.2rem;
}
.footer-col-links { list-style: none; display: flex; flex-direction: column; gap: .7rem; }
.footer-col-links a {
  font-size: var(--fs-nav); color: #a5c8aa;
  text-decoration: none; transition: color .15s;
}
.footer-col-links a:hover { color: var(--cream); }

.footer-bottom {
  max-width: 1100px; margin: 2rem auto 0;
  display: flex; justify-content: space-between; align-items: center;
  flex-wrap: wrap; gap: 1rem;
}
.footer-legal { font-size: var(--fs-xs); color: #4a7a52; line-height: 1.7; }
.footer-legal-links { display: flex; gap: 16px; }
.footer-legal-links a { font-size: var(--fs-xs); color: #4a7a52; text-decoration: none; transition: color .15s; }
.footer-legal-links a:hover { color: #6aaa78; }

/* legacy single-col footer elements (for pages not yet updated) */
.footer-logo { display: flex; align-items: center; gap: 8px; justify-content: center; margin-bottom: .8rem; }
.footer-brand-logo { height: 32px; width: auto; display: block; }
.footer-motto { font-size: var(--fs-sm); color: #6aaa78; margin-bottom: 1rem; text-align: center; }
.footer-nav { display: flex; gap: 20px; justify-content: center; flex-wrap: wrap; margin-bottom: 1.2rem; }
.footer-nav a { font-size: var(--fs-sm); color: #6aaa78; text-decoration: none; transition: color .15s; }
.footer-nav a:hover { color: #a5d6a7; }

/* ── MOBILE ── */
@media (max-width: 768px) {
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 2rem; }
  .footer-brand { grid-column: 1 / -1; }
  .footer-bottom { flex-direction: column; text-align: center; }
}

@media (max-width: 640px) {
  nav { padding: 0 1rem; height: 64px; }
  footer { padding: 3rem 1.2rem 2rem; }
  .footer-grid { grid-template-columns: 1fr; }
  .hamburger { display: flex; }
  .nav-links {
    display: none;
    position: fixed;
    top: 64px; left: 0; right: 0;
    background: var(--bg-nav);
    backdrop-filter: blur(var(--glass-blur));
    border-bottom: 1px solid var(--border);
    flex-direction: column;
    padding: .8rem 1rem;
    gap: 4px;
    z-index: 99;
  }
  .nav-links.open { display: flex; }
}

/* ── SKELETON / SHIMMER ── */
/* Used by Momentum (analizler.html) and Fon Bul (filtrele.html) */
.skel {
  display: inline-block;
  background: linear-gradient(
    90deg,
    var(--surface-hover) 25%,
    var(--border)        50%,
    var(--surface-hover) 75%
  );
  background-size: 200% 100%;
  border-radius: 3px;
  height: 12px;
  vertical-align: middle;
}
@media (prefers-reduced-motion: no-preference) {
  .skel { animation: skel-shimmer 1.4s ease-in-out infinite; }
  @keyframes skel-shimmer { to { background-position: -200% 0; } }
}
.skel-row td { pointer-events: none; }

/* ── VIEW TRANSITIONS (cross-document, Chrome 126+, Safari 18+) ── */
/* Opt every same-origin navigation into a view transition.        */
/* Firefox falls back silently to a normal navigation.             */
@view-transition {
  navigation: auto;
}

/* Nav has view-transition-name: site-nav (set above).             */
/* Give it contain:layout so it renders as its own layer.          */
::view-transition-group(site-nav) {
  animation-duration: 0s; /* nav slides with the page — don't animate it */
}

/* Page content: 180ms fade + 6px upward drift on entry */
::view-transition-old(root) {
  animation: 150ms ease-out both vt-fade-out;
}
::view-transition-new(root) {
  animation: 180ms ease-out both vt-fade-in;
}
@keyframes vt-fade-out {
  to { opacity: 0; }
}
@keyframes vt-fade-in {
  from { opacity: 0; transform: translateY(6px); }
}

/* Kill all transition animations for users who prefer reduced motion */
@media (prefers-reduced-motion: reduce) {
  ::view-transition-old(root),
  ::view-transition-new(root) {
    animation: none;
  }
}
