/* ==========================================================================
   apamni — project catalog
   A lightweight, framework-free visual system for the landing page.
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Design tokens
   -------------------------------------------------------------------------- */

:root {
  color-scheme: light;

  --bg: #f4f1ea;
  --bg-soft: #eae5dc;
  --surface: #fffdfa;
  --surface-2: #efe9df;
  --text: #141416;
  --muted: #66635d;
  --faint: #8a867f;
  --line: rgba(20, 20, 22, 0.11);
  --line-strong: rgba(20, 20, 22, 0.2);
  --accent: #e0392b;
  --accent-2: #5b45d6;
  --accent-soft: rgba(224, 57, 43, 0.1);
  --glow: rgba(224, 57, 43, 0.18);
  --glow-2: rgba(91, 69, 214, 0.12);
  --spotlight: rgba(224, 57, 43, 0.09);
  --success: #15803d;
  --danger: #b42318;
  --shadow-sm: 0 1px 2px rgba(20, 20, 22, 0.05),
    0 12px 28px rgba(20, 20, 22, 0.06);
  --shadow-lg: 0 28px 70px rgba(20, 20, 22, 0.13);

  --container: 1180px;
  --gutter: clamp(18px, 4vw, 32px);
  --header-h: 76px;
  --radius-sm: 12px;
  --radius-md: 20px;
  --radius-lg: 28px;
  --radius-xl: 40px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);

  --font-sans: "Manrope", ui-sans-serif, system-ui, -apple-system,
    BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-display: "Manrope", ui-sans-serif, system-ui, -apple-system,
    BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-serif: "Instrument Serif", Georgia, "Times New Roman", serif;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;

    --bg: #070708;
    --bg-soft: #0c0c0e;
    --surface: #111113;
    --surface-2: #17171a;
    --text: #f4f2ee;
    --muted: #a09da6;
    --faint: #74717a;
    --line: rgba(255, 255, 255, 0.09);
    --line-strong: rgba(255, 255, 255, 0.18);
    --accent: #ff5a45;
    --accent-2: #a78bfa;
    --accent-soft: rgba(255, 90, 69, 0.12);
    --glow: rgba(255, 90, 69, 0.2);
    --glow-2: rgba(167, 139, 250, 0.12);
    --spotlight: rgba(255, 90, 69, 0.12);
    --success: #34d399;
    --danger: #ff9b91;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.45),
      0 14px 34px rgba(0, 0, 0, 0.35);
    --shadow-lg: 0 30px 90px rgba(0, 0, 0, 0.6);
  }
}

:root[data-theme="dark"] {
  color-scheme: dark;

  --bg: #070708;
  --bg-soft: #0c0c0e;
  --surface: #111113;
  --surface-2: #17171a;
  --text: #f4f2ee;
  --muted: #a09da6;
  --faint: #74717a;
  --line: rgba(255, 255, 255, 0.09);
  --line-strong: rgba(255, 255, 255, 0.18);
  --accent: #ff5a45;
  --accent-2: #a78bfa;
  --accent-soft: rgba(255, 90, 69, 0.12);
  --glow: rgba(255, 90, 69, 0.2);
  --glow-2: rgba(167, 139, 250, 0.12);
  --spotlight: rgba(255, 90, 69, 0.12);
  --success: #34d399;
  --danger: #ff9b91;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.45), 0 14px 34px rgba(0, 0, 0, 0.35);
  --shadow-lg: 0 30px 90px rgba(0, 0, 0, 0.6);
}

/* --------------------------------------------------------------------------
   2. Reset and base
   -------------------------------------------------------------------------- */

*,
*::before,
*::after {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  min-height: 100%;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  min-height: 100vh;
  margin: 0;
  padding-top: var(--header-h);
  overflow-x: clip;
  background:
    radial-gradient(1100px 640px at 82% -8%, var(--glow), transparent 62%),
    radial-gradient(900px 600px at -12% 34%, var(--glow-2), transparent 62%),
    var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0.035;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.92' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

body > * {
  position: relative;
  z-index: 1;
}

body.menu-open {
  overflow: hidden;
}

::selection {
  background: var(--accent);
  color: #ffffff;
}

img,
svg {
  display: block;
  max-width: 100%;
}

img {
  height: auto;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input {
  font: inherit;
}

button {
  color: inherit;
}

h1,
h2,
h3,
p,
dl,
dd,
ul {
  margin: 0;
}

ul {
  padding: 0;
  list-style: none;
}

:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
}

section[id] {
  scroll-margin-top: calc(var(--header-h) + 24px);
}

/* --------------------------------------------------------------------------
   3. Utilities
   -------------------------------------------------------------------------- */

.container {
  width: 100%;
  max-width: calc(var(--container) + var(--gutter) * 2);
  margin: 0 auto;
  padding-inline: var(--gutter);
}

.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: fixed;
  top: 10px;
  left: 10px;
  z-index: 200;
  padding: 11px 16px;
  border-radius: 999px;
  background: var(--text);
  color: var(--bg);
  font-weight: 800;
  transform: translateY(-160%);
  transition: transform 0.2s var(--ease);
}

