/* Self-hosted variable fonts — no external requests, Cyrillic included. */
@font-face {
  font-family: "Manrope";
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url("assets/fonts/manrope-cyrillic.woff2") format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: "Manrope";
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url("assets/fonts/manrope-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC,
    U+0304, U+0308, U+0329, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212,
    U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Unbounded";
  font-style: normal;
  font-weight: 600 800;
  font-display: swap;
  src: url("assets/fonts/unbounded-cyrillic.woff2") format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: "Unbounded";
  font-style: normal;
  font-weight: 600 800;
  font-display: swap;
  src: url("assets/fonts/unbounded-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC,
    U+0304, U+0308, U+0329, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212,
    U+2215, U+FEFF, U+FFFD;
}

:root {
  --font-body: "Manrope", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-display: "Unbounded", "Manrope", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

  --bg: #070807;
  --bg-soft: #141613;
  --text: #f4f6f4;
  --text-dim: #939c93;
  --border: #24271f;
  --accent: #39ff8a;
  --accent-dim: #1f8f52;
  --radius: 20px;
  --header-h: 64px;
  --maxw: 1120px;
}

:root[data-theme="light"] {
  --bg: #f6f8f6;
  --bg-soft: #ffffff;
  --text: #10130f;
  --text-dim: #576057;
  --border: #dde3dc;
  --accent: #16a34a;
  --accent-dim: #0d7a37;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

/* Display face for headings and the logo */
.hero h1,
.work-head h1,
.works-head h2,
.reviews h2,
.footer-title,
.logo,
.hero-stats b,
.section-label {
  font-family: var(--font-display);
  font-weight: 700;
}

/* Fine grain over the flat background — removes the "plastic" look */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 9999;
  pointer-events: none;
  opacity: 0.035;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23n)'/%3E%3C/svg%3E");
}
:root[data-theme="light"] body::after { opacity: 0.02; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  line-height: 1.55;
  letter-spacing: -0.005em;
  -webkit-font-smoothing: antialiased;
  transition: background 0.2s ease, color 0.2s ease, opacity 0.2s ease;
}

/* Theme toggle */
.theme-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--bg-soft);
  color: var(--text);
  cursor: pointer;
  flex-shrink: 0;
  padding: 0;
  transition: border-color 0.15s ease, transform 0.15s ease, background 0.15s ease;
}
.theme-toggle:hover { border-color: var(--accent); transform: translateY(-1px); }
/* Icons are stacked and cross-faded so the switch reads as one motion. */
.theme-toggle { position: relative; overflow: hidden; }
.theme-toggle svg {
  width: 18px;
  height: 18px;
  grid-area: 1 / 1;
  position: absolute;
  top: 50%;
  left: 50%;
  transition: transform 0.35s cubic-bezier(0.2, 0.7, 0.3, 1), opacity 0.25s ease;
}
.theme-toggle .icon-moon {
  transform: translate(-50%, -50%) rotate(0deg) scale(1);
  opacity: 1;
}
.theme-toggle .icon-sun {
  transform: translate(-50%, -50%) rotate(-90deg) scale(0.4);
  opacity: 0;
}
:root[data-theme="light"] .theme-toggle .icon-moon {
  transform: translate(-50%, -50%) rotate(90deg) scale(0.4);
  opacity: 0;
}
:root[data-theme="light"] .theme-toggle .icon-sun {
  transform: translate(-50%, -50%) rotate(0deg) scale(1);
  opacity: 1;
}
@media (prefers-reduced-motion: reduce) {
  .theme-toggle svg { transition: opacity 0.15s ease; }
}

/* Header hides on scroll down, returns on scroll up */
.site-header {
  transition: transform 0.3s cubic-bezier(0.2, 0.7, 0.3, 1);
}
.site-header.header-hidden { transform: translateY(-100%); }
@media (prefers-reduced-motion: reduce) {
  .site-header { transition: none; }
  .site-header.header-hidden { transform: none; }
}

/* Scroll reveal */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.reveal.in-view {
  opacity: 1;
  transform: translateY(0);
}

/* Card tilt */
.card {
  transform-style: preserve-3d;
  will-change: transform;
}

.container {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 24px;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: color-mix(in srgb, var(--bg) 85%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--header-h);
}

.logo {
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--text);
  text-decoration: none;
  letter-spacing: -0.02em;
  transition: font-weight 0.25s ease;
}
.logo:hover { font-weight: 800; }
.logo span { color: var(--accent); }

.nav {
  display: flex;
  align-items: center;
  gap: 28px;
}
.nav a {
  position: relative;
  color: var(--text-dim);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 500;
  transition: color 0.15s ease, font-weight 0.25s ease;
}
.nav a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -5px;
  height: 2px;
  width: 100%;
  background: var(--accent);
  border-radius: 2px;
  transform: scaleX(0);
  transform-origin: 0 50%;
  transition: transform 0.25s cubic-bezier(0.2, 0.7, 0.3, 1);
}
.nav a:hover { color: var(--text); font-weight: 800; }
.nav a:hover::after,
.nav a:focus-visible::after { transform: scaleX(1); }
@media (prefers-reduced-motion: reduce) {
  .nav a::after { transition: none; }
}

.nav-divider {
  width: 1px;
  height: 20px;
  background: var(--border);
}

