/* Personal Product Studio — design tokens & styles */

:root {
  /* Colors */
  --bg: #13181c;
  --surface: #1a2127;
  --surface-2: #222b32;
  --text: #e8edf0;
  --text-2: #a8b4bd;
  --text-muted: #788792;
  --border: #2d3842;
  --border-strong: #3c4954;
  --accent: #52a39b;
  --accent-deep: #3d817a;
  --accent-hover: #62b5ad;
  --accent-muted: rgba(82, 163, 155, 0.14);
  --accent-border: color-mix(in srgb, var(--accent) 38%, var(--border));
  --accent-ink: #e8edf0;
  --success: #6f9f7a;
  --error: #c97b7b;
  --focus-ring: #52a39b;
  --info: #7a9eb5;

  /* Typography */
  --font: "Onest", system-ui, sans-serif;
  --font-display: "Onest", system-ui, sans-serif;
  --lh-body: 1.6;
  --lh-heading: 1.15;

  /* Spacing */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 24px;
  --space-6: 32px;
  --space-7: 48px;
  --space-8: 64px;
  --space-9: 96px;

  /* Radius */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;

  /* Layout */
  --content-max: 1120px;
  --gutter: clamp(16px, 4vw, 48px);
  --header-h: 64px;

  /* Motion */
  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
  --dur-micro: 150ms;
  --dur-hover: 200ms;
  --dur-menu: 250ms;

  /* Shadow */
  --shadow-soft: 0 8px 24px rgba(0, 0, 0, 0.25);
}

/* Reset */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  color-scheme: dark;
}

[id] {
  scroll-margin-top: calc(var(--header-h) + 16px);
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: 1rem;
  line-height: var(--lh-body);
  color: var(--text);
  background: var(--bg);
  background-image:
    radial-gradient(ellipse 72% 48% at 6% -6%, rgba(82, 163, 155, 0.055), transparent 58%),
    radial-gradient(ellipse 44% 32% at 100% 2%, rgba(34, 43, 50, 0.65), transparent 52%);
  background-attachment: fixed;
  min-height: 100vh;
  overflow-x: hidden;
  touch-action: manipulation;
  -webkit-tap-highlight-color: rgba(82, 163, 155, 0.18);
}

body.nav-open {
  overflow: hidden;
}

img,
svg {
  display: block;
  max-width: 100%;
}

/* Hardened media: real photo is CSS background; no savable <img> under cursor */
img {
  -webkit-user-drag: none;
  user-select: none;
  -webkit-touch-callout: none;
  pointer-events: none;
}

.img-shell {
  display: block;
  width: 100%;
  max-width: 100%;
  background-repeat: no-repeat;
  background-position: center;
  background-size: cover;
  -webkit-user-drag: none;
  user-select: none;
  -webkit-touch-callout: none;
  position: relative;
}

.img-shell::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
}

.photo-frame .img-shell,
.cat-visual .img-shell,
.project-card__media .img-shell,
.case-gallery__item .img-shell {
  height: 100%;
}

.photo-frame::after,
.cat-visual::after,
.project-card__media::after,
.case-gallery__item::after,
.lightbox__figure::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
}

a {
  color: var(--accent);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

a:hover {
  color: var(--accent-hover);
}

:focus-visible {
  outline: 2px solid var(--focus-ring);
  outline-offset: 3px;
}

::selection {
  background: var(--accent-muted);
  color: var(--text);
}

h1,
h2,
h3,
h4 {
  margin: 0;
  line-height: var(--lh-heading);
  font-weight: 600;
  letter-spacing: -0.02em;
  text-wrap: balance;
}

h1 {
  font-family: var(--font-display);
  font-size: clamp(2.25rem, 5vw, 3.5rem);
  font-weight: 600;
  letter-spacing: -0.03em;
}

h2 {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 2.5vw, 2rem);
  font-weight: 600;
}

h3 {
  font-size: 1.2rem;
  letter-spacing: -0.01em;
}

p {
  margin: 0;
  color: var(--text-2);
}

ul,
ol {
  margin: 0;
  padding: 0;
  list-style: none;
}

button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}

/* Layout */
.container {
  width: min(100% - var(--gutter) * 2, var(--content-max));
  margin-inline: auto;
}

.section {
  padding-block: clamp(48px, 8vw, 96px);
}

.section--tight-top {
  padding-top: 0;
}

.section__header {
  max-width: 40rem;
  margin-bottom: var(--space-7);
}

.section__header h2 {
  margin-bottom: var(--space-4);
}

.section__header p {
  font-size: 1.0625rem;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 200;
  padding: var(--space-3) var(--space-4);
  background: var(--accent-deep);
  color: var(--accent-ink);
  font-weight: 600;
  text-decoration: none;
  border-radius: 0 0 var(--radius-sm) 0;
  transform: translateY(-120%);
  transition: transform var(--dur-hover) var(--ease);
}

.skip-link:focus-visible {
  transform: translateY(0);
}

