/* =========================================================
   BArch Creative Studios — site.css
   Clean, literal layout system. Built on the existing tokens.
   ========================================================= */

:root {
  --header-h: 76px;
  --max: 1360px;
  --section: clamp(68px, 8.5vw, 118px);
  --r-sm: 10px;
  --r-md: 16px;
  --r-lg: 22px;
  --r-xl: 30px;
}

body::after { display: none; }

body {
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--sans);
  font-weight: 650;
  line-height: 1.02;
  letter-spacing: -0.045em;
}

.display,
.section-title,
.page-title,
.hero-title {
  font-family: var(--sans);
  font-weight: 700;
  letter-spacing: -0.055em;
  line-height: 0.96;
}

.display em,
.section-title em,
.page-title em,
.hero-title em {
  font-style: normal;
  color: var(--clay);
}

.shell {
  width: 100%;
  max-width: var(--max);
  margin-inline: auto;
  padding-inline: var(--pad);
}

.section { padding-block: var(--section); }
.section--tight { padding-block: clamp(48px, 6vw, 82px); }

/* ---------- Header ---------- */

.site-head {
  background: var(--paper);
  border-bottom: 1px solid var(--line);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}
.site-head.is-scrolled {
  background: var(--paper);
  box-shadow: 0 10px 34px rgba(var(--shadow-rgb), 0.07);
}
.head-inner {
  max-width: var(--max);
  height: var(--header-h);
  padding-inline: var(--pad);
  gap: 20px;
}
.brand { gap: 12px; }
.brand-mark { height: 42px; }
.brand-type strong { font-size: 20px; letter-spacing: -0.045em; }
.brand-type small { font-size: 7px; letter-spacing: 0.18em; }

.nav {
  gap: 3px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 100px;
  background: rgba(var(--ink-rgb), 0.03);
}
.nav a {
  padding: 9px 15px;
  border-radius: 100px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--muted);
}
.nav a::after { display: none; }
.nav a::before { display: none; }
.nav a:hover {
  color: var(--ink);
  background: rgba(var(--ink-rgb), 0.05);
}
.nav a[aria-current="page"] {
  color: var(--ink);
  background: var(--paper);
  box-shadow: 0 1px 2px rgba(var(--shadow-rgb), 0.1);
}

.head-actions { gap: 8px; }
.head-actions .lang-switch,
.head-actions .theme-switch {
  background: transparent;
  border-color: var(--line);
}
.head-cta { margin-left: 4px; }

/* ---------- Mobile menu ---------- */

.mobile-menu-inner {
  display: flex;
  flex-direction: column;
  min-height: 100%;
}
.mobile-menu nav a {
  font-family: var(--sans);
  font-weight: 650;
  letter-spacing: -0.045em;
}
.mobile-menu .mobile-foot {
  gap: 18px;
}
.mobile-menu .mobile-foot .btn {
  align-self: stretch;
  justify-content: center;
}
.mobile-foot .mono {
  color: var(--muted);
  font-size: 10px;
  line-height: 1.75;
}
.mobile-lang,
.mobile-theme {
  margin-top: 2px;
}
.mobile-theme { margin-bottom: 12px; }

/* ---------- Buttons ---------- */

.btn {
  min-height: 46px;
  padding: 12px 21px;
  border-radius: 100px;
  font-size: 12.5px;
  font-weight: 650;
  letter-spacing: 0.005em;
}
.btn-lg { min-height: 54px; padding: 16px 27px; font-size: 13.5px; }
.btn-sm { min-height: 38px; padding: 9px 16px; font-size: 11.5px; }
.btn .arr { transition: transform 0.3s var(--ease); }
.btn:hover .arr { transform: translate(3px, -3px); }

.text-link {
  font-size: 13px;
  font-weight: 650;
  border-bottom: 1px solid var(--line-strong);
}

/* ---------- Shared type ---------- */

.kicker {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--muted);
}
.kicker::before {
  content: "";
  width: 18px;
  height: 1px;
  background: var(--clay);
  flex: none;
}
.kicker--plain::before { display: none; }
.kicker--light { color: rgba(var(--on-panel-rgb), 0.65); }
.kicker--light::before { background: var(--ochre); }

.lede {
  max-width: 58ch;
  color: var(--muted);
  font-size: clamp(1rem, 1.25vw, 1.16rem);
  line-height: 1.68;
}
.muted { color: var(--muted); }

.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 28px;
  margin-bottom: clamp(26px, 4vw, 44px);
}
.section-head__copy { max-width: 570px; }
.section-head h2 {
  margin-top: 12px;
  font-size: clamp(2rem, 4.2vw, 3.75rem);
}
.section-head p {
  margin-top: 14px;
  max-width: 54ch;
  color: var(--muted);
  font-size: 14.5px;
  line-height: 1.7;
}
.section-head .text-link { flex: none; margin-bottom: 5px; }

.rule { border-top: 1px solid var(--line); }

/* ---------- Hero ---------- */

.hero {
  padding-block: clamp(40px, 6.5vw, 88px) clamp(48px, 7vw, 96px);
  overflow: clip;
}
.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.02fr) minmax(0, 0.98fr);
  align-items: center;
  gap: clamp(34px, 5vw, 76px);
}
.hero-copy { position: relative; z-index: 2; }
.hero-title {
  margin-top: 22px;
  max-width: 11.5ch;
  font-size: clamp(3.3rem, 6.5vw, 7rem);
}
.hero-title span { display: block; }
.hero-lede {
  margin-top: 24px;
  max-width: 53ch;
}
.hero-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 30px;
}
.hero-meta {
  display: flex;
  align-items: center;
  gap: clamp(18px, 3vw, 34px);
  flex-wrap: wrap;
  margin-top: 38px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--muted);
}
.hero-meta span { display: inline-flex; align-items: center; gap: 8px; }
.hero-meta i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--sage);
  flex: none;
}

.hero-media {
  position: relative;
  min-height: clamp(440px, 55vw, 640px);
}
.hero-frame {
  position: absolute;
  inset: 0 0 0 7%;
  overflow: hidden;
  border-radius: var(--r-xl);
  background: var(--paper-deep);
  box-shadow: 0 30px 80px rgba(var(--shadow-rgb), 0.12);
  clip-path: inset(0 0 100% 0 round var(--r-xl));
  transition: clip-path 1.15s var(--ease-out) 0.12s;
}
.hero-media.is-in .hero-frame { clip-path: inset(0 0 0 0 round var(--r-xl)); }
.hero-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 1.2s var(--ease-out);
}
.hero-media:hover .hero-frame img { transform: scale(1.035); }