.skip-link:focus {
  transform: translateY(0);
}

.scroll-progress {
  position: fixed;
  inset: 0 0 auto;
  z-index: 120;
  height: 2px;
  pointer-events: none;
}

.scroll-progress span {
  display: block;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  transform: scaleX(0);
  transform-origin: left center;
  will-change: transform;
}

.catalog-error {
  margin-top: 18px;
  padding: 14px 18px;
  border: 1px solid var(--danger);
  border-radius: 14px;
  color: var(--danger);
  font-size: 0.86rem;
}

.catalog-error strong {
  display: block;
  margin-bottom: 2px;
}

/* --------------------------------------------------------------------------
   4. Buttons, pills and eyebrow labels
   -------------------------------------------------------------------------- */

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 48px;
  padding: 13px 21px;
  border: 1px solid transparent;
  border-radius: 999px;
  background: var(--text);
  color: var(--bg);
  font-size: 0.95rem;
  font-weight: 800;
  letter-spacing: -0.01em;
  cursor: pointer;
  transition: transform 0.28s var(--ease), box-shadow 0.28s var(--ease),
    background 0.28s, color 0.28s, border-color 0.28s;
}

.button svg {
  flex: 0 0 auto;
  transition: transform 0.28s var(--ease);
}

.button:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}

.button:hover svg {
  transform: translate(2px, -2px);
}

.button:active {
  transform: translateY(0);
}

.button-small {
  min-height: 40px;
  padding: 9px 16px;
  font-size: 0.86rem;
}

.button-large {
  min-height: 56px;
  padding: 16px 26px;
  font-size: 1rem;
}

.button-ghost {
  background: transparent;
  color: var(--text);
  border-color: var(--line-strong);
}

.button-ghost:hover {
  border-color: var(--text);
}

.button-accent {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #ffffff;
  border-color: transparent;
  box-shadow: 0 14px 34px var(--accent-soft);
}

.button-accent:hover {
  box-shadow: 0 18px 44px var(--glow);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.status-dot,
.live-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--success);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--success) 16%, transparent);
}

.status-dot {
  animation: status-pulse 2.4s ease-in-out infinite;
}

@keyframes status-pulse {
  0%,
  100% {
    box-shadow: 0 0 0 4px color-mix(in srgb, var(--success) 16%, transparent);
  }
  50% {
    box-shadow: 0 0 0 8px color-mix(in srgb, var(--success) 4%, transparent);
  }
}

/* --------------------------------------------------------------------------
   5. Header and navigation
   -------------------------------------------------------------------------- */

.site-header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 100;
  border-bottom: 1px solid transparent;
  transition: background 0.35s var(--ease), border-color 0.35s,
    backdrop-filter 0.35s;
}

.site-header.is-scrolled {
  background: var(--bg);
  background: color-mix(in srgb, var(--bg) 80%, transparent);
  border-bottom-color: var(--line);
  -webkit-backdrop-filter: blur(18px);
  backdrop-filter: blur(18px);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
  min-height: var(--header-h);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  flex: 0 0 auto;
}

.brand-mark {
  width: 36px;
  height: 36px;
  object-fit: contain;
  border-radius: 11px;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.24);
}

.brand-name {
  font-size: 1.05rem;
  font-weight: 800;
  letter-spacing: -0.04em;
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 30px;
  margin-left: auto;
  margin-right: 10px;
}

.desktop-nav a {
  position: relative;
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 700;
  transition: color 0.25s;
}

.desktop-nav a::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: -6px;
  left: 0;
  height: 1.5px;
  border-radius: 2px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: right center;
  transition: transform 0.3s var(--ease);
}

