/* GRU953-Studio website — shared design system.
   Palette   = the official GRU953 "Open Spectrum" brand tokens (Cobalt-led),
               taken verbatim from the GRU953 Brand Guidebook, light + dark.
   Typefaces = the brand's own: DM Sans (display/body/UI), JetBrains Mono
               (code), Noto Sans Bengali (Bangla) — self-hosted below, never
               loaded from a third-party font CDN (a brand rule).
   Accessibility = WCAG 2.2 AA; both light and dark ship; motion honours
               prefers-reduced-motion; focus is always visible. */

/* ---- self-hosted brand fonts (variable; one file spans all weights) ---- */
@font-face {
  font-family: "DM Sans"; font-style: normal; font-weight: 400 800;
  font-display: swap; src: url("fonts/dm-sans-latin.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+2074,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;
}
@font-face {
  font-family: "DM Sans"; font-style: normal; font-weight: 400 800;
  font-display: swap; src: url("fonts/dm-sans-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF;
}
@font-face {
  font-family: "Noto Sans Bengali"; font-style: normal; font-weight: 400 700;
  font-display: swap; src: url("fonts/noto-sans-bengali.woff2") format("woff2");
  unicode-range: U+0951-0952,U+0964-0965,U+0980-09FE,U+1CD0,U+1CD2,U+1CD5-1CD6,U+1CD8,U+1CE1,U+1CEA,U+1CED,U+1CF2,U+1CF5-1CF7,U+200C-200D,U+20B9,U+25CC,U+A8F1;
}
@font-face {
  font-family: "JetBrains Mono"; font-style: normal; font-weight: 400 700;
  font-display: swap; src: url("fonts/jetbrains-mono-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+2000-206F,U+2074,U+20AC,U+2122,U+2212,U+FEFF,U+FFFD;
}

:root {
  /* Brand hues (Open Spectrum lead pair + signature stops) */
  --gru-cobalt: #3257A0;   /* Cobalt 700 — primary on light */
  --gru-cobalt-500: #5188F3;
  --gru-azure: #0097C7;
  --gru-teal: #00AE99;
  --gru-green: #6DBE4C;
  --gru-marigold: #B28400;
  --gru-gold: #E7AD00;

  /* Light theme (default) — official neutrals */
  --ink: #090B0F;
  --ink-soft: #3B3D41;
  --paper: #F4F7FD;
  --paper-raised: #FFFFFF;
  --paper-2: #EAEEF3;
  --line: #DBDFE4;
  --line-strong: #C8CBD0;
  --muted: #585B5F;
  --heading: #1E3156;
  --heading-2: #3257A0;
  --accent: #3257A0;
  --accent-contrast: #FFFFFF;
  --accent-warm: #735400;
  --focus-ring: #3C6AC5;
  --ok: #157E3C;
  --warn: #915C05;
  --err: #B13A38;
  --info: #0470A5;

  --font-display: "DM Sans", "Noto Sans Bengali", system-ui, -apple-system, sans-serif;
  --font-body: "DM Sans", "Noto Sans Bengali", system-ui, -apple-system, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;

  --measure: 68ch;
  --radius-s: 8px;
  --radius-m: 14px;
  --radius-l: 22px;
  --shadow-1: 0 1px 2px rgba(9, 11, 15, 0.06), 0 1px 1px rgba(9, 11, 15, 0.04);
  --shadow-2: 0 12px 32px -12px rgba(30, 49, 86, 0.30);

  /* Brand logo gradient: Cobalt -> Azure -> Marigold */
  --spectrum: linear-gradient(120deg,#1C50B5,#1F55BB,#1560C3,#0072C2,#0085B8,#0099AE,#00AE99,#6DBE4C,#E7AD00);
}

@media (prefers-color-scheme: dark) {
  :root {
    --ink: #EAEEF3;
    --ink-soft: #CFD3D8;
    --paper: #12151A;
    --paper-raised: #1D2127;
    --paper-2: #2A2E35;
    --line: #34383F;
    --line-strong: #454B53;
    --muted: #A0A5AC;
    --heading: #CFE0FF;
    --heading-2: #E9C376;
    --accent: #ACCAFF;
    --accent-contrast: #12151A;
    --accent-warm: #E9C376;
    --focus-ring: #ACCAFF;
    --ok: #79D68F;
    --warn: #F3BD5C;
    --err: #F88A82;
    --info: #78C7FD;
    --shadow-2: 0 12px 32px -12px rgba(0, 0, 0, 0.55);
  }
}
:root[data-theme="dark"] {
  --ink: #EAEEF3; --ink-soft: #CFD3D8; --paper: #12151A; --paper-raised: #1D2127;
  --paper-2: #2A2E35; --line: #34383F; --line-strong: #454B53; --muted: #A0A5AC;
  --heading: #CFE0FF; --heading-2: #E9C376; --accent: #ACCAFF;
  --accent-contrast: #12151A; --accent-warm: #E9C376; --focus-ring: #ACCAFF;
  --ok: #79D68F; --warn: #F3BD5C; --err: #F88A82; --info: #78C7FD;
  --shadow-2: 0 12px 32px -12px rgba(0, 0, 0, 0.55);
}
:root[data-theme="light"] {
  --ink: #090B0F; --ink-soft: #3B3D41; --paper: #F4F7FD; --paper-raised: #FFFFFF;
  --paper-2: #EAEEF3; --line: #DBDFE4; --line-strong: #C8CBD0; --muted: #585B5F;
  --heading: #1E3156; --heading-2: #3257A0; --accent: #3257A0;
  --accent-contrast: #FFFFFF; --accent-warm: #735400; --focus-ring: #3C6AC5;
  --ok: #157E3C; --warn: #915C05; --err: #B13A38; --info: #0470A5;
  --shadow-2: 0 12px 32px -12px rgba(30, 49, 86, 0.30);
}

* { box-sizing: border-box; }
html { color-scheme: light dark; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; }
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4 { font-family: var(--font-display); text-wrap: balance; line-height: 1.15; margin: 0 0 0.5em; color: var(--heading); }
h1 { font-size: clamp(2.1rem, 1.5rem + 2.6vw, 3.4rem); font-weight: 800; letter-spacing: -0.01em; }
h2 { font-size: clamp(1.5rem, 1.2rem + 1.2vw, 2.1rem); font-weight: 700; letter-spacing: -0.01em; }
h3 { font-size: 1.2rem; font-weight: 700; color: var(--ink); }
p { margin: 0 0 1em; color: var(--ink-soft); max-width: var(--measure); }
p.lede { font-size: 1.15rem; color: var(--ink); }
strong { color: var(--ink); }
a { color: var(--accent); text-decoration-thickness: 1.5px; text-underline-offset: 2px; }
a:focus-visible, button:focus-visible, summary:focus-visible, [tabindex]:focus-visible {
  outline: 2.5px solid var(--focus-ring); outline-offset: 2px; border-radius: 4px;
}
code, .mono { font-family: var(--font-mono); font-size: 0.9em; }
:lang(bn), .bangla { font-family: "Noto Sans Bengali", var(--font-body); line-height: 1.8; }

/* skip link for keyboard/screen-reader users */
.skip-link { position: absolute; left: -999px; top: 0; background: var(--accent); color: var(--accent-contrast); padding: 10px 16px; border-radius: 0 0 8px 0; z-index: 100; font-weight: 700; }
.skip-link:focus { left: 0; }

.wrap { max-width: 1120px; margin: 0 auto; padding: 0 24px; }
.doc-wrap { max-width: 780px; margin: 0 auto; padding: 0 24px; }

/* ---- site header ---- */
.site-header {
  position: sticky; top: 0; z-index: 20;
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  backdrop-filter: saturate(160%) blur(10px);
  border-bottom: 1px solid var(--line);
}
.site-header .bar { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 14px 24px; }
.brand { display: flex; align-items: center; gap: 10px; font-family: var(--font-display); font-weight: 800; font-size: 1.05rem; color: var(--ink); text-decoration: none; }
.brand img { height: 28px; width: auto; display: block; }
.site-nav { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.site-nav a { color: var(--ink-soft); text-decoration: none; font-weight: 600; font-size: 0.94rem; padding: 8px 12px; border-radius: 999px; }
.site-nav a:hover { background: var(--paper-2); color: var(--ink); }
.site-nav a.current { color: var(--accent-contrast); background: var(--accent); }

/* ---- buttons (min target 44px) ---- */
.btn { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; font-family: var(--font-display); font-weight: 700; font-size: 0.98rem; padding: 12px 22px; border-radius: 999px; text-decoration: none; border: 1.5px solid transparent; cursor: pointer; }
.btn-primary { background: var(--accent); color: var(--accent-contrast); box-shadow: var(--shadow-2); }
.btn-primary:hover { filter: brightness(1.06); }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line-strong); }
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }

/* ---- hero (index only) ---- */
.hero { position: relative; overflow: hidden; padding: 84px 0 64px; }
.spectrum-band {
  position: absolute; inset: -20% -10% auto -10%; height: 460px;
  background: var(--spectrum);
  filter: blur(60px) saturate(120%);
  opacity: 0.20;
  transform: rotate(-4deg);
  animation: drift 26s ease-in-out infinite alternate;
}
@keyframes drift { from { transform: rotate(-4deg) translateY(0); } to { transform: rotate(-2deg) translateY(14px); } }
.hero-inner { position: relative; display: grid; gap: 28px; }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; font-family: var(--font-display); font-weight: 700; font-size: 0.82rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--heading-2); }
.eyebrow .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--gru-teal); }
.hero h1 { max-width: 18ch; }
.hero .lede { max-width: 54ch; font-size: 1.2rem; }
.hero-cta { display: flex; gap: 14px; flex-wrap: wrap; align-items: center; margin-top: 6px; }
.hero-install { margin-top: 18px; background: var(--paper-raised); border: 1px solid var(--line); border-radius: var(--radius-m); padding: 16px 20px; box-shadow: var(--shadow-1); max-width: 560px; }
.hero-install p { margin: 0 0 8px; font-size: 0.86rem; color: var(--muted); font-weight: 600; }
.hero-install pre { margin: 0; overflow-x: auto; }
.hero-install code { color: var(--ink); }
.hero .tagline-bn { font-family: "Noto Sans Bengali", var(--font-body); color: var(--muted); font-size: 1rem; margin-top: -14px; }

