/* Muqarnas Tech website. Fonts are self-hosted (SIL OFL, see fonts/LICENSE.txt).
   Theme: follows the system (prefers-color-scheme); js/theme.js can pin it via
   <html data-theme="light|dark">. Layout uses logical properties so /ar/ (dir=rtl) mirrors. */

/* ---------- Fonts ---------- */
@font-face { font-family: "Reem Kufi"; src: url("fonts/reem-kufi.woff2") format("woff2"); font-weight: 400 700; font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2212, U+FEFF, U+FFFD; }
@font-face { font-family: "Reem Kufi"; src: url("fonts/reem-kufi-arabic.woff2") format("woff2"); font-weight: 400 700; font-display: swap;
  unicode-range: U+0600-06FF, U+0750-077F, U+0870-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FEFC; }
@font-face { font-family: "Source Sans 3"; src: url("fonts/source-sans-3.woff2") format("woff2"); font-weight: 200 900; font-style: normal; font-display: swap; }
@font-face { font-family: "Source Sans 3"; src: url("fonts/source-sans-3-italic.woff2") format("woff2"); font-weight: 200 900; font-style: italic; font-display: swap; }
@font-face { font-family: "IBM Plex Mono"; src: url("fonts/ibm-plex-mono-500.woff2") format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "IBM Plex Sans Arabic"; src: url("fonts/ibm-plex-sans-arabic-400.woff2") format("woff2"); font-weight: 400; font-display: swap;
  unicode-range: U+0600-06FF, U+0750-077F, U+0870-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FEFC; }
@font-face { font-family: "IBM Plex Sans Arabic"; src: url("fonts/ibm-plex-sans-arabic-600.woff2") format("woff2"); font-weight: 600 700; font-display: swap;
  unicode-range: U+0600-06FF, U+0750-077F, U+0870-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FEFC; }

/* ---------- Tokens ---------- */
:root {
  color-scheme: light;
  --bg: #faf6f5;            /* warm plaster */
  --bg-2: #f3e9ea;          /* recessed bands */
  --surface: #ffffff;
  --surface-2: #fbf4f5;
  --ink: #22101a;
  --ink-soft: #6b5560;
  --plum: #470127;          /* logo outer */
  --crimson: #8e172d;       /* logo inner: primary accent */
  --accent: #8e172d;
  --accent-hover: #6f0f23;
  --accent-ink: #ffffff;
  --accent-soft: rgba(142, 23, 45, 0.08);
  --gold: #a87a33;          /* thin details only */
  --rule: #e7d8db;
  --shadow: 0 1px 2px rgba(71, 1, 39, 0.06), 0 12px 32px -12px rgba(71, 1, 39, 0.18);
  --logo-1: #8e172d;
  --logo-2: #3f0026;
  --glow: rgba(142, 23, 45, 0.16);
  --pattern: rgba(71, 1, 39, 0.07);
  --line-rgb: 142, 23, 45;  /* techlines animation */
  --line-alpha: 0.32;
  --header-bg: rgba(250, 246, 245, 0.82);

  --display: "Reem Kufi", "Segoe UI", system-ui, sans-serif;
  --body: "Source Sans 3", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;

  --step--1: 0.875rem;
  --step-0: 1.0625rem;
  --step-1: 1.3rem;
  --step-2: 1.75rem;
  --step-3: clamp(2rem, 4vw, 2.8rem);
  --step-4: clamp(2.5rem, 6.2vw, 4.6rem);

  --wrap: 74rem;
  --gutter: clamp(16px, 4vw, 40px);
  --radius: 18px;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #10060b;
    --bg-2: #180a11;
    --surface: #1c0c14;
    --surface-2: #22101a;
    --ink: #f6eaee;
    --ink-soft: #c2a8b3;
    --accent: #ea5673;
    --accent-hover: #f37d94;
    --accent-ink: #1a0710;
    --accent-soft: rgba(234, 86, 115, 0.12);
    --gold: #d6aa62;
    --rule: #3a1c29;
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.4), 0 16px 40px -16px rgba(0, 0, 0, 0.7);
    --logo-1: #f06a82;
    --logo-2: #9e2449;
    --glow: rgba(234, 86, 115, 0.2);
    --pattern: rgba(240, 106, 130, 0.06);
    --line-rgb: 240, 106, 130;
    --line-alpha: 0.3;
    --header-bg: rgba(16, 6, 11, 0.78);
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #10060b;
  --bg-2: #180a11;
  --surface: #1c0c14;
  --surface-2: #22101a;
  --ink: #f6eaee;
  --ink-soft: #c2a8b3;
  --accent: #ea5673;
  --accent-hover: #f37d94;
  --accent-ink: #1a0710;
  --accent-soft: rgba(234, 86, 115, 0.12);
  --gold: #d6aa62;
  --rule: #3a1c29;
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.4), 0 16px 40px -16px rgba(0, 0, 0, 0.7);
  --logo-1: #f06a82;
  --logo-2: #9e2449;
  --glow: rgba(234, 86, 115, 0.2);
  --pattern: rgba(240, 106, 130, 0.06);
  --line-rgb: 240, 106, 130;
  --line-alpha: 0.3;
  --header-bg: rgba(16, 6, 11, 0.78);
}