.hero-thumb {
  position: absolute;
  left: 0;
  bottom: 7%;
  width: 34%;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  border: 7px solid var(--paper);
  border-radius: var(--r-lg);
  background: var(--paper-deep);
  box-shadow: 0 18px 44px rgba(var(--shadow-rgb), 0.16);
}
.hero-thumb img { width: 100%; height: 100%; object-fit: cover; }

.hero-app {
  position: absolute;
  top: 7%;
  right: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 11px;
  width: min(235px, 52%);
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: rgba(var(--paper-rgb), 0.96);
  box-shadow: 0 16px 40px rgba(var(--shadow-rgb), 0.14);
}
.hero-app img { width: 34px; height: 34px; flex: none; }
.hero-app strong { display: block; font-size: 12px; letter-spacing: -0.01em; color: var(--ink); }
.hero-app span { display: block; margin-top: 2px; font-size: 10px; color: var(--muted); }
.hero-app .dot {
  width: 6px;
  height: 6px;
  margin-left: auto;
  border-radius: 50%;
  background: var(--sage);
  flex: none;
}

.hero-note {
  position: absolute;
  right: 4%;
  bottom: 4%;
  z-index: 2;
  padding: 9px 12px;
  border-radius: 100px;
  background: var(--ink);
  color: var(--paper);
  font-family: var(--mono);
  font-size: 8.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

/* ---------- Ticker ---------- */

.ticker {
  overflow: hidden;
  border-block: 1px solid var(--line);
  background: var(--paper);
  padding-block: 16px;
}
.ticker-track {
  display: flex;
  width: max-content;
  animation: ticker 32s linear infinite;
}
.ticker:hover .ticker-track { animation-play-state: paused; }
.ticker-group {
  display: flex;
  align-items: center;
  gap: 28px;
  padding-right: 28px;
}
.ticker span {
  font-size: 11.5px;
  font-weight: 650;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  color: var(--muted);
  white-space: nowrap;
}
.ticker i {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--clay);
  flex: none;
}
@keyframes ticker {
  to { transform: translateX(-50%); }
}

/* ---------- Work cards ---------- */

.work-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(18px, 2.4vw, 30px);
}
.work-card {
  display: flex;
  flex-direction: column;
  gap: 13px;
  min-width: 0;
}
.work-media {
  position: relative;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border-radius: var(--r-lg);
  background: var(--paper-deep);
}
.work-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.8s var(--ease-out);
}
.work-card:hover .work-media img { transform: scale(1.045); }
.work-media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(var(--night-rgb), 0.24), transparent 45%);
  opacity: 0;
  transition: opacity 0.4s var(--ease);
}
.work-card:hover .work-media::after { opacity: 1; }
.work-index {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 1;
  padding: 6px 9px;
  border-radius: 100px;
  background: rgba(var(--paper-rgb), 0.92);
  color: var(--ink);
  font-family: var(--mono);
  font-size: 8.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.work-arrow {
  position: absolute;
  right: 12px;
  bottom: 12px;
  z-index: 1;
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--paper);
  color: var(--ink);
  font-size: 16px;
  opacity: 0;
  transform: translateY(7px);
  transition: opacity 0.3s var(--ease), transform 0.3s var(--ease);
}
.work-card:hover .work-arrow { opacity: 1; transform: none; }
.work-meta {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  padding-inline: 3px;
}
.work-title {
  font-size: 16px;
  font-weight: 650;
  letter-spacing: -0.025em;
  line-height: 1.25;
}
.work-cat {
  flex: none;
  text-align: right;
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  line-height: 1.5;
}

/* ---------- Service cards ---------- */

.service-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}
.service-card {
  display: flex;
  flex-direction: column;
  min-height: 230px;
  padding: clamp(20px, 2.5vw, 30px);
  border: 1px solid transparent;
  border-radius: var(--r-lg);
  background: var(--paper-deep);
  transition: transform 0.35s var(--ease), background-color 0.35s var(--ease),
    border-color 0.35s var(--ease), box-shadow 0.35s var(--ease);
}
.service-card:hover {
  transform: translateY(-4px);
  background: var(--card);
  border-color: var(--line);
  box-shadow: 0 18px 44px rgba(var(--shadow-rgb), 0.07);
}
.service-num {
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: 0.11em;
  color: var(--muted);
}
.service-card h3 {
  margin-top: auto;
  padding-top: 42px;
  font-size: clamp(1.15rem, 1.7vw, 1.45rem);
}
.service-card p {
  margin-top: 9px;
  color: var(--muted);
  font-size: 13.5px;
  line-height: 1.65;
}
.service-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 18px;
}
.service-tags span {
  padding: 5px 9px;
  border: 1px solid var(--line);
  border-radius: 100px;
  font-family: var(--mono);
  font-size: 8.5px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}

/* ---------- AI preview ---------- */

.ai-preview {
  display: grid;
  grid-template-columns: minmax(0, 0.86fr) minmax(0, 1.14fr);
  align-items: center;
  gap: clamp(28px, 4vw, 58px);
  padding: clamp(28px, 4.6vw, 60px);
  border-radius: var(--r-xl);
  background: var(--night);
  color: var(--on-panel);
  overflow: hidden;
}
.ai-preview h2 {
  margin-top: 14px;
  font-size: clamp(2rem, 4vw, 3.4rem);
  color: var(--on-panel);
}
.ai-preview h2 em { color: var(--ochre); }
.ai-preview p {
  margin-top: 16px;
  max-width: 45ch;
  color: rgba(var(--on-panel-rgb), 0.68);
  font-size: 14.5px;
  line-height: 1.7;
}
.ai-preview-list {
  display: flex;
  flex-direction: column;
  gap: 9px;
  margin-top: 22px;
}
.ai-preview-list li {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 13px;
  color: rgba(var(--on-panel-rgb), 0.84);
}
.ai-preview-list i {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--ochre);
  flex: none;
}
.ai-preview .btn { margin-top: 26px; }

.ai-window {
  overflow: hidden;
  border-radius: var(--r-lg);
  background: var(--paper);
  color: var(--ink);
  box-shadow: 0 30px 70px rgba(var(--shadow-rgb), 0.32);
  transform: rotate(-1.2deg);
}
.ai-window-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 15px;
  border-bottom: 1px solid var(--line);
}
.ai-window-bar img { width: 24px; height: 24px; }
.ai-window-bar strong { font-size: 11.5px; }
.ai-window-bar span {
  margin-left: auto;
  font-family: var(--mono);
  font-size: 8px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}