/* Burger — desktop hides it, mobile turns .nav into a dropdown panel */
.nav-toggle {
  display: none;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: color-mix(in srgb, var(--bg-soft) 70%, transparent);
  cursor: pointer;
  position: relative;
}
.nav-toggle span {
  position: absolute;
  left: 50%;
  width: 18px;
  height: 2px;
  border-radius: 2px;
  background: var(--text);
  transform: translateX(-50%);
  transition: transform 0.28s cubic-bezier(0.2, 0.7, 0.3, 1), opacity 0.2s ease;
}
.nav-toggle span:nth-child(1) { top: 13px; }
.nav-toggle span:nth-child(2) { top: 19px; }
.nav-toggle span:nth-child(3) { top: 25px; }
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateX(-50%) translateY(6px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateX(-50%) translateY(-6px) rotate(-45deg); }

@media (max-width: 720px) {
  .nav-toggle { display: block; }

  .nav {
    position: fixed;
    top: var(--header-h);
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 8px 20px 20px;
    background: color-mix(in srgb, var(--bg) 92%, transparent);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border);
    transform: translateY(-12px);
    opacity: 0;
    visibility: hidden;
    transition: transform 0.25s cubic-bezier(0.2, 0.7, 0.3, 1), opacity 0.2s ease, visibility 0.25s;
  }
  .nav.open {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
  }
  .nav a {
    font-size: 1.05rem;
    padding: 14px 4px;
    border-bottom: 1px solid var(--border);
  }
  .nav a::after { display: none; }
  .nav-divider { display: none; }
  .nav .theme-toggle { margin-top: 16px; align-self: flex-start; }

  @media (prefers-reduced-motion: reduce) {
    .nav { transition: none; }
    .nav-toggle span { transition: none; }
  }
}

/* Hero */
.hero {
  position: relative;
  padding: 96px 0 72px;
  text-align: center;
  overflow: hidden;
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background: radial-gradient(
    500px circle at var(--spot-x, 50%) var(--spot-y, 30%),
    rgba(57, 255, 138, 0.16),
    transparent 60%
  );
  transition: background 0.1s ease;
}
.hero .container { position: relative; z-index: 1; }

.hero-particles {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}
.hero-particles span {
  position: absolute;
  bottom: -20px;
  left: var(--x, 50%);
  width: var(--s, 3px);
  height: var(--s, 3px);
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 6px 1px var(--accent);
  opacity: 0;
  animation: hero-particle-float var(--dur, 12s) linear infinite;
  animation-delay: var(--delay, 0s);
}
@keyframes hero-particle-float {
  0% { transform: translateY(0) translateX(0); opacity: 0; }
  10% { opacity: 0.7; }
  90% { opacity: 0.25; }
  100% { transform: translateY(-360px) translateX(var(--drift, 20px)); opacity: 0; }
}
:root[data-theme="light"] .hero-particles { display: none; }
@media (prefers-reduced-motion: reduce) {
  .hero-particles { display: none; }
}
.hero-kicker {
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.8rem;
  font-weight: 600;
  margin: 0 0 16px;
}
.hero h1 {
  font-size: clamp(2.2rem, 7vw, 4.8rem);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -0.03em;
  margin: 0 0 20px;
}
.hero-accent {
  color: var(--accent);
  font-weight: 400;
  font-style: italic;
}

/* Section dividers */
.section-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 28px;
  color: var(--text-dim);
}
.section-num {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-dim);
}
.section-line {
  flex: 1;
  height: 1px;
  background: var(--border);
}
.section-label {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}
.hero-sub {
  color: var(--text-dim);
  max-width: 560px;
  margin: 0 auto 32px;
  font-size: 1.05rem;
}

.hero-stats {
  display: flex;
  justify-content: center;
  gap: 48px;
  margin-top: 56px;
  flex-wrap: wrap;
}
.hero-stats div {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}
.hero-stats b {
  font-size: 1.8rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--text);
}
.hero-stats span {
  color: var(--text-dim);
  font-size: 0.85rem;
}

/* Trust bar (filled from live review data) */
.trust-bar {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: center;
  margin-top: 32px;
  padding: 10px 20px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: color-mix(in srgb, var(--bg-soft) 72%, transparent);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  color: var(--text-dim);
  font-size: 0.85rem;
  text-decoration: none;
  transition: border-color 0.2s ease, color 0.2s ease;
}
.trust-bar:hover { border-color: var(--accent); color: var(--text); }
.trust-bar b { color: var(--accent); font-weight: 700; }
.trust-bar i { font-style: normal; opacity: 0.4; }
.trust-bar[hidden] { display: none; }
@media (max-width: 520px) {
  .trust-bar { font-size: 0.78rem; padding: 9px 16px; gap: 7px; }
}

/* Marquee ticker */
.marquee {
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  overflow: hidden;
  padding: 18px 0;
  background: var(--bg-soft);
}
.marquee-track {
  display: flex;
  width: max-content;
  animation: marquee-scroll 28s linear infinite;
}
.marquee:hover .marquee-track,
.marquee:focus-within .marquee-track {
  animation-play-state: paused;
}
.marquee-track a {
  flex-shrink: 0;
  padding: 0 28px;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-dim);
  letter-spacing: 0.02em;
  position: relative;
  text-decoration: none;
  transition: color 0.2s ease, font-weight 0.2s ease;
}
.marquee-track a:hover,
.marquee-track a:focus-visible {
  color: var(--text);
  font-weight: 800;
}
.marquee-track a::after {
  content: "•";
  position: absolute;
  right: -4px;
  color: var(--accent);
}

