/* ============================================================
   BULLS & BEARS · INVESTMENT CENTRE
   Design tokens — modern editorial. Clean white canvas,
   ABN-AMRO teal/green, restrained upright serif for display.
   Mix of: original B&B (teal), jettenaccount (editorial calm),
   ABN AMRO beleggen (corporate teal/green, modern sans).
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Hanken+Grotesk:ital,wght@0,300..800;1,400..600&display=swap');

:root {
  /* ---- Type — one humanist sans (ABN AMRO Sans lookalike) ---- */
  --f-serif: 'Hanken Grotesk', system-ui, -apple-system, sans-serif;  /* display alias — kept so existing rules work */
  --f-sans:  'Hanken Grotesk', system-ui, -apple-system, sans-serif;

  /* ---- Surfaces — clean, cool, modern ---- */
  --paper:      #eef1ee;
  --paper-2:    #e5e9e5;
  --paper-soft: #f4f6f3;
  --ivory:      #ffffff;   /* cards: clean white */
  --ivory-2:    #f6f9f6;

  /* ---- Ink — very dark teal (ABN) ---- */
  --ink:        #10221f;
  --ink-2:      #1f3330;
  --ink-soft:   #4b5b57;
  --ink-mute:   #8a938f;
  --hair:       rgba(0, 55, 55, 0.11);
  --hair-2:     rgba(0, 55, 55, 0.18);

  /* ---- Brand accent (themeable) — ABN teal ---- */
  --accent:       #00716b;
  --accent-deep:  #004c4c;
  --accent-soft:  rgba(0, 113, 107, 0.12);
  --accent-ink:   #ffffff;

  /* ---- Market semantics ---- */
  --up:        #1f8a52;   /* long / gains */
  --up-soft:   rgba(31, 138, 82, 0.12);
  --down:      #c43d2f;   /* short / losses */
  --down-soft: rgba(196, 61, 47, 0.12);
  --flat:      #8a938f;

  /* ---- Medals ---- */
  --gold:   #b8902f;
  --silver: #8a8d94;
  --bronze: #b06a32;

  /* ---- Geometry ---- */
  --r-sm: 10px;
  --r:    14px;
  --r-lg: 20px;
  --pill: 999px;

  /* ---- Elevation ---- */
  --shadow-sm: 0 1px 2px rgba(0, 55, 55, 0.05);
  --shadow:    0 12px 30px -16px rgba(0, 40, 40, 0.20);
  --shadow-lg: 0 28px 56px -24px rgba(0, 40, 40, 0.26);

  /* ---- Layout ---- */
  --maxw: 1240px;
  --gutter: clamp(1rem, 3.2vw, 2.2rem);

  /* ---- Motion ---- */
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
}