.ai-window-body {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 18px;
}
.ai-bubble-mini {
  max-width: 88%;
  padding: 10px 12px;
  border-radius: 12px;
  font-size: 11.5px;
  line-height: 1.55;
}
.ai-bubble-mini.user {
  align-self: flex-end;
  background: var(--ink);
  color: var(--paper);
  border-bottom-right-radius: 4px;
}
.ai-bubble-mini.bot {
  background: var(--paper-deep);
  border-bottom-left-radius: 4px;
}
.ai-bubble-mini.bot strong { display: block; margin-bottom: 4px; font-size: 10.5px; }
.ai-window-compose {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 14px 14px;
  padding: 9px 10px 9px 13px;
  border: 1px solid var(--line);
  border-radius: 12px;
  font-size: 10.5px;
  color: var(--muted);
}
.ai-window-compose span { flex: 1; }
.ai-window-compose i {
  display: grid;
  place-items: center;
  width: 25px;
  height: 25px;
  border-radius: 8px;
  background: var(--ink);
  color: var(--paper);
  font-style: normal;
  font-size: 12px;
}

/* ---------- App cards ---------- */

.app-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}
.app-card {
  display: flex;
  flex-direction: column;
  gap: 17px;
  min-height: 230px;
  padding: clamp(20px, 2.4vw, 28px);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: var(--card);
  transition: transform 0.35s var(--ease), border-color 0.35s var(--ease),
    box-shadow 0.35s var(--ease);
}
.app-card:hover {
  transform: translateY(-4px);
  border-color: var(--line-strong);
  box-shadow: 0 18px 44px rgba(var(--shadow-rgb), 0.07);
}
.app-icon {
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  border-radius: 17px;
  background: var(--paper-deep);
  border: 1px solid var(--line);
}
.app-icon img { width: 39px; height: 39px; }
.app-card h3 { font-size: 17px; letter-spacing: -0.025em; }
.app-card p {
  color: var(--muted);
  font-size: 13.5px;
  line-height: 1.65;
}
.app-card-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: auto;
  padding-top: 15px;
  border-top: 1px solid var(--line);
  font-family: var(--mono);
  font-size: 8.5px;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--muted);
}
.app-card-foot span:last-child {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.app-card-foot i {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--sage);
}

/* ---------- CTA band ---------- */

.cta-band {
  padding-block: clamp(52px, 7vw, 92px);
  background: var(--night);
  color: var(--on-panel);
}
.cta-band-inner {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 34px;
}
.cta-band h2 {
  max-width: 720px;
  margin-top: 14px;
  font-size: clamp(2.3rem, 5vw, 4.8rem);
  color: var(--on-panel);
}
.cta-band h2 em { color: var(--ochre); }
.cta-band p {
  max-width: 42ch;
  margin-top: 16px;
  color: rgba(var(--on-panel-rgb), 0.65);
  font-size: 14.5px;
}
.cta-band-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  flex: none;
}
.cta-band .btn-outline {
  --btn-bg: transparent;
  --btn-fg: var(--on-panel);
  border-color: rgba(var(--on-panel-rgb), 0.28);
}
.cta-band .btn-outline:hover {
  --btn-bg: var(--on-panel);
  --btn-fg: var(--ink);
  border-color: var(--on-panel);
}
.cta-band .btn-paper:hover { --btn-bg: var(--ochre); --btn-fg: var(--on-light); }

/* ---------- Page hero ---------- */

.page-hero {
  padding-block: clamp(48px, 6.5vw, 96px) clamp(34px, 4.5vw, 62px);
}
.page-hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.18fr) minmax(0, 0.82fr);
  align-items: end;
  gap: clamp(28px, 5vw, 76px);
}
.page-title {
  margin-top: 18px;
  max-width: 12ch;
  font-size: clamp(3rem, 6.7vw, 7.2rem);
}
.page-hero-copy .lede { margin-top: 20px; }
.page-meta {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-top: 30px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}
.page-meta strong {
  display: block;
  margin-bottom: 4px;
  font-family: var(--mono);
  font-size: 8.5px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}
.page-meta span { font-size: 13.5px; line-height: 1.45; }
.page-meta--contact { grid-template-columns: minmax(0, 1.6fr) minmax(0, 0.8fr) minmax(0, 0.8fr); }

/* ---------- Work page ---------- */

.work-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  flex-wrap: wrap;
  padding-block: 16px;
  border-block: 1px solid var(--line);
}
.filters {
  display: flex;
  align-items: center;
  gap: 5px;
  flex-wrap: wrap;
}
.filter {
  padding: 9px 13px;
  border-radius: 100px;
  border: 1px solid transparent;
  color: var(--muted);
  font-size: 12.5px;
  font-weight: 600;
  transition: background-color 0.2s var(--ease), color 0.2s var(--ease),
    border-color 0.2s var(--ease);
}
.filter:hover { color: var(--ink); background: var(--paper-deep); }
.filter.is-active { background: var(--ink); color: var(--paper); }
.filter-count { margin-left: 4px; font-family: var(--mono); font-size: 8.5px; opacity: 0.7; }
.filter-count--standalone {
  margin: 0;
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}
.work-page-section { padding-top: clamp(30px, 4vw, 50px); }
.work-card.is-hidden { display: none; }
.empty-state {
  display: none;
  padding: 50px 20px;
  text-align: center;
  color: var(--muted);
}
.empty-state.is-visible { display: block; }
.empty-state .text-link {
  margin-top: 14px;
  background: none;
  border-top: 0;
  border-right: 0;
  border-left: 0;
  color: var(--ink);
}
.page-meta span { overflow-wrap: anywhere; }

/* ---------- Not found ---------- */

.not-found {
  display: grid;
  grid-template-columns: minmax(0, 0.55fr) minmax(0, 1fr);
  align-items: center;
  gap: clamp(28px, 6vw, 90px);
  padding-block: clamp(54px, 8vw, 120px);
}
.not-found-code {
  font-family: var(--sans);
  font-size: clamp(6rem, 13vw, 13rem);
  font-weight: 700;
  line-height: 0.78;
  letter-spacing: -0.09em;
  color: transparent;
  -webkit-text-stroke: 1px var(--line-strong);
}
@supports not (-webkit-text-stroke: 1px black) {
  .not-found-code { color: var(--line-strong); }
}
.not-found .page-title { max-width: 11ch; }
.not-found .lede { max-width: 44ch; }
.not-found-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 30px;
}
.not-found-links {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 26px;
}
.not-found-links a {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 6px 12px;
  border: 1px solid var(--line);
  border-radius: 100px;
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  transition: color 0.2s var(--ease), border-color 0.2s var(--ease), background 0.2s var(--ease);
}
.not-found-links a:hover {
  color: var(--ink);
  border-color: var(--line-strong);
  background: var(--paper-deep);
}

/* ---------- Modal / dialogs ---------- */

