/* Cero Creative — site styles */

:root {
  --pink: #B68CFF;          /* main accent: buttons, contact band, chips */
  --pink-h: #C9A8FF;        /* accent hover */
  --accent-deep: #7A2FE0;   /* accent pixel on light backgrounds */
  --purple: #9B4DFF;
  --green: #39FF88;
  --ink: #1B0B33;
  --paper: #F6F1FF;

  /* dark (default) */
  --bg: #1B0B33;
  --bg2: #22103F;
  --card: #2C1650;
  --nav-bg: #22103F;
  --line: #3A2560;
  --text: #F6F1FF;
  --muted: #D9CFF0;
  --soft: #B4A6D1;
  --pixel: #39FF88;
  --eyebrow: #39FF88;
  --link: #39FF88;
  --outline: #9B4DFF;
  --chip: #2C1650;
  --trail: #4A2F78;
  --frame: #ECE9E4;
  --frame-dot: #C9C3BB;
  color-scheme: dark;
}

:root[data-theme="light"] {
  --bg: #FFFFFF;
  --bg2: #F6F1FF;
  --card: #FFFFFF;
  --nav-bg: #FFFFFF;
  --line: #E4DBF3;
  --text: #1B0B33;
  --muted: #4A3F66;
  --soft: #5E527A;
  --pixel: var(--accent-deep);
  --eyebrow: #7A2FE0;
  --link: #7A2FE0;
  --outline: #1B0B33;
  --chip: #FFFFFF;
  --trail: #D6C8EE;
  color-scheme: light;
}

@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    --bg: #FFFFFF;
    --bg2: #F6F1FF;
    --card: #FFFFFF;
    --nav-bg: #FFFFFF;
    --line: #E4DBF3;
    --text: #1B0B33;
    --muted: #4A3F66;
    --soft: #5E527A;
    --pixel: var(--accent-deep);
    --eyebrow: #7A2FE0;
    --link: #7A2FE0;
    --outline: #1B0B33;
    --chip: #FFFFFF;
    --trail: #D6C8EE;
    color-scheme: light;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 110px; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: 'Space Grotesk', system-ui, sans-serif;
  font-size: 17px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: var(--link); }
a:hover { color: var(--pink); }
:focus-visible { outline: 2px solid var(--pink); outline-offset: 3px; }
h1, h2, h3, p, figure, dl, dd, ol, ul { margin: 0; }
.mono { font-family: 'JetBrains Mono', ui-monospace, monospace; }

.skip {
  position: absolute; inset-inline-start: 16px; top: 8px; z-index: 50; transform: translateY(-300%);
  background: var(--pink); color: var(--ink); padding: 10px 16px; font-weight: 700;
}
.skip:focus { transform: none; }

