/* ==========================================================================
   CM Dev Studio — public stylesheet
   Tokens → base → layout → components → sections → pages → utilities
   ========================================================================== */

/* ---------- Fonts (self-hosted, SIL Open Font License — see assets/fonts) ---------- */
@font-face { font-family: "Bricolage Grotesque"; font-style: normal; font-weight: 200 800; font-display: swap; src: url("../fonts/bricolage-grotesque-var.woff2") format("woff2-variations"), url("../fonts/bricolage-grotesque-var.woff2") format("woff2"); }
@font-face { font-family: "Geist"; font-style: normal; font-weight: 100 900; font-display: swap; src: url("../fonts/geist-var.woff2") format("woff2-variations"), url("../fonts/geist-var.woff2") format("woff2"); }

/* ---------- Tokens ---------- */
:root {
  --font-display: "Bricolage Grotesque", "Segoe UI", system-ui, sans-serif;
  --font-body: "Geist", "Segoe UI", system-ui, -apple-system, sans-serif;

  --step--1: clamp(.84rem, .82rem + .1vw, .9rem);
  --step-0: clamp(1rem, .97rem + .15vw, 1.0625rem);
  --step-1: clamp(1.15rem, 1.08rem + .35vw, 1.35rem);
  --step-2: clamp(1.4rem, 1.25rem + .7vw, 1.85rem);
  --step-3: clamp(1.9rem, 1.5rem + 1.8vw, 3rem);
  --step-4: clamp(2.3rem, 1.6rem + 3.4vw, 4.4rem);
  --step-5: clamp(2.7rem, 1.4rem + 6vw, 6.6rem);

  --space-1: .5rem; --space-2: .75rem; --space-3: 1rem; --space-4: 1.5rem;
  --space-5: 2rem; --space-6: 3rem; --space-7: 4.5rem; --space-8: clamp(4.5rem, 3rem + 6vw, 8.5rem);

  --r-sm: 8px; --r-md: 14px; --r-lg: 22px; --r-pill: 999px;
  --wrap: 1240px;
  --ease: cubic-bezier(.2, .7, .1, 1);
  --header-h: 72px;
}

:root, :root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0d1020;
  --bg-2: #10142a;
  --surface: #151a2e;
  --surface-2: #1c2240;
  --line: rgba(233, 236, 245, .10);
  --line-2: rgba(233, 236, 245, .2);
  --text: #e9ecf5;
  --muted: #9aa2bf;
  --accent: #4f7cff;
  --accent-2: #7b9bff;
  --accent-ink: #ffffff;
  --accent-soft: rgba(79, 124, 255, .14);
  --amber: #ffb547;
  --ok: #3ccf91;
  --err: #ff7a7a;
  --shadow: 0 30px 80px -30px rgba(0, 0, 0, .75);
  --dot-rgb: 123, 155, 255;
  --glyph-rgb: 233, 236, 245;
}

:root[data-theme="light"] {
  color-scheme: light;
  --bg: #eef0f6;
  --bg-2: #e6e9f2;
  --surface: #ffffff;
  --surface-2: #f5f6fb;
  --line: rgba(16, 20, 42, .10);
  --line-2: rgba(16, 20, 42, .2);
  --text: #10142a;
  --muted: #4f5776;
  --accent: #2f5bff;
  --accent-2: #2448d8;
  --accent-ink: #ffffff;
  --accent-soft: rgba(47, 91, 255, .10);
  --amber: #a85f00;
  --ok: #10865a;
  --err: #c53030;
  --shadow: 0 30px 70px -35px rgba(16, 20, 60, .35);
  --dot-rgb: 47, 91, 255;
  --glyph-rgb: 16, 20, 42;
}

/* ---------- Base ---------- */
[hidden] { display: none !important; }
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 16px); background: var(--bg); }
body {
  margin: 0; min-height: 100vh; overflow-x: hidden;
  font-family: var(--font-body); font-size: var(--step-0); line-height: 1.65;
  color: var(--text); background: transparent;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
  transition: background-color .4s var(--ease), color .4s var(--ease);
}
img, svg, video { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration-color: color-mix(in srgb, currentColor 35%, transparent); text-underline-offset: .2em; }
a:hover { text-decoration-color: currentColor; }
h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 650; line-height: 1.1; letter-spacing: -.02em; margin: 0 0 .5em; text-wrap: balance; }
p { margin: 0 0 1em; text-wrap: pretty; }
ul, ol { padding-left: 1.2em; }
button { font: inherit; color: inherit; }
::selection { background: var(--accent); color: var(--accent-ink); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }
.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip { position: fixed; left: 16px; top: -60px; z-index: 200; padding: .6rem 1rem; background: var(--accent); color: var(--accent-ink); border-radius: var(--r-sm); text-decoration: none; transition: top .2s; }
.skip:focus { top: 16px; }

.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: clamp(16px, 4vw, 40px); }
.section { padding-block: var(--space-8); position: relative; }
.muted { color: var(--muted); }

.display-1 { font-size: var(--step-5); font-weight: 700; letter-spacing: -.045em; line-height: .95; }
.display-2 { font-size: var(--step-4); font-weight: 680; letter-spacing: -.035em; line-height: 1; }
.lede { font-size: var(--step-1); color: var(--muted); max-width: 62ch; line-height: 1.6; }
.sec-head { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: var(--space-4); margin-bottom: var(--space-6); }
.sec-head h2 { margin: 0; max-width: 18ch; }
.sec-head p { max-width: 46ch; margin: 0; color: var(--muted); }

/* ---------- Background animation layers ---------- */
#bg-canvas { position: fixed; inset: 0; width: 100vw; height: 100vh; z-index: -2; pointer-events: none; opacity: var(--bg-opacity, 1); transition: opacity .6s var(--ease); }
.bg-glow { position: fixed; inset: 0; z-index: -3; pointer-events: none;
  background:
    radial-gradient(48vmax 38vmax at 85% -5%, var(--accent-soft), transparent 70%),
    radial-gradient(40vmax 30vmax at -10% 110%, color-mix(in srgb, var(--accent) 7%, transparent), transparent 70%);
}

/* ---------- Buttons ---------- */
.btn { --b: var(--line-2); display: inline-flex; align-items: center; justify-content: center; gap: .55em; min-height: 46px; padding: .7em 1.25em;
  border-radius: var(--r-pill); border: 1px solid var(--b); background: transparent; color: var(--text);
  font-weight: 560; font-size: .97rem; line-height: 1.1; text-decoration: none; cursor: pointer; white-space: nowrap;
  transition: background-color .2s, border-color .2s, color .2s, transform .2s var(--ease); }