html[lang="ar"] {
  --body: "IBM Plex Sans Arabic", "Source Sans 3", system-ui, "Segoe UI", Tahoma, sans-serif;
  --display: "Reem Kufi", "IBM Plex Sans Arabic", system-ui, sans-serif;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 5.5rem; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--body);
  font-size: var(--step-0);
  line-height: 1.6;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
html[lang="ar"] body { line-height: 1.8; }
img, svg { display: block; max-width: 100%; }
a { color: var(--accent); text-underline-offset: 0.2em; }
a:hover { color: var(--accent-hover); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }
h1, h2, h3 { font-family: var(--display); font-weight: 600; line-height: 1.15; margin: 0 0 0.5em; letter-spacing: -0.01em; }
html[lang="ar"] :is(h1, h2, h3) { letter-spacing: 0; line-height: 1.35; }
h1 { font-size: var(--step-4); }
h2 { font-size: var(--step-3); }
h3 { font-size: var(--step-1); }
p { margin: 0 0 1em; }
.skip { position: absolute; inset-inline-start: 1rem; top: -4rem; background: var(--accent); color: var(--accent-ink); padding: 0.6rem 1rem; border-radius: 8px; z-index: 100; }
.skip:focus { top: 1rem; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.wrap { width: min(100% - 2 * var(--gutter), var(--wrap)); margin-inline: auto; }

.label {
  display: inline-flex; align-items: center; gap: 0.5em;
  font-family: var(--mono); font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.12em;
  color: var(--accent);
}
html[lang="ar"] .label { font-family: var(--body); font-weight: 600; letter-spacing: 0; text-transform: none; font-size: 0.9rem; }
.label::before { content: ""; width: 1.4em; height: 1px; background: currentColor; }

/* Background animation canvas (js/techlines.js) and page ornaments */
#bg-lines { position: fixed; inset: 0; width: 100%; height: 100%; z-index: -1; pointer-events: none; }
.pattern {
  position: absolute; inset: 0; pointer-events: none;
  background: var(--pattern);
  -webkit-mask: url("images/pattern.svg") repeat; mask: url("images/pattern.svg") repeat;
  -webkit-mask-size: 96px; mask-size: 96px;
}

/* ---------- Logo ---------- */
.logo-stop-1 { stop-color: var(--logo-1); }
.logo-stop-2 { stop-color: var(--logo-2); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.55em;
  min-height: 2.75rem; padding: 0.6rem 1.3rem; border-radius: 999px;
  font: 600 1rem/1 var(--body); text-decoration: none; white-space: nowrap;
  border: 1px solid transparent; cursor: pointer;
  transition: background-color 0.2s, color 0.2s, border-color 0.2s, transform 0.2s, box-shadow 0.2s;
}
.btn-primary { background: var(--accent); color: var(--accent-ink); box-shadow: 0 8px 24px -10px var(--glow); }
.btn-primary:hover { background: var(--accent-hover); color: var(--accent-ink); transform: translateY(-1px); }
.btn-quiet { border-color: var(--rule); color: var(--ink); background: color-mix(in srgb, var(--surface) 70%, transparent); }
.btn-quiet:hover { border-color: var(--accent); color: var(--accent); }
.btn-sm { min-height: 2.3rem; padding: 0.4rem 1rem; font-size: 0.95rem; }
.arrow { width: 1.1em; height: 1.1em; }
[dir="rtl"] .arrow { transform: scaleX(-1); }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: var(--header-bg);
  -webkit-backdrop-filter: saturate(1.4) blur(14px); backdrop-filter: saturate(1.4) blur(14px);
  border-bottom: 1px solid color-mix(in srgb, var(--rule) 70%, transparent);
}
.header-inner { display: flex; align-items: center; gap: 1rem; min-height: 4.25rem; flex-wrap: wrap; }
.brand { display: inline-flex; align-items: center; gap: 0.65rem; color: var(--ink); text-decoration: none; font-family: var(--display); font-weight: 600; font-size: 1.2rem; margin-inline-end: auto; }
.brand:hover { color: var(--ink); }
.brand svg { width: 2.1rem; height: 2.1rem; transition: transform 0.6s cubic-bezier(.2,.8,.2,1); }
.brand:hover svg { transform: rotate(30deg); }
.site-nav { display: flex; align-items: center; gap: 0.25rem; }
.site-nav a { color: var(--ink-soft); text-decoration: none; font-weight: 600; padding: 0.45rem 0.7rem; border-radius: 8px; }
.site-nav a:hover { color: var(--ink); background: var(--accent-soft); }
.header-actions { display: flex; align-items: center; gap: 0.5rem; }
.lang-switch { font-weight: 600; text-decoration: none; color: var(--ink); padding: 0.4rem 0.75rem; border-radius: 999px; border: 1px solid var(--rule); }
.lang-switch:hover { border-color: var(--accent); }
.lang-switch[lang="ar"] { font-family: "IBM Plex Sans Arabic", var(--body); }
.icon-btn {
  display: inline-grid; place-items: center; width: 2.4rem; height: 2.4rem; border-radius: 999px;
  border: 1px solid var(--rule); background: transparent; color: var(--ink); cursor: pointer;
}
.icon-btn:hover { border-color: var(--accent); color: var(--accent); }
.icon-btn svg { width: 1.15rem; height: 1.15rem; }
.icon-btn[hidden] { display: none; }
.theme-toggle .i-sun { display: none; }
:root[data-theme="dark"] .theme-toggle .i-sun { display: block; }
:root[data-theme="dark"] .theme-toggle .i-moon { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-toggle .i-sun { display: block; }
  :root:not([data-theme="light"]) .theme-toggle .i-moon { display: none; }
}
.menu-toggle { display: none; }