html.dialog-open,
html.dialog-open body { overflow: hidden; }

dialog.project-dialog,
dialog.modal {
  width: min(1040px, calc(100vw - 30px));
  max-width: none;
  max-height: min(92vh, 980px);
  padding: 0;
  border: 0;
  border-radius: var(--r-lg);
  background: var(--paper);
  color: var(--ink);
  box-shadow: 0 40px 120px rgba(var(--shadow-rgb), 0.3);
  overflow: hidden;
}
dialog::backdrop {
  background: rgba(var(--night-rgb), 0.62);
  backdrop-filter: blur(2px);
}
.dialog-scroll {
  max-height: min(92vh, 980px);
  overflow-y: auto;
  overscroll-behavior: contain;
}
.dialog-bar {
  position: sticky;
  top: 0;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 15px clamp(20px, 3vw, 34px);
  border-bottom: 1px solid var(--line);
  background: var(--paper);
}
.dialog-bar .label { color: var(--muted); }
.dialog-close {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 100px;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--ink-2);
  transition: background-color 0.2s var(--ease), color 0.2s var(--ease);
}
.dialog-close:hover { background: var(--ink); color: var(--paper); }
.dialog-hero { padding: clamp(22px, 3.4vw, 38px) clamp(20px, 3vw, 34px) 0; }
.dialog-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 20px;
}
.dialog-cat {
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}
.dialog-heading h2 {
  margin-top: 7px;
  font-size: clamp(1.8rem, 4vw, 3rem);
}
.dialog-cover {
  overflow: hidden;
  border-radius: var(--r-md);
  background: var(--paper-deep);
}
.dialog-cover img {
  width: 100%;
  aspect-ratio: 16 / 8.5;
  object-fit: cover;
}
.dialog-body {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(220px, 0.55fr);
  gap: clamp(24px, 4vw, 52px);
  padding: clamp(24px, 3.4vw, 38px) clamp(20px, 3vw, 34px) clamp(30px, 4vw, 46px);
}
.dialog-copy p {
  margin-bottom: 14px;
  color: var(--muted);
  font-size: 14.5px;
  line-height: 1.75;
}
.dialog-copy p:last-child { margin-bottom: 0; }
.dialog-copy h3 {
  margin: 26px 0 12px;
  font-size: 16px;
  letter-spacing: -0.02em;
}
.dialog-copy ul {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 0 0 16px;
  padding-left: 0;
  list-style: none;
  color: var(--muted);
  font-size: 13.5px;
  line-height: 1.6;
}
.dialog-copy li {
  display: flex;
  gap: 8px;
}
.dialog-copy li > span:first-child {
  color: var(--clay);
  line-height: 1.5;
}
.dialog-copy .lede {
  max-width: none;
  margin-bottom: 16px;
  color: var(--ink);
  font-size: clamp(1.1rem, 1.7vw, 1.3rem);
  line-height: 1.5;
}
.dialog-copy blockquote {
  margin: 22px 0 0;
  padding-left: 16px;
  border-left: 2px solid var(--clay);
  font-size: 15px;
  font-weight: 550;
  line-height: 1.5;
  color: var(--ink-2);
}
.dialog-side .btn {
  width: 100%;
  justify-content: center;
}
.pullquote {
  margin: 24px 0;
  padding-left: 17px;
  border-left: 2px solid var(--clay);
  font-size: 1.35rem;
  font-weight: 600;
  line-height: 1.35;
  letter-spacing: -0.025em;
  color: var(--ink);
}
.dialog-side {
  display: flex;
  flex-direction: column;
  gap: 22px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: var(--paper-deep);
  align-self: start;
}
.dialog-side dl { display: flex; flex-direction: column; gap: 10px; }
.side-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  padding-bottom: 9px;
  border-bottom: 1px solid var(--line);
}
.side-row:last-child { border-bottom: 0; padding-bottom: 0; }
.side-row dt {
  font-family: var(--mono);
  font-size: 8.5px;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--muted);
}
.side-row dd { text-align: right; font-size: 12.5px; line-height: 1.45; }
.dialog-palette { display: flex; gap: 5px; }
.dialog-palette i {
  display: block;
  width: 25px;
  height: 25px;
  border-radius: 50%;
  border: 1px solid rgba(var(--ink-rgb), 0.12);
}
.dialog-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.dialog-tags span {
  padding: 5px 8px;
  border: 1px solid var(--line);
  border-radius: 100px;
  font-family: var(--mono);
  font-size: 8px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--muted);
}
.dialog-next {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-top: 17px;
  border-top: 1px solid var(--line);
  transition: color 0.2s var(--ease);
}
.dialog-next:hover { color: var(--clay-deep); }
.dialog-next .label {
  display: block;
  margin-bottom: 3px;
  font-size: 8px;
}
.dialog-next strong { display: block; font-size: 13px; letter-spacing: -0.02em; }
.dialog-next .arr { font-size: 20px; }

/* ---------- Studio page ---------- */

.studio-intro-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: clamp(28px, 5vw, 76px);
  align-items: center;
}
.studio-image {
  overflow: hidden;
  border-radius: var(--r-xl);
  background: var(--paper-deep);
  aspect-ratio: 4 / 3.15;
}
.studio-image img { width: 100%; height: 100%; object-fit: cover; }
.studio-copy h2 {
  margin-top: 14px;
  font-size: clamp(2rem, 4vw, 3.5rem);
  max-width: 16ch;
}
.studio-copy p {
  margin-top: 18px;
  color: var(--muted);
  font-size: 14.5px;
  line-height: 1.75;
}
.studio-facts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  margin-top: 30px;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  overflow: hidden;
  background: var(--line);
}
.studio-fact { padding: 16px; background: var(--paper); }
.studio-fact strong {
  display: block;
  font-size: 19px;
  letter-spacing: -0.03em;
  line-height: 1.1;
}
.studio-fact span {
  display: block;
  margin-top: 4px;
  font-family: var(--mono);
  font-size: 8px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.service-list { border-top: 1px solid var(--line); }
.service-row {
  display: grid;
  grid-template-columns: 56px minmax(0, 0.8fr) minmax(0, 1.2fr);
  gap: 20px;
  align-items: baseline;
  padding-block: 21px;
  border-bottom: 1px solid var(--line);
  transition: background-color 0.2s var(--ease), padding-inline 0.25s var(--ease);
}
.service-row:hover { background: var(--paper-deep); padding-inline: 14px; }
.service-row__num {
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.08em;
  color: var(--muted);
}
.service-row h3 { font-size: 17px; letter-spacing: -0.025em; }
.service-row p { color: var(--muted); font-size: 13.5px; line-height: 1.65; }

.process-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}
.process-card {
  padding: clamp(22px, 2.6vw, 30px);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: var(--card);
}
.process-card span {
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--clay);
}
.process-card h3 { margin-top: 26px; font-size: 19px; }
.process-card p { margin-top: 9px; color: var(--muted); font-size: 13.5px; line-height: 1.65; }