/* Honeypot — off-screen, not display:none */
.hp {
  position: absolute;
  left: -10000px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* Label / role */
.label {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: var(--space-4);
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--header-h);
  background: rgba(21, 26, 30, 0.88);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid transparent;
  transition: border-color var(--dur-hover) var(--ease), box-shadow var(--dur-hover) var(--ease);
}

.site-header.is-scrolled {
  border-bottom-color: var(--border);
  box-shadow: var(--shadow-soft);
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  height: var(--header-h);
  gap: var(--space-4);
  position: relative;
}

.nav-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--text);
  cursor: pointer;
  transition: background var(--dur-hover) var(--ease), border-color var(--dur-hover) var(--ease);
}

.nav-toggle:hover {
  background: var(--surface-2);
  border-color: var(--border-strong);
}

.nav-toggle__icon {
  width: 20px;
  height: 20px;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: var(--space-1);
}

.site-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: var(--space-2) var(--space-3);
  color: var(--text-2);
  text-decoration: none;
  font-size: 0.9375rem;
  font-weight: 500;
  border-radius: var(--radius-sm);
  transition: color var(--dur-hover) var(--ease), background var(--dur-hover) var(--ease);
}

.site-nav a:hover {
  color: var(--text);
  background: var(--surface-2);
}

.site-nav a.is-cta {
  margin-left: var(--space-2);
  background: var(--accent-deep);
  color: var(--accent-ink);
  font-weight: 600;
}

.site-nav a.is-cta:hover {
  background: var(--accent);
  color: var(--accent-ink);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  min-height: 44px;
  padding: 0 var(--space-5);
  border-radius: var(--radius-md);
  border: 1px solid transparent;
  font-size: 0.9375rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition:
    background var(--dur-hover) var(--ease),
    border-color var(--dur-hover) var(--ease),
    color var(--dur-hover) var(--ease),
    transform var(--dur-micro) var(--ease);
}

.btn:active:not(:disabled) {
  transform: translateY(1px);
}

.btn:disabled,
.btn[aria-disabled="true"] {
  opacity: 0.5;
  cursor: not-allowed;
  pointer-events: none;
}

.btn--primary {
  background: var(--accent-deep);
  color: var(--accent-ink);
}

.btn--primary:hover {
  background: var(--accent);
  color: var(--accent-ink);
}

.btn--secondary {
  background: transparent;
  border-color: var(--border);
  color: var(--text);
}

.btn--secondary:hover {
  background: var(--surface-2);
  border-color: var(--border-strong);
  color: var(--text);
}

.btn-group {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
}

/* Cards */
.card {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  height: 100%;
  padding: var(--space-5);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  text-decoration: none;
  color: inherit;
  transition:
    background var(--dur-hover) var(--ease),
    border-color var(--dur-hover) var(--ease);
}

.card:hover {
  background: var(--surface-2);
  border-color: var(--border-strong);
  color: inherit;
}

.card:focus-visible {
  outline-offset: 2px;
}

.card__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  background: var(--accent-muted);
  color: var(--accent);
  flex-shrink: 0;
}

.card__icon svg {
  width: 24px;
  height: 24px;
}

.card__title {
  color: var(--text);
}

.card__text {
  font-size: 0.9375rem;
  line-height: 1.55;
  color: var(--text-2);
  flex-grow: 1;
}

.card__action {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  margin-top: var(--space-2);
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--accent);
}

.card__action svg {
  width: 16px;
  height: 16px;
  transition: transform var(--dur-hover) var(--ease);
}

.card:hover .card__action svg {
  transform: translateX(3px);
}

.card--static:hover {
  transform: none;
  background: var(--surface);
  border-color: var(--border);
}

.card--link {
  cursor: pointer;
}

/* Grids */
.grid {
  display: grid;
  gap: var(--space-5);
}

.grid--portfolio {
  grid-template-columns: repeat(3, 1fr);
}

.grid--projects {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-5);
  align-items: stretch;
}

.grid--projects:has(> :only-child) {
  grid-template-columns: minmax(0, 320px);
}

/* Hero */
.hero {
  padding-block: clamp(32px, 5vw, 56px) clamp(40px, 6vw, 72px);
}

.hero + .section:not(.section--statement) {
  padding-top: 0;
}

.hero__grid {
  display: grid;
  grid-template-columns: 1fr 1.05fr;
  gap: clamp(32px, 6vw, 64px);
  align-items: center;
}

.hero__content {
  animation: hero-in 0.6s var(--ease) both;
}

.hero__media {
  animation: hero-in 0.6s var(--ease) 0.1s both;
}

.hero h1 {
  margin-bottom: var(--space-3);
}

.hero__status {
  margin: 0 0 var(--space-4);
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--accent);
  letter-spacing: 0.01em;
}

.hero__positioning {
  font-size: clamp(1.125rem, 2vw, 1.3rem);
  font-weight: 500;
  color: var(--text-2);
  margin-bottom: var(--space-4);
  line-height: 1.5;
  max-width: 34rem;
}