/* Floating thumbnail that trails the cursor while hovering a marquee link */
.marquee-preview {
  position: fixed;
  top: 0;
  left: 0;
  width: 220px;
  aspect-ratio: 16 / 10;
  border-radius: 14px;
  overflow: hidden;
  pointer-events: none;
  z-index: 9998;
  border: 1px solid var(--border);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.45);
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.92);
  transition: opacity 0.22s ease, transform 0.22s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.marquee-preview.is-visible {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}
.marquee-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
@media (pointer: coarse), (prefers-reduced-motion: reduce) {
  .marquee-preview {
    display: none;
  }
}
@keyframes marquee-scroll {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}
@media (prefers-reduced-motion: reduce) {
  .marquee-track { animation: none; }
}

/* Image fade-in on load */
img.img-fade {
  opacity: 0;
  transition: opacity 0.5s ease;
}
img.img-fade.img-loaded {
  opacity: 1;
}

/* Skeleton placeholder while an image loads */
.is-loading {
  position: relative;
}
.is-loading::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(
    100deg,
    var(--bg-soft) 30%,
    color-mix(in srgb, var(--accent) 7%, var(--bg-soft)) 50%,
    var(--bg-soft) 70%
  );
  background-size: 200% 100%;
  animation: skeleton-sweep 1.4s ease-in-out infinite;
  pointer-events: none;
}
@keyframes skeleton-sweep {
  0% { background-position: 150% 0; }
  100% { background-position: -50% 0; }
}
@media (prefers-reduced-motion: reduce) {
  .is-loading::after { animation: none; }
}

/* Cookie notice */
.cookie-bar {
  position: fixed;
  left: 16px;
  right: 16px;
  bottom: 16px;
  z-index: 200;
  max-width: 640px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  padding: 16px 20px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--bg-soft);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5);
  transform: translateY(140%);
  transition: transform 0.35s cubic-bezier(0.2, 0.7, 0.3, 1);
}
.cookie-bar.show { transform: translateY(0); }
.cookie-bar p {
  margin: 0;
  flex: 1;
  min-width: 220px;
  font-size: 0.85rem;
  line-height: 1.45;
  color: var(--text-dim);
}
.cookie-bar .btn { padding: 9px 20px; font-size: 0.85rem; }
@media (prefers-reduced-motion: reduce) {
  .cookie-bar { transition: none; }
}
@media (max-width: 480px) {
  .cookie-bar { padding: 14px 16px; gap: 12px; }
  .cookie-bar p { font-size: 0.8rem; }
}

/* Reading progress bar (case pages) */
.read-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  width: 100%;
  transform: scaleX(0);
  transform-origin: 0 50%;
  background: var(--accent);
  box-shadow: 0 0 10px color-mix(in srgb, var(--accent) 60%, transparent);
  z-index: 100;
  pointer-events: none;
}

.btn {
  display: inline-block;
  background: var(--accent);
  color: #05070a;
  font-weight: 600;
  text-decoration: none;
  padding: 14px 28px;
  border-radius: 999px;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(57, 255, 138, 0.35);
}
.btn.btn-outline {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text);
  padding: 10px 20px;
  font-size: 0.9rem;
  cursor: pointer;
}
.btn.btn-outline:hover {
  border-color: var(--accent);
  color: var(--accent);
  box-shadow: none;
}

/* Reviews */
.reviews { padding: 0 0 96px; }
.work-reviews { padding: 8px 0 72px; }
.reviews-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
}
.reviews-empty {
  color: var(--text-dim);
  grid-column: 1 / -1;
}
.review-card {
  background: color-mix(in srgb, var(--bg-soft) 72%, transparent);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 22px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.review-card-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}
.review-avatar {
  flex-shrink: 0;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1rem;
  color: #05070a;
  background: linear-gradient(
    135deg,
    hsl(var(--hue, 140) 70% 62%),
    hsl(calc(var(--hue, 140) + 40) 70% 48%)
  );
}
.review-name { font-weight: 700; margin-right: auto; }
.review-stars { color: var(--accent); letter-spacing: 2px; font-size: 0.9rem; }
.review-date { color: var(--text-dim); font-size: 0.78rem; }
.review-project {
  display: inline-block;
  align-self: flex-start;
  color: var(--accent);
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  background: color-mix(in srgb, var(--accent) 12%, transparent);
  padding: 3px 10px;
  border-radius: 999px;
}
.review-text { color: var(--text); font-size: 0.92rem; line-height: 1.5; margin: 0; }
.review-pc {
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 0.85rem;
}
.review-pc b {
  display: block;
  color: var(--text-dim);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 2px;
}
.review-price {
  margin: 4px 0 0;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}
.review-price span {
  display: block;
  color: var(--text-dim);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 3px;
}
.review-price b {
  font-size: 1.05rem;
  color: var(--accent);
}

.review-photo {
  width: 100%;
  border-radius: 10px;
  display: block;
  margin-top: 4px;
}
.review-verified {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 600;
  text-decoration: none;
  margin-top: 4px;
  width: fit-content;
}
.review-verified svg {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
  padding: 2px;
  border-radius: 50%;
  background: color-mix(in srgb, var(--accent) 18%, transparent);
  box-sizing: content-box;
}
.review-verified:hover { text-decoration: underline; }

