/* ═════════════════════════════════════════════
   Stackwell Studio — styles
   Colours come from the Stackwell brand kit.
   Light + dark themes are switched with <html data-theme="...">
   ═════════════════════════════════════════════ */

/* ── Light theme (brand: paper + ink + violet) ── */
:root,
[data-theme="light"] {
  --bg: #FAFAF7;
  --bg-glow: #EFEBFF;
  --surface: #FFFFFF;
  --surface-2: #F4F2EC;
  --border: #E3E1DA;
  --text: #1C2230;
  --muted: #545B6B;
  --brand: #6D4AFF;
  --brand-deep: #5534E0;
  --brand-lite: #A894FF;
  --ribbon: #1C2230;          /* logo's S-ribbon colour */
  --em-from: #6D4AFF;
  --em-to: #5534E0;
  --nav-bg: rgba(250, 250, 247, .72);
  --card-bg: rgba(255, 255, 255, .78);
  --glow: rgba(109, 74, 255, .28);
  color-scheme: light;
}

/* ── Dark theme (brand: night + paper + violet) ── */
[data-theme="dark"] {
  --bg: #0F131C;
  --bg-glow: #221A4A;
  --surface: #1C2230;
  --surface-2: #161B26;
  --border: rgba(168, 148, 255, .16);
  --text: #F3F2EE;
  --muted: #A9B0BF;
  --brand: #7C5CFF;
  --brand-deep: #A894FF;
  --brand-lite: #A894FF;
  --ribbon: #FAFAF7;
  --em-from: #C4B5FD;
  --em-to: #7C5CFF;
  --nav-bg: rgba(15, 19, 28, .6);
  --card-bg: rgba(28, 34, 48, .55);
  --glow: rgba(124, 92, 255, .45);
  color-scheme: dark;
}