@media (max-width: 900px) {
  .site-nav { order: 3; width: 100%; overflow-x: auto; padding-bottom: 0.6rem; }
  .js .site-nav { display: none; }
  .js .site-header.open .site-nav { display: flex; flex-direction: column; align-items: stretch; padding-bottom: 1rem; }
  .js .site-header.open .site-nav a { padding: 0.75rem 0.5rem; border-bottom: 1px solid var(--rule); border-radius: 0; }
  .js .menu-toggle { display: inline-grid; }
  .hide-sm { display: none; }
}

/* ---------- Hero ---------- */
.hero { position: relative; isolation: isolate; overflow: hidden; }
.hero::before {
  content: ""; position: absolute; z-index: -1; inset-inline-end: -10%; top: -20%;
  width: 70vmax; height: 70vmax; border-radius: 50%;
  background: radial-gradient(closest-side, var(--glow), transparent 70%);
}
.hero-inner { display: grid; grid-template-columns: 1.1fr 0.9fr; align-items: center; gap: clamp(2rem, 5vw, 4rem); padding-block: clamp(3.5rem, 9vw, 7rem); }
.hero h1 { margin-block: 1rem 1.25rem; }
.hero h1 em { font-style: normal; background: linear-gradient(120deg, var(--logo-1), var(--accent)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.lede { font-size: clamp(1.1rem, 1.6vw, 1.3rem); color: var(--ink-soft); max-width: 36rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 2rem; }

.emblem { position: relative; aspect-ratio: 1; width: min(100%, 30rem); margin-inline: auto; }
.emblem .mark { position: absolute; inset: 14%; width: 72%; height: 72%; filter: drop-shadow(0 20px 40px var(--glow)); animation: spin 140s linear infinite; }
.emblem .ring { position: absolute; inset: 0; border-radius: 50%; border: 1px dashed color-mix(in srgb, var(--accent) 45%, transparent); animation: spin 90s linear infinite reverse; }
.emblem .ring-2 { inset: 7%; border-style: solid; border-color: color-mix(in srgb, var(--gold) 40%, transparent); animation-duration: 120s; animation-direction: normal; }
.emblem .ring::after {
  content: ""; position: absolute; top: -5px; inset-inline-start: calc(50% - 5px);
  width: 10px; height: 10px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 16px var(--accent);
}
.emblem .ring-2::after { background: var(--gold); box-shadow: 0 0 14px var(--gold); top: auto; bottom: -4px; width: 8px; height: 8px; }
@keyframes spin { to { transform: rotate(360deg); } }

.focus-strip { border-block: 1px solid var(--rule); background: color-mix(in srgb, var(--bg-2) 70%, transparent); }
.focus-strip ul { list-style: none; margin: 0; padding: 1.1rem 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 0.6rem 2.25rem; }
.focus-strip li { display: inline-flex; align-items: center; gap: 0.6rem; font-weight: 600; color: var(--ink-soft); }
.focus-strip li::before { content: ""; width: 0.55rem; height: 0.55rem; background: var(--accent); transform: rotate(45deg); }

/* ---------- Sections ---------- */
.section { position: relative; padding-block: clamp(4rem, 9vw, 7rem); }
.section-alt { background: color-mix(in srgb, var(--bg-2) 82%, transparent); }
.section-head { max-width: 44rem; margin-bottom: clamp(2rem, 4vw, 3rem); }
.section-head.center { margin-inline: auto; text-align: center; }
.section-head.center .label::after { content: ""; width: 1.4em; height: 1px; background: currentColor; }
.section-head p { color: var(--ink-soft); font-size: 1.12rem; }

/* Services */
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 19rem), 1fr)); gap: 1.25rem; }
.card {
  position: relative; background: color-mix(in srgb, var(--surface) 88%, transparent);
  border: 1px solid var(--rule); border-radius: var(--radius); padding: 1.75rem;
  box-shadow: var(--shadow); transition: transform 0.25s, border-color 0.25s;
  overflow: hidden;
}
.card::after {
  content: ""; position: absolute; inset-inline-end: -40px; top: -40px; width: 120px; height: 120px;
  background: radial-gradient(closest-side, var(--accent-soft), transparent); transition: transform 0.4s;
}
.card:hover { transform: translateY(-4px); border-color: color-mix(in srgb, var(--accent) 45%, var(--rule)); }
.card:hover::after { transform: scale(1.6); }
.card-icon { width: 3rem; height: 3rem; display: grid; place-items: center; border-radius: 12px; background: var(--accent-soft); color: var(--accent); margin-bottom: 1.1rem; }
.card-icon svg { width: 1.6rem; height: 1.6rem; }
.card p { color: var(--ink-soft); margin: 0; }
.badge {
  position: absolute; top: 1.25rem; inset-inline-end: 1.25rem;
  font: 600 0.72rem/1 var(--mono); letter-spacing: 0.08em; text-transform: uppercase;
  padding: 0.35rem 0.6rem; border-radius: 999px; color: var(--gold); border: 1px solid color-mix(in srgb, var(--gold) 50%, transparent);
}
html[lang="ar"] .badge { font-family: var(--body); letter-spacing: 0; text-transform: none; font-size: 0.8rem; }