.hero__note {
  margin: 0 0 var(--space-6);
  padding: var(--space-3) var(--space-4);
  background: var(--accent-muted);
  border-radius: var(--radius-sm);
  font-size: 0.975rem;
  font-weight: 500;
  line-height: 1.55;
  color: var(--text);
  max-width: 28rem;
}

.hero__stage {
  position: relative;
  max-width: 520px;
  margin-inline: auto;
}

.photo-frame {
  position: relative;
  aspect-ratio: 4 / 5;
  width: 100%;
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--surface);
  z-index: 1;
  box-shadow: 0 20px 44px rgba(0, 0, 0, 0.32);
}

.photo-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 42% 18%;
}

@keyframes hero-in {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* About — Quiet Editorial */
.section--statement {
  padding-block: clamp(36px, 5vw, 56px);
  background: var(--surface);
  border-block: 1px solid var(--border);
}

.about__layout {
  display: grid;
  grid-template-columns: minmax(7.5rem, 0.22fr) minmax(0, 1fr);
  gap: clamp(24px, 4vw, 52px);
  align-items: start;
}

.about__aside {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

.about__aside > h2 {
  margin: 0;
}

.about__mark {
  display: block;
  width: 2.5rem;
  height: 3px;
  border-radius: 999px;
  background: var(--accent);
}

.about__copy {
  max-width: 46rem;
}

.about__lead {
  margin: 0 0 var(--space-5);
  font-family: var(--font-display);
  font-size: clamp(1.2rem, 2.2vw, 1.45rem);
  font-weight: 500;
  line-height: 1.5;
  letter-spacing: -0.02em;
  color: var(--text);
}

.about__pull {
  color: var(--accent);
  font-weight: 600;
}

.about__body {
  margin: 0;
  max-width: 44rem;
  font-size: 1.0625rem;
  font-weight: 400;
  line-height: 1.65;
  color: var(--text-2);
}

/* Services — equal compact list */
.services-more {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0;
  border-top: 1px solid var(--border);
}

.services-more__item {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: var(--space-3) var(--space-4);
  align-items: start;
  padding: var(--space-5) var(--space-4);
  border-bottom: 1px solid var(--border);
  transition: background var(--dur-hover) var(--ease);
}

.services-more__item:nth-child(odd) {
  border-right: 1px solid var(--border);
}

.services-more__item:hover {
  background: rgba(34, 43, 50, 0.45);
}

.services-more__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  margin-top: 2px;
  color: var(--accent);
  flex-shrink: 0;
}

.services-more__icon svg {
  width: 20px;
  height: 20px;
}

.services-more__copy {
  min-width: 0;
}

.services-more__title {
  margin: 0 0 var(--space-2);
  font-size: 1.05rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--text);
}

.services-more__text {
  margin: 0;
  font-size: 0.9375rem;
  line-height: 1.55;
  color: var(--text-muted);
  max-width: 38ch;
}

/* Portfolio showcase — editorial layout */
.portfolio-showcase {
  display: flex;
  flex-direction: column;
  gap: var(--space-5);
}

.portfolio-showcase__row {
  display: grid;
  grid-template-columns: 1.35fr 0.85fr;
  gap: var(--space-5);
}

.portfolio-showcase__row--reverse {
  grid-template-columns: 0.85fr 1.35fr;
}

.portfolio-piece {
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: inherit;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition:
    border-color var(--dur-hover) var(--ease),
    background var(--dur-hover) var(--ease);
}

.portfolio-piece:hover {
  border-color: var(--border-strong);
  background: var(--surface-2);
  color: inherit;
}

.portfolio-piece:focus-visible {
  outline: 2px solid var(--focus-ring);
  outline-offset: 3px;
}

.portfolio-piece--lead {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  align-items: stretch;
}

.portfolio-piece--lead .portfolio-piece__visual {
  aspect-ratio: auto;
  min-height: 280px;
}

.portfolio-piece--lead .portfolio-piece__copy {
  justify-content: center;
  padding: clamp(24px, 4vw, 40px);
}

.portfolio-piece__visual {
  position: relative;
  aspect-ratio: 16 / 10;
  background: var(--surface-2);
  overflow: hidden;
  flex-shrink: 0;
}

.portfolio-piece__visual--quiet {
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(155deg, #1c242a 0%, #151b20 100%);
}

.portfolio-piece__image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  display: block;
  transition: filter var(--dur-hover) var(--ease);
}

.portfolio-piece:hover .portfolio-piece__image,
.portfolio-piece:hover .portfolio-piece__visual .img-shell {
  filter: brightness(1.07);
}

.portfolio-piece__placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  color: var(--text-muted);
  opacity: 0.42;
}

.portfolio-piece__placeholder svg {
  width: 28px;
  height: 28px;
}

.portfolio-piece__copy {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  padding: var(--space-4) var(--space-5) var(--space-5);
  flex: 1 1 auto;
  min-width: 0;
}