.desktop-nav a:hover {
  color: var(--text);
}

.desktop-nav a:hover::after {
  transform: scaleX(1);
  transform-origin: left center;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.icon-button {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: transparent;
  cursor: pointer;
  transition: background 0.25s, border-color 0.25s, transform 0.25s;
}

.icon-button:hover {
  background: var(--surface);
  border-color: var(--line-strong);
  transform: translateY(-1px);
}

.icon-button svg {
  width: 17px;
  height: 17px;
}

.icon-sun {
  display: var(--sun-display, none);
}

.icon-moon {
  display: var(--moon-display, block);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --sun-display: block;
    --moon-display: none;
  }
}

:root[data-theme="dark"] {
  --sun-display: block;
  --moon-display: none;
}

:root[data-theme="light"] {
  --sun-display: none;
  --moon-display: block;
}

.menu-button {
  display: none;
  position: relative;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: transparent;
  cursor: pointer;
}

.menu-button span {
  position: absolute;
  left: 11px;
  width: 16px;
  height: 1.5px;
  border-radius: 2px;
  background: var(--text);
  transition: transform 0.25s var(--ease), top 0.25s var(--ease);
}

.menu-button span:first-child {
  top: 16px;
}

.menu-button span:last-child {
  top: 22px;
}

.menu-button[aria-expanded="true"] span:first-child {
  top: 19px;
  transform: rotate(45deg);
}

.menu-button[aria-expanded="true"] span:last-child {
  top: 19px;
  transform: rotate(-45deg);
}

.mobile-menu {
  margin: 0 var(--gutter) 12px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface);
  box-shadow: var(--shadow-lg);
  animation: menu-in 0.3s var(--ease);
}

.mobile-menu nav {
  display: grid;
  gap: 4px;
  margin-bottom: 14px;
}

.mobile-menu nav a {
  padding: 10px 8px;
  border-radius: 10px;
  font-size: 1.05rem;
  font-weight: 700;
}

.mobile-menu nav a:hover {
  background: var(--surface-2);
}

.mobile-menu .button {
  width: 100%;
}

@keyframes menu-in {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }
}

/* --------------------------------------------------------------------------
   6. Hero
   -------------------------------------------------------------------------- */

.hero {
  position: relative;
  overflow: hidden;
  padding: clamp(44px, 7vw, 88px) 0 0;
}

.hero-bg {
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
}

.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  opacity: 0.7;
  animation: orb-drift 16s ease-in-out infinite alternate;
}

.orb-one {
  top: -180px;
  right: -120px;
  width: 540px;
  height: 540px;
  background: var(--glow);
}

.orb-two {
  bottom: 80px;
  left: -220px;
  width: 480px;
  height: 480px;
  background: var(--glow-2);
  animation-delay: -7s;
}

@keyframes orb-drift {
  from {
    transform: translate3d(0, 0, 0) scale(1);
  }
  to {
    transform: translate3d(28px, 34px, 0) scale(1.08);
  }
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.06fr) minmax(0, 0.94fr);
  align-items: center;
  gap: clamp(32px, 6vw, 76px);
  padding-bottom: clamp(44px, 6vw, 74px);
}

.hero-copy {
  max-width: 660px;
}

.hero-copy .eyebrow {
  margin-bottom: 20px;
}

.hero h1 {
  max-width: 15ch;
  font-family: var(--font-display);
  font-size: clamp(2.75rem, 5.4vw, 5rem);
  font-weight: 800;
  line-height: 0.97;
  letter-spacing: -0.06em;
}

.hero h1 em,
.section h2 em,
.contact-panel h2 em {
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 400;
  letter-spacing: -0.02em;
  background: linear-gradient(105deg, var(--accent), var(--accent-2));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  padding-right: 0.06em;
}

.hero-intro {
  max-width: 540px;
  margin-top: 24px;
  color: var(--muted);
  font-size: clamp(1rem, 1.35vw, 1.12rem);
  line-height: 1.72;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 11px;
  margin-top: 30px;
}

.hero-meta {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  max-width: 600px;
  margin-top: 42px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
}

