/* Katalys Media — site styles. Tokens from brand/tokens.css (Step 5). Light-only site. */

@font-face {
  font-family: "Bricolage Grotesque";
  src: url("../fonts/bricolage-latin.woff2") format("woff2");
  font-weight: 700 800;
  font-display: swap;
}
@font-face {
  font-family: "Figtree";
  src: url("../fonts/figtree-latin.woff2") format("woff2");
  font-weight: 400 700;
  font-display: swap;
}

/* Katalys Media — design tokens (Step 5). Direction: Rising Bars. Light-only site.
   Colours sampled from the original logo. Contrast ratios noted against --paper. */
:root {
  /* Colour: brand */
  --navy-900: #0b1a2e;   /* logo navy, bottom of gradient */
  --navy-800: #18273a;   /* logo navy, main ink. 14.1:1 on paper */
  --navy-700: #2a3b55;   /* hover on navy */
  --navy-200: #c9d0dc;   /* body text on navy. 9.7:1 on navy-800 */
  --gold-400: #e4b75c;   /* logo gold, light. Fills and accents on navy only (8.1:1) */
  --gold-600: #b58136;   /* logo gold, dark. Fills only, never text on light (3.4:1) */
  --gold-700: #8a6424;   /* gold for text on light. 5.0:1 on paper */
  --gold-grad: linear-gradient(180deg, var(--gold-400), var(--gold-600));

  /* Colour: neutrals, tinted toward navy */
  --white: #ffffff;
  --paper: #f6f7f9;      /* page background */
  --line: #dfe3ea;       /* hairlines */
  --line-strong: #8a94a6;/* input borders. 3.1:1 on white (WCAG non-text 3:1) */
  --muted: #5a6477;      /* secondary text. 5.6:1 on paper */
  --ink: var(--navy-800);

  /* Colour: semantic (forms only) */
  --error: #b42318;      /* 6.6:1 on white */
  --success: #1f7a4d;

  /* Type */
  --font-display: "Bricolage Grotesque", "Avenir Next", "Segoe UI", sans-serif;
  --font-body: "Figtree", "Avenir Next", "Segoe UI", system-ui, sans-serif;
  --text-xs: 0.75rem;                               /* 12 labels */
  --text-sm: 0.875rem;                              /* 14 small body, chips */
  --text-base: clamp(1rem, 0.96rem + 0.2vw, 1.0625rem);   /* 16-17 body */
  --text-lg: clamp(1.125rem, 1.05rem + 0.35vw, 1.25rem);  /* 18-20 lede */
  --text-h3: clamp(1.25rem, 1.1rem + 0.6vw, 1.5rem);      /* 20-24 */
  --text-h2: clamp(1.75rem, 1.3rem + 2vw, 2.75rem);       /* 28-44 */
  --text-h1: clamp(2.5rem, 1.6rem + 4.2vw, 4.5rem);       /* 40-72 */
  --leading-tight: 1.02;
  --leading-snug: 1.15;
  --leading-body: 1.6;
  --tracking-display: -0.035em;

  /* Space: 4px base */
  --space-1: 4px;  --space-2: 8px;  --space-3: 12px; --space-4: 16px;
  --space-5: 24px; --space-6: 32px; --space-7: 48px; --space-8: 64px; --space-9: 96px;
  --space-section: clamp(64px, 6vw + 32px, 128px);
  --gutter: clamp(16px, 4vw, 32px);
  --container: 1120px;
  --measure: 62ch;

  /* Shape: not uniform on purpose */
  --radius-sm: 4px;   /* chips, bars */
  --radius-md: 6px;   /* buttons, inputs */
  --radius-lg: 12px;  /* products card only */
  --shadow-card: 0 24px 48px -28px rgba(11, 26, 46, 0.55);

  /* Focus */
  --focus-ring: 0 0 0 3px var(--white), 0 0 0 6px var(--gold-600);

  /* Motion */
  --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
  --duration-fast: 150ms;
  --duration-bars: 1100ms;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { color-scheme: light; -webkit-text-size-adjust: 100%; scroll-padding-top: 16px; }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 var(--text-base)/var(--leading-body) var(--font-body);
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4 { margin: 0; text-wrap: balance; }
p, ul, ol, dl, dd { margin: 0; }
img, svg { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
:focus-visible { outline: none; box-shadow: var(--focus-ring); border-radius: 2px; }

.container { width: 100%; max-width: calc(var(--container) + 2 * var(--gutter)); margin-inline: auto; padding-inline: var(--gutter); }
.section { padding-block: var(--space-section); border-top: 1px solid var(--line); }

.skip {
  position: absolute; left: var(--space-4); top: -100px; z-index: 10;
  background: var(--navy-800); color: var(--white); padding: 10px 14px; border-radius: var(--radius-md);
  font-weight: 600; text-decoration: none;
}
.skip:focus { top: var(--space-4); }

/* ---------- Type ---------- */
.eyebrow { font: 600 var(--text-xs)/1 var(--font-body); letter-spacing: .1em; text-transform: uppercase; color: var(--gold-700); }
.h2 { font: 800 var(--text-h2)/var(--leading-snug) var(--font-display); letter-spacing: -.025em; }
.h3 { font: 700 var(--text-h3)/1.2 var(--font-display); letter-spacing: -.015em; }
.lede { font-size: var(--text-lg); line-height: 1.5; color: #3c4659; max-width: 46ch; }
.muted { color: var(--muted); }
.small { font-size: var(--text-sm); }

.section-head { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-5) var(--space-6); align-items: end; margin-bottom: var(--space-7); }
.section-head > * { min-width: 0; }
.section-head p { color: var(--muted); max-width: 44ch; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  font: 600 15px/1 var(--font-body); text-decoration: none; white-space: nowrap;
  padding: 14px 20px; border: 0; border-radius: var(--radius-md); cursor: pointer;
  transition: background-color var(--duration-fast) ease, box-shadow var(--duration-fast) ease, transform var(--duration-fast) ease;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--navy-800); color: var(--white); }
.btn-primary:hover { background: var(--navy-700); }
.btn-gold { background: var(--gold-400); color: var(--navy-900); }
.btn-gold:hover { background: #edc673; }
.btn-gold:focus-visible { box-shadow: 0 0 0 3px var(--navy-800), 0 0 0 6px var(--gold-400); }
.btn-link { position: relative; background: none; color: var(--ink); padding: 6px 0; border-radius: 0; box-shadow: inset 0 -2px 0 var(--gold-600); }
.btn-link::after { content: ""; position: absolute; inset: -10px -4px; } /* 44px tap area, same look */
.btn-link:hover { box-shadow: inset 0 -4px 0 var(--gold-400); }
.btn-link:focus-visible { box-shadow: inset 0 -2px 0 var(--gold-600), var(--focus-ring); }
.btn-outline { background: var(--white); color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--line-strong); }
.btn-outline:hover { box-shadow: inset 0 0 0 1.5px var(--navy-800); }
.btn-outline:focus-visible { box-shadow: inset 0 0 0 1.5px var(--navy-800), var(--focus-ring); }
.arrow { transition: transform var(--duration-fast) var(--ease-out-expo); }
.btn:hover .arrow { transform: translateX(3px); }
.btns { display: flex; flex-wrap: wrap; gap: var(--space-4) var(--space-5); align-items: center; }

/* ---------- Header ---------- */
.site-header { background: var(--white); border-bottom: 1px solid var(--line); }
.site-header .container { display: flex; align-items: center; justify-content: space-between; gap: var(--space-5); padding-block: 14px; }
.brand { flex: 0 1 auto; min-width: 0; display: block; } /* shrinks before the menu button falls off a 320px phone */
.brand img { width: 172px; }
.site-nav { display: flex; align-items: center; gap: var(--space-5); font: 600 var(--text-sm)/1 var(--font-body); }
.site-nav a:not(.btn) { text-decoration: none; padding-block: 6px; }
.site-nav a:not(.btn):hover { box-shadow: inset 0 -2px 0 var(--gold-600); }
.site-nav .btn { padding: 11px 16px; font-size: 14px; }

/* Mobile menu. The toggle stays hidden until site.js shows it, so without JS the header still works. */
.menu-toggle { display: none; }
html.no-scroll { overflow: hidden; }

/* ---------- Living map: shared by home and team pages ---------- */
:root { --grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E"); }
.svg-defs { position: absolute; width: 0; height: 0; }
.duo { filter: url(#duo); transition: filter 400ms ease; }
.map-canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.ticker { position: relative; z-index: 1; border-top: 1px solid #2a3b55; background: rgba(11, 26, 46, .7); overflow: hidden; }
.ticker-track { display: flex; width: max-content; }
.ticker ul { display: flex; list-style: none; padding: 18px 0; margin: 0; font: 700 clamp(1rem, .8rem + .8vw, 1.5rem)/1 var(--font-display); letter-spacing: -.01em; white-space: nowrap; }
.ticker li { padding-inline: 22px; color: var(--navy-200); }
.ticker li::before { content: ""; display: inline-block; width: 8px; height: 8px; margin-right: 22px; background: var(--gold-400); transform: rotate(45deg) translateY(-3px); }
.eq { position: absolute; inset: auto 0 0; height: 70%; display: flex; gap: 6px; align-items: end; padding-inline: var(--gutter); opacity: .22; pointer-events: none; }
.eq span { flex: 1; height: 100%; background: linear-gradient(var(--gold-400), transparent); border-radius: 2px 2px 0 0; transform-origin: bottom; transform: scaleY(var(--s, .4)); }
.live { display: inline-flex; align-items: center; gap: 8px; font: 700 var(--text-xs)/1 var(--font-body); letter-spacing: .1em; text-transform: uppercase; color: var(--gold-400); }
.live::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--gold-400); }
.after { margin-top: var(--space-7); }
@media (prefers-reduced-motion: no-preference) {
  .ticker-track { animation: ticker 40s linear infinite; }
  .ticker:hover .ticker-track { animation-play-state: paused; }
  .eq span { animation: eq var(--d, 3s) ease-in-out infinite alternate; animation-delay: var(--delay, 0s); }
}
@keyframes word-up { from { opacity: 0; transform: translateY(.5em); } }
@keyframes ticker { to { transform: translateX(-50%); } }
@keyframes eq { from { transform: scaleY(var(--s, .4)); } to { transform: scaleY(calc(var(--s, .4) * .35)); } }

/* ---------- Team page (rest lives in team.css) ---------- */
.site-nav a[aria-current="page"] { box-shadow: inset 0 -2px 0 var(--gold-600); }

/* ---------- Contact ---------- */
.contact { display: grid; grid-template-columns: .9fr 1.1fr; gap: clamp(32px, 5vw, 72px); align-items: start; }
.contact > * { min-width: 0; }
.contact-copy { display: grid; gap: var(--space-4); }
.mail-card { background: var(--white); border: 1px solid var(--line); border-top: 4px solid var(--gold-600); border-radius: var(--radius-md); padding: clamp(20px, 3vw, 32px); display: grid; gap: var(--space-5); }
.mail-address { font: 700 clamp(1.125rem, 0.9rem + 1.2vw, 1.625rem)/1.2 var(--font-display); letter-spacing: -.01em; overflow-wrap: anywhere; user-select: all; }
.copy-status { font-size: var(--text-sm); color: var(--success); font-weight: 600; min-height: 1.4em; }
.include h3 { font: 600 var(--text-sm)/1.3 var(--font-body); margin-bottom: var(--space-2); }
.include ul { padding-left: 18px; color: var(--muted); font-size: var(--text-sm); display: grid; gap: 4px; }

/* ---------- Footer ---------- */
.site-footer { background: var(--white); border-top: 1px solid var(--line); padding-block: var(--space-6); font-size: var(--text-sm); color: var(--muted); }
.site-footer .container { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--space-4) var(--space-6); }
.site-footer img { width: 150px; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: var(--space-2) var(--space-5); }
.site-footer a { color: var(--ink); padding-block: 10px; margin-block: -10px; } /* taller tap area, same layout */

/* ---------- Privacy page ---------- */
.doc { padding-block: clamp(40px, 6vw, 88px) var(--space-section); }
.doc .container { max-width: calc(760px + 2 * var(--gutter)); }
.doc-head { display: grid; gap: var(--space-4); padding-bottom: var(--space-6); border-bottom: 2px solid var(--navy-800); }
.lang-switch { display: flex; gap: var(--space-2); }
.lang-switch a { font: 600 var(--text-sm)/1 var(--font-body); padding: 9px 14px; border-radius: var(--radius-md); text-decoration: none; box-shadow: inset 0 0 0 1.5px var(--line-strong); background: var(--white); }
.lang-switch a:hover { box-shadow: inset 0 0 0 1.5px var(--navy-800); }
.policy { padding-top: var(--space-7); display: grid; gap: var(--space-6); }
.policy + .policy { margin-top: var(--space-8); border-top: 1px solid var(--line); }
.policy h3 { font: 700 var(--text-lg)/1.3 var(--font-display); margin-bottom: var(--space-2); }
.policy p, .policy li { max-width: var(--measure); }
.policy ul { padding-left: 20px; display: grid; gap: 4px; }
.policy section { display: grid; gap: var(--space-2); }

/* ---------- 404 page: the brand bars with the gold "Grow" bar missing ---------- */
.lost { position: relative; overflow: hidden; display: grid; align-items: center; min-height: min(85vh, 760px); min-height: min(85svh, 760px); background: var(--navy-900); color: var(--white); }
.lost::after { content: ""; position: absolute; inset: 0; background: var(--grain); opacity: .08; mix-blend-mode: overlay; pointer-events: none; }
.lost .container { position: relative; z-index: 1; display: grid; grid-template-columns: 1.2fr .8fr; gap: var(--space-7); align-items: center; padding-block: var(--space-8); }
.lost .container > * { min-width: 0; }
.lost .eyebrow { color: var(--gold-400); }
.lost h1 { font: 800 clamp(2.75rem, 1.2rem + 5.5vw, 6rem)/.95 var(--font-display); letter-spacing: -.045em; margin-block: var(--space-4) var(--space-5); max-width: 11ch; }
.lost .lede { color: var(--navy-200); }
.lost .btns { margin-top: var(--space-6); }
.lost .btn-link { color: var(--white); box-shadow: inset 0 -2px 0 var(--gold-400); }
.lost-links { display: flex; flex-wrap: wrap; gap: var(--space-2) var(--space-5); margin-top: var(--space-7); padding-top: var(--space-4); border-top: 1px solid #2a3b55; font: 600 var(--text-sm)/1 var(--font-body); }
.lost-links a { color: var(--navy-200); text-decoration: none; padding-block: 15px; } /* 44px tap rows */
.lost-links a:hover { color: var(--white); box-shadow: inset 0 -2px 0 var(--gold-400); }
.lost-bars { height: clamp(200px, 28vw, 360px); display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; align-items: end; border-bottom: 2px solid var(--gold-400); }
.lost-bars span { background: #22344f; border-radius: var(--radius-sm) var(--radius-sm) 0 0; }
.lost-bars span:nth-child(1) { height: 25%; } .lost-bars span:nth-child(2) { height: 45%; } .lost-bars span:nth-child(3) { height: 70%; }
.lost-bars span:nth-child(4) { height: 100%; background: none; border: 2px dashed var(--gold-400); border-bottom: 0; }
@media (prefers-reduced-motion: no-preference) {
  .lost-bars span:nth-child(4) { animation: lost-blink 2.4s ease-in-out infinite; }
}
@keyframes lost-blink { 50% { opacity: .3; } }
@media (max-width: 900px) {
  .lost .container { grid-template-columns: 1fr; }
  .lost-bars { height: 140px; max-width: 280px; }
}

/* ---------- Phone and tablet ---------- */
@media (max-width: 900px) {
  .site-nav a:not(.btn) { display: none; }
  .site-nav { margin-left: auto; }
  .site-nav .btn { min-height: 44px; } /* matches the 44px menu button */
  .menu-toggle:not([hidden]) { display: grid; place-content: center; gap: 5px; width: 44px; height: 44px; margin-right: -10px; padding: 0; background: none; border: 0; border-radius: var(--radius-md); cursor: pointer; }
  .menu-toggle i { display: block; width: 24px; height: 2px; background: var(--ink); border-radius: 1px; transition: transform 300ms var(--ease-out-expo), opacity 200ms ease, background-color 200ms ease; }
  .menu-toggle[aria-expanded="true"] i:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .menu-toggle[aria-expanded="true"] i:nth-child(2) { opacity: 0; }
  .menu-toggle[aria-expanded="true"] i:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
  .menu-open .menu-toggle { position: relative; z-index: 21; }
  .menu-open .menu-toggle i { background: var(--white); }
  .menu-open .site-nav { position: fixed; inset: 0; z-index: 20; flex-direction: column; align-items: stretch; gap: 0; margin: 0; padding: 96px var(--gutter) 40px; background: var(--navy-900); overflow-y: auto; }
  .menu-open .site-nav a:not(.btn) { display: block; padding-block: 18px; border-bottom: 1px solid #2a3b55; font: 800 clamp(2rem, 1.4rem + 3vw, 2.75rem)/1 var(--font-display); letter-spacing: -.03em; color: var(--white); box-shadow: none; }
  .menu-open .site-nav a[aria-current="page"] { color: var(--gold-400); }
  .menu-open .site-nav .btn { margin-top: var(--space-6); justify-content: center; padding: 16px 20px; font-size: 16px; background: var(--gold-400); color: var(--navy-900); }
  .section-head, .contact { grid-template-columns: 1fr; }
  .section-head { gap: var(--space-3); margin-bottom: var(--space-6); }
}
@media (max-width: 900px) and (prefers-reduced-motion: no-preference) {
  .menu-open .site-nav { animation: menu-in 300ms var(--ease-out-expo) both; }
  .menu-open .site-nav a { animation: menu-link 500ms var(--ease-out-expo) both; }
  .menu-open .site-nav a:nth-child(2) { animation-delay: 40ms; } .menu-open .site-nav a:nth-child(3) { animation-delay: 80ms; }
  .menu-open .site-nav a:nth-child(4) { animation-delay: 120ms; } .menu-open .site-nav a:nth-child(5) { animation-delay: 160ms; } .menu-open .site-nav a:nth-child(6) { animation-delay: 200ms; }
}
@keyframes menu-in { from { opacity: 0; } }
@keyframes menu-link { from { opacity: 0; transform: translateY(16px); } }
@media (max-width: 420px) {
  .brand img { width: 140px; }
  .site-header .container { gap: var(--space-3); }
  .site-nav .btn { padding-inline: 14px; }
}
.site-nav .btn-link { padding: 6px 0; font-size: var(--text-sm); }