.btn:hover { --b: var(--text); }
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--accent); --b: var(--accent); color: var(--accent-ink); }
.btn-primary:hover { background: var(--accent-2); --b: var(--accent-2); }
.btn-ghost { background: color-mix(in srgb, var(--surface) 55%, transparent); backdrop-filter: blur(6px); }
.btn-lg { min-height: 54px; padding: .85em 1.6em; font-size: 1.03rem; }
.btn-sm { min-height: 38px; padding: .5em 1em; font-size: .88rem; }
.btn[disabled] { opacity: .65; cursor: progress; }
.linkish { background: none; border: 0; padding: 0; color: inherit; text-decoration: underline; text-underline-offset: .2em; cursor: pointer; text-decoration-color: color-mix(in srgb, currentColor 35%, transparent); }
.text-link { font-weight: 560; color: var(--accent-2); text-decoration: none; border-bottom: 1px solid color-mix(in srgb, var(--accent) 40%, transparent); }
:root[data-theme="light"] .text-link { color: var(--accent); }
.text-link:hover { border-bottom-color: currentColor; }

/* ---------- Header ---------- */
.site-header { position: sticky; top: 0; z-index: 60; height: var(--header-h); transition: background-color .3s, border-color .3s, backdrop-filter .3s; border-bottom: 1px solid transparent; }
.site-header.scrolled { background: color-mix(in srgb, var(--bg) 82%, transparent); backdrop-filter: saturate(140%) blur(14px); border-bottom-color: var(--line); }
.header-inner { height: 100%; display: flex; align-items: center; gap: var(--space-4); }
.brand { display: inline-flex; align-items: center; gap: .65rem; text-decoration: none; flex-shrink: 0; }
.brand-mark { position: relative; display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 11px; background: var(--text); color: var(--bg);
  font-family: var(--font-display); font-weight: 800; font-size: 1.05rem; letter-spacing: -.06em; padding-right: 6px; }
.caret { position: absolute; right: 7px; bottom: 11px; width: 3px; height: 13px; background: var(--amber); border-radius: 1px; animation: blink 1.1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }
.brand-word { font-family: var(--font-display); font-weight: 700; font-size: 1.12rem; letter-spacing: -.02em; }

.nav { margin-left: auto; }
.nav-list { display: flex; align-items: center; gap: .2rem; list-style: none; margin: 0; padding: 0; }
.nav-list > li > a { display: inline-block; padding: .55rem .8rem; border-radius: var(--r-pill); text-decoration: none; color: var(--muted); font-weight: 520; font-size: .96rem; transition: color .2s, background-color .2s; }
.nav-list > li > a:hover, .nav-list > li > a[aria-current="page"] { color: var(--text); }
.nav-list > li > a[aria-current="page"] { background: var(--accent-soft); }
.has-menu { position: relative; display: flex; align-items: center; }
.menu-toggle { display: inline-grid; place-items: center; width: 26px; height: 26px; margin-left: -6px; border: 0; background: none; color: var(--muted); cursor: pointer; border-radius: 6px; }
.mega { position: absolute; top: calc(100% + 10px); left: 50%; translate: -50% 0; width: min(640px, 92vw); padding: .75rem; border-radius: var(--r-lg);
  background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow); opacity: 0; visibility: hidden; transform: translateY(6px); transition: opacity .2s, transform .2s var(--ease), visibility .2s; }
.mega ul { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 2px; }
.mega a { display: block; padding: .65rem .8rem; border-radius: 10px; text-decoration: none; }
.mega a:hover, .mega a:focus-visible { background: var(--surface-2); }
.mega strong { display: block; font-weight: 600; font-size: .95rem; }
.mega span { display: block; font-size: .82rem; color: var(--muted); line-height: 1.4; margin-top: 2px; }
.has-menu:hover .mega, .has-menu:focus-within .mega, .has-menu.open .mega { opacity: 1; visibility: visible; transform: none; }

.header-actions { display: flex; align-items: center; gap: .6rem; }
.theme-toggle { display: inline-grid; place-items: center; width: 42px; height: 42px; border-radius: 50%; border: 1px solid var(--line-2); background: transparent; cursor: pointer; transition: border-color .2s, transform .4s var(--ease); }
.theme-toggle:hover { border-color: var(--text); transform: rotate(-20deg); }
:root[data-theme="dark"] .i-moon, :root[data-theme="light"] .i-sun { display: none; }
.burger { display: none; width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--line-2); background: transparent; cursor: pointer; position: relative; }
.burger span { position: absolute; left: 13px; right: 13px; height: 1.6px; background: currentColor; transition: transform .3s var(--ease), top .3s; }
.burger span:first-child { top: 17px; } .burger span:last-child { top: 25px; }
.burger[aria-expanded="true"] span:first-child { top: 21px; transform: rotate(45deg); }
.burger[aria-expanded="true"] span:last-child { top: 21px; transform: rotate(-45deg); }
.nav-cta-mobile { display: none; }

@media (max-width: 1080px) {
  .header-cta { display: none; }
}
@media (max-width: 920px) {
  .burger { display: inline-block; }
  .nav { position: fixed; inset: var(--header-h) 0 0 0; margin: 0; padding: var(--space-4) clamp(16px, 4vw, 40px) var(--space-6);
    background: var(--bg); overflow-y: auto; visibility: hidden; opacity: 0; transform: translateY(-8px); transition: opacity .25s, transform .25s var(--ease), visibility .25s; }
  .nav.open { visibility: visible; opacity: 1; transform: none; }
  .nav-list { flex-direction: column; align-items: stretch; gap: 0; }
  .nav-list > li { border-bottom: 1px solid var(--line); }
  .nav-list > li > a { display: block; padding: 1rem 0; font-size: 1.35rem; font-family: var(--font-display); font-weight: 600; color: var(--text); border-radius: 0; background: none !important; }
  .has-menu { flex-wrap: wrap; justify-content: space-between; }
  .menu-toggle { width: 44px; height: 44px; }
  .mega { position: static; translate: none; width: 100%; box-shadow: none; border: 0; padding: 0 0 .75rem; background: none; display: none; opacity: 1; visibility: visible; transform: none; }
  .has-menu.open .mega { display: block; }
  .has-menu:hover .mega { display: none; } .has-menu.open:hover .mega { display: block; }
  .mega ul { grid-template-columns: 1fr; }
  .mega span { display: none; }
  .nav-cta-mobile { display: flex; width: 100%; margin-top: var(--space-5); }
  body.nav-open { overflow: hidden; }
}