.hero-meta dt {
  color: var(--faint);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.hero-meta dd {
  margin-top: 5px;
  font-size: 0.86rem;
  font-weight: 700;
  line-height: 1.4;
}

.hero-visual {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 540px;
  perspective: 1200px;
}

.visual-glow {
  position: absolute;
  width: min(430px, 82%);
  aspect-ratio: 1;
  border-radius: 50%;
  background:
    radial-gradient(circle at 35% 30%, var(--glow), transparent 58%),
    radial-gradient(circle at 70% 72%, var(--glow-2), transparent 58%);
  filter: blur(34px);
  animation: visual-breathe 8s ease-in-out infinite alternate;
}

@keyframes visual-breathe {
  from {
    transform: scale(0.94);
    opacity: 0.75;
  }
  to {
    transform: scale(1.06);
    opacity: 1;
  }
}

.hero-visual::before {
  content: "";
  position: absolute;
  width: min(460px, 94%);
  aspect-ratio: 1;
  border: 1px solid var(--line);
  border-radius: 50%;
  opacity: 0.65;
}

.phone-wrap {
  position: relative;
  width: min(286px, 68vw);
  transform: perspective(1200px) rotateX(var(--rx, 0deg))
    rotateY(var(--ry, 0deg));
  transform-style: preserve-3d;
  transition: transform 0.45s var(--ease);
  animation: phone-float 7s ease-in-out infinite;
  will-change: transform;
}

@keyframes phone-float {
  0%,
  100% {
    translate: 0 0;
  }
  50% {
    translate: 0 -12px;
  }
}

.phone {
  position: relative;
  aspect-ratio: 9 / 16;
  padding: 9px;
  overflow: hidden;
  border: 1px solid var(--line-strong);
  border-radius: 46px;
  background: #050506;
  box-shadow: var(--shadow-lg), 0 0 0 1px rgba(255, 255, 255, 0.04) inset;
}

.phone::after {
  content: "";
  position: absolute;
  inset: 9px;
  z-index: 2;
  border-radius: 38px;
  pointer-events: none;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.06) inset;
}

.phone img {
  width: 100%;
  height: 100%;
  border-radius: 38px;
  object-fit: cover;
  object-position: top center;
}

.phone.is-contain img {
  width: auto;
  height: auto;
  max-width: 82%;
  max-height: 82%;
  object-fit: contain;
  object-position: center;
}

.phone-notch {
  position: absolute;
  top: 20px;
  left: 50%;
  z-index: 3;
  width: 88px;
  height: 24px;
  border-radius: 999px;
  background: #050506;
  transform: translateX(-50%);
}

.phone-fallback {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  border-radius: 38px;
  background:
    radial-gradient(circle at 30% 20%, var(--project-accent), transparent 60%),
    var(--surface-2);
  color: #ffffff;
  font-size: 4rem;
  font-weight: 800;
  letter-spacing: -0.08em;
}

.floating-card {
  position: absolute;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 13px;
  border: 1px solid var(--line-strong);
  border-radius: 16px;
  background: var(--surface);
  background: color-mix(in srgb, var(--surface) 82%, transparent);
  box-shadow: var(--shadow-sm);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  font-size: 0.76rem;
  line-height: 1.35;
  animation: card-float 6s ease-in-out infinite;
}

.floating-card strong {
  display: block;
  font-size: 0.8rem;
  letter-spacing: -0.02em;
}

.floating-card span {
  color: var(--muted);
}

.floating-card-top {
  top: 14%;
  left: -14%;
}

.floating-card-bottom {
  right: -10%;
  bottom: 16%;
  animation-delay: -2.5s;
}

@keyframes card-float {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-7px);
  }
}

.floating-icon {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  overflow: hidden;
  border-radius: 10px;
  background: var(--surface-2);
}

.floating-icon img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.floating-icon > span {
  color: var(--text);
  font-size: 0.78rem;
  font-weight: 800;
}

.marquee {
  position: relative;
  overflow: hidden;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  -webkit-mask-image: linear-gradient(
    90deg,
    transparent,
    #000 8%,
    #000 92%,
    transparent
  );
  mask-image: linear-gradient(
    90deg,
    transparent,
    #000 8%,
    #000 92%,
    transparent
  );
}

.marquee-track {
  display: flex;
  width: max-content;
  animation: marquee 30s linear infinite;
}

.marquee:hover .marquee-track {
  animation-play-state: paused;
}

.marquee-list {
  display: flex;
  align-items: center;
  gap: 34px;
  padding: 17px 17px;
  white-space: nowrap;
}