.wrap { max-width: 1200px; margin: 0 auto; padding-left: clamp(16px, 4vw, 48px); padding-right: clamp(16px, 4vw, 48px); }
.section { padding-top: clamp(64px, 8vw, 104px); padding-bottom: clamp(64px, 8vw, 104px); }
.alt { background: var(--bg2); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.stack { display: flex; flex-direction: column; gap: 36px; }

.h-section { font-size: clamp(36px, 5vw, 60px); font-weight: 700; letter-spacing: -0.04em; line-height: 1; max-width: 720px; }
.head-row { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 16px 24px; }
.head-row > p { font-size: 17px; max-width: 360px; color: var(--soft); }
.eyebrow { display: inline-flex; align-items: center; gap: 10px; font-family: 'JetBrains Mono', monospace; font-size: 13px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--eyebrow); }
.tag-mono { font-family: 'JetBrains Mono', monospace; font-size: 13px; color: var(--soft); text-transform: uppercase; letter-spacing: 0.04em; }
.sq { display: inline-block; width: 10px; height: 10px; flex: none; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font: inherit; font-size: 18px; font-weight: 700; text-decoration: none;
  padding: 16px 26px; border-radius: 999px; border: 2px solid transparent; cursor: pointer;
  transition: transform .15s ease, background-color .15s ease, color .15s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn-pink { background: var(--pink); color: var(--ink); }
.btn-pink:hover { color: var(--ink); background: var(--pink-h); }
.btn-outline { border-color: var(--outline); color: var(--text); background: transparent; }
.btn-outline:hover { color: var(--text); background: var(--chip); }
.btn-ink { background: var(--ink); color: var(--paper); }
.btn-ink:hover { color: var(--paper); background: #2c1650; }
.btn-sm { font-size: 15px; font-weight: 600; padding: 10px 18px; border-width: 1.5px; }
.btn-row { display: flex; flex-wrap: wrap; gap: 14px; }

/* ---------- nav ---------- */
.site-header { position: sticky; top: 0; z-index: 20; background: var(--bg); padding: 16px clamp(16px, 4vw, 48px); }
.nav {
  max-width: 1104px; margin: 0 auto;
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 12px;
  background: var(--nav-bg); border: 1px solid var(--line); border-radius: 999px; padding: 8px 8px 8px 24px;
}
.logo { display: flex; flex-direction: column; gap: 2px; color: var(--text); text-decoration: none; }
.logo:hover { color: var(--text); }
.logo b { font-size: 20px; font-weight: 700; letter-spacing: -0.02em; line-height: 1; }
.logo span { font-size: 9px; font-weight: 500; letter-spacing: 0.45em; }
.nav-links { display: flex; align-items: center; gap: 2px; list-style: none; padding: 0; }
.nav-links a {
  display: flex; flex-direction: column; align-items: center; gap: 5px;
  color: var(--soft); text-decoration: none; font-size: 15px; font-weight: 500; padding: 10px 13px 6px; white-space: nowrap;
}
.nav-links a::after { content: ""; width: 6px; height: 6px; background: transparent; transition: background-color .2s; }
.nav-links a:hover { color: var(--text); }
.nav-links a[aria-current] { color: var(--text); }
.nav-links a[aria-current]::after { background: var(--pixel); }
.nav-tools { display: flex; align-items: center; gap: 8px; }
.nav-progress { display: flex; gap: 3px; padding: 0 6px; }
.nav-progress i { width: 8px; height: 8px; background: var(--line); transition: background-color .25s; }
.nav-progress i.on { background: var(--pixel); }
.theme-btn {
  font: inherit; font-size: 14px; background: transparent; color: var(--text);
  border: 1px solid var(--line); border-radius: 999px; padding: 10px 16px; cursor: pointer;
  display: inline-flex; align-items: center; gap: 8px; min-height: 44px;
}
.theme-btn:hover { background: var(--chip); }
.theme-btn svg { width: 16px; height: 16px; }
.nav .btn-pink { font-size: 15px; padding: 11px 20px; border: 0; }

@media (max-width: 900px) {
  .nav { border-radius: 24px; padding: 10px 10px 6px 18px; }
  .nav-links { order: 3; width: 100%; overflow-x: auto; scrollbar-width: none; margin: 0 -6px; }
  .nav-links::-webkit-scrollbar { display: none; }
  .nav-progress { display: none; }
}
@media (max-width: 480px) {
  .nav .btn-pink { padding: 10px 14px; font-size: 14px; }
  .theme-btn .label { display: none; }
  .theme-btn { padding: 10px 12px; }
}

/* ---------- hero ---------- */
.hero { padding-top: clamp(56px, 8vw, 112px); padding-bottom: clamp(72px, 10vw, 128px); display: flex; flex-direction: column; gap: 30px; }
.hero h1 { font-size: clamp(52px, 10vw, 148px); font-weight: 700; letter-spacing: -0.05em; line-height: 0.92; max-width: 1100px; }
.hero h1 .zero { width: 0.5em; height: 0.7em; vertical-align: 0; margin-left: 0.04em; }
.hero h1 .dot { color: var(--pink); }
.hero-foot { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 28px; }
.lede { font-size: clamp(18px, 2vw, 22px); line-height: 1.5; max-width: 620px; color: var(--muted); }
.chips { display: flex; flex-wrap: wrap; gap: 10px; list-style: none; padding: 0; }
.chips li {
  font-size: clamp(17px, 2vw, 22px); font-weight: 700; padding: 10px 16px;
  background: var(--chip); color: var(--text); border: 1px solid var(--line);
  transition: background-color .25s, color .25s, border-color .25s;
}
.chips li.on { background: var(--pink); color: var(--ink); border-color: var(--pink); }

/* ---------- services ---------- */
.tabs { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 12px; }
.tab {
  font: inherit; text-align: start; color: var(--text); background: transparent;
  border: 2px solid var(--line); border-radius: 20px; padding: 24px;
  display: flex; flex-direction: column; gap: 12px; cursor: pointer; transition: border-color .2s, background-color .2s;
}
.tab:hover { border-color: var(--soft); }
.tab[aria-selected="true"] { background: var(--card); border-color: var(--accent); }
.tab .top { display: flex; align-items: center; justify-content: space-between; width: 100%; }
.tab .sw { width: 24px; height: 24px; background: var(--accent); }
.tab .hint { font-family: 'JetBrains Mono', monospace; font-size: 13px; color: var(--soft); }
.tab .hint::before { content: attr(data-off); }
.tab[aria-selected="true"] .hint::before { content: attr(data-on); }
.tab strong { font-size: 24px; }
.tab span.desc { font-size: 16px; line-height: 1.55; color: var(--muted); }
.panel { background: var(--card); border: 1px solid var(--line); border-radius: 24px; padding: clamp(20px, 3vw, 32px); display: flex; flex-direction: column; gap: 18px; }
.panel[hidden] { display: none; }
.panel h3 { font-size: 22px; }
.samples { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; }
.sample { display: flex; flex-direction: column; gap: 8px; text-decoration: none; color: var(--text); }
.sample:hover { color: var(--text); }
.sample .thumb { height: 200px; border-radius: 14px; overflow: hidden; border: 1px solid var(--line); transition: transform .2s; }
.sample:hover .thumb { transform: translateY(-3px); }
.sample .thumb img { width: 100%; height: 100%; object-fit: cover; object-position: top; }
.sample .thumb.logo img { object-fit: contain; padding: 20px; }
.sample b { font-size: 16px; }
.sample small { font-size: 14px; color: var(--soft); }
.empty { border: 1px dashed var(--line); border-radius: 16px; padding: 28px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; }
.empty p { color: var(--muted); max-width: 560px; }

/* ---------- process ---------- */
.steps { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 24px 16px; }
.steps li { display: flex; flex-direction: column; gap: 12px; }
.dots { display: flex; gap: 4px; }
.dots i { width: 14px; height: 14px; background: var(--line); transition: background-color .2s; }
.dots i.trail { background: var(--trail); }
.dots i.head { background: var(--accent); }
.steps h3 { font-size: 22px; }
.steps p { font-size: 16px; line-height: 1.55; color: var(--muted); }

/* ---------- packages ---------- */
.packages { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 16px; }
.pkg { background: var(--card); border: 1px solid var(--line); border-radius: 24px; padding: 30px; display: flex; flex-direction: column; gap: 18px; }
.pkg.featured { border: 2px solid var(--pink); }
.pkg .top { display: flex; justify-content: space-between; align-items: center; }
.pkg > .pix, .pkg .top { min-height: 24px; align-items: center; }
.pkg .pix { display: flex; gap: 4px; }
.pkg .pix i { width: 12px; height: 12px; }
.badge { font-family: 'JetBrains Mono', monospace; font-size: 12px; font-weight: 600; background: var(--pink); color: var(--ink); padding: 5px 10px; }
.pkg h3 { font-size: 26px; }
.pkg p { font-size: 16px; line-height: 1.55; color: var(--muted); }
.pkg ul { list-style: none; padding: 0; display: flex; flex-direction: column; gap: 10px; font-size: 15px; }
.pkg li::before { content: "✓ "; color: var(--pixel); font-weight: 700; }
.pkg .btn { margin-top: auto; align-self: flex-start; }

/* ---------- faq ---------- */
.faq-wrap { display: flex; flex-wrap: wrap; gap: 40px; }
.faq-wrap .h-section { flex: 1 1 300px; }
.faq { flex: 2 1 520px; border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary {
  list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 16px;
  font-size: 20px; font-weight: 700; padding: 22px 0;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: ""; width: 12px; height: 12px; flex: none; background: var(--line); transition: background-color .2s; }
.faq details[open] summary::after { background: var(--pink); }
.faq details p { padding: 0 0 22px; font-size: 17px; line-height: 1.6; color: var(--muted); max-width: 640px; }

/* ---------- contact ---------- */
.contact, .cta {
  position: relative; overflow: hidden; color: var(--text); background: var(--bg2);
  border-top: 1px solid var(--line);
}
.contact::before, .cta::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background:
    radial-gradient(60% 70% at 12% 0%, color-mix(in srgb, var(--pink) 22%, transparent), transparent 70%),
    radial-gradient(40% 50% at 95% 100%, color-mix(in srgb, var(--pink) 12%, transparent), transparent 70%);
}
.contact .wrap, .cta .wrap { position: relative; }
.contact .kicker, .cta .kicker { color: var(--eyebrow); }
.kicker .sq { background: var(--pink); }
.contact .wrap { padding-top: clamp(64px, 8vw, 96px); padding-bottom: clamp(64px, 8vw, 96px); display: flex; flex-direction: column; gap: 40px; }
.contact .intro { display: flex; flex-direction: column; gap: 14px; max-width: 760px; }
.contact .kicker { display: flex; align-items: center; gap: 10px; font-family: 'JetBrains Mono', monospace; font-size: 14px; font-weight: 600; }
.contact h2 { font-size: clamp(40px, 6vw, 72px); font-weight: 700; letter-spacing: -0.045em; line-height: 0.95; }
.contact .intro p { font-size: 19px; color: var(--muted); }
.form { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 16px; }
.form-card { background: var(--card); border: 1px solid var(--line); border-radius: 20px; padding: 24px; display: flex; flex-direction: column; gap: 10px; }
.form-card .step { font-family: 'JetBrains Mono', monospace; font-size: 13px; font-weight: 600; margin-bottom: 4px; color: var(--eyebrow); }
.form label, .form legend { font-size: 14px; font-weight: 700; }
.form fieldset { border: 0; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.form legend { padding: 0; margin-bottom: 8px; }
.form input[type="text"], .form input[type="email"], .form input[type="tel"], .form select, .form textarea {
  font: inherit; font-size: 16px; padding: 13px 14px; border: 1.5px solid var(--line); background: var(--bg); color: var(--text);
  border-radius: 12px; width: 100%; margin-bottom: 6px; transition: border-color .15s;
}
.form input::placeholder, .form textarea::placeholder { color: var(--soft); opacity: 0.8; }
.form input:focus, .form select:focus, .form textarea:focus { outline: none; border-color: var(--pink); box-shadow: 0 0 0 3px color-mix(in srgb, var(--pink) 25%, transparent); }
.form select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--soft) 50%), linear-gradient(135deg, var(--soft) 50%, transparent 50%); background-position: calc(100% - 20px) 50%, calc(100% - 14px) 50%; background-size: 6px 6px; background-repeat: no-repeat; padding-right: 40px; }
.check { display: flex; align-items: center; gap: 10px; border: 1.5px solid var(--line); border-radius: 12px; background: var(--bg); padding: 10px 12px; font-size: 15px; font-weight: 500 !important; cursor: pointer; transition: border-color .15s, background-color .15s; }
.check:hover { border-color: var(--soft); }
.check:has(input:checked) { border-color: var(--pink); background: color-mix(in srgb, var(--pink) 14%, var(--bg)); }
.check input { width: 18px; height: 18px; accent-color: var(--pink); margin: 0; }
.form .bottom { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 16px; align-items: stretch; }
.form .bottom textarea { flex: 999 1 400px; resize: vertical; margin: 0; }
.form .bottom .btn { flex: 1 1 220px; border-radius: 12px; font-size: 18px; }
.form-status { grid-column: 1 / -1; font-weight: 700; min-height: 1.5em; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- cta band (subpages) ---------- */
.cta .wrap { padding-top: clamp(56px, 7vw, 88px); padding-bottom: clamp(56px, 7vw, 88px); display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 28px; }
.cta h2 { font-size: clamp(36px, 5vw, 60px); font-weight: 700; letter-spacing: -0.045em; line-height: 0.95; margin-top: 12px; }

/* ---------- footer ---------- */
.site-footer { border-top: 1px solid var(--line); }
.site-footer .wrap { padding-top: 36px; padding-bottom: 36px; display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 20px; font-size: 15px; color: var(--soft); }
.site-footer .name { display: flex; align-items: center; gap: 8px; color: var(--text); font-weight: 700; }
.site-footer a { color: var(--text); font-weight: 500; }

/* ---------- work overview ---------- */
.page-hero { padding-top: clamp(48px, 7vw, 96px); padding-bottom: clamp(48px, 6vw, 72px); display: flex; flex-direction: column; gap: 24px; }
.page-hero h1 { font-size: clamp(48px, 8vw, 112px); font-weight: 700; letter-spacing: -0.05em; line-height: 0.95; max-width: 1000px; }
.pills { display: flex; flex-wrap: wrap; gap: 10px; list-style: none; padding: 0; margin-top: 8px; }
.pills li { font-family: 'JetBrains Mono', monospace; font-size: 13px; border: 1px solid var(--line); padding: 8px 12px; color: var(--soft); }
.projects { display: flex; flex-direction: column; gap: 20px; padding-bottom: clamp(64px, 8vw, 104px); }
.project { display: flex; flex-wrap: wrap; background: var(--bg2); border: 1px solid var(--line); border-radius: 28px; overflow: hidden; }
.project .shot { flex: 1 1 520px; min-width: 0; display: block; background: var(--shot-bg, #fff); }
.project .shot img { width: 100%; height: 100%; min-height: 300px; max-height: 440px; object-fit: cover; object-position: top; transition: transform .4s ease; }
.project .shot:hover img { transform: scale(1.02); }
.project .info { flex: 1 1 380px; min-width: 0; padding: clamp(24px, 3vw, 40px); display: flex; flex-direction: column; gap: 16px; }
.project h2 { font-size: clamp(32px, 4vw, 44px); font-weight: 700; letter-spacing: -0.03em; line-height: 1.05; }
.project p { color: var(--muted); }
.tags { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; padding: 0; }
.tags li { font-size: 13px; font-weight: 500; background: var(--chip); border: 1px solid var(--line); padding: 6px 12px; }
.project .actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; margin-top: auto; padding-top: 8px; }
.project .actions a.ext { font-size: 15px; font-weight: 600; }

/* ---------- case study ---------- */
.back { align-self: flex-start; color: var(--soft); font-size: 15px; font-weight: 600; text-decoration: none; padding: 8px 0; }
.back:hover { color: var(--text); }
.case-hero { padding-top: clamp(28px, 5vw, 56px); padding-bottom: clamp(48px, 6vw, 72px); display: flex; flex-direction: column; gap: 24px; }
.case-hero h1 { font-size: clamp(48px, 9vw, 128px); font-weight: 700; letter-spacing: -0.05em; line-height: 0.92; }
.meta { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); border-top: 1px solid var(--line); margin-top: 8px; }
.meta div { padding: 18px 20px 18px 0; border-bottom: 1px solid var(--line); }
.meta dt { font-family: 'JetBrains Mono', monospace; font-size: 12px; color: var(--soft); margin-bottom: 6px; }
.meta dd { font-size: 17px; font-weight: 600; }
.browser { background: #FFFFFF; border: 1px solid var(--line); border-radius: 22px; overflow: hidden; }
.browser .bar { display: flex; align-items: center; gap: 8px; padding: 13px 20px; background: var(--frame); }
.browser .bar i { width: 11px; height: 11px; border-radius: 50%; background: var(--frame-dot); }
.browser .bar span { font-family: 'JetBrains Mono', monospace; font-size: 13px; color: #5E5964; margin-left: 12px; }
.browser img { width: 100%; height: auto; }
.brand-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 16px; }
.logo-card { border: 1px solid var(--line); border-radius: 24px; display: flex; align-items: center; justify-content: center; padding: 32px; min-height: 320px; }
.logo-card img { width: 100%; max-width: 440px; height: auto; }
.type-card { border: 1px solid var(--line); border-radius: 24px; padding: 32px; display: flex; flex-direction: column; gap: 22px; }
.type-card div { display: flex; flex-direction: column; gap: 4px; }
.type-card small { font-family: 'JetBrains Mono', monospace; font-size: 12px; opacity: 0.75; }
.swatches { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); border-radius: 20px; overflow: hidden; border: 1px solid var(--line); }
.swatches div { height: 150px; padding: 16px; display: flex; flex-direction: column; justify-content: flex-end; gap: 2px; }
.swatches b { font-size: 15px; font-weight: 600; }
.swatches span { font-family: 'JetBrains Mono', monospace; font-size: 13px; }
.points { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 24px 16px; }
.points li { display: flex; flex-direction: column; gap: 10px; border-top: 3px solid var(--accent); padding-top: 18px; }
.points h3 { font-size: 22px; }
.points p { font-size: 16px; line-height: 1.55; color: var(--muted); }
.shots { display: flex; flex-wrap: wrap; gap: 20px; align-items: flex-start; }
.shots .phone { flex: 0 1 280px; min-width: 220px; display: flex; flex-direction: column; gap: 12px; }
.shots .phone > div { background: #FFFFFF; border: 1px solid var(--line); border-radius: 34px; padding: 10px; }
.shots .phone img { width: 100%; aspect-ratio: 9 / 17; object-fit: cover; object-position: top; border-radius: 26px; }
.shots .pages { flex: 999 1 520px; min-width: 0; display: flex; flex-direction: column; gap: 20px; }
.shots figure { display: flex; flex-direction: column; gap: 12px; }
.shots .browser { border-radius: 18px; }
.shots .browser .bar { padding: 11px 16px; }
.shots .browser .bar i { width: 10px; height: 10px; }
figcaption { font-family: 'JetBrains Mono', monospace; font-size: 13px; color: var(--soft); }
.next { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 20px; padding-top: clamp(40px, 5vw, 64px); padding-bottom: clamp(40px, 5vw, 64px); }
.next a.title { font-size: clamp(28px, 4vw, 44px); font-weight: 700; letter-spacing: -0.03em; color: var(--text); text-decoration: none; }
.next a.title:hover { color: var(--pink); }

/* ---------- motion ---------- */
.blink { animation: blink 1.3s steps(1) infinite; }
@keyframes blink { 0% { opacity: 1; } 50% { opacity: 0.2; } }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .blink { animation: none; }
  * { transition: none !important; }
}

/* ---------- theme icon button ---------- */
.theme-btn.icon-btn { width: 44px; height: 44px; padding: 0; justify-content: center; }
.theme-btn.icon-btn svg { width: 18px; height: 18px; animation: icon-in .35s ease; }
@keyframes icon-in { from { opacity: 0; transform: rotate(-90deg) scale(.6); } }
@media (prefers-reduced-motion: reduce) { .theme-btn.icon-btn svg { animation: none; } }

/* ---------- language menu ---------- */
.lang-menu { position: relative; }
.lang-btn {
  font: inherit; font-family: 'JetBrains Mono', monospace; font-size: 13px; font-weight: 600; color: var(--text);
  display: inline-flex; align-items: center; gap: 6px; height: 44px; padding: 0 12px; cursor: pointer;
  background: transparent; border: 1px solid var(--line); border-radius: 999px;
}
.lang-btn:hover, .lang-btn[aria-expanded="true"] { background: var(--chip); }
.lang-btn svg { width: 18px; height: 18px; }
.lang-btn .chev { width: 14px; height: 14px; color: var(--soft); transition: transform .2s; }
.lang-btn[aria-expanded="true"] .chev { transform: rotate(180deg); }
.lang-list {
  position: absolute; top: calc(100% + 8px); inset-inline-end: 0; z-index: 60; min-width: 180px;
  list-style: none; margin: 0; padding: 6px; background: var(--card); border: 1px solid var(--line); border-radius: 16px;
  box-shadow: 0 18px 40px rgba(10, 4, 22, .35); animation: menu-in .16s ease;
}
@keyframes menu-in { from { opacity: 0; transform: translateY(-4px); } }
.lang-list a { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 10px; color: var(--text); text-decoration: none; font-size: 15px; }
.lang-list a:hover, .lang-list a:focus-visible { background: var(--chip); outline: none; }
.lang-list b { font-family: 'JetBrains Mono', monospace; font-size: 12px; font-weight: 600; color: var(--soft); width: 22px; }
.lang-list a[lang="ar"] span { font-family: 'IBM Plex Sans Arabic', 'Space Grotesk', sans-serif; }
.lang-list a[aria-current] { background: color-mix(in srgb, var(--pink) 16%, transparent); }
.lang-list a[aria-current]::after { content: ""; width: 7px; height: 7px; margin-inline-start: auto; background: var(--pixel); }
@media (max-width: 480px) { .lang-btn { padding: 0 10px; gap: 4px; } .lang-btn .chev { display: none; } }

/* ---------- right-to-left (Arabic) ---------- */
html[dir="rtl"] body { font-family: 'IBM Plex Sans Arabic', 'Space Grotesk', system-ui, sans-serif; line-height: 1.7; }
html[dir="rtl"] h1, html[dir="rtl"] h2, html[dir="rtl"] h3,
html[dir="rtl"] .h-section, html[dir="rtl"] .hero h1, html[dir="rtl"] .page-hero h1, html[dir="rtl"] .case-hero h1,
html[dir="rtl"] .contact h2, html[dir="rtl"] .cta h2, html[dir="rtl"] .project h2, html[dir="rtl"] .next a.title { letter-spacing: 0; line-height: 1.25; }
html[dir="rtl"] .hero h1 { font-size: clamp(44px, 8.5vw, 120px); line-height: 1.2; }
html[dir="rtl"] .hero h1 .zero { margin-left: 0; margin-right: 0.08em; }
html[dir="rtl"] .eyebrow, html[dir="rtl"] .tag-mono, html[dir="rtl"] .tab .hint, html[dir="rtl"] .badge,
html[dir="rtl"] .contact .kicker, html[dir="rtl"] .cta .kicker, html[dir="rtl"] .form-card .step, html[dir="rtl"] .pills li,
html[dir="rtl"] .meta dt, html[dir="rtl"] figcaption, html[dir="rtl"] .type-card small {
  font-family: 'IBM Plex Sans Arabic', 'JetBrains Mono', sans-serif; letter-spacing: 0; text-transform: none;
}
html[dir="rtl"] .nav { padding: 8px 24px 8px 8px; }
html[dir="rtl"] .logo, html[dir="rtl"] .lang-btn { font-family: 'Space Grotesk', system-ui, sans-serif; }
html[dir="rtl"] .form select { background-position: 20px 50%, 14px 50%; padding-right: 14px; padding-left: 40px; }
html[dir="rtl"] .browser .bar span { margin-left: 0; margin-right: 12px; }
@media (max-width: 900px) { html[dir="rtl"] .nav { padding: 10px 18px 6px 10px; } }
.hero h1 .nw { white-space: nowrap; }

/* ---------- work: pills as jump links ---------- */
.pills li:has(a) { padding: 0; border-color: var(--outline); }
.pills a { display: block; padding: 8px 12px; color: var(--text); text-decoration: none; }
.pills a:hover { background: var(--chip); }

/* ---------- brand identities grid ---------- */
.idgrid { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
@media (max-width: 960px) { .idgrid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 600px) { .idgrid { grid-template-columns: 1fr; } }
.idgrid li { scroll-margin-top: 120px; }
.idcard {
  font: inherit; color: var(--text); text-align: start; width: 100%; cursor: pointer;
  display: flex; flex-direction: column; gap: 14px; padding: 10px 10px 16px;
  background: var(--card); border: 1px solid var(--line); border-radius: 22px; transition: border-color .2s, transform .2s;
}
.idcard:hover { border-color: var(--pink); transform: translateY(-3px); }
.idcard:focus-visible { outline: 3px solid var(--pink); outline-offset: 3px; }
.idcard .thumb { position: relative; display: block; aspect-ratio: 16 / 10; border-radius: 14px; overflow: hidden; }
.idcard .thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.idcard:hover .thumb img { transform: scale(1.04); }
.idcard .open {
  position: absolute; top: 12px; inset-inline-end: 12px; width: 36px; height: 36px; border-radius: 999px;
  display: grid; place-items: center; font-size: 22px; line-height: 1; font-weight: 500;
  background: rgba(27, 11, 51, .78); color: #F6F1FF; backdrop-filter: blur(6px);
  opacity: 0; transform: scale(.8); transition: opacity .2s, transform .2s;
}
.idcard:hover .open, .idcard:focus-visible .open { opacity: 1; transform: none; }
@media (hover: none) { .idcard .open { opacity: 1; transform: none; } }
.idcard .row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 0 6px; }
.idcard .txt { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.idcard b { font-size: 18px; font-weight: 700; }
.idcard small { font-size: 14px; color: var(--soft); }
.idcard .pal { display: flex; flex-shrink: 0; }
.idcard .pal i { width: 14px; height: 14px; display: block; box-shadow: 0 0 0 1px var(--line); }

/* ---------- brand board dialog ---------- */
html:has(dialog.board[open]) { overflow: hidden; }
dialog.board {
  width: min(1120px, calc(100% - 32px)); max-width: none; height: min(900px, calc(100dvh - 32px)); max-height: none;
  margin: auto; padding: 0; border: 1px solid var(--line); border-radius: 24px; background: var(--bg); color: var(--text);
  overflow: hidden; flex-direction: column;
}
dialog.board[open] { display: flex; animation: board-in .25s ease; }
dialog.board::backdrop { background: rgba(10, 4, 22, .72); backdrop-filter: blur(4px); }
@keyframes board-in { from { opacity: 0; transform: translateY(12px) scale(.985); } }
@media (prefers-reduced-motion: reduce) { dialog.board[open] { animation: none; } }
.board-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 18px 18px 18px 28px; border-bottom: 1px solid var(--line); }
html[dir="rtl"] .board-head { padding: 18px 28px 18px 18px; }
.board-head h2 { font-size: clamp(24px, 3vw, 32px); font-weight: 700; letter-spacing: -0.03em; line-height: 1.1; margin-top: 4px; }
.board-nav { display: flex; gap: 8px; flex-shrink: 0; }
.board-nav button {
  font: inherit; font-size: 18px; width: 44px; height: 44px; border-radius: 999px; cursor: pointer;
  border: 1px solid var(--line); background: transparent; color: var(--text); display: grid; place-items: center;
}
.board-nav button:hover { background: var(--chip); }
.board-nav [data-board-close] { font-size: 24px; background: var(--card); }
.board-body { flex: 1; min-height: 0; overflow-y: auto; display: grid; grid-template-columns: 320px minmax(0, 1fr); align-items: start; overscroll-behavior: contain; }
.board-body aside { position: sticky; top: 0; padding: 28px; display: flex; flex-direction: column; gap: 12px; }
.board-body aside p { color: var(--muted); font-size: 16px; margin-bottom: 8px; }
.board-body aside h3 { font-family: 'JetBrains Mono', monospace; font-size: 12px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--eyebrow); margin-top: 10px; }
html[dir="rtl"] .board-body aside h3 { font-family: 'IBM Plex Sans Arabic', sans-serif; letter-spacing: 0; font-size: 14px; }
.board-body aside .btn { align-self: flex-start; margin-top: 16px; }
.fonts { display: flex; flex-direction: column; gap: 8px; }
.fonts div { display: flex; justify-content: space-between; gap: 12px; font-size: 15px; border-bottom: 1px dashed var(--line); padding-bottom: 8px; }
.fonts dt { color: var(--soft); }
.fonts dd { font-weight: 600; text-align: end; }
.pal-list { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.pal-list li { display: flex; align-items: center; gap: 8px; font-family: 'JetBrains Mono', monospace; font-size: 13px; color: var(--muted); border: 1px solid var(--line); border-radius: 999px; padding: 4px 10px 4px 4px; }
html[dir="rtl"] .pal-list li { padding: 4px 4px 4px 10px; }
.pal-list i { width: 20px; height: 20px; border-radius: 999px; display: block; box-shadow: inset 0 0 0 1px rgba(0,0,0,.12); }
.board-body figure { padding: 20px 20px 20px 0; }
html[dir="rtl"] .board-body figure { padding: 20px 0 20px 20px; }
.board-body figure img { width: 100%; height: auto; border-radius: 14px; display: block; background: var(--bg2); }
@media (max-width: 820px) {
  .board-body { grid-template-columns: 1fr; }
  .board-body aside { position: static; padding: 20px; }
  .board-body figure, html[dir="rtl"] .board-body figure { padding: 0 12px 12px; }
  .board-head, html[dir="rtl"] .board-head { padding: 14px 14px 14px 20px; }
  html[dir="rtl"] .board-head { padding: 14px 20px 14px 14px; }
  dialog.board { width: calc(100% - 16px); height: calc(100dvh - 16px); border-radius: 20px; }
  .board-nav button { width: 40px; height: 40px; }
}
@media (max-width: 900px) { .lang-list { inset-inline-end: auto; inset-inline-start: 0; } }