.portfolio-piece__head {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
}

.portfolio-piece__title {
  margin: 0;
  min-width: 0;
  font-size: clamp(1.05rem, 1.8vw, 1.2rem);
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--text);
}

.portfolio-piece--lead .portfolio-piece__title {
  font-size: clamp(1.25rem, 2.4vw, 1.6rem);
}

.portfolio-piece__desc {
  margin: 0;
  font-size: 0.9375rem;
  line-height: 1.55;
  color: var(--text-2);
  flex-grow: 1;
}

.portfolio-piece:hover .card__go {
  color: var(--accent);
  transform: translateX(3px);
  opacity: 1;
  background: var(--accent-muted);
}

.photo-frame .img-shell,
.portfolio-piece__visual .img-shell {
  height: 100%;
}

.portfolio-piece__visual::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
}

/* Services index (legacy — portfolio subpages) */
.service-index {
  list-style: none;
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--border);
}

.service-index__item {
  display: grid;
  grid-template-columns: auto minmax(11rem, 0.4fr) 1fr;
  gap: var(--space-4) var(--space-5);
  align-items: start;
  padding: 30px 14px;
  margin-inline: -14px;
  border-bottom: 1px solid var(--border);
  border-radius: var(--radius-md);
  transition:
    background var(--dur-hover) var(--ease),
    border-color var(--dur-hover) var(--ease),
    translate var(--dur-hover) var(--ease);
}

.service-index__item:hover {
  background: rgba(36, 44, 51, 0.35);
  translate: 3px 0;
}

.service-index__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  margin-top: 8px;
  color: var(--accent);
  flex-shrink: 0;
}

.service-index__icon svg {
  width: 20px;
  height: 20px;
}

.service-index__title {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(1.0625rem, 1.6vw, 1.2rem);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.35;
  color: var(--text);
  padding-top: 8px;
}

.service-index__item--focus .service-index__title {
  font-size: clamp(1.2rem, 2vw, 1.35rem);
  font-weight: 600;
}

.service-index__text {
  margin: 0;
  font-size: 0.975rem;
  line-height: 1.55;
  color: var(--text-2);
  max-width: 36rem;
  padding-top: 8px;
}

.placeholder-text {
  color: var(--text-muted);
  font-style: italic;
}

/* Contact */
.contact__layout {
  display: grid;
  grid-template-columns: minmax(240px, 1fr) minmax(300px, 1fr);
  gap: clamp(24px, 4vw, 48px);
  align-items: start;
  max-width: 880px;
  margin-inline: auto;
}

.contact__intro {
  max-width: none;
  padding-top: var(--space-2);
}

.contact__intro h2 {
  margin-bottom: var(--space-3);
}

.contact__intro .about__mark {
  margin-bottom: var(--space-4);
}

.contact__lead {
  margin-bottom: var(--space-5);
  max-width: 34ch;
  font-size: 1rem;
  line-height: 1.55;
  color: var(--text-2);
}

.social-list {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  gap: var(--space-2);
  width: 100%;
}

.social-item {
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  gap: var(--space-3);
  flex: 1 1 0;
  min-width: 0;
  min-height: 44px;
  padding: 8px 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  font-size: 0.875rem;
  font-weight: 500;
}

.social-item__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 1.25rem;
  height: 1.25rem;
  color: var(--accent);
  flex-shrink: 0;
}

.social-item__icon svg {
  width: 100%;
  height: 100%;
  display: block;
}

.social-item[href] {
  text-decoration: none;
  color: var(--text);
  transition: background var(--dur-hover) var(--ease), border-color var(--dur-hover) var(--ease);
}

.social-item[href]:hover {
  background: var(--surface-2);
  border-color: var(--border-strong);
  color: var(--text);
}

.social-item[aria-disabled="true"] {
  cursor: default;
}

/* Form */
.form-card {
  position: relative;
  padding: var(--space-5);
  background: transparent;
  border: 1px solid var(--accent-border);
  border-radius: var(--radius-md);
}

.form-field {
  margin-bottom: var(--space-5);
}

.form-field:last-of-type {
  margin-bottom: var(--space-6);
}

.form-field--consent {
  margin-bottom: var(--space-5);
}

.consent {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  cursor: pointer;
  font-size: 0.875rem;
  line-height: 1.45;
  color: var(--text-2);
  user-select: none;
}

.consent input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
  margin: 0;
  pointer-events: none;
}

.consent__box {
  flex-shrink: 0;
  width: 1.125rem;
  height: 1.125rem;
  margin-top: 0.1rem;
  border: 1px solid var(--accent-border);
  border-radius: 0.25rem;
  background: var(--bg);
  transition:
    border-color var(--dur-hover) var(--ease),
    background var(--dur-hover) var(--ease),
    box-shadow var(--dur-hover) var(--ease);
}

.consent__box::after {
  content: "";
  display: block;
  width: 100%;
  height: 100%;
  background: no-repeat center / 0.7rem
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230B1418' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E");
  opacity: 0;
  transform: scale(0.85);
  transition: opacity var(--dur-hover) var(--ease), transform var(--dur-hover) var(--ease);
}