/* ---------- Hero ---------- */
.hero { position: relative; min-height: calc(100svh - var(--header-h)); display: flex; flex-direction: column; justify-content: center; padding-block: var(--space-5) var(--space-7); }
.hero-status { display: inline-flex; align-items: center; gap: .6rem; margin-bottom: var(--space-4); padding: .35rem .85rem .35rem .65rem; border-radius: var(--r-pill);
  border: 1px solid var(--line-2); font-size: .88rem; color: var(--muted); background: color-mix(in srgb, var(--bg) 60%, transparent); backdrop-filter: blur(6px); }
.live-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--amber); box-shadow: 0 0 0 0 color-mix(in srgb, var(--amber) 60%, transparent); animation: pulse 2.4s infinite; display: inline-block; flex-shrink: 0; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--amber) 55%, transparent); } 70% { box-shadow: 0 0 0 10px transparent; } 100% { box-shadow: 0 0 0 0 transparent; } }
.hero h1 { font-size: clamp(2.2rem, .9rem + 5.5vw, 6.4rem); font-weight: 720; letter-spacing: -.05em; line-height: .92; margin-bottom: var(--space-5); }
.hero h1 .ln { display: block; overflow: hidden; padding-bottom: .07em; }
.hero h1 .ln > span { display: inline-block; transform: translateY(105%); animation: rise .9s var(--ease) forwards; }
.hero h1 .ln:nth-child(2) > span { animation-delay: .08s; }
.hero h1 .ln:nth-child(3) > span { animation-delay: .16s; }
.hero h1 .ln:nth-child(4) > span { animation-delay: .24s; }
.hero h1 .ln.dim > span { color: var(--muted); }
.hero h1 .ln.indent { padding-left: clamp(0rem, 12vw, 11rem); }
@keyframes rise { to { transform: none; } }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(2rem, 5vw, 5rem); align-items: end; }
.hero-intro { font-size: var(--step-1); color: var(--muted); max-width: 52ch; margin-bottom: var(--space-5); line-height: 1.55; }
.hero-intro strong { color: var(--text); font-weight: 560; }
.btns { display: flex; flex-wrap: wrap; gap: .75rem; }
.hero-meta { display: flex; flex-wrap: wrap; gap: .5rem 1.6rem; margin: var(--space-5) 0 0; font-size: .9rem; color: var(--muted); list-style: none; padding: 0; }
.hero-meta li { display: inline-flex; align-items: center; gap: .45rem; }
.hero-meta strong { color: var(--text); font-weight: 560; }

.hero-stack { position: relative; height: clamp(300px, 28vw, 400px); }
.hero-stack a { position: absolute; width: 74%; aspect-ratio: 16 / 10; border-radius: var(--r-lg); overflow: hidden; box-shadow: var(--shadow); text-decoration: none;
  transition: transform .7s var(--ease); border: 1px solid var(--line-2); background: var(--surface); }
.hero-stack a:nth-child(1) { right: 0; top: 0; transform: rotate(3deg); z-index: 1; }
.hero-stack a:nth-child(2) { left: 0; top: 14%; transform: rotate(-2.5deg); z-index: 2; }
.hero-stack a:nth-child(3) { right: 6%; bottom: 0; transform: rotate(1deg); z-index: 3; }
.hero-stack:hover a:nth-child(1) { transform: rotate(6deg) translate(5%, -6%); }
.hero-stack:hover a:nth-child(2) { transform: rotate(-5deg) translate(-6%, 0); }
.hero-stack a:hover, .hero-stack a:focus-visible { z-index: 5 !important; transform: rotate(0) scale(1.03) !important; }
.hero-stack .stack-label { position: absolute; left: 12px; bottom: 12px; padding: .3rem .7rem; border-radius: var(--r-pill); background: color-mix(in srgb, var(--bg) 78%, transparent); backdrop-filter: blur(8px); font-size: .8rem; font-weight: 560; }
.scroll-cue { position: absolute; left: 50%; bottom: 18px; translate: -50% 0; font-size: .8rem; color: var(--muted); text-decoration: none; display: inline-flex; flex-direction: column; align-items: center; gap: 6px; }
.scroll-cue i { width: 1px; height: 34px; background: linear-gradient(var(--muted), transparent); animation: drip 2s var(--ease) infinite; transform-origin: top; }
@keyframes drip { 0% { transform: scaleY(0); } 50% { transform: scaleY(1); } 100% { transform: scaleY(1); opacity: 0; } }

@media (max-width: 920px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-stack { height: 260px; max-width: 520px; }
  .hero h1 .ln.indent { padding-left: 0; }
  .scroll-cue { display: none; }
}

/* ---------- Generated project cover (placeholder until a real screenshot is uploaded) ---------- */
.gen-cover { position: relative; width: 100%; height: 100%; display: flex; flex-direction: column; color: #f1f3fa; overflow: hidden;
  background: linear-gradient(150deg, hsl(var(--h) 42% 17%) 0%, hsl(calc(var(--h) + 22) 46% 10%) 100%); }