.quote-band {
  padding-block: clamp(52px, 7vw, 92px);
  background: var(--paper-deep);
}
.quote-band-inner {
  display: grid;
  grid-template-columns: minmax(0, 0.45fr) minmax(0, 1.55fr);
  gap: clamp(24px, 5vw, 70px);
  align-items: start;
}
.quote-band blockquote {
  max-width: 24ch;
  font-size: clamp(1.8rem, 3.8vw, 3.3rem);
  font-weight: 650;
  line-height: 1.08;
  letter-spacing: -0.045em;
}
.quote-band cite {
  display: block;
  margin-top: 18px;
  font-style: normal;
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

/* ---------- AI app ---------- */

.ai-page { padding-block: clamp(28px, 4vw, 48px) clamp(44px, 6vw, 76px); }
.ai-template[hidden] { display: none !important; }
.ai-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 20px;
}
.ai-head h1 {
  margin-top: 12px;
  font-size: clamp(2.1rem, 4.4vw, 4rem);
}
.ai-head p {
  max-width: 52ch;
  margin-top: 8px;
  color: var(--muted);
  font-size: 14px;
}
.ai-head-actions { display: flex; align-items: center; gap: 10px; flex: none; }

.ai-app {
  display: grid;
  grid-template-columns: 238px minmax(0, 1fr) 286px;
  min-height: min(760px, calc(100vh - 220px));
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--r-xl);
  background: var(--paper);
  box-shadow: 0 30px 90px rgba(var(--shadow-rgb), 0.1);
}

.ai-sidebar {
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: 16px 14px;
  background: var(--night);
  color: var(--on-panel);
  min-width: 0;
}
.ai-brand {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 2px 6px 15px;
  border-bottom: 1px solid rgba(var(--on-panel-rgb), 0.12);
}
.ai-brand img { width: 27px; height: 27px; }
.ai-brand strong { display: block; font-size: 12.5px; letter-spacing: -0.01em; }
.ai-brand span {
  display: block;
  margin-top: 1px;
  font-family: var(--mono);
  font-size: 7.5px;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: rgba(var(--on-panel-rgb), 0.55);
}
.ai-new {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 37px;
  padding: 8px 10px;
  border-radius: 9px;
  background: var(--paper);
  color: var(--ink);
  font-size: 11.5px;
  font-weight: 650;
  transition: background-color 0.2s var(--ease), color 0.2s var(--ease);
}
.ai-new:hover { background: var(--ochre); color: var(--on-light); }
.ai-side-label {
  padding-inline: 7px;
  font-family: var(--mono);
  font-size: 8px;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  color: rgba(var(--on-panel-rgb), 0.48);
}
.ai-thread-list { display: flex; flex-direction: column; gap: 3px; }
.ai-thread-btn {
  width: 100%;
  padding: 9px 9px;
  border-radius: 7px;
  color: rgba(var(--on-panel-rgb), 0.68);
  font-size: 11.5px;
  line-height: 1.35;
  text-align: left;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: background-color 0.2s var(--ease), color 0.2s var(--ease);
}
.ai-thread-btn:hover { background: rgba(var(--on-panel-rgb), 0.08); color: var(--on-panel); }
.ai-thread-btn.is-active { background: rgba(var(--on-panel-rgb), 0.13); color: var(--on-panel); }
.ai-side-foot {
  display: flex;
  flex-direction: column;
  gap: 9px;
  margin-top: auto;
  padding-top: 16px;
  border-top: 1px solid rgba(var(--on-panel-rgb), 0.12);
}
.ai-side-foot p {
  font-family: var(--mono);
  font-size: 7.5px;
  letter-spacing: 0.07em;
  line-height: 1.6;
  text-transform: uppercase;
  color: rgba(var(--on-panel-rgb), 0.45);
}
.ai-side-foot a {
  font-size: 11px;
  font-weight: 600;
  color: var(--ochre);
}

.ai-main {
  display: flex;
  flex-direction: column;
  min-width: 0;
  background: var(--paper);
}
.ai-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  min-height: 57px;
  padding: 9px 18px;
  border-bottom: 1px solid var(--line);
}
.ai-topbar-title { min-width: 0; }
.ai-topbar-title strong {
  display: block;
  font-size: 12.5px;
  letter-spacing: -0.01em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ai-model {
  display: block;
  margin-top: 1px;
  font-family: var(--mono);
  font-size: 8px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}
.ai-top-actions { display: flex; align-items: center; gap: 7px; flex: none; }
.ai-top-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: 100px;
  font-size: 10.5px;
  font-weight: 600;
  color: var(--muted);
  transition: background-color 0.2s var(--ease), color 0.2s var(--ease),
    border-color 0.2s var(--ease);
}
.ai-top-btn:hover { background: var(--paper-deep); color: var(--ink); }
.ai-top-btn--dark { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.ai-top-btn--dark:hover { background: var(--clay); border-color: var(--clay); color: var(--paper); }
.ai-top-new { display: none; }

.ai-thread {
  flex: 1;
  overflow-y: auto;
  padding: clamp(20px, 3.4vw, 44px) clamp(18px, 4vw, 58px) 22px;
  scrollbar-width: thin;
  scrollbar-color: var(--line-strong) transparent;
}
.ai-empty {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 100%;
  max-width: 660px;
  margin-inline: auto;
  text-align: center;
  padding-block: 28px;
}
.ai-empty-mark {
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  margin: 0 auto 18px;
  border-radius: 16px;
  background: var(--paper-deep);
  border: 1px solid var(--line);
}
.ai-empty-mark img { width: 35px; height: 35px; }
.ai-empty h2 {
  font-size: clamp(1.7rem, 3.1vw, 2.7rem);
  letter-spacing: -0.045em;
}
.ai-empty p {
  max-width: 46ch;
  margin: 10px auto 0;
  color: var(--muted);
  font-size: 13.5px;
}
.ai-suggestions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 24px;
  text-align: left;
}
.ai-suggestion {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 12px 13px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--card);
  color: var(--ink);
  font-size: 12px;
  font-weight: 600;
  line-height: 1.35;
  transition: border-color 0.2s var(--ease), background-color 0.2s var(--ease),
    transform 0.2s var(--ease);
}
.ai-suggestion:hover {
  border-color: var(--clay);
  background: var(--paper-deep);
  transform: translateY(-1px);
}
.ai-suggestion span { font-size: 10px; font-weight: 400; color: var(--muted); }