.consent input:checked + .consent__box {
  background: var(--accent);
  border-color: var(--accent);
}

.consent input:checked + .consent__box::after {
  opacity: 1;
  transform: scale(1);
}

.consent input:focus-visible + .consent__box {
  box-shadow: 0 0 0 3px var(--accent-muted);
  border-color: var(--accent);
}

.form-field--consent.has-error .consent__box {
  border-color: var(--error);
}

.consent__link {
  color: var(--text);
  text-decoration: underline;
  text-underline-offset: 0.15em;
  text-decoration-thickness: 1px;
}

.consent__link:hover {
  color: var(--accent);
}

.form-label {
  display: block;
  margin-bottom: var(--space-2);
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text);
}

.form-hint {
  display: block;
  margin-top: var(--space-2);
  font-size: 0.8125rem;
  color: var(--text-muted);
}

.form-control {
  width: 100%;
  min-height: 44px;
  padding: 0.65rem 0.9rem;
  background: var(--bg);
  border: 1px solid var(--accent-border);
  border-radius: var(--radius-sm);
  color: var(--text);
  transition: border-color var(--dur-hover) var(--ease), background var(--dur-hover) var(--ease);
}

.form-control::placeholder {
  color: var(--text-muted);
}

.form-control:hover:not(:disabled):not(:focus) {
  border-color: var(--accent-deep);
}

.form-control:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-muted);
}

.form-control.is-error {
  border-color: var(--error);
}

.form-control.is-error:focus {
  box-shadow: 0 0 0 3px rgba(201, 123, 123, 0.2);
}

.form-control:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

textarea.form-control {
  min-height: 120px;
  resize: vertical;
  padding-top: 0.75rem;
  line-height: 1.5;
}

select.form-control {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%237A8791' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 40px;
}

/* Custom select — Quiet Editorial */
.select {
  position: relative;
}

.select__trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  width: 100%;
  min-height: 44px;
  padding: 0.65rem 0.9rem;
  background: var(--bg);
  border: 1px solid var(--accent-border);
  border-radius: var(--radius-sm);
  color: var(--text);
  text-align: left;
  cursor: pointer;
  transition:
    border-color var(--dur-hover) var(--ease),
    background var(--dur-hover) var(--ease),
    box-shadow var(--dur-hover) var(--ease);
}

.select__trigger:hover {
  border-color: var(--accent-deep);
}

.select__trigger:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-muted);
}

.select__trigger[aria-expanded="true"] {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-muted);
}

.select__trigger.is-error {
  border-color: var(--error);
}

.select__trigger.is-error:focus,
.select__trigger.is-error[aria-expanded="true"] {
  box-shadow: 0 0 0 3px rgba(201, 123, 123, 0.2);
}

.select__value {
  flex: 1 1 auto;
  min-width: 0;
  font-weight: 500;
  text-align: left;
}

.select__value.is-placeholder {
  color: var(--text-muted);
  font-weight: 400;
}

.select__chevron {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  color: var(--text-muted);
  transition: transform var(--dur-hover) var(--ease), color var(--dur-hover) var(--ease);
}

.select__trigger[aria-expanded="true"] .select__chevron {
  transform: rotate(180deg);
  color: var(--accent);
}

.select__menu {
  position: absolute;
  z-index: 40;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-md);
  box-shadow: 0 16px 40px rgba(8, 10, 12, 0.45);
  overflow: hidden;
}

.select__list {
  margin: 0;
  padding: 6px;
  list-style: none;
  max-height: min(280px, 50vh);
  overflow-x: hidden;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--accent-deep) transparent;
}

.select__list::-webkit-scrollbar {
  width: 8px;
}

.select__list::-webkit-scrollbar-button {
  display: none;
  width: 0;
  height: 0;
}

.select__list::-webkit-scrollbar-track {
  margin: 8px 0;
  background: transparent;
}

.select__list::-webkit-scrollbar-thumb {
  background: var(--accent-deep);
  border-radius: 999px;
  border: 2px solid var(--surface);
  background-clip: padding-box;
}

.select__list::-webkit-scrollbar-thumb:hover {
  background: var(--accent);
  border: 2px solid var(--surface);
  background-clip: padding-box;
}

.select__option {
  display: block;
  width: 100%;
  padding: 0.7rem 0.85rem;
  border: 0;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--text-2);
  text-align: left;
  font: inherit;
  font-weight: 500;
  cursor: pointer;
  transition:
    background var(--dur-hover) var(--ease),
    color var(--dur-hover) var(--ease);
}

.select__option:hover,
.select__option.is-active {
  background: var(--accent-muted);
  color: var(--text);
}

.select__option[aria-selected="true"] {
  color: var(--accent);
  background: var(--accent-muted);
}