:root[data-theme="light"] .gen-cover { background: linear-gradient(150deg, hsl(var(--h) 70% 95%) 0%, hsl(calc(var(--h) + 22) 55% 88%) 100%); color: #10142a; }
.gen-cover::before { content: ""; position: absolute; inset: 0;
  background-image: linear-gradient(hsl(var(--h) 80% 70% / .08) 1px, transparent 1px), linear-gradient(90deg, hsl(var(--h) 80% 70% / .08) 1px, transparent 1px);
  background-size: 28px 28px; mask-image: radial-gradient(120% 90% at 85% 10%, #000 20%, transparent 75%); }
.gen-bar { position: relative; display: flex; align-items: center; gap: 5px; padding: 9px 12px; border-bottom: 1px solid color-mix(in srgb, currentColor 12%, transparent); font-size: .72rem; }
.gen-bar i { width: 7px; height: 7px; border-radius: 50%; background: color-mix(in srgb, currentColor 30%, transparent); }
.gen-bar span { margin-left: 8px; padding: 2px 10px; border-radius: var(--r-pill); background: color-mix(in srgb, currentColor 9%, transparent); opacity: .85; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 75%; }
.gen-body { position: relative; flex: 1; display: flex; flex-direction: column; justify-content: flex-end; padding: clamp(14px, 5%, 26px); gap: 6px; }
.gen-word { position: absolute; right: 5%; top: 10%; max-width: 70%; font-family: var(--font-display); font-weight: 800; font-size: clamp(2.2rem, 6vw, 4.6rem); line-height: .9; letter-spacing: -.05em;
  color: transparent; -webkit-text-stroke: 1.2px hsl(var(--h) 75% 66% / .55); white-space: nowrap; overflow: hidden; text-overflow: clip; }
:root[data-theme="light"] .gen-word { -webkit-text-stroke-color: hsl(var(--h) 70% 45% / .45); }
.gen-title { font-family: var(--font-display); font-weight: 650; font-size: clamp(1.05rem, 2vw, 1.55rem); letter-spacing: -.02em; line-height: 1.1; max-width: 88%; }
.gen-meta { font-size: .78rem; opacity: .7; }

/* ---------- Trend / disciplines section ---------- */
.trend { padding-block: var(--space-8) var(--space-7); }
.trend-intro { max-width: 60ch; margin-bottom: var(--space-6); }
.trend-list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.trend-row { border-bottom: 1px solid var(--line); }
.trend-row button { width: 100%; display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: var(--space-4); padding: clamp(1rem, 2.4vw, 1.6rem) 0; background: none; border: 0; text-align: left; cursor: pointer; }
.trend-word { font-family: var(--font-display); font-size: clamp(2.6rem, 1rem + 8vw, 8.5rem); font-weight: 750; letter-spacing: -.055em; line-height: .9;
  color: transparent; -webkit-text-stroke: 1.2px color-mix(in srgb, var(--text) 45%, transparent); transition: color .45s var(--ease), -webkit-text-stroke-color .45s; }
.trend-row:hover .trend-word, .trend-row.open .trend-word { color: var(--text); -webkit-text-stroke-color: var(--text); }
.trend-plus { width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--line-2); display: grid; place-items: center; transition: transform .4s var(--ease), background-color .3s; flex-shrink: 0; }
.trend-row.open .trend-plus { transform: rotate(45deg); background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.trend-panel { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .5s var(--ease); }
.trend-row.open .trend-panel { grid-template-rows: 1fr; }
.trend-panel > div { overflow: hidden; }
.trend-inner { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: var(--space-5); padding-bottom: var(--space-5); }
.trend-inner p { color: var(--muted); font-size: var(--step-1); margin: 0; max-width: 46ch; }
.chips { display: flex; flex-wrap: wrap; gap: .45rem; list-style: none; margin: 0; padding: 0; align-content: flex-start; }
.chips li, .chip { padding: .35rem .8rem; border-radius: var(--r-pill); border: 1px solid var(--line-2); font-size: .86rem; color: var(--text); background: color-mix(in srgb, var(--surface) 50%, transparent); }
@media (max-width: 720px) { .trend-inner { grid-template-columns: 1fr; } }

/* Marquee ticker */
.marquee { position: relative; overflow: hidden; border-block: 1px solid var(--line); padding-block: 1.1rem; mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); }
.marquee-track { display: flex; width: max-content; gap: 2.4rem; animation: marquee 48s linear infinite; }
.marquee:hover .marquee-track { animation-play-state: paused; }
.marquee span { font-family: var(--font-display); font-size: clamp(1.2rem, 2.4vw, 1.9rem); font-weight: 600; letter-spacing: -.02em; white-space: nowrap; color: var(--muted); display: inline-flex; align-items: center; gap: 2.4rem; }
.marquee span::after { content: ""; width: 8px; height: 8px; border-radius: 2px; background: var(--accent); transform: rotate(45deg); }
@keyframes marquee { to { transform: translateX(-50%); } }

/* ---------- Brands strip ---------- */
.brands { padding-block: var(--space-7); }
.brands-grid { display: flex; flex-wrap: wrap; gap: .75rem 2.6rem; align-items: baseline; list-style: none; margin: var(--space-4) 0 0; padding: 0; }
.brands-grid li { font-family: var(--font-display); font-size: clamp(1.3rem, 2.6vw, 2.1rem); font-weight: 650; letter-spacing: -.03em; color: color-mix(in srgb, var(--text) 78%, transparent); }
.brands-note { font-size: .88rem; color: var(--muted); margin-top: var(--space-4); max-width: 70ch; }

/* ---------- About preview ---------- */
.about-prev { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: clamp(2rem, 6vw, 6rem); align-items: center; }
.portrait { position: relative; aspect-ratio: 4 / 5; border-radius: var(--r-lg); overflow: hidden; background: var(--surface); border: 1px solid var(--line); }
.portrait img { width: 100%; height: 100%; object-fit: cover; }
.portrait-mono { position: absolute; inset: 0; display: grid; place-items: center; font-family: var(--font-display); font-weight: 800; font-size: clamp(6rem, 16vw, 12rem); letter-spacing: -.08em; color: var(--accent);
  background: radial-gradient(circle at 30% 20%, var(--accent-soft), transparent 60%), repeating-linear-gradient(0deg, transparent 0 31px, var(--line) 31px 32px), repeating-linear-gradient(90deg, transparent 0 31px, var(--line) 31px 32px); }
.portrait-cap { position: absolute; left: 14px; right: 14px; bottom: 14px; padding: .7rem .9rem; border-radius: var(--r-md); background: color-mix(in srgb, var(--bg) 82%, transparent); backdrop-filter: blur(8px); font-size: .9rem; }
.portrait-cap strong { display: block; font-family: var(--font-display); font-size: 1.1rem; }
.about-prev h2 { font-size: var(--step-3); max-width: 22ch; }
.about-prev .lede { margin-bottom: var(--space-4); }
.skill-cloud { margin: var(--space-4) 0 var(--space-5); }
@media (max-width: 820px) { .about-prev { grid-template-columns: 1fr; } .portrait { max-width: 360px; } }

/* ---------- Services grid ---------- */
.svc-grid { display: grid; grid-template-columns: repeat(12, 1fr); gap: 1px; border-radius: var(--r-lg); overflow: hidden; }
.svc-card { grid-column: span 4; box-shadow: 0 0 0 1px var(--line); position: relative; display: flex; flex-direction: column; gap: .6rem; padding: clamp(1.4rem, 2.6vw, 2.1rem); background: color-mix(in srgb, var(--bg) 88%, transparent); text-decoration: none; transition: background-color .3s; min-height: 260px; }
.svc-card:hover { background: var(--surface); }
.svc-card h3 { font-size: var(--step-2); margin: 0; }
.svc-card p { margin: 0; color: var(--muted); }
.svc-card .svc-benefit { color: var(--text); font-size: .93rem; border-left: 2px solid var(--accent); padding-left: .75rem; margin-top: auto; }
.svc-card .svc-go { font-weight: 560; font-size: .92rem; color: var(--accent-2); display: inline-flex; align-items: center; gap: .4rem; }
:root[data-theme="light"] .svc-card .svc-go { color: var(--accent); }
.svc-card .svc-go svg { transition: transform .3s var(--ease); }
.svc-card:hover .svc-go svg { transform: translateX(4px); }
@media (max-width: 960px) { .svc-card, .svc-card:nth-child(1), .svc-card:nth-child(2) { grid-column: span 6; } }
@media (max-width: 620px) { .svc-card, .svc-card:nth-child(1), .svc-card:nth-child(2) { grid-column: span 12; min-height: 0; } }

/* ---------- Project cards ---------- */
.p-card { display: flex; flex-direction: column; border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--line); overflow: hidden; transition: border-color .3s, transform .5s var(--ease); }
.p-card:hover { border-color: var(--line-2); }
.p-media { display: block; aspect-ratio: 16 / 10; overflow: hidden; background: var(--surface-2); }
.p-media img, .p-media .gen-cover { width: 100%; height: 100%; object-fit: cover; transition: transform .8s var(--ease); }
.p-card:hover .p-media img, .p-card:hover .p-media .gen-cover { transform: scale(1.035); }
.p-body { display: flex; flex-direction: column; gap: .5rem; padding: 1.2rem 1.3rem 1.4rem; flex: 1; }
.p-kicker { margin: 0; font-size: .82rem; color: var(--muted); }
.p-title { margin: 0; font-size: var(--step-1); }
.p-title a { text-decoration: none; }
.p-title a::after { content: ""; position: absolute; inset: 0; }
.p-card { position: relative; }
.p-sum { margin: 0; color: var(--muted); font-size: .94rem; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.p-tags { display: flex; flex-wrap: wrap; gap: .35rem; list-style: none; margin: auto 0 0; padding: .4rem 0 0; }
.p-tags li { font-size: .76rem; padding: .22rem .6rem; border-radius: var(--r-pill); background: var(--accent-soft); color: var(--text); }
.p-tags li.muted { background: transparent; border: 1px solid var(--line-2); color: var(--muted); }

/* Featured rail */
.rail-wrap { position: relative; }
.rail { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(300px, 34%); gap: 1.2rem; overflow-x: auto; scroll-snap-type: x mandatory; padding: 4px 4px 1.4rem; scrollbar-width: thin; scrollbar-color: var(--line-2) transparent; overscroll-behavior-x: contain; }
.rail > * { scroll-snap-align: start; }
.rail .p-card-lg:first-child { grid-column: span 1; }
.rail-ctrl { display: flex; gap: .5rem; }
.rail-ctrl button { width: 46px; height: 46px; border-radius: 50%; border: 1px solid var(--line-2); background: transparent; cursor: pointer; display: grid; place-items: center; transition: border-color .2s, background-color .2s; }
.rail-ctrl button:hover { border-color: var(--text); }
@media (max-width: 960px) { .rail { grid-auto-columns: minmax(280px, 72%); } }
@media (max-width: 520px) { .rail { grid-auto-columns: 86%; } }

/* ---------- Orbit sphere ---------- */
.orbit-sec { padding-block: var(--space-8) var(--space-7); overflow: hidden; }
.orbit-head { text-align: center; display: grid; justify-items: center; gap: .6rem; }
.orbit-head h2 { margin: 0; }
.orbit-head p { color: var(--muted); max-width: 54ch; margin: 0; }
.orbit-stage { position: relative; height: clamp(520px, 72vw, 780px); margin-top: var(--space-4); touch-action: pan-y; cursor: grab; user-select: none; -webkit-user-select: none; }
.orbit-stage.dragging { cursor: grabbing; }
.orbit-stage::before { content: ""; position: absolute; left: 50%; top: 50%; width: min(560px, 74vw); aspect-ratio: 1; translate: -50% -50%; border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, var(--accent-soft), transparent 62%); border: 1px dashed var(--line-2); pointer-events: none; }
.orbit-sphere { position: absolute; inset: 0; list-style: none; margin: 0; padding: 0; }
.orb { position: absolute; left: 50%; top: 50%; width: var(--w, 132px); margin-left: calc(var(--w, 132px) / -2); will-change: transform, opacity; }
.orb-reel { --w: 104px; } .orb-project { --w: 132px; } .orb-service { --w: 122px; }
.orb > a, .orb > button { position: relative; display: block; width: 100%; aspect-ratio: 4 / 5; border-radius: 16px; overflow: hidden; border: 1px solid var(--line-2); background: var(--surface); text-decoration: none; cursor: pointer; padding: 0; text-align: left;
  box-shadow: 0 18px 40px -20px rgba(0, 0, 0, .6); transition: border-color .2s; }
.orb-reel > button { aspect-ratio: 9 / 16; }
.orb-project > a { aspect-ratio: 1; }
.orb > a:hover, .orb > button:hover, .orb > a:focus-visible, .orb > button:focus-visible { border-color: var(--accent); }
.orb img, .orb .orb-fill { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.orb .orb-fill { background: linear-gradient(160deg, var(--accent), #1a1f3d); }
.orb-tile { position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: flex-end; padding: .7rem .7rem 3.1rem; background: radial-gradient(120% 80% at 20% 10%, var(--accent-soft), transparent 70%), var(--surface); }
.orb-tile::before { content: ""; position: absolute; inset: 0; background-image: radial-gradient(circle, color-mix(in srgb, var(--accent) 35%, transparent) 1px, transparent 1.4px); background-size: 14px 14px; mask-image: linear-gradient(160deg, #000, transparent 70%); }
.orb-tile svg { position: relative; color: var(--accent-2); }
.orb-project .orb-tile { background: linear-gradient(150deg, var(--surface-2), var(--surface)); }
.orb-project .orb-tile svg { color: var(--amber); }
.orb-label { position: absolute; left: 0; right: 0; bottom: 0; padding: .55rem .65rem .6rem; font-size: .78rem; font-weight: 560; line-height: 1.25; color: #fff; background: linear-gradient(transparent, rgba(5, 8, 20, .88) 45%); }
.orb-label small { display: block; font-size: .66rem; font-weight: 500; opacity: .72; }
.orb-play { position: absolute; left: 50%; top: 42%; translate: -50% -50%; width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; background: rgba(255, 255, 255, .92); color: #0d1020; padding-left: 2px; }
.orbit-ui { position: absolute; left: 0; right: 0; bottom: 6px; display: flex; justify-content: center; align-items: center; gap: 1rem; pointer-events: none; }
.orbit-ui > * { pointer-events: auto; }
.orbit-hint { margin: 0; font-size: .84rem; color: var(--muted); }
@media (max-width: 620px) { .orb-reel { --w: 84px; } .orb-project { --w: 104px; } .orb-service { --w: 96px; } .orb-label { font-size: .68rem; } }

/* ---------- Process ---------- */
.process { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: clamp(2rem, 6vw, 6rem); }
.process-head { position: sticky; top: calc(var(--header-h) + 2rem); align-self: start; }
.process-head h2 { font-size: var(--step-4); }
.steps { list-style: none; margin: 0; padding: 0; counter-reset: step; }
.steps li { counter-increment: step; display: grid; grid-template-columns: 4.2rem 1fr; gap: 1rem; padding: 1.4rem 0; border-top: 1px solid var(--line); }
.steps li:last-child { border-bottom: 1px solid var(--line); }
.steps li::before { content: counter(step, decimal-leading-zero); font-family: var(--font-display); font-weight: 700; font-size: 1.6rem; color: var(--accent-2); line-height: 1.2; }
:root[data-theme="light"] .steps li::before { color: var(--accent); }
.steps h3 { font-size: var(--step-1); margin: 0 0 .3rem; }
.steps p { margin: 0; color: var(--muted); }
@media (max-width: 820px) { .process { grid-template-columns: 1fr; } .process-head { position: static; } }

/* ---------- Why me ---------- */
.why-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; border-top: 1px solid var(--line); }
.why-grid > div { padding: 1.8rem 1.8rem 1.8rem 0; border-bottom: 1px solid var(--line); }
.why-grid > div:not(:nth-child(3n)) { border-right: 1px solid var(--line); }
.why-grid > div:not(:nth-child(3n+1)) { padding-left: 1.8rem; }
.why-grid h3 { font-size: var(--step-1); margin-bottom: .4rem; }
.why-grid p { margin: 0; color: var(--muted); }
@media (max-width: 860px) {
  .why-grid { grid-template-columns: 1fr 1fr; }
  .why-grid > div, .why-grid > div:not(:nth-child(3n+1)) { padding: 1.5rem 1.2rem 1.5rem 0; border-right: 0 !important; }
  .why-grid > div:nth-child(odd) { border-right: 1px solid var(--line) !important; }
  .why-grid > div:nth-child(even) { padding-left: 1.2rem; }
}
@media (max-width: 560px) { .why-grid { grid-template-columns: 1fr; } .why-grid > div { border-right: 0 !important; padding-left: 0 !important; } }

/* ---------- Blog cards ---------- */
.post-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.2rem; }
.post-card { position: relative; display: flex; flex-direction: column; gap: .6rem; padding: 1.5rem; border-radius: var(--r-lg); border: 1px solid var(--line); background: color-mix(in srgb, var(--surface) 70%, transparent); transition: border-color .3s, background-color .3s; }
.post-card:hover { border-color: var(--line-2); background: var(--surface); }
.post-card .post-img { margin: -1.5rem -1.5rem .6rem; aspect-ratio: 16 / 9; overflow: hidden; }
.post-card .post-img img { width: 100%; height: 100%; object-fit: cover; }
.post-meta { font-size: .82rem; color: var(--muted); margin: 0; }
.post-card h3 { font-size: var(--step-1); margin: 0; }
.post-card h3 a { text-decoration: none; }
.post-card h3 a::after { content: ""; position: absolute; inset: 0; }
.post-card p { margin: 0; color: var(--muted); font-size: .95rem; }
@media (max-width: 900px) { .post-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 600px) { .post-grid { grid-template-columns: 1fr; } }

/* ---------- CTA band ---------- */
.cta-band { padding-block: var(--space-8); border-top: 1px solid var(--line); }
.cta-band h2 { margin-bottom: var(--space-5); max-width: 14ch; }
.cta-row { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: var(--space-4); }
.cta-row p { max-width: 52ch; color: var(--muted); font-size: var(--step-1); margin: 0; }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--line); padding-top: var(--space-7); background: color-mix(in srgb, var(--bg-2) 85%, transparent); }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr .8fr 1fr; gap: var(--space-5); }
.f-about p { color: var(--muted); max-width: 40ch; margin-top: 1rem; font-size: .95rem; }
.f-local { display: flex; align-items: center; gap: .5rem; font-size: .88rem !important; }
.f-col h2 { font-family: var(--font-body); font-size: .9rem; font-weight: 600; color: var(--muted); letter-spacing: 0; margin-bottom: .9rem; }
.f-col ul { list-style: none; margin: 0; padding: 0; display: grid; gap: .45rem; }
.f-col a, .f-col .linkish { text-decoration: none; font-size: .95rem; }
.f-col a:hover, .f-col .linkish:hover { color: var(--accent-2); }
.f-social { margin-top: 1rem !important; display: flex !important; flex-wrap: wrap; gap: .4rem 1rem !important; }
.f-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1rem; padding-block: var(--space-5); margin-top: var(--space-6); border-top: 1px solid var(--line); font-size: .86rem; color: var(--muted); }
.f-bottom p { margin: 0; }
.to-top { text-decoration: none; }
@media (max-width: 900px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .footer-grid { grid-template-columns: 1fr; } }

.wa-float { position: fixed; right: 18px; bottom: 18px; z-index: 50; width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center; background: #25d366; color: #fff; box-shadow: 0 12px 30px -10px rgba(0, 0, 0, .5); transition: transform .3s var(--ease); }
.wa-float:hover { transform: scale(1.06); }

/* ---------- Modal (enquiry + video) ---------- */
.modal { position: fixed; inset: 0; z-index: 120; display: grid; place-items: center; padding: 16px; }
.modal[hidden] { display: none; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(4, 6, 16, .62); backdrop-filter: blur(4px); opacity: 0; transition: opacity .3s; }
.modal.is-open .modal-backdrop { opacity: 1; }
.modal-panel { position: relative; width: min(640px, 100%); max-height: calc(100svh - 32px); overflow-y: auto; overscroll-behavior: contain; padding: clamp(1.4rem, 3vw, 2.2rem);
  border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--line-2); box-shadow: var(--shadow);
  opacity: 0; transform: translateY(14px) scale(.98); transition: opacity .3s var(--ease), transform .4s var(--ease); }
.modal.is-open .modal-panel { opacity: 1; transform: none; }
.modal-panel:focus { outline: none; }
.modal-panel h2 { font-size: var(--step-3); margin-bottom: .4rem; padding-right: 2.5rem; }
.modal-lead { color: var(--muted); margin-bottom: var(--space-4); }
.modal-close { position: absolute; right: 14px; top: 14px; width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--line-2); background: var(--surface); display: grid; place-items: center; cursor: pointer; z-index: 2; }
.modal-close:hover { border-color: var(--text); }
.modal-grab { display: none; }
@media (max-width: 640px) {
  .modal:not(.modal-video) { place-items: end stretch; padding: 0; }
  .modal:not(.modal-video) .modal-panel { width: 100%; max-height: 92svh; border-radius: 22px 22px 0 0; border-bottom: 0; transform: translateY(100%); padding-top: 1.6rem; padding-bottom: calc(1.4rem + env(safe-area-inset-bottom)); }
  .modal:not(.modal-video).is-open .modal-panel { transform: none; }
  .modal-grab { display: block; position: absolute; top: 8px; left: 50%; translate: -50% 0; width: 42px; height: 4px; border-radius: 4px; background: var(--line-2); }
}
.video-panel { width: min(420px, 100%); padding: 0; background: #000; overflow: hidden; }
.video-panel.wide { width: min(960px, 100%); }
.video-slot video, .video-slot iframe { display: block; width: 100%; max-height: calc(100svh - 40px); aspect-ratio: 9 / 16; border: 0; background: #000; }
.video-panel.wide .video-slot iframe, .video-panel.wide .video-slot video { aspect-ratio: 16 / 9; }

/* ---------- Forms ---------- */
.enquiry-form { display: grid; gap: .9rem; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: .9rem; }
@media (max-width: 560px) { .field-row { grid-template-columns: 1fr; } }
.field label { display: block; font-size: .88rem; font-weight: 560; margin-bottom: .35rem; }
.field input, .field select, .field textarea {
  width: 100%; min-height: 48px; padding: .75rem .9rem; border-radius: 12px; border: 1px solid var(--line-2); background: var(--bg); color: var(--text);
  font: inherit; font-size: 1rem; transition: border-color .2s, box-shadow .2s; }
.field textarea { min-height: 112px; resize: vertical; }
.field select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath d='M2 4l4 4 4-4' fill='none' stroke='%239aa2bf' stroke-width='1.6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right .9rem center; padding-right: 2.4rem; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.field.invalid input, .field.invalid select, .field.invalid textarea { border-color: var(--err); }
.field-err { margin: .3rem 0 0; font-size: .82rem; color: var(--err); min-height: 0; }
.field-err:empty { display: none; }
.hp { position: absolute !important; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.privacy-note { font-size: .82rem; color: var(--muted); margin: 0; }
.form-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem; }
.form-status { margin: 0; font-size: .92rem; flex: 1 1 220px; }
.form-status.ok { color: var(--ok); } .form-status.err { color: var(--err); }
.spinner { display: none; width: 16px; height: 16px; border-radius: 50%; border: 2px solid currentColor; border-right-color: transparent; animation: spin .7s linear infinite; }
.is-loading .spinner { display: inline-block; }
@keyframes spin { to { transform: rotate(360deg); } }
.form-done { padding: 1.4rem; border-radius: var(--r-md); background: color-mix(in srgb, var(--ok) 12%, transparent); border: 1px solid color-mix(in srgb, var(--ok) 40%, transparent); }
.form-done h3 { margin: 0 0 .3rem; font-size: var(--step-1); }
.form-done p { margin: 0; color: var(--muted); }

/* ---------- Inner pages ---------- */
.page-hero { padding-block: var(--space-6) var(--space-6); }
.page-hero h1 { font-size: var(--step-4); font-weight: 700; letter-spacing: -.04em; line-height: 1; max-width: 18ch; margin-bottom: var(--space-4); }
.page-hero .lede { margin: 0; }
.crumbs ol { display: flex; flex-wrap: wrap; gap: .3rem; list-style: none; padding: 0; margin: 0 0 var(--space-4); font-size: .86rem; color: var(--muted); }
.crumbs li + li::before { content: "/"; margin-right: .3rem; opacity: .5; }
.crumbs a { text-decoration: none; } .crumbs a:hover { color: var(--text); }

.two-col { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: clamp(2rem, 5vw, 4.5rem); align-items: start; }
.aside-card { position: sticky; top: calc(var(--header-h) + 1.5rem); padding: 1.5rem; border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--line); }
.aside-card h2, .aside-card h3 { font-size: var(--step-1); }
.aside-card dl { margin: 0; display: grid; gap: .9rem; }
.aside-card dt { font-size: .8rem; color: var(--muted); }
.aside-card dd { margin: .1rem 0 0; font-weight: 520; }
.aside-card .btn { width: 100%; margin-top: 1.2rem; }
@media (max-width: 960px) { .two-col { grid-template-columns: 1fr; } .aside-card { position: static; } }

.block { margin-bottom: var(--space-6); }
.block > h2 { font-size: var(--step-3); margin-bottom: var(--space-4); }
.tick-list { list-style: none; padding: 0; margin: 0; display: grid; gap: .7rem; }
.tick-list li { position: relative; padding-left: 1.8rem; }
.tick-list li::before { content: ""; position: absolute; left: 0; top: .5em; width: 12px; height: 7px; border-left: 2px solid var(--accent); border-bottom: 2px solid var(--accent); transform: rotate(-45deg); }
.cap-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; border-radius: var(--r-lg); overflow: hidden; }
.cap-grid > div { background: color-mix(in srgb, var(--bg) 88%, transparent); padding: 1.4rem; box-shadow: 0 0 0 1px var(--line); }
.cap-grid h3 { font-size: 1.1rem; margin-bottom: .35rem; font-family: var(--font-body); font-weight: 600; letter-spacing: 0; }
.cap-grid p { margin: 0; color: var(--muted); font-size: .95rem; }
@media (max-width: 640px) { .cap-grid { grid-template-columns: 1fr; } }

.faq details { border-top: 1px solid var(--line); }
.faq details:last-child { border-bottom: 1px solid var(--line); }
.faq summary { cursor: pointer; list-style: none; display: flex; justify-content: space-between; gap: 1rem; padding: 1.1rem 0; font-weight: 600; font-size: 1.05rem; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-size: 1.4rem; line-height: 1; color: var(--muted); transition: transform .3s var(--ease); }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { color: var(--muted); padding-bottom: 1.1rem; margin: 0; max-width: 70ch; }

/* Service index rows */
.svc-rows { border-top: 1px solid var(--line); }
.svc-row { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr) auto; gap: 1.5rem; align-items: center; padding: 1.6rem 0; border-bottom: 1px solid var(--line); text-decoration: none; transition: padding-left .4s var(--ease); }
.svc-row:hover { padding-left: .8rem; }
.svc-row .n { color: var(--muted); font-size: .9rem; }
.svc-row h2 { font-size: var(--step-2); margin: 0; }
.svc-row p { margin: 0; color: var(--muted); }
.svc-row .arrow { width: 46px; height: 46px; border-radius: 50%; border: 1px solid var(--line-2); display: grid; place-items: center; transition: background-color .3s, border-color .3s, color .3s; }
.svc-row:hover .arrow { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
@media (max-width: 760px) { .svc-row { grid-template-columns: 1fr auto; } .svc-row .n { display: none; } .svc-row p { grid-column: 1 / -1; grid-row: 2; } }

/* Portfolio */
.filters { display: flex; flex-wrap: wrap; gap: .75rem; align-items: center; justify-content: space-between; margin-bottom: var(--space-5); }
.filter-chips { display: flex; flex-wrap: wrap; gap: .45rem; }
.filter-chips button { padding: .5rem 1rem; border-radius: var(--r-pill); border: 1px solid var(--line-2); background: transparent; cursor: pointer; font-size: .9rem; font-weight: 520; color: var(--muted); transition: all .2s; }
.filter-chips button:hover { color: var(--text); border-color: var(--text); }
.filter-chips button[aria-pressed="true"] { background: var(--text); color: var(--bg); border-color: var(--text); }
.filter-chips button .count { opacity: .6; margin-left: .3rem; font-size: .8rem; }
.filter-tools { display: flex; flex-wrap: wrap; gap: .6rem; }
.filter-tools input, .filter-tools select { min-height: 42px; padding: .5rem .9rem; border-radius: var(--r-pill); border: 1px solid var(--line-2); background: var(--surface); color: var(--text); font: inherit; font-size: .92rem; }
.filter-tools input { width: min(260px, 100%); }
.p-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.2rem; }
.p-grid .p-card[hidden] { display: none; }
.p-empty { padding: 3rem 0; text-align: center; color: var(--muted); }
@media (max-width: 960px) { .p-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 600px) { .p-grid { grid-template-columns: 1fr; } }
.group-h { font-size: var(--step-2); margin: var(--space-6) 0 var(--space-4); padding-top: var(--space-4); border-top: 1px solid var(--line); }