/* Platform teaser */
.platform {
  position: relative; overflow: hidden; isolation: isolate;
  display: grid; grid-template-columns: 1.2fr 0.8fr; gap: 2rem; align-items: center;
  padding: clamp(2rem, 5vw, 3.5rem); border-radius: calc(var(--radius) + 8px);
  background: linear-gradient(135deg, #470127, #8e172d 60%, #b52a45);
  color: #fff; box-shadow: 0 30px 60px -30px rgba(71, 1, 39, 0.6);
}
.platform .pattern { background: rgba(255, 255, 255, 0.07); z-index: -1; }
.platform .label { color: #ffc9d4; }
.platform h2 { color: #fff; }
.platform p { color: rgba(255, 255, 255, 0.82); }
.platform ul { list-style: none; padding: 0; margin: 1.5rem 0 0; display: grid; gap: 0.6rem; }
.platform li { display: flex; gap: 0.7rem; align-items: baseline; }
.platform li::before { content: ""; flex: none; width: 0.5rem; height: 0.5rem; background: #ffc9d4; transform: rotate(45deg) translateY(-2px); }
.platform .btn-light { background: #fff; color: #470127; }
.platform .btn-light:hover { background: #ffe6eb; color: #470127; }
.platform-art { display: grid; place-items: center; }
.platform-art svg { width: min(100%, 16rem); color: rgba(255, 255, 255, 0.9); animation: float 6s ease-in-out infinite; }
@keyframes float { 50% { transform: translateY(-10px); } }

/* Approach: tiers stacked like muqarnas rows */
.tiers { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; counter-reset: tier; }
.tiers li {
  position: relative; padding: 1.75rem 1.5rem 1.5rem; border-radius: var(--radius);
  background: color-mix(in srgb, var(--surface) 88%, transparent); border: 1px solid var(--rule);
  counter-increment: tier;
}
.tiers li:nth-child(2) { margin-top: 1.5rem; }
.tiers li:nth-child(3) { margin-top: 3rem; }
.tiers li:nth-child(4) { margin-top: 4.5rem; }
.tiers li::before {
  content: counter(tier, decimal-leading-zero);
  display: block; font: 500 0.85rem/1 var(--mono); color: var(--accent); margin-bottom: 1rem;
}
html[lang="ar"] .tiers li::before { content: counter(tier, arabic-indic); font-family: var(--body); font-size: 1.1rem; }
.tiers li::after {
  content: ""; position: absolute; top: -1px; inset-inline: 1.5rem; height: 3px; border-radius: 0 0 3px 3px;
  background: linear-gradient(90deg, var(--logo-2), var(--logo-1));
}
.tiers p { color: var(--ink-soft); margin: 0; }

/* About / the name */
.about { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2rem, 5vw, 4rem); align-items: center; }
.about p { color: var(--ink-soft); }
.quote {
  margin: 0; padding: 2rem; border-radius: var(--radius); border: 1px solid var(--rule);
  background: color-mix(in srgb, var(--surface) 88%, transparent); position: relative;
}
.quote blockquote { margin: 0 0 1.5rem; font-family: var(--display); font-size: var(--step-2); line-height: 1.3; color: var(--ink); }
.quote dl { display: grid; grid-template-columns: auto 1fr; gap: 0.5rem 1.25rem; margin: 0; font-size: 0.95rem; }
.quote dt { font-family: var(--mono); font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--accent); padding-top: 0.2em; }
html[lang="ar"] .quote dt { font-family: var(--body); text-transform: none; letter-spacing: 0; font-size: 0.9rem; font-weight: 600; }
.quote dd { margin: 0; color: var(--ink-soft); }

/* Contact */
.contact { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2rem, 5vw, 4rem); align-items: start; }
.contact-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.75rem; }
.contact-list li {
  display: flex; align-items: center; gap: 1rem; padding: 1rem 1.25rem; border-radius: 14px;
  background: color-mix(in srgb, var(--surface) 88%, transparent); border: 1px solid var(--rule);
}
.contact-list .card-icon { margin: 0; width: 2.6rem; height: 2.6rem; flex: none; }
.contact-list .card-icon svg { width: 1.3rem; height: 1.3rem; }
.contact-list small { display: block; color: var(--ink-soft); font-size: 0.85rem; }
.contact-list a, .contact-list span.v { color: var(--ink); font-weight: 600; text-decoration: none; }
.contact-list a:hover { color: var(--accent); }
.ltr { direction: ltr; unicode-bidi: isolate; }
.socials { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 1.5rem; }

/* CTA band */
.band {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1.5rem;
  padding: 2rem clamp(1.5rem, 4vw, 2.5rem); border-radius: var(--radius);
  border: 1px solid var(--rule); background: color-mix(in srgb, var(--surface) 88%, transparent);
}
.band h2 { font-size: var(--step-2); margin-bottom: 0.25rem; }
.band p { margin: 0; color: var(--ink-soft); }

/* Footer */
.site-footer { border-top: 1px solid var(--rule); padding-block: 3rem 2rem; background: color-mix(in srgb, var(--bg-2) 85%, transparent); }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 2rem; }
.footer-grid p { color: var(--ink-soft); max-width: 26rem; margin-top: 1rem; }
.footer-grid h3 { font-size: 1rem; margin-bottom: 0.75rem; }
.footer-grid ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.4rem; }
.footer-grid ul a { color: var(--ink-soft); text-decoration: none; }
.footer-grid ul a:hover { color: var(--accent); }
.footer-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1rem; margin-top: 2.5rem; padding-top: 1.5rem; border-top: 1px solid var(--rule); color: var(--ink-soft); font-size: 0.9rem; }