.marquee-list li {
  display: inline-flex;
  align-items: center;
  gap: 34px;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.marquee-list li::after {
  content: "";
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--accent);
  opacity: 0.7;
}

@keyframes marquee {
  to {
    transform: translateX(-50%);
  }
}

/* --------------------------------------------------------------------------
   7. Sections
   -------------------------------------------------------------------------- */

.section {
  padding: clamp(78px, 10vw, 142px) 0;
}

.section-head {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(260px, 0.55fr);
  align-items: end;
  gap: clamp(24px, 5vw, 70px);
  margin-bottom: clamp(30px, 5vw, 54px);
}

.section-head .eyebrow {
  margin-bottom: 14px;
}

.section h2 {
  font-family: var(--font-display);
  font-size: clamp(2.1rem, 4.2vw, 3.8rem);
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.055em;
  text-wrap: balance;
}

.section-intro {
  max-width: 400px;
  color: var(--muted);
  font-size: 0.96rem;
  line-height: 1.72;
}

/* --------------------------------------------------------------------------
   8. Projects toolbar
   -------------------------------------------------------------------------- */

.toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 20px;
}

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.filter {
  padding: 9px 15px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
  cursor: pointer;
  transition: background 0.25s, color 0.25s, border-color 0.25s,
    transform 0.25s var(--ease);
}

.filter:hover {
  border-color: var(--line-strong);
  color: var(--text);
  transform: translateY(-1px);
}

.filter.is-active {
  background: var(--text);
  border-color: var(--text);
  color: var(--bg);
}

.search {
  position: relative;
  display: flex;
  align-items: center;
  width: min(300px, 100%);
}

.search-icon {
  position: absolute;
  left: 15px;
  width: 16px;
  height: 16px;
  color: var(--faint);
  pointer-events: none;
}

.search input {
  width: 100%;
  min-height: 44px;
  padding: 10px 40px 10px 42px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--text);
  font-size: 0.86rem;
  outline: none;
  transition: border-color 0.25s, box-shadow 0.25s, background 0.25s;
}

.search input::placeholder {
  color: var(--faint);
}

.search input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-soft);
}

.search input::-webkit-search-cancel-button {
  display: none;
}

.search-clear {
  position: absolute;
  right: 8px;
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: var(--surface-2);
  color: var(--muted);
  font-size: 1.05rem;
  line-height: 1;
  cursor: pointer;
}

.results-count {
  margin-bottom: 16px;
  color: var(--faint);
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* --------------------------------------------------------------------------
   9. Project cards
   -------------------------------------------------------------------------- */

.project-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(16px, 2.4vw, 26px);
}

.project-card {
  position: relative;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
  color: var(--text);
  isolation: isolate;
  transition: transform 0.45s var(--ease), border-color 0.3s,
    box-shadow 0.45s var(--ease);
}

a.project-card {
  cursor: pointer;
}

.project-card:hover {
  transform: translateY(-5px);
  border-color: var(--line-strong);
  box-shadow: var(--shadow-lg);
}

.project-card::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  opacity: 0;
  background: radial-gradient(
    360px circle at var(--mx, 50%) var(--my, 50%),
    var(--spotlight),
    transparent 68%
  );
  transition: opacity 0.35s;
}

.project-card:hover::after {
  opacity: 1;
}

.project-card > * {
  position: relative;
  z-index: 2;
}

.project-card-featured {
  grid-column: span 2;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 0.94fr);
  min-height: 430px;
}

.featured-media {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 360px;
  padding: 38px;
  overflow: hidden;
  background:
    radial-gradient(circle at 25% 20%, var(--project-accent), transparent 52%),
    linear-gradient(150deg, var(--surface-2), var(--surface));
}

.media-halo {
  position: absolute;
  width: 74%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: var(--project-accent);
  filter: blur(70px);
  opacity: 0.2;
}

.media-phone {
  position: relative;
  display: block;
  width: min(218px, 58%);
  aspect-ratio: 9 / 16;
  padding: 7px;
  overflow: hidden;
  border: 1px solid var(--line-strong);
  border-radius: 32px;
  background: #050506;
  box-shadow: var(--shadow-lg);
  transform: rotate(-4deg);
  transition: transform 0.7s var(--ease);
}

.project-card:hover .media-phone {
  transform: rotate(0deg) translateY(-5px);
}

.media-phone img {
  width: 100%;
  height: 100%;
  border-radius: 25px;
  object-fit: cover;
  object-position: top center;
}