/* Modal (review form) */
.modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(5, 6, 7, 0.85);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  overflow-y: auto;
}
.modal.open { display: flex; }
.modal-box {
  position: relative;
  background: color-mix(in srgb, var(--bg-soft) 72%, transparent);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px;
  max-width: 480px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  margin: auto;
}
.modal-box h3 {
  margin: 0 0 20px;
  font-size: 1.2rem;
}
.modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  background: none;
  border: none;
  color: var(--text-dim);
  font-size: 1.5rem;
  cursor: pointer;
  line-height: 1;
}
.modal-close:hover { color: var(--text); }

#reviewForm label,
#briefForm label {
  display: block;
  font-size: 0.85rem;
  color: var(--text-dim);
  margin-bottom: 14px;
}
#reviewForm .opt,
#briefForm .opt { font-weight: 400; text-transform: none; letter-spacing: 0; opacity: 0.7; }
#reviewForm input[type="text"],
#reviewForm input[type="number"],
#reviewForm input[type="file"],
#reviewForm select,
#reviewForm textarea,
#briefForm input[type="text"],
#briefForm input[type="email"],
#briefForm input[type="number"],
#briefForm select,
#briefForm textarea {
  display: block;
  width: 100%;
  margin-top: 6px;
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text);
  font-family: inherit;
  font-size: 0.92rem;
  resize: vertical;
}
#reviewForm input:focus,
#reviewForm textarea:focus,
#briefForm input:focus,
#briefForm select:focus,
#briefForm textarea:focus {
  outline: none;
  border-color: var(--accent);
}

.star-picker {
  display: flex;
  gap: 6px;
  margin-top: 6px;
}
.star-picker button {
  background: none;
  border: none;
  font-size: 1.6rem;
  color: var(--border);
  cursor: pointer;
  padding: 0;
  transition: color 0.15s ease, transform 0.15s ease;
}
.star-picker button:hover { transform: scale(1.15); }
.star-picker button.active { color: var(--accent); }

.hp-field {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.review-status {
  margin: 14px 0 0;
  font-size: 0.88rem;
  min-height: 1.2em;
}

/* Brief page */
.brief-section { max-width: 640px; margin: 0 auto 64px; }
.brief-section h2 {
  font-size: 1.05rem;
  margin: 0 0 16px;
  color: var(--text);
}
.type-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 12px;
  margin-bottom: 12px;
}
.type-card {
  display: block;
  cursor: pointer;
}
.type-card input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
}
.type-card span {
  display: block;
  text-align: center;
  padding: 16px 12px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--bg-soft);
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-dim);
  transition: border-color 0.15s ease, color 0.15s ease, background 0.15s ease;
}
.type-card input:checked + span {
  border-color: var(--accent);
  color: var(--text);
  background: color-mix(in srgb, var(--accent) 12%, var(--bg-soft));
}
.type-card:hover span { border-color: var(--accent); }

.brief-type-fields {
  display: none;
  border-top: 1px solid var(--border);
  padding-top: 20px;
  margin-top: 4px;
}
.brief-type-fields.active { display: block; }

.brief-status {
  margin: 14px 0 0;
  font-size: 0.88rem;
  min-height: 1.2em;
}
.brief-status.error { color: #ff8080; }
.brief-status.success { color: var(--accent); }

.brief-estimate {
  margin: 12px 0 0;
  padding: 14px 16px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--bg-soft);
  font-size: 0.9rem;
  line-height: 1.5;
}
.brief-estimate b { color: var(--accent); }
.review-status.error { color: #ff8080; }
.review-status.success { color: var(--accent); }

/* Works */
.works { padding: 40px 0 96px; }
.works-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 32px;
}
.works-head h2 {
  font-size: 1.6rem;
  margin: 0;
  letter-spacing: -0.01em;
}

.filters {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.filter {
  background: var(--bg-soft);
  border: 1px solid var(--border);
  color: var(--text-dim);
  padding: 8px 16px;
  border-radius: 999px;
  font-size: 0.85rem;
  cursor: pointer;
  transition: all 0.15s ease;
}
.filter:hover { color: var(--text); border-color: #3a3f47; }
.filter.active {
  background: var(--accent);
  color: #05070a;
  border-color: var(--accent);
  font-weight: 600;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 24px;
}
@media (min-width: 900px) {
  .grid { grid-template-columns: repeat(3, 1fr); }
  .card-featured { grid-column: span 2; }
  .card-featured .thumb { height: 260px; }
}

.card {
  position: relative;
  /* Semi-transparent + blur so cards sit "on" the background, not over it */
  background: color-mix(in srgb, var(--bg-soft) 72%, transparent);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.2s ease, border-color 0.2s ease;
}
.card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(220px circle at var(--mx, 50%) var(--my, 50%), color-mix(in srgb, var(--accent) 16%, transparent), transparent 60%);
  opacity: 0;
  transition: opacity 0.25s ease;
  pointer-events: none;
  z-index: 3;
}
.card:hover::before { opacity: 1; }
.card:hover {
  transform: translateY(-4px);
  border-color: var(--accent);
}
.card.hidden { display: none; }

.thumb {
  display: block;
  height: 180px;
  background: linear-gradient(135deg, var(--c1), var(--c2));
  position: relative;
  overflow: hidden;
}
.thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.5s cubic-bezier(0.2, 0.7, 0.3, 1);
}
.card:hover .thumb img {
  transform: scale(1.06);
}
@media (prefers-reduced-motion: reduce) {
  .thumb img { transition: none; }
  .card:hover .thumb img { transform: none; }
}
.thumb-mark {
  position: absolute;
  bottom: 14px;
  left: 18px;
  font-weight: 800;
  font-size: 1.4rem;
  letter-spacing: -0.02em;
  color: rgba(255,255,255,0.9);
}