.select__option[aria-selected="true"]::after {
  content: "";
  float: right;
  width: 6px;
  height: 6px;
  margin-top: 0.45em;
  border-radius: 50%;
  background: var(--accent);
}

.form-error {
  display: none;
  margin-top: var(--space-2);
  font-size: 0.8125rem;
  color: var(--error);
}

.form-field.has-error .form-error {
  display: block;
}

.form-status {
  display: none;
  margin-top: var(--space-4);
  padding: var(--space-4);
  border-radius: var(--radius-sm);
  font-size: 0.9375rem;
  line-height: 1.5;
}

.form-status.is-visible {
  display: block;
}

.form-status--info {
  background: rgba(122, 158, 181, 0.12);
  border: 1px solid rgba(122, 158, 181, 0.35);
  color: var(--text);
}

.form-status--success {
  background: rgba(111, 159, 122, 0.12);
  border: 1px solid rgba(111, 159, 122, 0.35);
  color: var(--text);
}

.form-status--error {
  background: rgba(201, 123, 123, 0.12);
  border: 1px solid rgba(201, 123, 123, 0.35);
  color: var(--text);
}

.btn.is-loading {
  position: relative;
  color: transparent;
  pointer-events: none;
}

.btn.is-loading::after {
  content: "";
  position: absolute;
  width: 18px;
  height: 18px;
  border: 2px solid var(--accent-ink);
  border-right-color: transparent;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* Portfolio page */
.page-hero {
  padding-block: clamp(32px, 6vw, 56px) clamp(24px, 4vw, 40px);
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  margin-bottom: var(--space-5);
  color: var(--text-2);
  text-decoration: none;
  font-size: 0.9375rem;
  font-weight: 500;
  min-height: 44px;
}

.back-link:hover {
  color: var(--text);
}

.back-link svg {
  width: 18px;
  height: 18px;
}

.page-hero h1 {
  margin-bottom: var(--space-4);
  color: var(--accent);
}

.page-hero p {
  max-width: 36rem;
  font-size: 1.0625rem;
}

.legal {
  max-width: 42rem;
}

.legal__meta {
  margin-bottom: var(--space-6);
  font-size: 0.875rem;
  color: var(--text-muted);
}

.legal h3 {
  margin: var(--space-7) 0 var(--space-3);
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--text);
}

.legal h3:first-of-type {
  margin-top: 0;
}

.legal p,
.legal li {
  color: var(--text-2);
  font-size: 0.9375rem;
  line-height: 1.65;
}

.legal p {
  margin-bottom: var(--space-3);
}

.legal ul {
  margin: 0 0 var(--space-4);
  padding-left: 1.25rem;
}

.legal li {
  margin-bottom: var(--space-2);
}

.legal a {
  color: var(--text);
  text-decoration: underline;
  text-underline-offset: 0.15em;
}

.legal a:hover {
  color: var(--accent);
}

.empty-state {
  padding: var(--space-8) var(--space-5);
  text-align: center;
  background: var(--surface);
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius-md);
}

.empty-state p {
  max-width: 28rem;
  margin-inline: auto;
}

.project-card {
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow: hidden;
  padding: 0;
}

.project-card__media {
  aspect-ratio: 16 / 10;
  flex-shrink: 0;
  background: var(--surface-2);
  border-bottom: 1px solid var(--border);
  overflow: hidden;
  color: var(--text-muted);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  display: flex;
  align-items: center;
  justify-content: center;
}

.project-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 38%;
  display: block;
  transition: filter var(--dur-hover) var(--ease);
}

.project-card:hover .project-card__media img,
.project-card:hover .project-card__media .img-shell {
  filter: brightness(1.06);
}

.project-card__media img[src*="quest-bot"],
.cat-visual__image[src*="quest-bot"] {
  object-fit: cover;
  object-position: center top;
}

.project-card__body {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  padding: 16px 18px 18px;
  flex: 1 1 auto;
  min-height: 8.5rem;
}

.project-card .card__title {
  font-size: 1.05rem;
}

.project-card .card__text {
  flex-grow: 1;
  margin: 0;
}

.project-card .card__action {
  margin-top: auto;
}

/* Case gallery + lightbox */
.case-gallery__heading {
  margin: 0 0 var(--space-3);
}

.case-gallery__lead {
  margin: 0 0 var(--space-6);
  max-width: 36rem;
}

.case-gallery {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--space-5);
  max-width: 920px;
  margin-inline: auto;
  justify-items: center;
}

.case-gallery__item {
  display: block;
  padding: 0;
  margin: 0;
  width: 100%;
  max-width: 260px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--surface-2);
  cursor: zoom-in;
  transition:
    border-color var(--dur-hover) var(--ease),
    background var(--dur-hover) var(--ease);
}

.case-gallery__item:hover {
  border-color: var(--border-strong);
}

/* Page thumbs: slightly smaller, full frame (no side crop) */
.case-gallery__item img {
  width: 100%;
  height: auto;
  max-height: 420px;
  object-fit: contain;
  object-position: top center;
  display: block;
  margin-inline: auto;
  background: var(--surface-2);
}