.ai-msg {
  display: flex;
  gap: 10px;
  width: min(100%, 740px);
  margin-bottom: 22px;
}
.ai-msg--user {
  margin-left: auto;
  flex-direction: row-reverse;
}
.ai-avatar {
  display: grid;
  place-items: center;
  width: 29px;
  height: 29px;
  border-radius: 50%;
  background: var(--paper-deep);
  border: 1px solid var(--line);
  flex: none;
  overflow: hidden;
}
.ai-avatar img { width: 21px; height: 21px; }
.ai-msg--user .ai-avatar { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.ai-msg--user .ai-avatar span { font-size: 10px; font-weight: 700; }
.ai-bubble {
  padding: 12px 14px;
  border-radius: 14px;
  font-size: 13px;
  line-height: 1.65;
}
.ai-msg--user .ai-bubble {
  background: var(--ink);
  color: var(--paper);
  border-bottom-right-radius: 4px;
}
.ai-msg--ai .ai-bubble {
  background: var(--paper-deep);
  border-bottom-left-radius: 4px;
}
.ai-bubble p + p { margin-top: 9px; }
.ai-bubble ul,
.ai-bubble ol {
  margin: 7px 0 0;
  padding-left: 17px;
  list-style: disc;
}
.ai-bubble ol { list-style: decimal; }
.ai-bubble li { margin: 4px 0; }
.ai-bubble strong { font-weight: 650; }
.ai-bubble .ai-note {
  display: block;
  margin-top: 10px;
  padding-top: 9px;
  border-top: 1px solid var(--line);
  font-size: 10.5px;
  color: var(--muted);
}
.ai-typing {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-height: 17px;
}
.ai-typing i {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--muted);
  animation: ai-bounce 1.2s infinite ease-in-out;
}
.ai-typing i:nth-child(2) { animation-delay: 0.15s; }
.ai-typing i:nth-child(3) { animation-delay: 0.3s; }
@keyframes ai-bounce {
  0%, 60%, 100% { transform: translateY(0); opacity: 0.45; }
  30% { transform: translateY(-3px); opacity: 1; }
}

.ai-composer-wrap {
  padding: 12px clamp(18px, 4vw, 58px) 14px;
  border-top: 1px solid var(--line);
  background: var(--paper);
}
.ai-composer {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  padding: 8px 8px 8px 13px;
  border: 1px solid var(--line-strong);
  border-radius: 15px;
  background: var(--card);
  box-shadow: 0 8px 24px rgba(var(--shadow-rgb), 0.05);
  transition: border-color 0.2s var(--ease), box-shadow 0.2s var(--ease);
}
.ai-composer:focus-within {
  border-color: var(--clay);
  box-shadow: 0 8px 30px rgba(var(--shadow-rgb), 0.08);
}
.ai-composer textarea {
  flex: 1;
  min-height: 25px;
  max-height: 150px;
  padding: 6px 0;
  border: 0;
  outline: 0;
  background: transparent;
  resize: none;
  font-size: 12.5px;
  line-height: 1.5;
}
.ai-composer textarea::placeholder { color: var(--muted); }
.ai-send {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: var(--ink);
  color: var(--paper);
  flex: none;
  transition: background-color 0.2s var(--ease), transform 0.2s var(--ease);
}
.ai-send:hover { background: var(--clay); transform: translateY(-1px); }
.ai-send svg { width: 15px; height: 15px; }
.ai-composer-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 7px;
  font-size: 9px;
  color: var(--muted);
}
.ai-composer-foot span:last-child { text-align: right; }

.ai-context {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 17px;
  border-left: 1px solid var(--line);
  background: var(--paper-deep);
  overflow-y: auto;
}
.ai-context-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-family: var(--mono);
  font-size: 8.5px;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--muted);
}
.ai-context-head span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--sage);
}
.ai-context-head i { width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
.ai-project {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--card);
}
.ai-project img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; }
.ai-project-body { padding: 12px; }
.ai-project strong { display: block; font-size: 13px; letter-spacing: -0.02em; }
.ai-project span { display: block; margin-top: 3px; font-size: 10.5px; color: var(--muted); }
.ai-context-list { display: flex; flex-direction: column; gap: 7px; }
.ai-context-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 7px;
  border-bottom: 1px solid var(--line);
  font-size: 11px;
}
.ai-context-row:last-child { border-bottom: 0; padding-bottom: 0; }
.ai-context-row dt { color: var(--muted); }
.ai-context-row dd { text-align: right; font-weight: 600; }
.ai-context-tags { display: flex; flex-wrap: wrap; gap: 5px; }
.ai-context-tags span {
  padding: 4px 7px;
  border: 1px solid var(--line);
  border-radius: 100px;
  background: var(--paper);
  font-family: var(--mono);
  font-size: 7.5px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
}
.ai-context-link {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: auto;
  padding-top: 12px;
  border-top: 1px solid var(--line);
  font-size: 11px;
  font-weight: 650;
  color: var(--ink-2);
}
.ai-context-link:hover { color: var(--clay-deep); }

.ai-footnote {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 22px;
  margin-top: 16px;
  padding-top: 15px;
  border-top: 1px solid var(--line);
  font-size: 10.5px;
  color: var(--muted);
}
.ai-footnote p { max-width: 72ch; }
.ai-footnote a { font-weight: 650; color: var(--ink-2); }
.ai-footnote a:hover { color: var(--clay-deep); }

.ai-features {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-top: clamp(38px, 5vw, 62px);
}
.ai-feature {
  padding: clamp(21px, 2.5vw, 28px);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: var(--card);
}
.ai-feature span {
  font-family: var(--mono);
  font-size: 8.5px;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--clay);
}
.ai-feature h3 { margin-top: 18px; font-size: 17px; }
.ai-feature p { margin-top: 8px; color: var(--muted); font-size: 13px; line-height: 1.65; }

/* ---------- Store page ---------- */