.card-badge {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--accent);
  color: #05070a;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.05rem;
  font-weight: 700;
  box-shadow: 0 4px 16px rgba(57, 255, 138, 0.45);
  transform: scale(0.85) rotate(0deg);
  opacity: 0.9;
  transition: transform 0.2s ease, opacity 0.2s ease;
}
.card:hover .card-badge {
  transform: scale(1) rotate(45deg);
  opacity: 1;
}

.card-body {
  padding: 20px 22px 24px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
}

.tag {
  color: var(--accent);
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.card-body h3 {
  margin: 0;
  font-size: 1.15rem;
  letter-spacing: -0.01em;
  font-weight: 600;
  transition: font-weight 0.25s ease, color 0.25s ease;
}
.card:hover .card-body h3 {
  font-weight: 800;
  color: var(--accent);
}

.card-body p {
  color: var(--text-dim);
  font-size: 0.92rem;
  margin: 0;
  flex: 1;
}

/* Link-buttons get a real outlined shape so they read as buttons */
.card-link {
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--text);
  text-decoration: none;
  font-size: 0.88rem;
  font-weight: 600;
  margin-top: 12px;
  padding: 9px 18px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: color-mix(in srgb, var(--bg) 40%, transparent);
  transition: color 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}
.card-link:hover {
  color: var(--accent);
  border-color: var(--accent);
  background: color-mix(in srgb, var(--accent) 10%, transparent);
}
.card-link svg { transition: transform 0.2s ease; }
.card-link:hover svg { transform: translateX(2px); }

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px 8px 12px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: color-mix(in srgb, var(--bg-soft) 60%, transparent);
  transition: border-color 0.15s ease, color 0.15s ease;
}
.back-link:hover { border-color: var(--accent); }

.card-review {
  font-size: 0.82rem;
  color: var(--text-dim);
  font-style: italic;
  border-left: 2px solid var(--border);
  padding-left: 10px;
  line-height: 1.4;
}
.card-review:empty { display: none; }
.card-review-stars {
  display: block;
  font-style: normal;
  color: var(--accent);
  letter-spacing: 1px;
  font-size: 0.78rem;
  margin-bottom: 2px;
}

/* Footer */
.site-footer {
  position: relative;
  border-top: 1px solid var(--border);
  padding: 64px 0;
  overflow: hidden;
  isolation: isolate;
}
.footer-art {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 52%;
  background-size: cover;
  background-position: center;
  filter: grayscale(1) contrast(1.05);
  opacity: 0.4;
  z-index: -2;
}
.footer-art-left { left: 0; mask-image: linear-gradient(to right, black 40%, transparent 100%); }
.footer-art-right { right: 0; mask-image: linear-gradient(to left, black 40%, transparent 100%); }
.site-footer::before {
  content: "";
  position: absolute;
  inset: 0;
  background: color-mix(in srgb, var(--bg) 55%, transparent);
  z-index: -1;
}
.footer-inner {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 20px;
  background: color-mix(in srgb, var(--bg-soft) 82%, transparent);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px 36px;
  backdrop-filter: blur(6px);
}
.footer-title {
  font-size: 1.3rem;
  font-weight: 700;
  margin: 0 0 4px;
  letter-spacing: -0.01em;
}
.footer-sub {
  color: var(--text-dim);
  margin: 0;
}
.footer-contacts {
  display: flex;
  flex-direction: column;
  gap: 6px;
  text-align: right;
}
.footer-contacts a {
  color: var(--text);
  text-decoration: none;
  font-weight: 600;
}
.footer-contacts a:hover { color: var(--accent); }

.contact-save {
  align-self: flex-end;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
  padding: 9px 16px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-dim);
  font: inherit;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: border-color 0.15s ease, color 0.15s ease;
}
.contact-save:hover { border-color: var(--accent); color: var(--accent); }
.contact-save svg { width: 15px; height: 15px; flex-shrink: 0; }

@media (max-width: 560px) {
  .footer-inner { flex-direction: column; align-items: flex-start; }
  .footer-contacts { text-align: left; }
  .contact-save { align-self: flex-start; }
}

/* Case study pages */
.back-link {
  display: inline-block;
  color: var(--text-dim);
  text-decoration: none;
  font-size: 0.9rem;
  margin: 40px 0 20px;
  transition: color 0.15s ease;
}
.back-link:hover { color: var(--text); }

.work-head {
  padding-bottom: 8px;
}
.work-tag {
  color: var(--accent);
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.work-head h1 {
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  letter-spacing: -0.02em;
  margin: 10px 0 24px;
}
.work-head-avatar {
  display: flex;
  align-items: center;
  gap: 20px;
  background-image: url("assets/about-art.jpg");
  background-size: cover;
  background-position: center;
  border-radius: var(--radius);
  padding: 28px 24px;
}
:root[data-theme="light"] .work-head-avatar { background-image: none; padding: 0; }
.work-head-avatar h1 {
  margin: 6px 0 0;
}
.avatar-photo {
  width: 88px;
  height: 88px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--border);
  flex-shrink: 0;
}
@media (max-width: 600px) {
  .avatar-photo { width: 68px; height: 68px; }
}

