/* ————————————————————————————————
   Nazar Kokoten — Brand & Identity
   Axel-style split-screen.
   ———————————————————————————————— */

:root {
  --bg: #ffffff;
  --ink: #1a1a1a;
  --grey: #6b6b6b;
  --line: #ececec;
  --field: #fafafa;
  --field-line: #e2e2e2;
  --accent: #1601fc;          /* electric blue */
  --panel-text: #ffffff;
  --pill-bg: #f1f1f1;
  --pill-active: #e6e6e6;
  --radius: 22px;
  --pad: clamp(22px, 3.5vw, 56px);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --panel-w: 46vw;
  --panel-pad: clamp(20px, 2vw, 32px);
  --panel-inset: 34px;
}

[data-theme="dark"] {
  --bg: #121212;
  --ink: #f2f2f2;
  --grey: #9a9a9a;
  --line: #262626;
  --field: #1c1c1c;
  --field-line: #2c2c2c;
  --accent: #4636ff;          /* lifted for dark bg */
  --pill-bg: #1e1e1e;
  --pill-active: #2a2a2a;
  --panel-text: #ffffff;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--ink);
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  transition: background 0.4s var(--ease), color 0.4s var(--ease);
}

a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
::selection { background: var(--accent); color: #fff; }

/* ——————— SPLIT LAYOUT ——————— */

.split {
  display: grid;
  grid-template-columns: var(--panel-w) 1fr;
  min-height: 100vh;
}

.panel {
  position: sticky;
  top: 0;
  height: 100vh;
  padding: var(--panel-pad);
}
.panel-inner {
  position: relative;
  height: 100%;
  border-radius: var(--radius);
  overflow: hidden;
  background: #e9e9e9;
  color: var(--panel-text);
}
[data-theme="dark"] .panel-inner { background: #222; }

.site-logo { display: inline-block; line-height: 0; margin-right: auto; }
.site-logo img { display: block; height: 38px; width: auto; }
.site-logo .logo-dark { display: none; }
[data-theme="dark"] .site-logo .logo-light { display: none; }
[data-theme="dark"] .site-logo .logo-dark { display: block; }

.content {
  padding: clamp(28px, 4vw, 72px) var(--pad) clamp(20px, 2vw, 32px);
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* ——————— NAV ——————— */

.topnav {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 18px;
  margin-bottom: clamp(40px, 8vw, 96px);
}
.topnav ul { display: flex; gap: 6px; list-style: none; }
.topnav a {
  display: inline-block;
  padding: 9px 17px;
  border-radius: 999px;
  font-size: 0.98rem;
  color: var(--grey);
  transition: background 0.25s var(--ease), color 0.25s var(--ease);
}
.topnav a:hover { color: var(--ink); }
.topnav a[aria-current="page"] { background: none; color: var(--accent); font-weight: 600; }

.theme-btn {
  width: 38px; height: 38px;
  border: 0; border-radius: 999px;
  background: transparent;
  cursor: pointer;
  color: var(--accent);
  display: grid; place-items: center;
  transition: background 0.25s;
}
.theme-btn:hover { background: var(--pill-bg); }
.theme-btn svg { width: 20px; height: 20px; }

/* sun in light, moon in dark */
.icon-moon { display: none; }
[data-theme="dark"] .icon-sun { display: none; }
[data-theme="dark"] .icon-moon { display: block; }

/* logo overlaid on the panel photo; theme toggle stays in the nav on desktop */
.panel-topbar {
  display: flex; align-items: center; justify-content: space-between;
  position: absolute; top: var(--panel-inset); left: var(--panel-inset); right: var(--panel-inset); z-index: 5;
}
.panel-logo img { display: block; height: 44px; width: auto; }
.topnav > .site-logo { display: none; }

/* some mobile panel crops put this corner over a bright window in the
   photo, where the white mark disappears — swap to the black mark there only */
.panel-logo .pl-black { display: none; }

/* pages without a photo panel (Services) still need the logo somewhere —
   pin it in the same top-left spot the panel-topbar logo occupies
   elsewhere, so it doesn't relocate when navigating between pages */
.page-logo {
  position: absolute;
  top: calc(var(--panel-pad) + var(--panel-inset));
  left: calc(var(--panel-pad) + var(--panel-inset));
  z-index: 5;
  display: inline-block; line-height: 0;
}
.page-logo img { display: block; height: 44px; width: auto; }
.page-logo .logo-dark { display: none; }
[data-theme="dark"] .page-logo .logo-light { display: none; }
[data-theme="dark"] .page-logo .logo-dark { display: block; }
.panel-topbar .panel-theme-btn { display: none; }
.panel-theme-btn {
  width: 40px; height: 40px;
  background: transparent;
  color: #fff;
}
.panel-theme-btn:hover,
.panel-theme-btn:focus,
.panel-theme-btn:active { background: transparent; }

.menu-btn { display: none; }

/* ——————— TYPE ——————— */

h1, h2, h3 { font-weight: 600; letter-spacing: -0.025em; }

.display {
  font-size: clamp(2.6rem, 5.2vw, 4.6rem);
  line-height: 1.02;
  letter-spacing: -0.035em;
}
.display .muted, .muted { color: var(--grey); }

.h-big { font-size: clamp(2.4rem, 5vw, 4rem); line-height: 1.02; letter-spacing: -0.035em; }

.body-lg { font-size: clamp(1.05rem, 1.35vw, 1.2rem); color: var(--grey); line-height: 1.55; max-width: 34em; white-space: pre-line; }
.body-lg strong { color: var(--ink); font-weight: 600; }
.body-lg + .body-lg { margin-top: 1.15em; }

.badge {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 7px 15px 7px 13px;
  border-radius: 999px;
  background: color-mix(in srgb, #2f9e44 14%, transparent);
  color: #2f9e44;
  font-size: 0.9rem;
  font-weight: 500;
}
.badge::before {
  content: "";
  width: 7px; height: 7px; border-radius: 50%;
  background: #2f9e44;
  animation: pulse 2.4s ease-in-out infinite;
}
@keyframes pulse { 0%,100%{opacity:1} 50%{opacity:.35} }

/* ——————— BUTTONS ——————— */

.btns { display: flex; gap: 12px; flex-wrap: wrap; }
.btn {
  display: inline-block;
  padding: 15px 30px;
  border-radius: 999px;
  font-size: 1rem;
  border: 1px solid transparent;
  transition: transform 0.25s var(--ease), background 0.25s, color 0.25s;
}
.btn:active { transform: scale(0.97); }
.btn.solid { background: var(--accent); color: #fff; }
.btn.solid:hover { background: #000; }
.btn.soft { background: var(--pill-bg); color: var(--ink); }
.btn.soft:hover { background: var(--pill-active); }

/* ——————— HERO (home) ——————— */

.hero-block { margin-top: 4vh; margin-bottom: 40px; }
.hero-block .badge { margin-bottom: 44px; }
.hero-block h1 { margin-bottom: 56px; max-width: 12em; }

/* ——————— SLIDER (left panel) ——————— */

.slides { position: absolute; inset: 0; }
.slide {
  position: absolute; inset: 0;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.7s var(--ease);
}
.slide.active { opacity: 1; pointer-events: auto; }
.slide-link { position: absolute; inset: 0; display: block; overflow: hidden; }
a.slide-link { cursor: pointer; }
.slide .fill {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.8rem; letter-spacing: 0.05em;
  color: rgba(255,255,255,0.65);
  transition: transform 1.4s var(--ease), filter 1.4s var(--ease);
}
/* the scale/blur/logo hover reveal is a home-page-only flourish —
   Projects drives the photo from the list instead, so it stays still */
body:not(.projects-page) a.slide-link:hover .fill,
body:not(.projects-page) a.slide-link:focus-visible .fill {
  transform: scale(1.08);
  filter: blur(6px);
}
.slide .fill { background: #e9e9e9; }
[data-theme="dark"] .slide .fill { background: #222; }

.slide-logo {
  position: absolute; top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  z-index: 3;
  max-width: 38%;
  max-height: 24%;
  object-fit: contain;
  opacity: 0;
  transition: opacity 0.9s var(--ease) 0.2s;
  pointer-events: none;
}
.slide-logo-text {
  font-size: 1.6rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: #fff;
  white-space: nowrap;
}
body:not(.projects-page) a.slide-link:hover .slide-logo,
body:not(.projects-page) a.slide-link:focus-visible .slide-logo {
  opacity: 1;
}

/* caption sits above the dots row — extra bottom padding prevents overlap */
.slide .caption {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  z-index: 2;
  padding: 34px 100px var(--panel-inset) var(--panel-inset);
}
/* when dots sit below the caption (home slider), give them equal breathing
   room above and below instead of crowding the bottom edge */
.panel-inner:has(.dots) .slide .caption { padding-bottom: calc(var(--panel-inset) * 2 + 4px); }
.slide .caption h3 { font-size: 1.5rem; font-weight: 600; }
.slide .caption span { color: rgba(255,255,255,0.8); font-size: 0.98rem; }

.slider-arrow {
  position: absolute;
  right: var(--panel-inset); bottom: var(--panel-inset);
  z-index: 4;
  width: 48px; height: 48px;
  border-radius: 999px;
  border: 0;
  background: var(--accent);
  color: #fff;
  cursor: pointer;
  display: grid; place-items: center;
  font-size: 1.2rem;
  transition: background 0.25s;
}
.slider-arrow:hover { background: color-mix(in srgb, var(--accent) 80%, black); }

/* dots on their own row, below the caption */
.dots {
  position: absolute;
  left: var(--panel-inset); bottom: var(--panel-inset);
  z-index: 4;
  display: flex; gap: 8px;
}
.dot {
  position: relative;
  width: 26px; height: 4px; border-radius: 4px;
  background: color-mix(in srgb, var(--accent) 32%, transparent);
  border: 0; cursor: pointer; padding: 0;
  overflow: hidden;
}
.dot::after {
  content: '';
  position: absolute; inset: 0;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
}
.dot.active::after { animation: dot-fill 4.5s linear forwards; }
.dot.done::after { transform: scaleX(1); }

@keyframes dot-fill {
  from { transform: scaleX(0); }
  to { transform: scaleX(1); }
}

/* ——————— ABOUT ——————— */

.about-copy { margin-top: auto; margin-bottom: 40px; }
.about-copy h1 { margin-bottom: 32px; }
.about-copy .body-lg { max-width: none; font-size: clamp(0.9rem, 1.15vw, 1.05rem); }
.about-copy .btns { margin-top: 36px; }

[data-tags] { display: contents; }
.tag-float {
  position: absolute;
  padding: 10px 20px;
  border-radius: 999px;
  background: rgba(255,255,255,0.16);
  backdrop-filter: blur(8px);
  color: #fff;
  font-size: 1rem;
  z-index: 3;
}
.tag-1 { top: 46%; left: 12%; }
.tag-2 { top: 58%; left: 46%; }
.tag-3 { top: 70%; left: 8%; }

.panel-quote {
  position: absolute;
  left: var(--panel-inset); bottom: var(--panel-inset);
  z-index: 3;
  max-width: 58%;
  font-style: italic;
  font-size: 1.15rem;
  line-height: 1.35;
  color: rgba(255,255,255,0.92);
}
.panel-socials {
  position: absolute;
  right: var(--panel-inset); bottom: var(--panel-inset);
  z-index: 3;
  display: flex; gap: 10px;
}
.panel-socials a {
  width: 40px; height: 40px; border-radius: 999px;
  background: rgba(0,0,0,0.28);
  display: grid; place-items: center;
  color: #fff; font-size: 0.9rem;
  transition: background 0.25s;
}
.panel-socials a:hover { background: rgba(0,0,0,0.5); }

/* ——————— PROJECTS list ——————— */

/* shared right-column wrapper on pages without a hero (Projects, Contact) */
.page-body { margin-top: auto; margin-bottom: clamp(40px, 6vw, 72px); }

.intro-lede { margin-bottom: clamp(40px, 6vw, 72px); }

.proj-list { list-style: none; }
.proj-row {
  display: grid;
  grid-template-columns: 1.4fr 1fr auto;
  align-items: center;
  gap: 20px;
  padding: 26px 4px;
  border-top: 1px solid var(--line);
  transition: padding-left 0.3s var(--ease);
}
.proj-list li:last-child .proj-row { border-bottom: 1px solid var(--line); }
.proj-row:hover { padding-left: 14px; }
.proj-row .name { font-size: 1.25rem; font-weight: 600; display: flex; align-items: center; gap: 12px; }
.new { font-size: 0.72rem; font-style: normal; color: #2f9e44; background: color-mix(in srgb,#2f9e44 14%,transparent); padding: 3px 9px; border-radius: 999px; font-weight: 600; letter-spacing: 0.03em; }
.proj-row .cat { color: var(--grey); }
.proj-row .yr { color: var(--grey); font-variant-numeric: tabular-nums; }

/* ——————— SERVICES / pricing ——————— */

/* Services has no split panel, so its own header/footer carry the
   spacing .content normally provides via the flex column */
.svc-header { padding: clamp(28px,4vw,72px) var(--pad) 0; }
.svc-header .topnav { margin-bottom: 0; }
.site-foot.svc-foot { margin-top: clamp(36px,4vw,52px); }

.full { max-width: 1200px; margin: 0 auto; padding: clamp(40px,6vw,90px) var(--pad) clamp(70px,9vw,130px); }
.svc-head { max-width: 46em; margin-bottom: clamp(44px,6vw,72px); }
.svc-head h1 { margin-bottom: 22px; }

.tiers {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
  align-items: stretch;
}
.tier {
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 30px 26px 34px;
  display: flex; flex-direction: column;
  background: var(--bg);
  transition: transform 0.3s var(--ease), border-color 0.3s;
}
.tier:hover { transform: translateY(-4px); }
.tier.hero {
  border-color: var(--accent);
  background: color-mix(in srgb, var(--accent) 5%, var(--bg));
}
.tier .flag { font-size: 0.72rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--accent); margin-bottom: 14px; min-height: 1em; font-weight: 600; }
.tier h3 { font-size: 1.3rem; margin-bottom: 6px; }
.tier .price { font-size: 2rem; font-weight: 600; letter-spacing: -0.03em; margin-bottom: 6px; }
.tier .for { color: var(--grey); font-size: 0.92rem; margin-bottom: 20px; min-height: 2.6em; }
.tier ul { list-style: none; margin-bottom: 26px; flex: 1; }
.tier li { font-size: 0.92rem; padding: 8px 0 8px 22px; position: relative; border-top: 1px solid var(--line); }
.tier li:first-child { border-top: 0; }
.tier li::before { content: "→"; position: absolute; left: 0; color: var(--accent); }
.tier li.strat { font-weight: 600; color: var(--ink); }
.tier .btn { text-align: center; }

.svc-rules {
  margin-top: clamp(48px,6vw,80px);
  padding-top: clamp(36px,4vw,52px);
  border-top: 1px solid var(--line);
  display: grid;
  grid-template-columns: repeat(3,1fr);
  gap: 32px;
}
.svc-rules h4 { font-size: 1rem; margin-bottom: 8px; }
.svc-rules p { color: var(--grey); font-size: 0.95rem; }

/* ——————— CONTACT form ——————— */

.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 22px 20px; margin: clamp(32px,5vw,52px) 0 28px; }
.field label { display: block; font-size: 0.95rem; margin-bottom: 9px; }
.field.full-w { grid-column: 1 / -1; }
.field input, .field select, .field textarea {
  width: 100%;
  padding: 15px 16px;
  border: 1px solid var(--field-line);
  border-radius: 12px;
  background: var(--field);
  color: var(--ink);
  font: inherit;
  transition: border-color 0.25s;
}
.field textarea { resize: vertical; min-height: 130px; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--accent); }
.field ::placeholder { color: #b3b3b3; }

.form-foot { display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.resp { color: var(--grey); font-size: 0.95rem; display: inline-flex; align-items: center; gap: 8px; }

.contact-info {
  position: absolute; left: 34px; bottom: 34px; z-index: 3;
  display: flex; gap: 34px; flex-wrap: wrap;
  color: rgba(255,255,255,0.92);
}
.contact-info .k { font-size: 0.78rem; opacity: 0.7; margin-bottom: 4px; }
.contact-info .v { font-size: 0.98rem; }

.contact-info-mobile { display: none; }

/* ——————— CASE (Bungee model) ——————— */

.case { max-width: 1280px; margin: 0 auto; padding: clamp(28px,3vw,44px) var(--pad) 0; }

/* mobile-only: first block's photo, hoisted above the nav to match the
   photo-first rhythm every other page opens with (see .panel). Reuses
   .panel-topbar/.panel-logo/.panel-theme-btn so the overlaid logo + theme
   toggle inherit the same white-on-photo styling and mobile behavior. */
.case-hero-mobile { display: none; position: relative; }

.case-nav { margin-bottom: clamp(40px,6vw,80px); }
.case-nav .topnav { margin-bottom: 0; }
.case-nav .logo { margin-right: auto; font-size: 1.35rem; font-style: italic; font-weight: 600; }

.case-top { display: grid; grid-template-columns: 1fr 1.35fr; gap: clamp(40px,6vw,90px); align-items: start; }
.case-left { position: sticky; top: 40px; }
.case-title { font-size: clamp(3rem,7vw,5.6rem); font-weight: 700; letter-spacing: -0.04em; line-height: 0.95; margin-bottom: 30px; }
.case-title sup { font-size: 0.35em; vertical-align: super; }
.case-intro { color: var(--grey); font-size: clamp(1.05rem,1.4vw,1.25rem); line-height: 1.5; max-width: 26em; margin-bottom: 44px; white-space: pre-line; }
.case-intro p + p { margin-top: 1em; }

.case-meta { list-style: none; }
.case-meta li {
  display: flex; justify-content: space-between; align-items: center;
  padding: 20px 0;
  border-top: 1px solid var(--line);
  font-size: 1rem;
}
.case-meta li:last-child { border-bottom: 1px solid var(--line); }
.case-meta .k { color: var(--grey); }
.case-meta .v { font-weight: 500; }
.case-meta .preview { display: inline-flex; align-items: center; gap: 8px; border-bottom: 1px solid var(--ink); padding-bottom: 2px; }

.case-right { display: flex; flex-direction: column; gap: clamp(44px,6vw,85px); }

/* one block = its image(s) + its own text, grouped tightly so it reads
   as a unit — the big gap that separates blocks lives on .case-right above */
.case-block { display: flex; flex-direction: column; gap: clamp(20px,2.6vw,28px); }

/* several case-media-group rows stacked with the exact same gap that
   separates photos within a row — used when a "break" item splits one
   photo set into rows (e.g. 2 up, then 3 up) */
.case-media-rows { display: flex; flex-direction: column; gap: 12px; }
.case-media-group {
  display: grid;
  grid-template-columns: repeat(var(--n, 1), 1fr);
  gap: 12px;
}
@media (max-width: 640px) {
  .case-media-group { grid-template-columns: 1fr; }
}
.case-media {
  border-radius: 14px; overflow: hidden;
  background: #e9e9e9;
  aspect-ratio: 4 / 5;
  display: grid; place-items: center;
  color: #999; font-size: 0.82rem; letter-spacing: 0.05em;
}
[data-theme="dark"] .case-media { background: #222; color: #777; }
video.case-media { display: block; width: 100%; height: 100%; object-fit: cover; }

/* case text blocks */
.case-block-txt { max-width: 40em; }

/* small muted eyebrow — a hint at what the block is about, editable per block */
.cb-label {
  font-size: 0.8rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--grey);
}

/* the block's main thought — plain body copy, not a shouting headline */
.cb-thesis {
  font-size: clamp(1.05rem, 1.4vw, 1.25rem);
  line-height: 1.55;
  letter-spacing: -0.01em;
  font-weight: 400;
  white-space: pre-line;
}
.cb-thesis + .cb-thesis { margin-top: 1em; }

/* Format C: statement heading + smaller reveal */
.cb-statement {
  font-size: clamp(1.4rem, 2.4vw, 1.9rem);
  line-height: 1.2;
  letter-spacing: -0.02em;
  font-weight: 600;
  margin-bottom: 16px;
}
.cb-reveal {
  color: var(--grey);
  font-size: 1.1rem;
  line-height: 1.55;
  max-width: 34em;
}
.cb-reveal + .cb-reveal { margin-top: 1em; }

.more { max-width: 1280px; margin: clamp(60px,9vw,120px) auto 0; padding: clamp(60px,9vw,120px) var(--pad) clamp(40px,5vw,70px); border-top: 1px solid var(--line); }
.more h2 { font-size: clamp(2.4rem,5vw,4rem); font-weight: 700; letter-spacing: -0.035em; margin-bottom: 44px; }
.more .row { display: grid; grid-template-columns: 1fr 1fr; gap: 26px; }
.more-card .thumb { border-radius: 14px; overflow: hidden; aspect-ratio: 16/11; background: #e9e9e9; margin-bottom: 14px; transition: transform 0.6s var(--ease); display:grid; place-items:center; color:#999; font-size:0.8rem; }
[data-theme="dark"] .more-card .thumb { background:#222; color:#777; }
.more-card:hover .thumb { transform: scale(1.02); }
.more-card .m { display: flex; justify-content: space-between; }
.more-card h3 { font-size: 1.15rem; font-weight: 600; }
.more-card span { color: var(--grey); font-size: 0.9rem; }

/* ——————— BIG FOOTER (case page, Bungee-style) ——————— */

.big-foot {
  max-width: 1280px;
  margin: 0 auto;
  padding: clamp(70px,10vw,140px) var(--pad) clamp(50px,6vw,80px);
  border-top: 1px solid var(--line);
}
.bf-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 40px;
  align-items: start;
  margin-bottom: clamp(60px,9vw,110px);
}
.bf-grid h2 {
  font-size: clamp(1.9rem, 4vw, 3.2rem);
  line-height: 1.08;
  letter-spacing: -0.03em;
  margin-bottom: 34px;
  max-width: 14em;
}
.bf-mail {
  font-size: clamp(1.3rem, 2.2vw, 1.9rem);
  font-weight: 600;
  letter-spacing: -0.02em;
  border-bottom: 2px solid var(--ink);
  padding-bottom: 4px;
  transition: color 0.25s, border-color 0.25s;
}
.bf-mail:hover { color: var(--accent); border-color: var(--accent); }
.bf-right { display: flex; justify-content: flex-end; }
.bf-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  font-size: 0.92rem;
  color: var(--grey);
}
.bf-bottom .links { display: flex; gap: 22px; }
.bf-bottom a:hover { color: var(--ink); }

/* ——————— footer (right column pages) ——————— */

.site-foot { margin-top: auto; padding-top: 40px; border-top: 1px solid var(--line); display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; font-size: 0.88rem; color: var(--grey); }
.site-foot a:hover { color: var(--ink); }
.site-foot .links { display: flex; gap: 18px; }

/* ——————— reveal ——————— */
.rv { opacity: 0; transform: translateY(22px); transition: opacity .8s var(--ease), transform .8s var(--ease); transition-delay: var(--d,0s); }
.rv.in { opacity: 1; transform: none; }

/* ——————— RESPONSIVE ——————— */

@media (max-width: 1000px) {
  :root { --panel-w: 40vw; }
  .tiers { grid-template-columns: 1fr 1fr; }
  .svc-rules { grid-template-columns: 1fr; gap: 22px; }
  .case-top { grid-template-columns: 1fr; }
  .case-left { position: static; }
  .bf-grid { grid-template-columns: 1fr; }
  .bf-right { justify-content: flex-start; }
}

@media (max-width: 720px) {
  .split { grid-template-columns: minmax(0, 1fr); }
  /* drop the panel's own bottom padding — .content's top padding already
     supplies the gap below the photo, so keeping both double-counts it */
  .panel { position: relative; height: 34vh; padding-bottom: 0; }
  .content { min-height: auto; }

  .case-hero-mobile {
    display: block;
    height: 34vh;
    margin-bottom: clamp(28px,6vw,44px);
    border-radius: var(--radius);
    overflow: hidden;
  }
  .case-media-group--hero-dup { display: none; }
  .case-hero-mobile-media { display: block; width: 100%; height: 100%; object-fit: cover; }
  /* the hero's own panel-theme-btn takes over — drop the nav's copy,
     same swap the .split layout does for .panel */
  .case:has(.case-hero-mobile) .case-nav .topnav > .theme-btn { display: none; }

  /* theme toggle moves onto the panel photo; nav becomes a scrollable pill row */
  :root { --panel-inset: 20px; }
  .panel-logo img, .page-logo img { height: 30px; }
  .panel-topbar .panel-theme-btn { display: grid; }
  .panel-logo-swap .pl-white { display: none; }
  .panel-logo-swap .pl-black { display: block; }
  .contact-info { display: none; }
  .contact-info-mobile {
    display: flex; justify-content: space-between;
    position: absolute; left: var(--panel-inset); right: var(--panel-inset); bottom: var(--panel-inset); z-index: 3;
    font-size: 0.92rem;
    color: rgba(255,255,255,0.92);
  }
  /* equalize the photo -> nav -> badge -> headline rhythm to match the
     smallest of the three (the .content top padding, ~28px) */
  .hero-block { margin-top: 0; }
  .hero-block .badge { margin-bottom: 28px; }
  .split .topnav > .theme-btn { display: none; }
  .menu-btn { display: none; }
  .topnav {
    flex-wrap: wrap;
    justify-content: space-between;
    row-gap: 14px;
    margin-bottom: clamp(28px, 6vw, 48px);
  }
  /* on pages without the split panel (e.g. Services), the theme button is
     the only item left on the first row once the menu button is hidden —
     space-between then collapses it to flex-start, landing on top of the
     page-logo pinned top-left. Force it to the right edge instead. */
  .topnav > .theme-btn { margin-left: auto; }
  /* on the same pages, the button sits in normal nav flow while .page-logo
     is pinned absolutely (top: panel-pad + panel-inset) — their tops don't
     share a reference, so the button reads ~8px high of the logo's center.
     Nudge it down to match. */
  body:has(> .page-logo) .topnav > .theme-btn { margin-top: 8px; }
  .topnav ul {
    order: 3;
    flex-basis: 100%;
    list-style: none;
    overflow-x: auto;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }
  .topnav ul::-webkit-scrollbar { display: none; }
  .topnav a { white-space: nowrap; }
  .topnav li { flex: 0 0 auto; }

  .site-logo img { height: 30px; }
  .form-grid { grid-template-columns: 1fr; }
  .tiers { grid-template-columns: 1fr; }
  .more .row { grid-template-columns: 1fr; }
  .slide .caption { padding-top: 24px; }
}

@media (prefers-reduced-motion: reduce) {
  .rv { opacity: 1; transform: none; transition: none; }
  .slide { transition: none; }
  .badge::before { animation: none; }
}