.media-phone.is-contain img {
  width: auto;
  height: auto;
  max-width: 78%;
  max-height: 78%;
  object-fit: contain;
  object-position: center;
}

.media-monogram,
.project-monogram {
  display: grid;
  place-items: center;
  color: #ffffff;
  font-size: clamp(3rem, 6vw, 5.4rem);
  font-weight: 800;
  letter-spacing: -0.08em;
}

.media-monogram {
  position: relative;
  width: min(240px, 62%);
  aspect-ratio: 1;
  border-radius: 34px;
  background:
    radial-gradient(circle at 30% 20%, var(--project-accent), transparent 68%),
    var(--surface-2);
  box-shadow: var(--shadow-lg);
  transform: rotate(-4deg);
}

.project-status {
  position: absolute;
  top: 18px;
  right: 18px;
  z-index: 4;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 11px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  background: color-mix(in srgb, var(--surface) 86%, transparent);
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}

.project-icon {
  position: absolute;
  top: 18px;
  left: 18px;
  z-index: 4;
  width: 46px;
  height: 46px;
  object-fit: contain;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 13px;
  box-shadow: var(--shadow-sm);
}

.sale-badge {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  margin-top: 12px;
  padding: 5px 10px;
  border: 1px solid color-mix(in srgb, var(--accent) 32%, transparent);
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.sale-badge-small {
  margin-top: 6px;
  padding: 3px 8px;
  font-size: 0.6rem;
}

.featured-content {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(26px, 4vw, 48px);
}

.project-kicker {
  color: var(--accent);
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.project-card h3 {
  margin-top: 11px;
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 2.6vw, 2.35rem);
  font-weight: 800;
  line-height: 1.04;
  letter-spacing: -0.045em;
}

.project-summary {
  margin-top: 13px;
  color: var(--muted);
  font-size: 0.94rem;
  line-height: 1.68;
}

.highlights {
  display: grid;
  gap: 8px;
  margin-top: 20px;
}

.highlights li {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  color: var(--muted);
  font-size: 0.85rem;
  line-height: 1.45;
}

.highlights svg {
  flex: 0 0 auto;
  margin-top: 2px;
  color: var(--success);
}

.project-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: auto;
  padding-top: 24px;
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.tags li {
  padding: 5px 9px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--faint);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.project-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--text);
  font-size: 0.84rem;
  font-weight: 800;
  white-space: nowrap;
}

.project-link svg {
  transition: transform 0.3s var(--ease);
}

.project-card:hover .project-link svg {
  transform: translate(3px, -3px);
}

.project-cover {
  position: relative;
  display: grid;
  place-items: center;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background:
    radial-gradient(circle at 28% 24%, var(--project-accent), transparent 60%),
    var(--surface-2);
}

.project-cover > .project-cover-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  transition: transform 0.8s var(--ease);
}

.project-cover.is-contain {
  padding: clamp(20px, 6%, 48px);
}

.project-cover.is-contain > .project-cover-image {
  width: auto;
  height: auto;
  max-width: 62%;
  max-height: 62%;
  object-fit: contain;
  object-position: center;
}

.project-card:hover .project-cover > .project-cover-image {
  transform: scale(1.035);
}

.project-monogram {
  width: 100%;
  height: 100%;
  font-size: clamp(3.4rem, 8vw, 6rem);
  background:
    radial-gradient(circle at 30% 20%, var(--project-accent), transparent 66%),
    var(--surface-2);
}

.project-body {
  display: flex;
  flex-direction: column;
  flex: 1;
  padding: 24px;
}

.project-body h3 {
  font-size: 1.4rem;
}

.project-arrow {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--text);
  transition: background 0.25s, color 0.25s, border-color 0.25s,
    transform 0.3s var(--ease);
}

.project-card:hover .project-arrow {
  background: var(--text);
  border-color: var(--text);
  color: var(--bg);
  transform: rotate(45deg);
}

.project-card.is-static {
  cursor: default;
}

.project-card.is-static:hover {
  transform: none;
}

.empty-state {
  margin-top: 18px;
  padding: 36px 24px;
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius-lg);
  color: var(--muted);
  text-align: center;
}

.empty-state strong {
  display: block;
  margin-bottom: 4px;
  color: var(--text);
  font-size: 1.05rem;
}