.work-cover {
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: var(--radius);
  overflow: hidden;
  background: linear-gradient(135deg, var(--c1, #2d3f5a), var(--c2, #151d28));
  margin-bottom: 40px;
}
.work-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.work-gallery {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 10;
  margin-bottom: 40px;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--bg-soft);
}
.work-gallery img {
  width: 100%;
  display: block;
}
.work-gallery img:first-child {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top;
}
.work-gallery img:not(:first-child) {
  display: none;
}

.gallery-btn {
  position: absolute;
  right: 16px;
  bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(11, 13, 16, 0.75);
  backdrop-filter: blur(6px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: var(--text);
  padding: 10px 16px;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s ease, transform 0.15s ease;
}
.gallery-btn:hover {
  background: rgba(11, 13, 16, 0.92);
  transform: translateY(-2px);
}
.gallery-btn svg { width: 16px; height: 16px; flex-shrink: 0; }

/* Lightbox */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(5, 6, 8, 0.92);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.lightbox.open { display: flex; }

.lightbox-stage {
  position: relative;
  max-width: 1100px;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
}
.lightbox-img-wrap {
  max-width: 100%;
  max-height: calc(100% - 56px);
  overflow: auto;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--bg-soft);

  scrollbar-width: thin;
  scrollbar-color: var(--accent) rgba(255, 255, 255, 0.06);
}
.lightbox-img-wrap img {
  display: block;
  width: 100%;
  height: auto;
  transition: width 0.25s ease;
}
/* Tap/click to zoom: image renders at a larger width and the wrap pans */
.lightbox-img-wrap.zoomed {
  cursor: zoom-out;
  touch-action: pan-x pan-y;
}
.lightbox-img-wrap.zoomed img {
  width: 220%;
  max-width: none;
}
.lightbox-img-wrap.zoomable:not(.zoomed) {
  cursor: zoom-in;
}
.lightbox-zoom-hint {
  position: absolute;
  bottom: 14px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0, 0, 0, 0.65);
  color: #fff;
  font-size: 0.75rem;
  padding: 6px 12px;
  border-radius: 999px;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.3s ease;
}
.lightbox-zoom-hint.show { opacity: 1; }
@media (prefers-reduced-motion: reduce) {
  .lightbox-img-wrap img { transition: none; }
}

/* pretty scrollbar (webkit) */
.lightbox-img-wrap::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}
.lightbox-img-wrap::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.05);
  border-radius: 999px;
}
.lightbox-img-wrap::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, var(--accent), var(--accent-dim));
  border-radius: 999px;
  border: 2px solid var(--bg-soft);
}
.lightbox-img-wrap::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, #7dffb0, var(--accent));
}

.lightbox-close {
  position: fixed;
  top: 18px;
  right: 24px;
  background: rgba(11, 13, 16, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: var(--text);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1001;
}
.lightbox-counter {
  position: fixed;
  top: 26px;
  left: 24px;
  color: var(--text-dim);
  font-size: 0.9rem;
  z-index: 1001;
}

.lightbox-nav {
  position: fixed;
  top: 50%;
  transform: translateY(-50%);
  background: var(--accent);
  border: none;
  color: #05070a;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 1.6rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 18px rgba(57, 255, 138, 0.5);
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
  z-index: 1001;
}
.lightbox-nav:hover {
  background: #7dffb0;
  transform: translateY(-50%) scale(1.08);
  box-shadow: 0 6px 22px rgba(57, 255, 138, 0.7);
}
.lightbox-nav.prev { left: 24px; }
.lightbox-nav.next { right: 24px; }

.lightbox-dots {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: center;
  max-width: 100%;
}
.lightbox-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.25);
  border: none;
  cursor: pointer;
  padding: 0;
  transition: background 0.15s ease, transform 0.15s ease;
}
.lightbox-dot:hover { background: rgba(255, 255, 255, 0.5); }
.lightbox-dot.active {
  background: var(--accent);
  transform: scale(1.3);
}

@media (max-width: 900px) {
  .lightbox-nav.prev { left: 10px; }
  .lightbox-nav.next { right: 10px; }
}

.work-body {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 48px;
  padding-bottom: 80px;
}
@media (max-width: 760px) {
  .work-body { grid-template-columns: 1fr; }
}