.project-hero-media { border-radius: var(--r-lg); overflow: hidden; border: 1px solid var(--line); aspect-ratio: 16 / 9; margin-bottom: var(--space-6); background: var(--surface); }
.project-hero-media:has(.gen-cover) { aspect-ratio: 21 / 6; }
@media (max-width: 700px) { .project-hero-media:has(.gen-cover) { aspect-ratio: 16 / 9; } }
.project-hero-media img, .project-hero-media .gen-cover { width: 100%; height: 100%; object-fit: cover; }
.attribution { padding: 1rem 1.2rem; border-radius: var(--r-md); border: 1px solid var(--line-2); background: color-mix(in srgb, var(--surface) 70%, transparent); font-size: .93rem; color: var(--muted); margin-bottom: var(--space-5); }
.attribution strong { color: var(--text); }
.gallery { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.gallery img { border-radius: var(--r-md); border: 1px solid var(--line); width: 100%; }
@media (max-width: 600px) { .gallery { grid-template-columns: 1fr; } }

/* Prose (blog, legal) */
.prose { font-size: 1.08rem; line-height: 1.75; max-width: 70ch; }
.prose h2 { font-size: var(--step-2); margin: 2.2em 0 .6em; }
.prose h3 { font-size: var(--step-1); margin: 1.8em 0 .5em; }
.prose ul, .prose ol { margin: 0 0 1.2em; }
.prose li { margin-bottom: .45em; }
.prose a { color: var(--accent-2); }
:root[data-theme="light"] .prose a { color: var(--accent); }
.prose code { font-size: .9em; padding: .1em .4em; border-radius: 6px; background: var(--surface-2); }
.prose pre { padding: 1rem; border-radius: var(--r-md); background: var(--surface-2); overflow-x: auto; }
.prose pre code { padding: 0; background: none; }
.prose blockquote { margin: 1.5em 0; padding-left: 1.2em; border-left: 3px solid var(--accent); color: var(--muted); }
.prose img { border-radius: var(--r-md); margin: 1.5em 0; }
.prose table { width: 100%; border-collapse: collapse; font-size: .95rem; margin-bottom: 1.4em; }
.prose th, .prose td { border-bottom: 1px solid var(--line); padding: .6em .5em; text-align: left; }
.toc { font-size: .92rem; }
.toc ol { list-style: none; padding: 0; margin: 0; display: grid; gap: .5rem; }
.toc a { text-decoration: none; color: var(--muted); } .toc a:hover { color: var(--text); }
.post-head-meta { display: flex; flex-wrap: wrap; gap: .4rem 1.2rem; color: var(--muted); font-size: .92rem; }

.contact-grid { display: grid; grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr); gap: clamp(2rem, 5vw, 5rem); align-items: start; }
.contact-card { padding: clamp(1.4rem, 3vw, 2.2rem); border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--line); }
.contact-list { list-style: none; padding: 0; margin: var(--space-4) 0; display: grid; gap: 1rem; }
.contact-list li { display: grid; gap: .1rem; }
.contact-list span { font-size: .82rem; color: var(--muted); }
.contact-list a { font-size: 1.1rem; font-weight: 560; text-decoration: none; }
@media (max-width: 900px) { .contact-grid { grid-template-columns: 1fr; } }