:root { --radius: 22px; --pad: 6vw; --max: 1240px; }

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Sora', system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  overflow-x: hidden;
  overflow-x: clip;
  -webkit-font-smoothing: antialiased;
  transition: background-color .5s, color .5s;
}
body::before {               /* soft violet glow behind everything */
  content: ''; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background: radial-gradient(ellipse 60% 50% at 78% 18%, var(--bg-glow), transparent 70%);
  transition: opacity .5s;
}
img { display: block; max-width: 100%; }
a { color: inherit; }
::selection { background: var(--brand); color: #fff; }

/* ── 3D canvas ── */
#webgl { position: fixed; inset: 0; width: 100vw; height: 100vh; z-index: 0; pointer-events: none; }
.fallback-blob {
  display: none; position: fixed; top: 22%; right: 10%; width: 320px; height: 320px; border-radius: 40%;
  background: linear-gradient(135deg, var(--brand-lite), var(--brand)); filter: blur(14px); opacity: .45; z-index: 0;
}
.no-webgl .fallback-blob { display: block; }

/* ── Logo (inline SVG adapts to theme) ── */
.brand { display: flex; align-items: center; gap: 11px; text-decoration: none; }
.mark { width: 36px; height: 36px; flex: none; }
.mark .t { fill: var(--brand); }
.mark .t2 { fill: var(--brand-lite); }
.mark .r { fill: none; stroke: var(--ribbon); stroke-width: 9; stroke-linecap: round; stroke-linejoin: round; transition: stroke .5s; }
.wordmark { font-weight: 800; font-size: 1.15rem; letter-spacing: -.03em; }
.wordmark span { font-weight: 500; color: var(--brand-deep); }
.brand.small .mark { width: 26px; height: 26px; }
.brand.small .wordmark { font-size: .95rem; }

/* ── Nav ── */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 30;
  display: flex; align-items: center; justify-content: space-between; gap: 20px;
  padding: 16px var(--pad);
  background: var(--nav-bg);
  backdrop-filter: blur(14px) saturate(1.4); -webkit-backdrop-filter: blur(14px) saturate(1.4);
  border-bottom: 1px solid var(--border);
  transition: background-color .5s, border-color .5s;
}
.nav-links { display: flex; align-items: center; gap: 30px; }
.nav-links a { text-decoration: none; color: var(--muted); font-size: .9rem; font-weight: 500; transition: color .2s; }
.nav-links a:hover { color: var(--text); }
.nav-links .nav-cta { color: #fff; background: var(--brand); padding: 10px 20px; border-radius: 999px; }
.nav-links .nav-cta:hover { color: #fff; background: var(--brand-deep); }
[data-theme="dark"] .nav-links .nav-cta:hover { background: #6D4AFF; }
.nav-tools { display: flex; gap: 8px; }

.icon-btn {
  width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center;
  background: var(--surface); border: 1px solid var(--border); color: var(--text); cursor: pointer;
  transition: border-color .2s, background-color .5s;
}
.icon-btn:hover { border-color: var(--brand); }
.icon-btn svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }
[data-theme="light"] .i-sun, [data-theme="dark"] .i-moon { display: none; }
.menu-btn { display: none; flex-direction: column; align-items: center; justify-content: center; gap: 5px; }
.menu-btn span { display: block; width: 18px; height: 2px; background: currentColor; border-radius: 2px; transition: transform .3s; }
.menu-btn[aria-expanded="true"] span:first-child { transform: translateY(3.5px) rotate(45deg); }
.menu-btn[aria-expanded="true"] span:last-child { transform: translateY(-3.5px) rotate(-45deg); }

main { position: relative; z-index: 1; }

/* ── Typography ── */
.eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  font-size: .72rem; font-weight: 600; letter-spacing: .22em; text-transform: uppercase;
  color: var(--brand-deep); margin-bottom: 18px;
}
.eyebrow::before { content: ''; width: 22px; height: 2px; background: currentColor; border-radius: 2px; }
h1 { font-size: clamp(2rem, 4vw, 3.3rem); line-height: 1.08; letter-spacing: -.04em; font-weight: 800; }
h2 { font-size: clamp(1.65rem, 3vw, 2.35rem); line-height: 1.12; letter-spacing: -.03em; font-weight: 700; }
h3 { font-size: 1.12rem; font-weight: 600; letter-spacing: -.015em; }
h1 em, h2 em {
  font-style: normal;
  background: linear-gradient(95deg, var(--em-from), var(--em-to));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
p { color: var(--muted); font-size: 1rem; line-height: 1.7; font-weight: 400; }

/* ── Buttons ── */
.btn-row { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 34px; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 15px 30px; border-radius: 999px; border: 0; cursor: pointer;
  background: var(--brand); color: #fff; text-decoration: none; font: inherit; font-weight: 600; font-size: .95rem;
  box-shadow: 0 14px 40px -14px var(--glow);
  transition: transform .25s, box-shadow .25s, background-color .25s;
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 20px 50px -14px var(--glow); }
.btn-ghost { background: transparent; color: var(--text); border: 1px solid var(--border); box-shadow: none; }
.btn-ghost:hover { border-color: var(--brand); box-shadow: none; }
.link { color: var(--brand-deep); font-weight: 600; text-decoration: none; font-size: .92rem; }
.link:hover { text-decoration: underline; text-underline-offset: 4px; }

/* ── Full-screen 3D story panels ── */
.panel { min-height: 100vh; display: flex; align-items: center; padding: 110px var(--pad) 70px; position: relative; }
.panel.right { justify-content: flex-end; }
.copy { max-width: 540px; }
.copy > p { margin-top: 22px; font-size: 1.05rem; }

/* Quiet trust line under the hero buttons */
.trust { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 40px; }
.trust span {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 14px; border-radius: 999px; font-size: .82rem; color: var(--muted);
  background: color-mix(in srgb, var(--surface) 60%, transparent); border: 1px solid var(--border);
}
.trust b { color: var(--text); font-weight: 700; }
.trust svg { width: 15px; height: 15px; fill: none; stroke: var(--brand-deep); stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }

.scroll-hint { position: absolute; bottom: 32px; left: var(--pad); font-size: .72rem; letter-spacing: .22em; text-transform: uppercase; color: var(--muted); }
.scroll-hint span { display: inline-block; animation: bob 1.8s ease-in-out infinite; }
@keyframes bob { 50% { transform: translateY(5px); } }

/* ── Content blocks ── */
.block { padding: 100px var(--pad); max-width: calc(var(--max) + 12vw); margin: 0 auto; }
.block-head { max-width: 680px; margin-bottom: 48px; }
.block-head p { margin-top: 16px; font-size: 1.05rem; }

.card {
  position: relative; padding: 32px 28px; border-radius: var(--radius);
  background: var(--card-bg); border: 1px solid var(--border);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  transform-style: preserve-3d;
  transition: border-color .3s, background-color .5s, box-shadow .3s;
}
.card:hover { border-color: color-mix(in srgb, var(--brand) 45%, transparent); box-shadow: 0 30px 60px -30px var(--glow); }
.card-icon {
  width: 48px; height: 48px; border-radius: 14px; margin-bottom: 26px; display: grid; place-items: center;
  background: color-mix(in srgb, var(--brand) 14%, transparent); color: var(--brand-deep);
  transform: translateZ(30px);
}
.card-icon svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.card h3 { transform: translateZ(20px); }
.card p { margin-top: 10px; font-size: .93rem; }

/* ── Services ── */
.services { display: grid; grid-template-columns: repeat(6, 1fr); gap: 20px; perspective: 1200px; }
.services .svc { grid-column: span 2; }
.services .svc:nth-child(4), .services .svc:nth-child(5) { grid-column: span 3; }
.feature {
  grid-column: 1 / -1; display: grid; grid-template-columns: 1.1fr .9fr; align-items: center; gap: 30px;
  padding: 44px; overflow: hidden;
  background:
    radial-gradient(ellipse at 85% 50%, color-mix(in srgb, var(--brand) 22%, transparent), transparent 60%),
    var(--card-bg);
}
.feature h3 { font-size: clamp(1.3rem, 2vw, 1.65rem); font-weight: 700; letter-spacing: -.035em; }
.feature p { font-size: 1rem; max-width: 46ch; }
.badge {
  display: inline-block; margin-bottom: 18px; padding: 6px 12px; border-radius: 999px;
  font-size: .7rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase;
  background: var(--brand); color: #fff;
}
.ticks { list-style: none; margin: 22px 0 26px; display: grid; gap: 10px; }
.ticks li { font-size: .92rem; display: flex; gap: 10px; align-items: center; }
.ticks li::before {
  content: ''; width: 18px; height: 18px; border-radius: 6px; flex: none;
  background: var(--brand) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 12 4 4 8-8'/%3E%3C/svg%3E") center/12px no-repeat;
}

/* Mini CSS-3D logo stack inside the feature card */
.cube-stage { height: 300px; display: grid; place-items: center; perspective: 900px; }
.iso { position: relative; width: 170px; height: 170px; transform-style: preserve-3d; transform: rotateX(58deg) rotateZ(45deg); animation: isoSpin 16s linear infinite; }
@keyframes isoSpin { to { transform: rotateX(58deg) rotateZ(405deg); } }
.iso-layer { position: absolute; inset: 0; border-radius: 22px; border: 12px solid var(--ribbon); opacity: .9; transition: border-color .5s; }
.iso-layer.l1 { transform: translateZ(0); }
.iso-layer.l2 { transform: translateZ(40px); }
.iso-tiles {
  position: absolute; inset: 20px; display: grid; grid-template-columns: 1fr 1fr; gap: 12px;
  transform-style: preserve-3d; transform: translateZ(90px); animation: isoLift 3.2s ease-in-out infinite;
}
@keyframes isoLift { 50% { transform: translateZ(118px); } }
.iso-tiles i { border-radius: 10px; background: var(--brand); box-shadow: 0 0 40px var(--glow); }
.iso-tiles i.lite { background: var(--brand-lite); }

/* ── Work ── */
.client-grid { display: grid; gap: 24px; }
.client-grid .work-card { display: grid; grid-template-columns: 1.25fr 1fr; align-items: center; gap: 10px 26px; }
.client-grid .work-meta h3 { font-size: 1.6rem; }
.ideas-head { margin-top: 96px; }
.ideas-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.ideas-grid .work-meta h3 { font-size: 1.1rem; }
.ideas-grid .work-meta p { font-size: .88rem; }
.work-card { display: block; text-decoration: none; padding: 14px; }
.work-card .shot {
  position: relative; aspect-ratio: 16 / 10; border-radius: 14px; overflow: hidden;
  background: var(--surface-2); border: 1px solid var(--border);
}
.work-card .shot .pan { position: absolute; left: 0; right: 0; top: -6%; height: 112%; }
.work-card .shot img { width: 100%; height: 100%; object-fit: cover; transition: transform .8s cubic-bezier(.2,.7,.2,1); }
.work-card:hover .shot img, .work-card:hover .mock-body { transform: scale(1.04); }
.mock-bar { display: flex; align-items: center; gap: 6px; padding: 10px 14px; border-bottom: 1px solid var(--border); background: var(--surface); }
.mock-bar i { width: 9px; height: 9px; border-radius: 50%; background: var(--border); }
.mock-bar span { margin-left: 10px; font-size: .72rem; color: var(--muted); padding: 3px 10px; border-radius: 6px; background: var(--surface-2); }
.mock-body {
  position: absolute; inset: 38px 0 0; display: grid; place-items: center; text-align: center; padding: 24px;
  background:
    radial-gradient(circle at 25% 30%, color-mix(in srgb, var(--brand) 30%, transparent), transparent 55%),
    radial-gradient(circle at 80% 80%, color-mix(in srgb, var(--brand-lite) 30%, transparent), transparent 55%);
  transition: transform .8s cubic-bezier(.2,.7,.2,1);
}
.mock-body b { font-size: clamp(1.3rem, 2.4vw, 1.9rem); font-weight: 700; letter-spacing: -.03em; color: var(--text); max-width: 16ch; line-height: 1.15; }
.work-meta { padding: 22px 8px 8px; }
.work-meta small { font-size: .72rem; letter-spacing: .16em; text-transform: uppercase; color: var(--brand-deep); font-weight: 600; }
.work-meta h3 { margin-top: 8px; font-size: 1.25rem; display: flex; justify-content: space-between; gap: 12px; }
.work-meta h3 .arrow { transition: transform .3s; color: var(--brand-deep); }
.work-card:hover .arrow { transform: translate(4px, -4px); }
.work-meta p { margin-top: 8px; font-size: .92rem; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.chips span {
  font-size: .76rem; padding: 6px 12px; border-radius: 999px; color: var(--text);
  background: var(--surface-2); border: 1px solid var(--border);
}
.concept-badge {
  position: absolute; top: 14px; right: 14px; z-index: 2;
  padding: 6px 12px; border-radius: 999px; font-size: .68rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase;
  color: #fff; background: rgba(28, 34, 48, .72); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
}
.work-next {
  grid-column: 1 / -1;
  display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 6px 40px;
  padding: 34px 40px; text-decoration: none; border-style: dashed;
}
.work-next .eyebrow { grid-column: 1 / -1; }
.work-next p { margin: 0; }
.work-next .eyebrow { margin-bottom: 0; }
.work-next h3 { font-size: 1.45rem; font-weight: 700; letter-spacing: -.03em; }

/* ── Why Stackwell ── */
.why { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.why-item { padding: 30px 26px; border-radius: var(--radius); background: var(--card-bg); border: 1px solid var(--border); }
.why-item span { display: block; font-size: .8rem; font-weight: 700; color: var(--brand-deep); margin-bottom: 18px; }
.why-item p { margin-top: 10px; font-size: .92rem; }

/* ── Full-page screenshots: scroll through the whole site on hover ── */
.shot.full .scroller { position: absolute; inset: 0; overflow: hidden; container-type: size; }
.shot.full .scroller img { width: 100%; height: auto; object-fit: initial; transform: translateY(0); transition: transform 7s cubic-bezier(.45,.05,.35,1); }
.work-card:hover .shot.full .scroller img { transform: translateY(calc(-100% + 100cqh)); }
.viewer-design.full { display: block; overflow: auto; padding: 28px; }
.viewer-design .browser { max-width: 1100px; margin: 0 auto; border-radius: 14px; overflow: hidden; border: 1px solid var(--border); background: var(--surface); box-shadow: 0 20px 50px -20px rgba(0,0,0,.4); }
.viewer-design .browser img { display: block; width: 100%; height: auto; max-height: none; border-radius: 0; box-shadow: none; }
#viewerLive[hidden] { display: none; }
#viewerPages { flex-wrap: wrap; }
.viewer-empty { text-align: center; padding: 60px 0; }

/* ── Concept cards are clickable ── */
.work-card.is-concept { cursor: pointer; }
.work-card.is-concept:focus-visible { outline: 2px solid var(--brand); outline-offset: 4px; }
.view-link { display: inline-block; margin-top: 18px; font-size: .88rem; font-weight: 600; color: var(--brand-deep); transition: transform .25s; }
.work-card.is-concept:hover .view-link { transform: translateX(4px); }

/* ── Concept viewer (full-screen preview) ── */
.viewer-open, .viewer-open body { overflow: hidden; }
.viewer { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 3vh 3vw; }
.viewer[hidden] { display: none; }
.viewer-backdrop { position: absolute; inset: 0; background: rgba(8, 10, 16, .72); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); opacity: 0; transition: opacity .25s; }
.viewer-panel {
  position: relative; width: min(1240px, 100%); height: min(860px, 94vh);
  display: grid; grid-template-rows: auto 1fr auto; overflow: hidden;
  background: var(--surface); color: var(--text); border: 1px solid var(--border); border-radius: 24px;
  box-shadow: 0 40px 120px -30px rgba(0,0,0,.6);
  opacity: 0; transform: translateY(18px) scale(.98); transition: opacity .25s, transform .3s cubic-bezier(.2,.7,.2,1);
}
.viewer.show .viewer-backdrop { opacity: 1; }
.viewer.show .viewer-panel { opacity: 1; transform: none; }
.viewer-head { display: flex; align-items: center; gap: 20px; padding: 18px 22px; border-bottom: 1px solid var(--border); }
.viewer-titles { flex: 1; min-width: 0; }
.viewer-titles small { font-size: .7rem; letter-spacing: .16em; text-transform: uppercase; color: var(--brand-deep); font-weight: 600; }
.viewer-titles h3 { font-size: 1.2rem; margin-top: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.viewer-tabs { display: flex; padding: 4px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--border); }
.viewer-tabs[hidden] { display: none; }
.viewer-tabs button { font: inherit; font-size: .85rem; font-weight: 600; border: 0; background: none; color: var(--muted); padding: 9px 16px; border-radius: 999px; cursor: pointer; }
.viewer-tabs button.on { background: var(--brand); color: #fff; }
.viewer-close svg { stroke-width: 2.2; }
.viewer-body { position: relative; min-height: 0; background: var(--surface-2); }
.viewer-3d, .viewer-design { position: absolute; inset: 0; }
.viewer-3d[hidden], .viewer-design[hidden] { display: none; }
.viewer-3d canvas { width: 100%; height: 100%; display: block; cursor: grab; touch-action: none; }
.viewer-3d canvas:active { cursor: grabbing; }
.viewer-hint {
  position: absolute; left: 50%; bottom: 16px; transform: translateX(-50%); pointer-events: none;
  font-size: .78rem; padding: 8px 14px; border-radius: 999px; background: rgba(255,255,255,.88); color: #2e2a24;
  box-shadow: 0 8px 20px rgba(0,0,0,.12);
}
.viewer-loading { position: absolute; inset: 0; display: none; place-items: center; font-size: .9rem; color: var(--muted); }
.viewer-3d.loading .viewer-loading { display: grid; }
.viewer-3d.loading .viewer-hint { display: none; }
.viewer-design { display: flex; align-items: center; justify-content: center; padding: 24px; }
.viewer-design img { display: block; width: auto; height: auto; max-width: 100%; max-height: 100%; border-radius: 12px; box-shadow: 0 20px 50px -20px rgba(0,0,0,.4); }
.viewer-foot { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; padding: 14px 22px; border-top: 1px solid var(--border); }
.viewer-opts { display: flex; gap: 22px; flex-wrap: wrap; }
.viewer-opts[hidden] { display: none; }
.opt-group small { display: block; font-size: .68rem; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); margin-bottom: 7px; }
.swatches { display: flex; gap: 8px; }
.swatches button { width: 28px; height: 28px; border-radius: 50%; border: 3px solid var(--surface); box-shadow: 0 0 0 1px var(--border); cursor: pointer; transition: transform .15s; }
.swatches button:hover { transform: scale(1.1); }
.swatches button.on { box-shadow: 0 0 0 2px var(--brand); }
.viewer-note { flex: 1; font-size: .8rem; text-align: right; }
.viewer-foot .btn { padding: 12px 22px; font-size: .88rem; }

@media (max-width: 767px) {
  .viewer { padding: 0; }
  .viewer-panel { height: 100%; border-radius: 0; }
  .viewer-head { flex-wrap: wrap; gap: 12px; padding: 14px 16px; }
  .viewer-tabs { order: 3; width: 100%; justify-content: center; }
  .viewer-tabs button { flex: 1; }
  .viewer-note { display: none; }
  .viewer-foot .btn { width: 100%; }
}

/* ── Experience ── */
.exp-layout { display: grid; grid-template-columns: 1.15fr .85fr; gap: 50px; align-items: start; }
.timeline { list-style: none; position: relative; padding-left: 34px; }
.timeline::before { content: ''; position: absolute; left: 7px; top: 8px; bottom: 8px; width: 2px; background: linear-gradient(var(--brand), transparent); }
.timeline li { position: relative; padding-bottom: 42px; }
.timeline li::before {
  content: ''; position: absolute; left: -34px; top: 4px; width: 16px; height: 16px; border-radius: 5px;
  background: var(--brand); transform: rotate(45deg); box-shadow: 0 0 0 6px color-mix(in srgb, var(--brand) 18%, transparent);
}
.timeline .when { font-size: .75rem; letter-spacing: .14em; text-transform: uppercase; color: var(--brand-deep); font-weight: 600; }
.timeline h3 { margin-top: 8px; font-size: 1.35rem; }
.timeline .where { display: block; margin-top: 4px; font-size: .92rem; color: var(--text); opacity: .8; }
.timeline p { margin-top: 10px; font-size: .93rem; max-width: 52ch; }
.skills { padding: 32px; border-radius: var(--radius); background: var(--card-bg); border: 1px solid var(--border); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); }
.skill-group { margin-top: 24px; }
.skill-group small { font-size: .72rem; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.skill-group .chips { margin-top: 10px; }

/* ── Process ── */
.steps { list-style: none; display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; counter-reset: s; }
.steps li { padding-top: 26px; border-top: 1px solid var(--border); }
.steps span { display: block; font-size: .8rem; color: var(--brand-deep); margin-bottom: 14px; font-weight: 700; }
.steps p { margin-top: 8px; font-size: .92rem; }

/* ── Contact ── */
.contact { display: grid; grid-template-columns: .9fr 1.1fr; gap: 56px; align-items: start; }
.contact-info > p { margin-top: 18px; }
.contact-list { display: grid; gap: 12px; margin-top: 32px; }
.contact-item {
  display: block; text-decoration: none; padding: 18px 22px; border-radius: 16px;
  background: var(--card-bg); border: 1px solid var(--border);
  transition: border-color .2s, transform .2s;
}
a.contact-item:hover { border-color: var(--brand); transform: translateX(4px); }
.contact-item small { display: block; font-size: .7rem; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); margin-bottom: 5px; }
.contact-item strong { font-weight: 600; word-break: break-word; }

.form {
  display: grid; gap: 18px; padding: 36px; border-radius: var(--radius);
  background: var(--card-bg); border: 1px solid var(--border);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
}
.form .row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.form label { display: grid; gap: 8px; font-size: .85rem; font-weight: 500; }
.form label em { font-style: normal; color: var(--muted); font-weight: 400; }
.form input, .form select, .form textarea {
  font: inherit; font-size: .95rem; color: var(--text);
  background: var(--surface); border: 1px solid var(--border); border-radius: 12px;
  padding: 13px 15px; width: 100%; transition: border-color .2s, box-shadow .2s;
}
.form textarea { resize: vertical; min-height: 130px; }
.form input:focus, .form select:focus, .form textarea:focus {
  outline: none; border-color: var(--brand); box-shadow: 0 0 0 4px color-mix(in srgb, var(--brand) 18%, transparent);
}
.form .btn { justify-self: start; }
.form .btn[disabled] { opacity: .6; cursor: wait; }
.form-status { font-size: .9rem; min-height: 1.4em; }
.form-status.ok { color: #0B7A4B; }
[data-theme="dark"] .form-status.ok { color: #5FD39A; }
.form-status.err { color: #D92D20; }
.hp { position: absolute; left: -9999px; }

/* ── Footer ── */
footer {
  position: relative; z-index: 1; display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 14px;
  padding: 34px var(--pad); border-top: 1px solid var(--border);
}
footer p { font-size: .82rem; }

/* ── Tablet ── */
@media (max-width: 1020px) {
  .services { grid-template-columns: repeat(2, 1fr); }
  .feature { grid-template-columns: 1fr; }
  .services .svc, .services .svc:nth-child(n) { grid-column: span 3; }
  .services .svc:nth-child(5) { grid-column: 1 / -1; }
  .cube-stage { height: 240px; }
  .exp-layout, .contact { grid-template-columns: 1fr; }
  .steps, .why, .ideas-grid { grid-template-columns: repeat(2, 1fr); }
  .work-next { grid-template-columns: 1fr; }
  .client-grid .work-card { grid-template-columns: 1fr; }
}

/* ── Phone ── */
@media (max-width: 767px) {
  .menu-btn { display: flex; }
  .nav-links {
    position: fixed; top: 75px; left: 12px; right: 12px; flex-direction: column; align-items: stretch; gap: 4px;
    padding: 14px; border-radius: 18px; background: var(--surface); border: 1px solid var(--border);
    box-shadow: 0 30px 60px -20px rgba(0,0,0,.35);
    opacity: 0; transform: translateY(-10px); pointer-events: none; transition: opacity .25s, transform .25s;
  }
  .nav-links.open { opacity: 1; transform: none; pointer-events: auto; }
  .nav-links a { padding: 12px 14px; border-radius: 10px; font-size: 1rem; }
  .nav-links .nav-cta { text-align: center; margin-top: 6px; }
  .wordmark { font-size: 1rem; }

  .panel, .panel.right { justify-content: center; align-items: flex-end; padding-bottom: 9vh; }
  .panel .copy {
    background: var(--card-bg); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
    padding: 26px; border-radius: var(--radius); border: 1px solid var(--border);
  }
  .trust { margin-top: 28px; }
  .scroll-hint { display: none; }
  .block { padding: 70px var(--pad); }
  .block-head { margin-bottom: 36px; }
  .services, .ideas-grid, .steps, .why, .form .row { grid-template-columns: 1fr; }
  .services .svc, .services .svc:nth-child(n) { grid-column: auto; }
  .ideas-head { margin-top: 72px; }
  .work-next { padding: 30px 26px; grid-template-columns: 1fr; }
  .feature { padding: 28px; }
  .form { padding: 24px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; }
}

.block-head .name { color: var(--text); font-weight: 600; }