/* Third shot is wider — keep more breathing room so text isn’t clipped */
.case-gallery__item:nth-child(3) {
  max-width: 232px;
}

.case-gallery__item:nth-child(3) img {
  max-height: 380px;
}

body.lightbox-open {
  overflow: hidden;
}

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-5);
}

.lightbox[hidden] {
  display: none;
}

.lightbox__backdrop {
  position: absolute;
  inset: 0;
  border: 0;
  padding: 0;
  margin: 0;
  background: rgba(8, 10, 12, 0.82);
  cursor: pointer;
}

.lightbox__panel {
  position: relative;
  z-index: 1;
  width: min(100%, 520px);
  max-height: min(92vh, 920px);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-3);
}

.lightbox__figure {
  position: relative;
  width: 100%;
  max-height: min(84vh, 860px);
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background: var(--surface);
  overflow: hidden;
}

.lightbox__image {
  display: block;
  width: 100%;
  height: min(84vh, 860px);
  background-repeat: no-repeat;
  background-position: center top;
  background-size: contain;
}

.lightbox__close {
  position: absolute;
  top: -8px;
  right: -8px;
  z-index: 2;
  width: 44px;
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
}

.lightbox__close:hover {
  background: var(--surface-2);
  border-color: var(--border-strong);
}

.lightbox__close svg {
  width: 20px;
  height: 20px;
}

.lightbox__nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
}

.lightbox__nav:hover {
  background: var(--surface-2);
  border-color: var(--border-strong);
}

.lightbox__nav svg {
  width: 20px;
  height: 20px;
}

.lightbox__nav--prev {
  left: -56px;
}

.lightbox__nav--next {
  right: -56px;
}

.lightbox__counter {
  margin: 0;
  font-size: 0.875rem;
  color: var(--text-muted);
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--border);
  padding-block: var(--space-6);
  margin-top: auto;
}

.site-footer__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4) var(--space-6);
}

.site-footer__copy {
  margin: 0;
  font-size: 0.875rem;
  color: var(--text-muted);
}

.site-footer__links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem 1.15rem;
}

.site-footer__links a {
  font-size: 0.875rem;
  color: var(--text-2);
  text-decoration: none;
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  transition: color var(--dur-hover) var(--ease);
}

.site-footer__links a:hover {
  color: var(--text);
}

.site-footer__ext {
  margin-left: 0.65rem;
}

/* Portfolio category visual */
.cat-visual {
  position: relative;
  aspect-ratio: 16 / 10;
  border-bottom: 1px solid var(--border);
  background: var(--surface-2);
  overflow: hidden;
  border-radius: var(--radius-md) var(--radius-md) 0 0;
}

.cat-visual__image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  display: block;
  transition: filter var(--dur-hover) var(--ease);
}

.cat-preview {
  position: absolute;
  inset: 0;
}