/* 404 */
.lost { min-height: 70vh; display: grid; place-content: center; text-align: center; gap: 0.5rem; padding-block: 4rem; }
.lost .mark { width: 7rem; height: 7rem; margin: 0 auto 1rem; }
.lost .pair { display: grid; gap: 0.25rem; }
.lost .actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.75rem; margin-top: 1.5rem; }

/* Scroll reveal (only when js/site.js runs and motion is allowed) */
.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity 0.7s ease, transform 0.7s cubic-bezier(.2,.8,.2,1); }
.js .reveal.in { opacity: 1; transform: none; }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .hero-inner, .platform, .about, .contact { grid-template-columns: 1fr; }
  .emblem { width: min(80%, 22rem); order: -1; }
  .platform-art { display: none; }
  .tiers { grid-template-columns: 1fr 1fr; }
  .tiers li:nth-child(n) { margin-top: 0; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-grid > :first-child { grid-column: 1 / -1; }
}
@media (max-width: 560px) {
  .tiers { grid-template-columns: 1fr; }
  .hero-actions .btn { flex: 1 1 100%; }
  .header-actions .btn-sm { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .js .reveal { opacity: 1; transform: none; }
}

/* Hidden SVG symbol sprite (not display:none, or gradients inside it stop rendering). */
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.platform .cta { margin-top: 1.75rem; }
/* Client sign-in inside the menu, only where the header button is hidden. */
.site-nav .nav-signin { display: none; }
@media (max-width: 560px) { .site-nav .nav-signin { display: block; color: var(--accent); } }
/* Motto as the hero eyebrow: wraps cleanly on narrow screens. */
.label.motto { flex-wrap: wrap; line-height: 1.5; }
.footer-grid p strong { color: var(--ink); font-weight: 600; }
@media (max-width: 420px) { .label.motto::before { display: none; } }
/* Hero headline: highlighted phrase on its own line, lines balanced. */
.hero h1 { text-wrap: balance; }
.hero h1 em { display: block; }
.hero h1 { font-size: clamp(2.1rem, 4.4vw, 3.4rem); }
/* js/spin.js drives the hero logo; the CSS spin above is the no-JS fallback. */
.emblem .mark.js-spin { animation: none; will-change: transform; }