/* ---- sections ---- */
section { padding: 56px 0; }
section.tight { padding: 40px 0; }
.section-head { max-width: 680px; margin-bottom: 32px; }
.section-head .eyebrow { margin-bottom: 10px; }

/* ---- feature grid ---- */
.feature-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 18px; }
.feature-card { background: var(--paper-raised); border: 1px solid var(--line); border-radius: var(--radius-m); padding: 22px; box-shadow: var(--shadow-1); }
.feature-card .icon { width: 34px; height: 34px; margin-bottom: 14px; color: var(--accent); }
.feature-card h3 { margin-bottom: 6px; }
.feature-card p { margin: 0; font-size: 0.95rem; }

/* ---- numbered steps ---- */
.steps { display: grid; gap: 0; counter-reset: step; }
.step { display: grid; grid-template-columns: 44px 1fr; gap: 18px; padding: 20px 0; border-top: 1px solid var(--line); }
.step:first-child { border-top: none; }
.step .num { counter-increment: step; font-family: var(--font-mono); font-weight: 700; color: var(--accent); font-size: 1.1rem; }
.step .num::before { content: counter(step, decimal-leading-zero); }
.step h3 { margin-bottom: 4px; font-size: 1.05rem; }
.step p { margin: 0; font-size: 0.95rem; }