.cat-preview--quiet {
  display: flex;
  align-items: center;
  justify-content: center;
  background:
    linear-gradient(160deg, #1a2127 0%, #151b20 55%, #12171b 100%);
}

.cat-preview__glyph {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  color: var(--text-muted);
  opacity: 0.38;
}

.cat-preview__glyph svg {
  width: 28px;
  height: 28px;
}

.card--portfolio:hover .cat-visual__image,
.card--portfolio:hover .cat-visual .img-shell {
  filter: brightness(1.06);
}

.card--portfolio:hover {
  border-color: var(--border-strong);
  background: var(--surface);
}

.card--portfolio:hover .card__go {
  color: var(--accent);
  transform: translateX(3px);
  opacity: 1;
  background: var(--accent-muted);
}

.card--portfolio {
  padding: 0;
  overflow: hidden;
}

.card--portfolio .card__body {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  padding: 14px 18px;
  flex-grow: 0;
}

.card--portfolio .card__title {
  font-size: 1rem;
  margin: 0;
  font-weight: 600;
}

.card__go {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  opacity: 0.7;
  flex-shrink: 0;
  transition:
    color var(--dur-hover) var(--ease),
    transform var(--dur-hover) var(--ease),
    opacity var(--dur-hover) var(--ease),
    background var(--dur-hover) var(--ease);
}

.card__go svg {
  width: 16px;
  height: 16px;
}

/* Responsive */
@media (max-width: 1024px) {
  .grid--portfolio {
    grid-template-columns: repeat(2, 1fr);
  }

  .portfolio-piece--lead {
    grid-template-columns: 1fr;
  }

  .portfolio-showcase__row,
  .portfolio-showcase__row--reverse {
    grid-template-columns: 1fr;
  }

  .about__layout {
    grid-template-columns: 1fr;
    gap: var(--space-4);
  }

  .service-index__item {
    grid-template-columns: auto 1fr;
    gap: var(--space-3) var(--space-4);
    padding: 24px 10px;
    margin-inline: -10px;
  }

  .service-index__text {
    grid-column: 2;
  }

  .hero__grid {
    grid-template-columns: 1fr 0.9fr;
    gap: var(--space-5);
  }
}

@media (max-width: 768px) {
  .nav-toggle {
    display: inline-flex;
  }

  .site-nav {
    position: fixed;
    inset: var(--header-h) 0 0 0;
    flex-direction: column;
    align-items: stretch;
    gap: var(--space-2);
    padding: var(--space-5) var(--gutter);
    background: var(--bg);
    border-top: 1px solid var(--border);
    transform: translateX(100%);
    opacity: 0;
    visibility: hidden;
    transition:
      transform var(--dur-menu) var(--ease),
      opacity var(--dur-menu) var(--ease),
      visibility var(--dur-menu) var(--ease);
    overflow-y: auto;
  }

  .site-nav.is-open {
    transform: translateX(0);
    opacity: 1;
    visibility: visible;
  }

  .site-nav a {
    min-height: 48px;
    padding: var(--space-3) var(--space-4);
    font-size: 1.0625rem;
    border: 1px solid var(--border);
    background: var(--surface);
  }

  .site-nav a.is-cta {
    margin-left: 0;
    margin-top: var(--space-2);
    justify-content: center;
  }

  .hero__grid {
    grid-template-columns: 1fr;
  }

  .hero__media {
    order: 1;
  }

  .hero__content {
    order: 0;
  }

  .hero .btn-group {
    order: 2;
  }

  .hero__content .btn-group {
    display: none;
  }

  .hero__cta-mobile {
    display: flex;
    margin-top: var(--space-5);
  }

  .photo-frame {
    max-width: none;
  }

  .hero__stage {
    max-width: 360px;
  }

  .hero__note {
    max-width: none;
  }

  .services-more {
    grid-template-columns: 1fr;
  }

  .services-more__item:nth-child(odd) {
    border-right: 0;
  }

  .service-index__item {
    grid-template-columns: auto 1fr;
    gap: var(--space-3) var(--space-4);
    padding: 22px 8px;
    margin-inline: -8px;
  }

  .service-index__text {
    grid-column: 2;
  }

  .service-index__item:hover {
    background: rgba(36, 44, 51, 0.35);
  }

  .site-footer__inner {
    flex-direction: column;
    align-items: flex-start;
  }

  .site-footer__ext {
    margin-left: 0.35rem;
  }

  .contact__layout {
    grid-template-columns: 1fr;
    max-width: none;
  }

  .contact__intro > p,
  .contact__lead {
    max-width: none;
  }

  .social-list {
    flex-wrap: wrap;
  }

  .social-item {
    flex: 1 1 calc(50% - 4px);
    min-width: 140px;
  }

  .card--portfolio .card__body {
    flex-wrap: wrap;
  }

  .grid--portfolio,
  .grid--projects {
    grid-template-columns: 1fr;
  }

  .case-gallery {
    grid-template-columns: 1fr;
    max-width: 280px;
  }

  .case-gallery__item,
  .case-gallery__item:nth-child(3) {
    max-width: 280px;
  }

  .case-gallery__item img,
  .case-gallery__item:nth-child(3) img {
    max-height: 460px;
  }

  .lightbox__nav--prev {
    left: 8px;
  }

  .lightbox__nav--next {
    right: 8px;
  }

  .lightbox__close {
    right: 8px;
    top: 8px;
  }

  .grid--projects:has(> :only-child) {
    grid-template-columns: minmax(0, 320px);
  }
}

@media (min-width: 769px) {
  .hero__cta-mobile {
    display: none;
  }
}

@media (max-width: 430px) {
  .btn-group {
    flex-direction: column;
  }

  .btn-group .btn {
    width: 100%;
  }

  .photo-frame {
    max-width: 100%;
  }

  .hero__stage {
    max-width: 100%;
  }
}

/* Scroll reveal — calm section entrance */
.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition:
    opacity 0.5s var(--ease),
    transform 0.5s var(--ease);
  transition-delay: var(--reveal-delay, 0ms);
  will-change: opacity, transform;
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
  will-change: auto;
}

/* Keep service hover shift (translate) while reveal uses transform */
.service-index__item.reveal {
  transition:
    opacity 0.5s var(--ease),
    transform 0.5s var(--ease),
    background var(--dur-hover) var(--ease),
    border-color var(--dur-hover) var(--ease),
    translate var(--dur-hover) var(--ease);
  transition-delay: var(--reveal-delay, 0ms);
}

.service-index__item.reveal.is-visible {
  transition-delay: 0ms;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .hero__content,
  .hero__media {
    animation: none;
  }

  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .card--portfolio:hover .cat-visual__image,
  .card--portfolio:hover .cat-visual .img-shell,
  .portfolio-piece:hover .portfolio-piece__image,
  .portfolio-piece:hover .portfolio-piece__visual .img-shell,
  .card--portfolio:hover .card__go,
  .portfolio-piece:hover .card__go {
    transform: none;
    filter: none;
  }
}