.work-body h2 {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  margin: 40px 0 16px;
}
.work-body > div > h2:first-child { margin-top: 0; }
/* First paragraph after a heading reads as a lead-in */
.work-body h2 + p {
  font-size: 1.12rem;
  line-height: 1.6;
  color: var(--text);
}
.work-body p {
  color: var(--text-dim);
  margin: 0 0 20px;
  max-width: 62ch;
}
.work-list {
  margin: 0 0 24px;
  padding-left: 0;
  list-style: none;
  color: var(--text-dim);
  max-width: 62ch;
}
.work-list li {
  position: relative;
  margin-bottom: 12px;
  padding-left: 26px;
  line-height: 1.55;
}
/* Numbered process steps */
.steps {
  list-style: none;
  counter-reset: step;
  margin: 0 0 28px;
  padding: 0;
  max-width: 62ch;
}
.steps li {
  counter-increment: step;
  position: relative;
  padding-left: 52px;
  padding-bottom: 22px;
}
.steps li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: 0;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  border: 1px solid var(--accent);
  color: var(--accent);
  font-family: var(--font-display);
  font-size: 0.82rem;
  font-weight: 700;
  background: color-mix(in srgb, var(--accent) 10%, transparent);
}
/* Connector line between steps */
.steps li::after {
  content: "";
  position: absolute;
  left: 16px;
  top: 36px;
  bottom: 4px;
  width: 1px;
  background: var(--border);
}
.steps li:last-child { padding-bottom: 0; }
.steps li:last-child::after { display: none; }
.steps b {
  display: block;
  color: var(--text);
  font-size: 1rem;
  margin-bottom: 4px;
}
.steps span {
  display: block;
  color: var(--text-dim);
  font-size: 0.93rem;
  line-height: 1.55;
}

/* Public price ranges */
.price-table {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 40px;
}
.price-table div {
  display: grid;
  grid-template-columns: 1fr auto auto;
  align-items: baseline;
  gap: 16px;
  padding: 14px 20px;
  border-top: 1px solid var(--border);
  background: color-mix(in srgb, var(--bg-soft) 55%, transparent);
}
.price-table div:first-child { border-top: none; }
.price-table span { color: var(--text); font-size: 0.92rem; }
.price-table b {
  color: var(--accent);
  font-weight: 700;
  font-size: 0.95rem;
  white-space: nowrap;
}
.price-table i {
  font-style: normal;
  color: var(--text-dim);
  font-size: 0.82rem;
  white-space: nowrap;
  min-width: 82px;
  text-align: right;
}
@media (max-width: 560px) {
  .price-table div {
    grid-template-columns: 1fr auto;
    row-gap: 4px;
  }
  .price-table span { grid-column: 1 / -1; }
  .price-table i { text-align: left; min-width: 0; }
}

/* Compact variant used above the brief form */
.steps-compact {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 18px;
  max-width: none;
  margin-bottom: 36px;
  padding: 20px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: color-mix(in srgb, var(--bg-soft) 60%, transparent);
}
.steps-compact li { padding-bottom: 0; padding-left: 42px; }
.steps-compact li::before { width: 28px; height: 28px; font-size: 0.75rem; }
.steps-compact li::after { display: none; }
.steps-compact b { font-size: 0.92rem; }
.steps-compact span { font-size: 0.85rem; }

.work-list li::before {
  content: "";
  position: absolute;
  left: 4px;
  top: 0.62em;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  opacity: 0.8;
}

.work-side {
  align-self: start;
  background: color-mix(in srgb, var(--bg-soft) 72%, transparent);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
}
.work-side dl { margin: 0; }
.work-side dt {
  color: var(--text-dim);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
}
.work-side dt:first-child { margin-top: 0; padding-top: 0; border-top: none; }
.work-side dd {
  margin: 6px 0 0;
  font-size: 1.05rem;
  font-weight: 600;
  line-height: 1.35;
  color: var(--text);
}
/* A metric worth reading as a number, not prose */
.work-side dd.metric {
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--accent);
}
.work-side .btn {
  display: block;
  text-align: center;
  margin-top: 24px;
  padding: 12px 20px;
}
.work-note {
  color: var(--text-dim);
  font-size: 0.88rem;
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
}

/* Next case navigation */
.next-case {
  display: flex;
  align-items: center;
  gap: 20px;
  text-decoration: none;
  color: var(--text);
  background: color-mix(in srgb, var(--bg-soft) 72%, transparent);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 24px;
  margin: 0 0 64px;
  max-width: 440px;
  transition: border-color 0.15s ease, transform 0.15s ease;
}
.next-case:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
}
.next-case-thumb {
  width: 64px;
  height: 64px;
  object-fit: cover;
  border-radius: 10px;
  flex-shrink: 0;
}
.next-case-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1;
  min-width: 0;
}
.next-case-label {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-dim);
}
.next-case-title {
  font-size: 1.1rem;
  font-weight: 700;
}
.next-case-arrow {
  margin-left: 0;
  flex-shrink: 0;
  transition: transform 0.2s ease;
}
.next-case:hover .next-case-arrow {
  transform: translateX(4px);
}

/* Accessibility: visible keyboard focus */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}
.theme-toggle:focus-visible,
.lightbox-nav:focus-visible,
.lightbox-close:focus-visible,
.card-badge:focus-visible {
  outline-offset: 2px;
}

@media (max-width: 640px) {
  .next-case { padding: 14px 16px; gap: 14px; margin: 0 0 40px; max-width: none; }
  .next-case-thumb { width: 48px; height: 48px; }
  .next-case-title { font-size: 0.98rem; }
}