.store-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  flex-wrap: wrap;
  padding-block: 16px;
  border-block: 1px solid var(--line);
}
.store-filters { display: flex; align-items: center; gap: 5px; flex-wrap: wrap; }
.store-search {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 40px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 100px;
  background: var(--card);
  color: var(--muted);
}
.store-search svg { width: 15px; height: 15px; flex: none; }
.store-search input {
  width: 170px;
  border: 0;
  outline: 0;
  background: transparent;
  font-size: 12.5px;
  color: var(--ink);
}
.store-search input::placeholder { color: var(--muted); }
.store-count {
  margin-top: 14px;
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}
.store-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-top: 18px;
}
.store-card {
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-height: 280px;
  padding: clamp(20px, 2.4vw, 28px);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: var(--card);
  text-align: left;
  transition: transform 0.35s var(--ease), border-color 0.35s var(--ease),
    box-shadow 0.35s var(--ease);
}
.store-card:hover {
  transform: translateY(-4px);
  border-color: var(--line-strong);
  box-shadow: 0 18px 44px rgba(var(--shadow-rgb), 0.07);
}
.store-card-heading {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}
.store-icon {
  width: 54px;
  height: 54px;
  padding: 7px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--paper-deep);
  flex: none;
}
.store-name { min-width: 0; padding-top: 2px; }
.store-name .label {
  display: block;
  margin-bottom: 3px;
  font-family: var(--mono);
  font-size: 7.5px;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--muted);
}
.store-name strong {
  display: block;
  font-size: 16px;
  font-weight: 650;
  letter-spacing: -0.025em;
  line-height: 1.2;
}
.store-desc {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.65;
}
.store-card-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: auto;
  padding-top: 15px;
  border-top: 1px solid var(--line);
  font-family: var(--mono);
  font-size: 8.5px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}
.store-platforms { display: flex; flex-wrap: wrap; gap: 7px; }
.store-status { display: inline-flex; align-items: center; gap: 5px; flex: none; }
.store-status i { width: 5px; height: 5px; border-radius: 50%; background: var(--sage); }
.store-card.is-hidden { display: none; }

.early-access {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: clamp(28px, 5vw, 76px);
  align-items: start;
  padding-top: clamp(36px, 5vw, 64px);
  border-top: 1px solid var(--line);
}
.early-access h2 {
  margin-top: 14px;
  font-size: clamp(2rem, 4vw, 3.4rem);
}
.early-access p {
  margin-top: 14px;
  max-width: 45ch;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.7;
}
.early-access .small {
  margin-top: 22px;
  font-size: 11.5px;
  color: var(--muted);
}
.early-access .small a { font-weight: 650; color: var(--ink-2); }

/* ---------- Forms ---------- */

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}
.field-group { display: flex; flex-direction: column; gap: 7px; }
.field-group.full { grid-column: 1 / -1; }
.field-group label {
  font-size: 11.5px;
  font-weight: 650;
  color: var(--ink-2);
}
.field-group label span {
  margin-left: 5px;
  font-family: var(--mono);
  font-size: 7.5px;
  font-weight: 400;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}
.field-group input,
.field-group select,
.field-group textarea {
  width: 100%;
  min-height: 46px;
  padding: 11px 13px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--card);
  color: var(--ink);
  font-size: 13px;
  outline: 0;
  transition: border-color 0.2s var(--ease), box-shadow 0.2s var(--ease);
}
.field-group textarea { min-height: 132px; resize: vertical; }
.field-group input:focus,
.field-group select:focus,
.field-group textarea:focus {
  border-color: var(--clay);
  box-shadow: 0 0 0 3px rgba(var(--clay-rgb), 0.1);
}
.field-group input::placeholder,
.field-group textarea::placeholder { color: var(--muted); }
.form-foot {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  margin-top: 18px;
}
.form-note {
  max-width: 39ch;
  color: var(--muted);
  font-size: 10.5px;
  line-height: 1.55;
}
.form-status {
  display: none;
  margin-top: 16px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--paper-deep);
  font-size: 12px;
  line-height: 1.55;
}
.form-status.is-visible { display: block; }
.form-status a { text-decoration: underline; }
.form-status .text-link { margin-left: 5px; }

/* ---------- Contact page ---------- */

.contact-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(280px, 0.9fr);
  gap: clamp(28px, 5vw, 72px);
  align-items: start;
}
.contact-form-panel {
  padding: clamp(22px, 3vw, 34px);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: var(--card);
}
.contact-form-panel h2 {
  margin-top: 12px;
  font-size: clamp(1.7rem, 3vw, 2.6rem);
}
.contact-form-panel form { margin-top: 24px; }
.contact-aside { display: flex; flex-direction: column; gap: 12px; }
.contact-card {
  padding: clamp(20px, 2.6vw, 28px);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: var(--paper-deep);
}
.contact-card h3 {
  margin-top: 12px;
  font-size: 20px;
  letter-spacing: -0.03em;
}
.contact-card .mail {
  display: inline-block;
  margin-top: 16px;
  font-size: clamp(1rem, 1.8vw, 1.3rem);
  font-weight: 650;
  letter-spacing: -0.025em;
  border-bottom: 1px solid var(--line-strong);
  word-break: break-word;
}
.contact-card .mail:hover { color: var(--clay-deep); border-color: var(--clay); }
.contact-lines { display: flex; flex-direction: column; gap: 0; margin-top: 24px; }
.contact-line {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 14px;
  padding-block: 10px;
  border-top: 1px solid var(--line);
}
.contact-line dt {
  font-family: var(--mono);
  font-size: 8.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}
.contact-line dd { text-align: right; font-size: 12.5px; }
.contact-note {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  font-size: 11.5px;
  line-height: 1.6;
  color: var(--muted);
}
.contact-note strong { color: var(--ink); }
.contact-steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-top: clamp(40px, 5vw, 64px);
  padding-top: clamp(30px, 4vw, 48px);
  border-top: 1px solid var(--line);
}
.contact-step span {
  font-family: var(--mono);
  font-size: 8.5px;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--clay);
}
.contact-step h3 { margin-top: 17px; font-size: 17px; }
.contact-step p { margin-top: 7px; color: var(--muted); font-size: 13px; line-height: 1.6; }

/* ---------- Footer ---------- */