.empty-state button {
  margin-top: 16px;
}

.project-cta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-top: 24px;
  padding: clamp(26px, 4vw, 40px);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background:
    radial-gradient(circle at 100% 0%, var(--glow-2), transparent 55%),
    var(--surface);
}

.project-cta h3 {
  font-family: var(--font-display);
  font-size: clamp(1.45rem, 2.4vw, 2rem);
  font-weight: 800;
  letter-spacing: -0.04em;
}

.project-cta p {
  max-width: 480px;
  margin-top: 6px;
  color: var(--muted);
  font-size: 0.92rem;
}

/* --------------------------------------------------------------------------
   10. About
   -------------------------------------------------------------------------- */

.about-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
  gap: clamp(32px, 7vw, 96px);
  align-items: start;
}

.about-head {
  position: sticky;
  top: calc(var(--header-h) + 34px);
}

.about-head h2 {
  margin-top: 14px;
}

.about-card {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 28px;
  padding: 13px 15px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.about-mark {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  overflow: hidden;
  border-radius: 12px;
  background: var(--surface-2);
}

.about-mark img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.about-card strong {
  display: block;
  font-size: 0.9rem;
  letter-spacing: -0.02em;
}

.about-card span {
  display: block;
  color: var(--muted);
  font-size: 0.76rem;
}

.about-card .status-dot {
  margin-left: auto;
}

.about-body > p {
  color: var(--muted);
  font-size: 1.02rem;
  line-height: 1.78;
}

.about-body > p + p {
  margin-top: 16px;
}

.about-body > p:first-child {
  color: var(--text);
  font-size: clamp(1.1rem, 1.6vw, 1.3rem);
  line-height: 1.62;
}

.services {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 13px;
  margin-top: 30px;
}

.service {
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface);
  transition: border-color 0.3s, transform 0.3s var(--ease),
    box-shadow 0.3s var(--ease);
}

.service:hover {
  transform: translateY(-3px);
  border-color: var(--line-strong);
  box-shadow: var(--shadow-sm);
}

.service-number {
  color: var(--accent);
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.12em;
}

.service h3 {
  margin-top: 10px;
  font-size: 0.98rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.service p {
  margin-top: 7px;
  color: var(--muted);
  font-size: 0.84rem;
  line-height: 1.62;
}

/* --------------------------------------------------------------------------
   11. Contact and footer
   -------------------------------------------------------------------------- */

.contact {
  padding-bottom: clamp(70px, 8vw, 110px);
}

.contact-panel {
  position: relative;
  overflow: hidden;
  padding: clamp(34px, 6vw, 76px);
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  background:
    radial-gradient(circle at 12% 0%, var(--glow), transparent 46%),
    radial-gradient(circle at 92% 100%, var(--glow-2), transparent 46%),
    var(--surface);
  box-shadow: var(--shadow-sm);
}

.contact-panel::after {
  content: "";
  position: absolute;
  top: -40%;
  right: -12%;
  width: 420px;
  height: 420px;
  border: 1px solid var(--line);
  border-radius: 50%;
  pointer-events: none;
}

.contact-copy {
  position: relative;
  z-index: 2;
  max-width: 720px;
}

.contact-panel h2 {
  margin-top: 14px;
  font-family: var(--font-display);
  font-size: clamp(2.2rem, 4.8vw, 4.4rem);
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.055em;
}

.contact-copy > p:last-child {
  max-width: 560px;
  margin-top: 18px;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.7;
}

.contact-actions {
  position: relative;
  z-index: 2;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 11px;
  margin-top: 28px;
}

.contact-actions .button {
  max-width: 100%;
  overflow-wrap: anywhere;
}

.copy-note {
  flex-basis: 100%;
  min-height: 1.4em;
  color: var(--success);
  font-size: 0.8rem;
  font-weight: 700;
}

.site-footer {
  border-top: 1px solid var(--line);
  padding: 26px 0;
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 0.88rem;
  font-weight: 800;
  letter-spacing: -0.03em;
}

.footer-brand img {
  width: 26px;
  height: 26px;
  object-fit: contain;
  border-radius: 8px;
}

.footer-inner p {
  color: var(--faint);
  font-size: 0.76rem;
}

.footer-links {
  display: flex;
  gap: 18px;
}

.footer-links a {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
  transition: color 0.2s;
}

.footer-links a:hover {
  color: var(--text);
}

/* --------------------------------------------------------------------------
   12. Reveal, view transitions and reduced motion
   -------------------------------------------------------------------------- */

[data-reveal].will-reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.8s var(--ease), transform 0.8s var(--ease);
  transition-delay: var(--reveal-delay, 0ms);
}