/* ---- card list ---- */
.card-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 16px; }
.card { background: var(--paper-raised); border: 1px solid var(--line); border-left: 3px solid var(--accent); border-radius: var(--radius-s); padding: 18px 20px; box-shadow: var(--shadow-1); }
.card h3 { font-size: 1rem; margin-bottom: 6px; }
.card p { font-size: 0.93rem; margin: 0; }
.card .tag { display: inline-block; font-size: 0.72rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; color: var(--accent-warm); margin-bottom: 8px; }

/* ---- directory (kept for parity) ---- */
.role-group { margin-bottom: 36px; }
.role-group h2 { font-size: 1.15rem; border-bottom: 2px solid var(--line); padding-bottom: 10px; margin-bottom: 16px; }
.role-list { display: grid; gap: 12px; }
.role { display: grid; grid-template-columns: minmax(180px, 220px) 1fr; gap: 16px; padding: 14px 0; border-top: 1px solid var(--line); align-items: baseline; }
.role:first-child { border-top: none; }
.role dt { font-family: var(--font-display); font-weight: 700; font-size: 0.96rem; color: var(--ink); }
.role dt .model { display: block; font-family: var(--font-mono); font-weight: 500; font-size: 0.72rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.04em; margin-top: 2px; }
.role dd { margin: 0; font-size: 0.93rem; color: var(--ink-soft); }
@media (max-width: 640px) { .role { grid-template-columns: 1fr; gap: 4px; } }

/* ---- table ---- */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius-m); }
table { width: 100%; border-collapse: collapse; font-size: 0.93rem; }
th, td { text-align: left; padding: 13px 16px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-family: var(--font-display); font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.04em; color: var(--muted); background: var(--paper-2); }
tr:last-child td { border-bottom: none; }

/* ---- footer ---- */
.site-footer { border-top: 1px solid var(--line); padding: 40px 0 60px; margin-top: 40px; }
.site-footer .foot-grid { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 24px; align-items: flex-start; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 6px 18px; }
.site-footer nav a { color: var(--muted); text-decoration: none; font-size: 0.9rem; }
.site-footer nav a:hover { color: var(--accent); }
.site-footer .fine { font-size: 0.82rem; color: var(--muted); margin-top: 18px; }
.site-footer .fine p { max-width: none; color: var(--muted); }

/* ---- misc ---- */
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 4px 12px; border-radius: 999px; background: var(--paper-2); color: var(--ink-soft); font-size: 0.78rem; font-weight: 700; }
.divider-spectrum { height: 4px; border: 0; border-radius: 4px; background: var(--spectrum); margin: 0 0 40px; }
.center { text-align: center; }
.callout { background: color-mix(in srgb, var(--gru-teal) 10%, var(--paper-raised)); border: 1px solid color-mix(in srgb, var(--gru-teal) 35%, var(--line)); border-radius: var(--radius-m); padding: 18px 22px; }
.callout p:last-child { margin-bottom: 0; }

@media (max-width: 720px) {
  .site-nav { gap: 2px; }
  .site-nav a { padding: 8px 9px; font-size: 0.88rem; }
  section { padding: 40px 0; }
  .hero { padding: 56px 0 40px; }
}