/* ---- Accent variants (tweakable) ---- */
[data-accent="teal"]    { --accent:#00716b; --accent-deep:#004c4c; --accent-soft:rgba(0,113,107,0.12); }
[data-accent="forest"]  { --accent:#1f6b3a; --accent-deep:#14502a; --accent-soft:rgba(31,107,58,0.12); }
[data-accent="slate"]   { --accent:#2b4a63; --accent-deep:#1d3447; --accent-soft:rgba(43,74,99,0.12); }
[data-accent="plum"]    { --accent:#7d2f5e; --accent-deep:#5f2347; --accent-soft:rgba(125,47,94,0.12); }
[data-accent="amber"]   { --accent:#b06a14; --accent-deep:#8a520f; --accent-soft:rgba(176,106,20,0.14); }

/* ---- Reset & base ---- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }

body {
  font-family: var(--f-sans);
  background: var(--paper);
  color: var(--ink);
  line-height: 1.55;
  font-weight: 400;
  letter-spacing: 0.01em;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  min-height: 100vh;
  /* Subtle, Apple-like soft mesh — teal accent + a warm hint, fixed for gentle parallax */
  background-color: var(--paper);
  background-image:
    radial-gradient(42% 40% at 12% 6%, var(--accent-soft), transparent 70%),
    radial-gradient(36% 34% at 88% 12%, rgba(236, 106, 30, 0.06), transparent 72%),
    radial-gradient(48% 44% at 50% 112%, var(--accent-soft), transparent 70%);
  background-attachment: fixed;
}
/* Slowly drifting aurora layer (behind content) */
body::after {
  content: ""; position: fixed; inset: -25%; z-index: 0; pointer-events: none;
  background-image:
    radial-gradient(28% 28% at 28% 30%, var(--accent-soft), transparent 60%),
    radial-gradient(26% 26% at 72% 62%, rgba(236, 106, 30, 0.055), transparent 62%);
  filter: blur(40px);
  opacity: 0.9;
  animation: aurora-drift 30s ease-in-out infinite alternate;
}
@keyframes aurora-drift {
  from { transform: translate3d(-1.5%, -1%, 0) scale(1); }
  to   { transform: translate3d(1.5%, 2%, 0) scale(1.08); }
}
/* Film-grain noise (above mesh, below content) */
body::before {
  content: ""; position: fixed; inset: 0; pointer-events: none; z-index: 1; opacity: 0.22;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0.04  0 0 0 0 0.13  0 0 0 0 0.12  0 0 0 0.05 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
  mix-blend-mode: multiply;
}

a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; padding: 0; color: inherit; }
img, svg { display: block; max-width: 100%; }
::selection { background: var(--accent); color: var(--accent-ink); }

/* ---- Type utilities (upright, modern) ---- */
.t-display {
  font-family: var(--f-serif); font-weight: 400; font-variation-settings: "opsz" 144;
  font-size: clamp(46px, 7.5vw, 124px); line-height: 0.96; letter-spacing: -0.022em;
}
.t-h2 {
  font-family: var(--f-serif); font-weight: 400; font-variation-settings: "opsz" 96;
  font-size: clamp(32px, 4.4vw, 64px); line-height: 1.0; letter-spacing: -0.02em;
}
.t-serif { font-family: var(--f-serif); font-weight: 400; letter-spacing: -0.015em; }
/* legacy .italic hook — now upright + accent for a modern, calm emphasis */
.italic { font-style: normal; font-weight: 400; }
.hand   { font-family: var(--f-sans); font-weight: 600; }

.eyebrow {
  font-family: var(--f-sans); font-size: 12px; font-weight: 600;
  letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-soft);
  display: inline-flex; align-items: center; gap: 10px;
}
.eyebrow::before { content: ""; width: 22px; height: 2px; background: var(--accent); display: inline-block; }

.num { font-variant-numeric: tabular-nums; font-feature-settings: "tnum" 1; }
.serif-num { font-family: var(--f-serif); font-variant-numeric: tabular-nums; font-weight: 380; letter-spacing: -0.02em; }

.accent-c { color: var(--accent); }
.pos { color: var(--up); }
.neg { color: var(--down); }
.flat { color: var(--flat); }

/* ---- Buttons / pills ---- */
.btn-primary {
  background: var(--accent); color: var(--accent-ink); border-radius: var(--pill);
  padding: 13px 22px; font-size: 14px; font-weight: 600; letter-spacing: 0.005em;
  display: inline-flex; align-items: center; gap: 10px; white-space: nowrap;
  transition: background 0.25s var(--ease), transform 0.2s var(--ease);
}
.btn-primary:hover { background: var(--accent-deep); }
.btn-primary .arr { transition: transform 0.2s var(--ease); }
.btn-primary:hover .arr { transform: translateX(3px); }
.btn-ghost {
  color: var(--ink); border: 1px solid var(--hair); border-radius: var(--pill);
  padding: 12px 20px; font-size: 14px; font-weight: 500; background: rgba(255,255,255,0.6);
  transition: border-color 0.2s, background 0.2s; display: inline-flex; align-items: center; gap: 8px;
}
.btn-ghost:hover { border-color: var(--ink); background: var(--ivory); }

/* ---- Pool switcher (gedeeld over alle poules) ---- */
.pool-switch { display: inline-flex; gap: 3px; background: rgba(24,27,32,0.05); border-radius: var(--pill); padding: 4px; }
.pool-switch a { padding: 7px 14px; border-radius: var(--pill); font-size: 13px; font-weight: 600; color: var(--ink-soft); line-height: 1; white-space: nowrap; transition: background 0.2s, color 0.2s; }
.pool-switch a.active { background: var(--accent); color: var(--accent-ink); }
.pool-switch a:not(.active):hover { color: var(--ink); }

/* ---- Taal-switcher (NL / EN) met vlaggetje ---- */
.lang-switch { display: inline-flex; gap: 2px; background: rgba(24,27,32,0.05); border-radius: var(--pill); padding: 3px; }
.lang-switch button { display: inline-flex; align-items: center; gap: 6px; padding: 6px 10px; border-radius: var(--pill); font-size: 12px; font-weight: 600; color: var(--ink-soft); line-height: 1; cursor: pointer; transition: background 0.2s, color 0.2s, box-shadow 0.2s; }
.lang-switch button img { width: 18px; height: 13px; border-radius: 2px; box-shadow: 0 0 0 1px var(--hair); display: block; }
.lang-switch button.active { background: var(--ivory); color: var(--ink); box-shadow: var(--shadow-sm); }
.lang-switch button:not(.active):hover { color: var(--ink); }

/* ---- Hand-drawn underline (kept as a drawn accent, not a font) ---- */
.uline { position: relative; display: inline-block; white-space: nowrap; }
.uline svg { position: absolute; left: 0; bottom: -0.1em; width: 100%; height: 0.3em; overflow: visible; pointer-events: none; }
.chalk {
  fill: none; stroke: var(--accent); stroke-width: 10; stroke-linecap: round; stroke-linejoin: round;
  filter: url(#chalk-rough); stroke-dasharray: 2000; stroke-dashoffset: 2000;
  animation: draw-uline 1.2s var(--ease) 0.5s forwards;
}
@keyframes draw-uline { to { stroke-dashoffset: 0; } }

* { scrollbar-width: thin; scrollbar-color: var(--hair-2) transparent; }
::-webkit-scrollbar { width: 9px; height: 9px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--hair-2); border-radius: 5px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
  .chalk { stroke-dashoffset: 0; }
}