[data-reveal].will-reveal.is-visible {
  opacity: 1;
  transform: none;
}

::view-transition-old(root),
::view-transition-new(root) {
  animation-duration: 0.32s;
  animation-timing-function: var(--ease);
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }

  [data-reveal].will-reveal {
    opacity: 1;
    transform: none;
  }
}

/* --------------------------------------------------------------------------
   13. Responsive
   -------------------------------------------------------------------------- */

@media (max-width: 1040px) {
  .hero-grid {
    grid-template-columns: minmax(0, 1fr) minmax(0, 0.85fr);
    gap: 36px;
  }

  .hero-visual {
    min-height: 470px;
  }

  .floating-card-top {
    left: -6%;
  }

  .floating-card-bottom {
    right: -4%;
  }

  .about-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .about-head {
    position: static;
  }
}

@media (max-width: 860px) {
  .desktop-nav,
  .header-actions > .button-small {
    display: none;
  }

  .menu-button {
    display: block;
  }

  .hero-grid {
    grid-template-columns: minmax(0, 1fr);
    padding-bottom: 56px;
  }

  .hero-copy {
    max-width: 720px;
  }

  .hero h1 {
    max-width: 18ch;
  }

  .hero-visual {
    min-height: 500px;
    margin-top: 8px;
  }

  .section-head {
    grid-template-columns: minmax(0, 1fr);
    align-items: start;
  }

  .section-intro {
    max-width: 620px;
  }

  .project-card-featured {
    grid-column: span 1;
    grid-template-columns: minmax(0, 1fr);
  }

  .featured-media {
    min-height: 340px;
  }

  .featured-content {
    padding: 28px;
  }

  .project-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .toolbar {
    align-items: stretch;
  }

  .search {
    width: 100%;
  }
}

@media (max-width: 620px) {
  :root {
    --header-h: 68px;
  }

  .brand-name {
    font-size: 1rem;
  }

  .hero {
    padding-top: 38px;
  }

  .hero h1 {
    font-size: clamp(2.55rem, 12vw, 3.6rem);
  }

  .hero-intro {
    margin-top: 18px;
    font-size: 0.98rem;
  }

  .hero-actions .button {
    flex: 1 1 180px;
  }

  .hero-meta {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
    margin-top: 32px;
  }

  .hero-meta > div:last-child {
    grid-column: span 2;
  }

  .hero-visual {
    min-height: 430px;
  }

  .phone-wrap {
    width: min(248px, 64vw);
  }

  .floating-card-top {
    top: 8%;
    left: -2%;
  }

  .floating-card-bottom {
    right: -1%;
    bottom: 10%;
  }

  .marquee-list {
    gap: 24px;
    padding-block: 14px;
  }

  .marquee-list li {
    gap: 24px;
    font-size: 0.66rem;
  }

  .section {
    padding: 72px 0;
  }

  .section h2 {
    font-size: clamp(2rem, 9vw, 2.8rem);
  }

  .filters {
    gap: 6px;
  }

  .filter {
    padding: 8px 13px;
    font-size: 0.78rem;
  }

  .project-cta,
  .contact-actions {
    align-items: stretch;
  }

  .project-cta .button,
  .contact-actions .button {
    width: 100%;
  }

  .project-card-featured {
    min-height: 0;
  }

  .featured-media {
    min-height: 300px;
    padding: 24px;
  }

  .media-phone {
    width: min(186px, 58%);
  }

  .featured-content {
    padding: 24px;
  }

  .services {
    grid-template-columns: minmax(0, 1fr);
  }

  .contact-panel {
    border-radius: 30px;
  }

  .contact-panel h2 {
    font-size: clamp(2rem, 9vw, 2.9rem);
  }

  .footer-inner {
    align-items: flex-start;
  }

  .footer-inner p {
    order: 3;
    flex-basis: 100%;
  }
}

@media (max-width: 400px) {
  .floating-card-bottom {
    display: none;
  }

  .hero-meta {
    grid-template-columns: minmax(0, 1fr);
  }

  .hero-meta > div:last-child {
    grid-column: auto;
  }
}