.timeline { list-style: none; padding: 0; margin: 0; border-left: 1px solid var(--line-2); }
.timeline li { position: relative; padding: 0 0 1.8rem 1.6rem; }
.timeline li::before { content: ""; position: absolute; left: -5px; top: .45em; width: 9px; height: 9px; border-radius: 50%; background: var(--accent); }
.timeline h3 { font-size: var(--step-1); margin-bottom: .2rem; }
.timeline p { color: var(--muted); margin: 0; }

.notfound { min-height: 60vh; display: grid; align-content: center; }
.notfound .display-1 { color: var(--accent); }

/* Reveal on scroll — one quiet treatment, used sparingly */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .8s var(--ease), transform .8s var(--ease); }
.reveal.in { opacity: 1; transform: none; }

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
  .hero h1 .ln > span { transform: none; }
  .reveal { opacity: 1; transform: none; }
  .marquee-track { animation: none; }
  .caret { animation: none; }
}
@media print { #bg-canvas, .bg-glow, .site-header, .site-footer, .modal, .wa-float { display: none !important; } body { background: #fff; color: #000; } }

/* Generated covers: the card already shows the title, so keep the cover quiet there */
.p-media .gen-title, .hero-stack .gen-title { display: none; }
.p-media .gen-word, .hero-stack .gen-word { top: auto; bottom: 18%; right: auto; left: clamp(14px, 5%, 26px); font-size: clamp(2.4rem, 5vw, 4rem); }