.site-foot {
  padding-top: clamp(54px, 7vw, 88px);
  background: var(--night);
  color: var(--on-panel);
}
.foot-main {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 0.5fr) minmax(0, 0.5fr);
  gap: clamp(30px, 5vw, 84px);
  padding-bottom: clamp(42px, 6vw, 72px);
}
.foot-brand .brand-mark { height: 54px; }
.foot-brand .brand-type small { color: rgba(var(--on-panel-rgb), 0.55); }
.foot-brand p {
  max-width: 36ch;
  margin-top: 18px;
  color: rgba(var(--on-panel-rgb), 0.62);
  font-size: 13px;
  line-height: 1.7;
}
.foot-brand .foot-mail {
  display: inline-block;
  margin-top: 20px;
  padding-bottom: 3px;
  border-bottom: 1px solid rgba(var(--on-panel-rgb), 0.28);
  font-family: var(--sans);
  font-size: clamp(1.05rem, 1.7vw, 1.35rem);
  font-weight: 650;
  letter-spacing: -0.02em;
  transition: color 0.2s var(--ease), border-color 0.2s var(--ease);
}
.foot-brand .foot-mail:hover { color: var(--ochre); border-color: var(--ochre); }
.foot-col h3 {
  margin-bottom: 16px;
  font-family: var(--mono);
  font-size: 8px;
  font-weight: 500;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: rgba(var(--on-panel-rgb), 0.5);
}
.foot-col ul { display: flex; flex-direction: column; gap: 9px; }
.foot-col a {
  font-size: 12.5px;
  color: rgba(var(--on-panel-rgb), 0.76);
  transition: color 0.2s var(--ease);
}
.foot-col a:hover { color: var(--ochre); }
.foot-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  flex-wrap: wrap;
  padding: 20px 0 24px;
  border-top: 1px solid rgba(var(--on-panel-rgb), 0.13);
  font-family: var(--mono);
  font-size: 8.5px;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: rgba(var(--on-panel-rgb), 0.48);
}
.foot-bottom a { transition: color 0.2s var(--ease); }
.foot-bottom a:hover { color: var(--on-panel); }
.to-top { display: inline-flex; align-items: center; gap: 6px; }
.to-top span { transition: transform 0.25s var(--ease); }
.to-top:hover span { transform: translateY(-3px); }

/* ---------- Toast ---------- */

.toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  z-index: 3000;
  padding: 11px 16px;
  border-radius: 100px;
  background: var(--ink);
  color: var(--paper);
  font-size: 12px;
  opacity: 0;
  transform: translate(-50%, 10px);
  pointer-events: none;
  transition: opacity 0.25s var(--ease), transform 0.25s var(--ease);
}
.toast.is-visible { opacity: 1; transform: translate(-50%, 0); }

/* ---------- Responsive ---------- */

@media (max-width: 1180px) {
  .ai-app { grid-template-columns: 224px minmax(0, 1fr); }
  .ai-context { display: none; }
  .hero-media { min-height: 520px; }
}

@media (max-width: 980px) {
  .hero-grid,
  .page-hero-grid,
  .studio-intro-grid,
  .ai-preview,
  .contact-layout,
  .early-access {
    grid-template-columns: 1fr;
  }
  .hero-copy { max-width: 720px; }
  .hero-title { max-width: 13ch; }
  .hero-media { min-height: 500px; max-width: 680px; width: 100%; }
  .page-hero-grid { gap: 24px; }
  .page-title { max-width: 14ch; }
  .ai-preview { gap: 34px; }
  .ai-window { max-width: 620px; }
  .work-grid,
  .store-grid,
  .service-grid,
  .app-grid,
  .process-grid,
  .ai-features {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .cta-band-inner { align-items: flex-start; flex-direction: column; }
  .quote-band-inner { grid-template-columns: 1fr; gap: 24px; }
  .ai-app { grid-template-columns: 1fr; min-height: 0; }
  .ai-sidebar { display: none; }
  .ai-thread { min-height: 430px; max-height: 62vh; }
  .ai-top-new { display: inline-flex; }
  .foot-main { grid-template-columns: 1fr 1fr; }
  .foot-brand { grid-column: 1 / -1; }
  .head-actions .btn,
  .head-actions .theme-switch,
  .head-actions .lang-switch { display: none; }
}

@media (max-width: 700px) {
  :root { --header-h: 66px; }
  .brand-mark { height: 36px; }
  .brand-type strong { font-size: 18px; }
  .brand-type small { font-size: 6.5px; }
  .hero { padding-top: 28px; }
  .hero-title { font-size: clamp(2.85rem, 12vw, 4.7rem); }
  .hero-media { min-height: 390px; }
  .hero-frame { left: 0; }
  .hero-thumb { width: 38%; border-width: 5px; }
  .hero-app { top: 4%; right: 0; width: min(215px, 58%); }
  .hero-note { right: 3%; bottom: 3%; }
  .section-head { align-items: flex-start; flex-direction: column; gap: 12px; }
  .section-head .text-link { margin-bottom: 0; }
  .work-grid,
  .store-grid,
  .service-grid,
  .app-grid,
  .process-grid,
  .ai-features,
  .contact-steps {
    grid-template-columns: 1fr;
  }
  .service-card { min-height: 0; }
  .service-card h3 { padding-top: 28px; }
  .app-card, .store-card { min-height: 0; }
  .page-meta { grid-template-columns: 1fr 1fr; }
  .page-meta--contact { grid-template-columns: 1fr 1fr; }
  .page-meta--contact > div:first-child { grid-column: 1 / -1; }
  .studio-facts { grid-template-columns: 1fr; }
  .service-row { grid-template-columns: 34px 1fr; gap: 8px 14px; padding-block: 17px; }
  .service-row p { grid-column: 2; }
  .dialog-body { grid-template-columns: 1fr; }
  .dialog-heading { align-items: flex-start; flex-direction: column; gap: 8px; }
  .dialog-cover img { aspect-ratio: 4 / 3; }
  .form-grid { grid-template-columns: 1fr; }
  .field-group.full { grid-column: auto; }
  .contact-layout { gap: 22px; }
  .ai-head { align-items: flex-start; flex-direction: column; }
  .ai-head-actions { width: 100%; }
  .ai-app { border-radius: var(--r-lg); }
  .ai-thread { min-height: 400px; max-height: 58vh; padding-inline: 16px; }
  .ai-suggestions { grid-template-columns: 1fr; }
  .ai-composer-wrap { padding-inline: 14px; }
  .ai-composer-foot span:last-child { display: none; }
  .ai-footnote { flex-direction: column; gap: 10px; }
  .foot-main { grid-template-columns: 1fr; gap: 30px; }
  .foot-bottom { align-items: flex-start; flex-direction: column; gap: 10px; }
  .cta-band-actions { width: 100%; }
  .cta-band-actions .btn { flex: 1; }
  .ticker span { font-size: 10.5px; }
}

@media (max-width: 430px) {
  .hero-media { min-height: 340px; }
  .hero-thumb { display: none; }
  .hero-app { width: 66%; }
  .hero-actions .btn { width: 100%; }
  .page-title { font-size: 2.75rem; }
  .not-found { grid-template-columns: 1fr; gap: 22px; padding-block: 56px 64px; }
  .not-found-code { font-size: clamp(6rem, 28vw, 9rem); }
  .not-found-actions .btn { width: 100%; }
  .ai-top-actions .ai-top-btn:not(.ai-top-new) { display: none; }
  .ai-empty { text-align: left; }
  .ai-empty-mark { margin-inline: 0; }
  .ai-empty p { margin-inline: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .ticker-track { animation: none; }
  .hero-frame { clip-path: none; }
  .ai-typing i { animation: none; }
}