/* Mobile */
@media (max-width: 640px) {
  .container { padding: 0 16px; }

  :root { --header-h: 56px; }
  .logo { font-size: 1.05rem; }
  .theme-toggle { width: 30px; height: 30px; }
  .theme-toggle svg { width: 15px; height: 15px; }
  .marquee { padding: 12px 0; }
  .marquee-track { animation-duration: 18s; }
  .marquee-track span { padding: 0 18px; font-size: 0.82rem; }

  .hero { padding: 56px 0 48px; }
  .hero-sub { font-size: 0.95rem; }
  .btn { padding: 12px 22px; font-size: 0.95rem; }
  .hero-stats { gap: 28px; margin-top: 36px; }
  .hero-stats b { font-size: 1.4rem; }
  .hero-stats span { font-size: 0.75rem; }

  .works { padding: 24px 0 64px; }
  .works-head h2 { font-size: 1.35rem; }
  .filters { gap: 6px; }
  .filter { padding: 7px 13px; font-size: 0.8rem; }

  .grid { grid-template-columns: 1fr; gap: 18px; }
  .thumb { height: 200px; }

  .site-footer { padding: 32px 0; }
  .footer-title { font-size: 1.15rem; }
  .footer-inner { padding: 22px 20px; }
  .footer-art { width: 65%; opacity: 0.25; }

  .back-link { margin: 24px 0 16px; }
  .work-head h1 { margin: 8px 0 18px; }

  .work-gallery { aspect-ratio: 4 / 3; margin-bottom: 28px; }
  .gallery-btn { font-size: 0.78rem; padding: 8px 12px; right: 10px; bottom: 10px; }
  .gallery-btn svg { width: 14px; height: 14px; }

  .lightbox { padding: 12px; }
  .lightbox-nav { width: 40px; height: 40px; font-size: 1.2rem; }
  .lightbox-nav.prev { left: 8px; }
  .lightbox-nav.next { right: 8px; }
  .lightbox-close { top: 10px; right: 10px; width: 34px; height: 34px; font-size: 1.2rem; }
  .lightbox-counter { top: 16px; left: 10px; font-size: 0.8rem; }

  .work-side { padding: 18px; }
  .work-side .btn { padding: 11px 16px; }
}

/* Arrow icons */
.icon-arrow {
  width: 16px;
  height: 16px;
  display: inline-block;
  vertical-align: -3px;
  margin-left: 7px;
  transition: transform 0.2s ease;
}
.icon-arrow.icon-arrow-left {
  margin-left: 0;
  margin-right: 8px;
}
.gallery-btn:hover .icon-arrow {
  transform: translateX(4px);
}
.back-link:hover .icon-arrow-left {
  transform: translateX(-4px);
}

.icon-site {
  width: 16px;
  height: 16px;
  display: inline-block;
  vertical-align: -3px;
  margin-left: 7px;
  transition: transform 0.2s ease;
}
.card-link:hover .icon-site,
.work-side .btn:hover .icon-site {
  transform: scale(1.15);
}

.icon-arrow-diag,
.icon-site-diag {
  width: 18px;
  height: 18px;
  display: block;
}

/* Page transitions */
body.fading-out {
  opacity: 0;
}
@media (prefers-reduced-motion: reduce) {
  body.fading-out {
    opacity: 1;
  }
}

/* ==========================================================================
   2026 refresh: film grain, custom cursor, magnetic buttons, view transitions
   ========================================================================== */

/* --- Magnetic buttons: JS sets transform on mousemove, this just eases it --- */
.magnetic {
  transition: transform 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
}

/* --- Native cross-document View Transitions between pages --- */
@view-transition {
  navigation: auto;
}
::view-transition-old(root) {
  animation: vt-fade-out 0.36s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}
::view-transition-new(root) {
  animation: vt-fade-in 0.36s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}
@keyframes vt-fade-out {
  to {
    opacity: 0;
    transform: scale(0.99);
  }
}
@keyframes vt-fade-in {
  from {
    opacity: 0;
    transform: scale(1.01);
  }
}
/* The header stays put across navigations instead of crossfading with the rest. */
.site-header {
  view-transition-name: site-header;
}
::view-transition-old(site-header),
::view-transition-new(site-header) {
  animation: none;
  mix-blend-mode: normal;
}
@media (prefers-reduced-motion: reduce) {
  ::view-transition-group(*),
  ::view-transition-old(*),
  ::view-transition-new(*) {
    animation: none !important;
  }
}

/* --- Bento grid: featured spans must not leave gaps in the flow --- */
.grid {
  grid-auto-flow: dense;
}

/* --- Floating "next case" pill: appears once you've scrolled past the
       gallery, before the in-flow .next-case block comes into view --- */
.next-case-float {
  position: fixed;
  right: 24px;
  bottom: 24px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 20px 8px 8px;
  background: color-mix(in srgb, var(--bg-soft) 90%, transparent);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid var(--border);
  border-radius: 999px;
  text-decoration: none;
  color: var(--text);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.35);
  z-index: 40;
  opacity: 0;
  transform: translateY(16px) scale(0.96);
  pointer-events: none;
  transition: opacity 0.3s ease, transform 0.3s cubic-bezier(0.2, 0.8, 0.2, 1), border-color 0.2s ease;
}
.next-case-float.is-visible {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}
.next-case-float:hover {
  border-color: var(--accent);
}
.next-case-float img {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}
.next-case-float b {
  display: block;
  font-size: 0.64rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-dim);
  font-weight: 600;
}
.next-case-float em {
  display: block;
  font-style: normal;
  font-weight: 700;
  font-size: 0.9rem;
}
@media (max-width: 640px), (pointer: coarse), (prefers-reduced-motion: reduce) {
  .next-case-float {
    display: none;
  }
}
