/* GKORE colour system (Material Design 3). Copied from the main site (gkore.co); keep in sync with src/styles/theme.css there. */
:root {
  color-scheme: dark; /* dark is the default theme; light is opt-in via the toggle (data-theme="light") */
  --primary: light-dark(#c8341c, #f0442b);
  --on-primary: light-dark(#ffffff, #131315);
  --primary-container: light-dark(#ffdad3, #5e1a10);
  --on-primary-container: light-dark(#5a0f05, #ffdad3);
  --secondary: light-dark(#7a554f, #ebbcb3);
  --on-secondary: light-dark(#ffffff, #462923);
  --secondary-container: light-dark(#ffdad4, #603e38);
  --on-secondary-container: light-dark(#603e38, #ffdad4);
  --tertiary: light-dark(#006878, #76d4e9);
  --on-tertiary: light-dark(#ffffff, #00363f);
  --tertiary-container: light-dark(#a7edff, #004e5b);
  --on-tertiary-container: light-dark(#004e5b, #a7edff);
  --error: light-dark(#ba1a1a, #ffb4ab);
  --on-error: light-dark(#ffffff, #690005);
  --error-container: light-dark(#ffdad6, #93000a);
  --on-error-container: light-dark(#93000a, #ffdad6);
  --surface: light-dark(#f4f3f5, #131315);
  --surface-dim: light-dark(#dcdbdd, #131315);
  --surface-bright: light-dark(#f4f3f5, #39393b);
  --surface-container-lowest: light-dark(#ffffff, #0e0e10);
  --surface-container-low: light-dark(#efeef0, #1b1b1e);
  --surface-container: light-dark(#e9e8ea, #1f1f22);
  --surface-container-high: light-dark(#e3e2e4, #2a2a2c);
  --surface-container-highest: light-dark(#dddcde, #343437);
  --on-surface: light-dark(#131315, #e4e2e6);
  --on-surface-variant: light-dark(#4a4951, #a09fa8);
  --outline: light-dark(#7a7982, #8a8992);
  --outline-variant: light-dark(#cac9cf, #3f3f44);
  --inverse-surface: light-dark(#2e2e31, #e4e2e6);
  --inverse-on-surface: light-dark(#f4f3f5, #2e2e31);
  --inverse-primary: light-dark(#f0442b, #c8341c);
  --scrim: light-dark(#000000, #000000);
  /* Brand kit colours, for logos and graphics (never recolour the red). */
  --brand: #f0442b;
  --brand-ink: #131315;
  --brand-cloud: #e4e2e6;
  --brand-slate: #a09fa8;
  --brand-paper: #f4f3f5;
}
:root[data-theme='light'] { color-scheme: light; }
:root[data-theme='dark'] { color-scheme: dark; }

/* Category / semantic hues: solid colour + tonal container. */
[data-hue='blue'] {
  --hue: light-dark(#0051e0, #b5c4ff);
  --on-hue: light-dark(#ffffff, #00297a);
  --hue-container: light-dark(#dbe1ff, #2d3a62);
  --on-hue-container: light-dark(#0a1940, #dbe1ff);
}
[data-hue='teal'] {
  --hue: light-dark(#006a65, #5dd9d0);
  --on-hue: light-dark(#ffffff, #003734);
  --hue-container: light-dark(#adefe8, #004340);
  --on-hue-container: light-dark(#00201e, #adefe8);
}
[data-hue='green'] {
  --hue: light-dark(#006e23, #6fdd78);
  --on-hue: light-dark(#ffffff, #00390e);
  --hue-container: light-dark(#c3eebe, #1f4321);
  --on-hue-container: light-dark(#002106, #c3eebe);
}
[data-hue='amber'] {
  --hue: light-dark(#825500, #ffb952);
  --on-hue: light-dark(#ffffff, #452b00);
  --hue-container: light-dark(#ffddb4, #543501);
  --on-hue-container: light-dark(#291800, #ffddb4);
}
[data-hue='red'] {
  --hue: light-dark(#bb1623, #ffb3ae);
  --on-hue: light-dark(#ffffff, #68000b);
  --hue-container: light-dark(#ffdad7, #5f2c29);
  --on-hue-container: light-dark(#370d0c, #ffdad7);
}
[data-hue='violet'] {
  --hue: light-dark(#603ce2, #cabeff);
  --on-hue: light-dark(#ffffff, #31009a);
  --hue-container: light-dark(#e6deff, #3d3561);
  --on-hue-container: light-dark(#1c153f, #e6deff);
}
[data-hue='pink'] {
  --hue: light-dark(#b6165d, #ffb1c5);
  --on-hue: light-dark(#ffffff, #650030);
  --hue-container: light-dark(#ffd9e1, #5d2c3b);
  --on-hue-container: light-dark(#360c1b, #ffd9e1);
}
[data-hue='slate'] {
  --hue: light-dark(#515f74, #b8c8e0);
  --on-hue: light-dark(#ffffff, #223144);
  --hue-container: light-dark(#d3e4ff, #1d3d60);
  --on-hue-container: light-dark(#001c38, #d3e4ff);
}
[data-hue='none'] { --hue: var(--primary); --on-hue: var(--on-primary); --hue-container: var(--primary-container); --on-hue-container: var(--on-primary-container); }

/* links.gkore.co: GKORE design system (Material Design 3, colour roles in theme.css). Mobile-first, no framework. */

@font-face { font-family: "Archivo Variable"; font-style: normal; font-display: swap; font-weight: 100 900; src: url("fonts/archivo-latin-wght-normal.woff2") format("woff2-variations"); }
@font-face { font-family: "Figtree Variable"; font-style: normal; font-display: swap; font-weight: 300 900; src: url("fonts/figtree-latin-wght-normal.woff2") format("woff2-variations"); }

:root {
  --font-display: "Archivo Variable", "Archivo", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-body: "Figtree Variable", "Figtree", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  --shape-xs: 4px;
  --shape-sm: 8px;
  --shape-md: 12px;
  --shape-lg: 16px;
  --shape-xl: 28px;

  --ease-standard: cubic-bezier(0.2, 0, 0, 1);
  --ease-decel: cubic-bezier(0.05, 0.7, 0.1, 1);
  --ease-accel: cubic-bezier(0.3, 0, 0.8, 0.15);
  --dur-s: 150ms;
  --dur-m: 250ms;
  --dur-l: 400ms;

  --col: 640px;
  --gutter: clamp(16px, 4vw, 40px);
  --appbar-h: 60px;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}
@media (min-width: 900px) { :root { --appbar-h: 68px; } }

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  background: var(--surface);
  scroll-padding-top: calc(var(--appbar-h) + var(--safe-top) + 16px);
}
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  background: var(--surface);
  color: var(--on-surface);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  -webkit-tap-highlight-color: transparent;
  overflow-wrap: break-word;
  text-rendering: optimizeLegibility;
}

img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
h1, h2, h3 { margin: 0; font-family: var(--font-display); font-weight: 700; letter-spacing: -0.015em; line-height: 1.15; text-wrap: balance; }
p { margin: 0; }
ul { margin: 0; padding: 0; list-style: none; }
a, button { touch-action: manipulation; }
html, body { overflow-x: clip; }

:focus-visible { outline: 3px solid var(--primary); outline-offset: 2px; border-radius: var(--shape-xs); }
::selection { background: var(--primary-container); color: var(--on-primary-container); }

.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip-link { position: fixed; inset-inline-start: 12px; top: -80px; z-index: 100; background: var(--primary); color: var(--on-primary); padding: 12px 20px; border-radius: 999px; font-weight: 700; }
.skip-link:focus { top: calc(var(--safe-top) + 10px); }

.icon { flex: none; fill: currentColor; }

.wrap {
  width: 100%;
  max-width: calc(var(--col) + var(--gutter) * 2);
  margin-inline: auto;
  padding-left: max(var(--gutter), env(safe-area-inset-left, 0px));
  padding-right: max(var(--gutter), env(safe-area-inset-right, 0px));
}

/* ---------- Icon buttons (M3 state layer) ---------- */
.icon-btn {
  position: relative; display: inline-grid; place-items: center; width: 48px; height: 48px; border-radius: 50%; color: var(--on-surface-variant);
}
.icon-btn::after { content: ""; position: absolute; inset: 4px; border-radius: 50%; background: currentColor; opacity: 0; transition: opacity var(--dur-s) var(--ease-standard); }
@media (hover: hover) { .icon-btn:hover::after { opacity: 0.08; } }
.icon-btn:focus-visible::after { opacity: 0.1; }
.icon-btn:active::after { opacity: 0.12; }

/* Dark is the default theme: the toggle offers the other one. */
.theme-toggle .to-light { display: block; }
.theme-toggle .to-dark { display: none; }
:root[data-theme="light"] .theme-toggle .to-light { display: none; }
:root[data-theme="light"] .theme-toggle .to-dark { display: block; }

/* ---------- App bar ---------- */
.appbar {
  position: sticky; top: 0; z-index: 40; padding-top: var(--safe-top); background: var(--surface);
}
@supports (animation-timeline: scroll()) {
  @media (prefers-reduced-motion: no-preference) {
    .appbar { animation: elevate linear both; animation-timeline: scroll(root block); animation-range: 0 72px; }
    @keyframes elevate { to { background: var(--surface-container); box-shadow: 0 1px 0 var(--outline-variant); } }
  }
}
.bar { display: flex; align-items: center; gap: 4px; height: var(--appbar-h); }
.logo { display: inline-flex; align-items: center; height: 44px; margin-inline-end: auto; }
.logo-svg { display: block; flex: none; width: auto; max-width: none; }
.logo-svg .ltr { fill: var(--on-surface); }

/* ---------- Page ---------- */
main { flex: 1; padding-bottom: 24px; }

.hero { padding: 28px 0 8px; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px; height: 28px; padding: 0 12px; border-radius: var(--shape-sm);
  background: var(--primary-container); color: var(--on-primary-container);
  font: 700 0.75rem/1 var(--font-body); letter-spacing: 0.06em; text-transform: uppercase;
}
.hero h1 { margin-top: 16px; font: 800 clamp(2.25rem, 8vw, 3.5rem)/1.04 var(--font-display); letter-spacing: -0.03em; }
.hero h1 em { font-style: normal; color: var(--primary); }
.hero p { margin-top: 12px; max-width: 46ch; color: var(--on-surface-variant); font-size: 1.0625rem; line-height: 1.55; }

/* Section label: hairline with a short Core Red bar, same as the main site */
.section-head {
  position: relative; display: flex; align-items: baseline; justify-content: space-between; gap: 16px;
  padding-top: 16px; margin: 36px 0 14px; border-top: 1px solid var(--outline-variant);
}
.section-head::before { content: ""; position: absolute; inset-inline-start: 0; top: -2px; width: 48px; height: 3px; background: var(--primary); }
.section-head h2 { font: 800 1.125rem/1.1 var(--font-display); text-transform: uppercase; letter-spacing: 0.04em; }

/* ---------- Link cards ---------- */
.links { display: grid; gap: 10px; }

.link {
  position: relative; display: flex; align-items: center; gap: 16px; min-height: 72px; padding: 12px 12px 12px 14px;
  border-radius: var(--shape-lg); background: var(--surface-container-low); border: 1px solid var(--outline-variant);
  transition: transform var(--dur-m) var(--ease-decel), border-color var(--dur-s) var(--ease-standard);
}
.link::after { content: ""; position: absolute; inset: -1px; border-radius: inherit; background: currentColor; opacity: 0; pointer-events: none; transition: opacity var(--dur-s) var(--ease-standard); }
@media (hover: hover) {
  .link:hover::after { opacity: 0.06; }
  .link:hover { border-color: var(--outline); }
  .link:hover .go { transform: translate(2px, -2px); color: var(--primary); }
}
.link:focus-visible::after { opacity: 0.1; }
.link:active::after { opacity: 0.12; }
.link:active { transform: scale(0.99); }

.link .ico {
  flex: none; display: grid; place-items: center; width: 44px; height: 44px; border-radius: var(--shape-md);
  background: var(--hue-container); color: var(--on-hue-container);
}
.link .txt { flex: 1; min-width: 0; display: grid; gap: 2px; }
.link .title { font: 700 1.0625rem/1.2 var(--font-display); letter-spacing: -0.01em; }
.link .desc { color: var(--on-surface-variant); font-size: 0.875rem; line-height: 1.35; }
.link .go { flex: none; margin-inline-end: 4px; color: var(--on-surface-variant); transition: transform var(--dur-m) var(--ease-decel), color var(--dur-s) var(--ease-standard); }

/* Featured link: Core Red, filled */
.link-main {
  min-height: 88px; padding: 16px 16px 16px 18px; border-radius: var(--shape-xl); border-color: transparent;
  background: var(--primary); color: var(--on-primary);
}
.link-main .ico { width: 52px; height: 52px; border-radius: var(--shape-lg); background: color-mix(in srgb, var(--on-primary) 16%, transparent); color: var(--on-primary); }
.link-main .title { font-size: 1.3125rem; font-weight: 800; letter-spacing: -0.02em; }
.link-main .desc { color: color-mix(in srgb, var(--on-primary) 82%, transparent); font-size: 0.9375rem; }
.link-main .go { color: var(--on-primary); }
@media (hover: hover) { .link-main:hover { border-color: transparent; } .link-main:hover .go { color: var(--on-primary); } }

/* ---------- Social ---------- */
.social { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 8px; }
.social a {
  position: relative; display: grid; place-items: center; height: 56px; border-radius: var(--shape-lg);
  background: var(--surface-container-low); border: 1px solid var(--outline-variant); color: var(--on-surface);
  transition: transform var(--dur-m) var(--ease-decel), color var(--dur-s) var(--ease-standard), border-color var(--dur-s) var(--ease-standard);
}
.social a::after { content: ""; position: absolute; inset: -1px; border-radius: inherit; background: currentColor; opacity: 0; transition: opacity var(--dur-s) var(--ease-standard); }
@media (hover: hover) { .social a:hover { color: var(--primary); border-color: var(--outline); } .social a:hover::after { opacity: 0.06; } }
.social a:active { transform: scale(0.96); }
.social a:active::after { opacity: 0.12; }

/* ---------- Footer ---------- */
.footer { margin-top: 40px; padding: 32px 0 calc(28px + var(--safe-bottom)); background: var(--surface-container-low); border-top: 1px solid var(--outline-variant); }
.footer .wrap { display: grid; gap: 14px; justify-items: start; }
.footer p { color: var(--on-surface-variant); font-size: 0.8125rem; }
.footer nav { display: flex; flex-wrap: wrap; gap: 0 20px; }
.footer nav a { display: inline-block; padding: 8px 0; font-weight: 500; }
.footer nav a:hover { color: var(--primary); text-decoration: underline; text-underline-offset: 3px; }

/* ---------- Toast ---------- */
.toast {
  position: fixed; left: 50%; z-index: 60; bottom: calc(var(--safe-bottom) + 24px); transform: translateX(-50%);
  max-width: calc(100vw - 32px); padding: 14px 20px; border-radius: var(--shape-sm);
  background: var(--inverse-surface); color: var(--inverse-on-surface); font-size: 0.875rem; font-weight: 500;
  animation: toast-in var(--dur-m) var(--ease-decel);
}
.toast[hidden] { display: none; }
@keyframes toast-in { from { opacity: 0; transform: translate(-50%, 12px); } }

/* ---------- Entrance motion ---------- */
@media (prefers-reduced-motion: no-preference) {
  .rise { animation: rise 520ms var(--ease-decel) both; animation-delay: calc(var(--i, 0) * 45ms); }
  @keyframes rise { from { opacity: 0; transform: translateY(14px); } }
}
@view-transition { navigation: auto; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
  @view-transition { navigation: none; }
}

@media (min-width: 700px) {
  .hero { padding-top: 44px; }
  .link { padding-inline-start: 16px; }
}

[hidden] { display: none !important; }
