/* ==========================================================================
   EKNIRB DESIGN – v2
   Black + White. Steel blue accent sparingly. Modern. Confident.
   ========================================================================== */

/* --------------------------------------------------------------------------
   FONTS
   -------------------------------------------------------------------------- */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('../fonts/inter-v20-latin-regular.woff2') format('woff2'),
       url('../fonts/inter-v20-latin-regular.woff') format('woff');
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('../fonts/inter-v20-latin-500.woff2') format('woff2'),
       url('../fonts/inter-v20-latin-500.woff') format('woff');
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('../fonts/inter-v20-latin-600.woff2') format('woff2'),
       url('../fonts/inter-v20-latin-600.woff') format('woff');
}

/* --------------------------------------------------------------------------
   TOKENS
   -------------------------------------------------------------------------- */
:root {
  --bg: #FFFFFF;
  --bg-alt: #F7F7F7;
  --bg-dark: #111111;
  --text: #111111;
  --text-s: #666666;
  --text-inv: #FFFFFF;
  --border: #E5E5E5;
  --nav-bg: rgba(255, 255, 255, 0.92);
  --accent: #4A6B8A;
  --accent-h: #5B7D9C;
  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --w: 1440px;
  --pad: clamp(1.25rem, 4vw, 2.5rem);
  --r: 10px;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --fast: 180ms;
  --med: 320ms;
  --slow: 500ms;
}

[data-theme="dark"] {
  --bg: #111111;
  --bg-alt: #1E1E1E;
  --bg-dark: #000000;
  --text: #E5E5E5;
  --text-s: #A0A0A0;
  --text-inv: #111111;
  --border: #333333;
  --nav-bg: rgba(17, 17, 17, 0.92);
  --accent: #6A9BC5;
  --accent-h: #7DADD4;
}

[data-theme="dark"] .nav-logo img,
[data-theme="dark"] .logo img,
[data-theme="dark"] .footer-brand img {
  content: url("../assets/eknirb.design-logo-weiß.png");
}

/* Force light theme variables for elements with light image backgrounds */
[data-theme="dark"] .ui-component-demo,
[data-theme="dark"] .statement,
[data-theme="dark"] .resize-wrapper {
  --bg: #FFFFFF;
  --bg-alt: #F7F7F7;
  --bg-dark: #111111;
  --text: #111111;
  --text-s: #666666;
  --border: #E5E5E5;
  color: var(--text);
}

/* --------------------------------------------------------------------------
   RESET
   -------------------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; overflow-x: clip; }
body {
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: clip;
  transition: background-color var(--med) var(--ease), color var(--med) var(--ease);
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; font-size: inherit; cursor: pointer; border: none; background: none; color: inherit; }
ul, ol { list-style: none; }
::selection { background: var(--text); color: var(--bg); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 2px; }

/* --------------------------------------------------------------------------
   TYPOGRAPHY
   -------------------------------------------------------------------------- */
h1, h2, h3 { font-weight: 600; line-height: 1.1; color: var(--text); letter-spacing: -0.03em; }
h1 { font-size: clamp(2.75rem, 5.5vw, 4.25rem); }
h2 { font-size: clamp(1.75rem, 3vw, 2.5rem); letter-spacing: -0.025em; }
h3 { font-size: clamp(1.125rem, 1.5vw, 1.375rem); letter-spacing: -0.015em; line-height: 1.3; }
p { max-width: 60ch; }
.eyebrow {
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-s);
}
.text-large { font-size: clamp(1.0625rem, 1.3vw, 1.1875rem); line-height: 1.6; color: var(--text-s); }

/* --------------------------------------------------------------------------
   LAYOUT
   -------------------------------------------------------------------------- */
.container { width: 100%; max-width: var(--w); margin: 0 auto; padding: 0 var(--pad); }
.section { padding: clamp(4rem, 6vw, 6rem) 0; }
.section-legal { padding-top: clamp(5rem, 10vw, 8.75rem); padding-bottom: clamp(2.5rem, 5vw, 5rem); }

/* --------------------------------------------------------------------------
   NAVIGATION
   -------------------------------------------------------------------------- */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 105;
  transition: background var(--med) ease, box-shadow var(--med) ease;
}
.nav.scrolled {
  background: var(--nav-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 1px 0 var(--border);
}
.nav-inner {
  display: flex; align-items: center; justify-content: space-between;
  height: 64px; max-width: var(--w); margin: 0 auto; padding: 0 var(--pad);
}
.nav-logo, .logo { display: flex; align-items: center; gap: 0.5rem; z-index: 101; text-decoration: none; }
.nav-logo img, .logo img { height: 28px; width: auto; display: block; }
.logo-text { font-size: 0.9375rem; font-weight: 600; letter-spacing: -0.02em; color: var(--text); }
.logo-text .dot { color: var(--accent); }
.nav-links { display: flex; align-items: center; gap: 2rem; }
.nav-link {
  font-size: 0.8125rem; font-weight: 400; color: var(--text-s);
  transition: color var(--fast) ease; position: relative;
}
.nav-link::after {
  content: ''; position: absolute; bottom: -3px; left: 0;
  width: 0; height: 1.5px; background: var(--text);
  transition: width var(--med) var(--ease);
}
.nav-link:hover { color: var(--text); }
.nav-link:hover::after { width: 100%; }

/* Primary CTA – BLACK */
.btn-primary {
  display: inline-flex; align-items: center; gap: 0.4rem;
  font-size: 0.8125rem; font-weight: 500;
  color: var(--text-inv); background: var(--text);
  padding: 0.625rem 1.25rem; border-radius: 6px;
  transition: opacity var(--fast) ease, transform var(--fast) ease;
}
.btn-primary:hover { opacity: 0.85; transform: translateY(-1px); }
.btn-primary svg { width: 14px; height: 14px; }

/* Secondary – text link */
.btn-secondary {
  display: inline-flex; align-items: center; gap: 0.35rem;
  font-size: 0.9375rem; font-weight: 400; color: var(--text-s);
  transition: color var(--fast) ease;
}
.btn-secondary:hover { color: var(--text); }
.btn-secondary svg { width: 15px; height: 15px; }

/* Nav CTA */
.nav-cta { margin-left: 0.75rem; }

/* Hamburger */
.nav-toggle {
  display: none; width: 44px; height: 44px; padding: 0;
  background: transparent; border: none; appearance: none; cursor: pointer; z-index: 101;
  position: relative;
}
.nav-toggle span {
  position: absolute; left: 10px; right: 10px; height: 2px;
  background: var(--text); border-radius: 1px;
  transition: transform var(--med) var(--ease), opacity var(--fast) ease;
  transform-origin: center;
}
.nav-toggle span:nth-child(1) { top: 13px; }
.nav-toggle span:nth-child(2) { top: 21px; }
.nav-toggle span:nth-child(3) { top: 29px; }

.nav-toggle.open span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

/* Mobile overlay */
.mobile-menu { display: none; }

/* --------------------------------------------------------------------------
   HERO
   -------------------------------------------------------------------------- */
.hero { padding-top: calc(64px + clamp(3rem, 5vw, 4.5rem)); padding-bottom: 0; }
.hero-top { max-width: 680px; margin-bottom: clamp(2.5rem, 4vw, 3.5rem); }
.hero-eyebrow { margin-bottom: 1.25rem; }
.hero-title { margin-bottom: 1.25rem; }
.hero-desc {
  font-size: clamp(1rem, 1.3vw, 1.125rem); line-height: 1.65;
  color: var(--text-s); margin-bottom: 1.75rem; max-width: 52ch;
}
.hero-actions { display: flex; align-items: center; gap: 1.5rem; flex-wrap: wrap; }
.hero-actions .btn-primary {
  font-size: 0.9375rem; padding: 0.8125rem 1.625rem;
}
.hero-actions .btn-primary svg { width: 15px; height: 15px; }

/* Hero Browser – MASSIVE */
.hero-browser {
  position: relative; z-index: 2;
  margin: 0 calc(-1 * var(--pad));
  padding: 0 var(--pad);
  margin-bottom: -4rem;
}
.hero-browser .browser-frame {
  max-width: calc(var(--w) + 2rem);
  margin: 0 auto;
}

/* Hero Interactive UI */
.hero-interactive-ui {
  background: url('../img/hero-mock-bg.jpg') center/cover no-repeat;
  min-height: 440px;
  padding: 2.5rem;
  position: relative;
}
.hero-interactive-ui::before {
  content: ''; position: absolute; inset: 0; background: rgba(0,0,0,0.25);
}
.ui-nav {
  position: relative; z-index: 2;
  display: flex; justify-content: space-between; align-items: center; margin-bottom: 3rem;
}
.ui-logo { width: 32px; height: 32px; background: rgba(255,255,255,0.9); border-radius: 4px; }
.ui-nav-links { display: flex; gap: 1rem; }
.ui-nav-links span { width: 48px; height: 6px; background: rgba(255,255,255,0.4); border-radius: 3px; }
.ui-body {
  position: relative; z-index: 2;
  display: grid; grid-template-columns: 1fr 1.2fr; gap: 4rem; align-items: center;
}
.ui-hero-text .ui-line {
  height: 24px; background: rgba(255,255,255,0.3); border-radius: 4px; margin-bottom: 1rem;
}
.ui-hero-text .ui-line--l { width: 100%; height: 48px; background: rgba(255,255,255,0.9); margin-bottom: 1.5rem; }
.ui-hero-text .ui-line--m { width: 85%; }
.ui-hero-text .ui-line--s { width: 60%; }
.ui-btn-group { display: flex; gap: 1rem; margin-top: 2rem; }
.ui-btn { width: 120px; height: 48px; background: rgba(255,255,255,0.9); border-radius: 24px; }
.ui-btn--ghost { background: rgba(255,255,255,0.1); border: 1px solid rgba(255,255,255,0.4); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); border-radius: 24px; }

.ui-cards { display: grid; gap: 1rem; }
.ui-card {
  background: rgba(255,255,255,0.1); border: 1px solid rgba(255,255,255,0.2); border-radius: 12px;
  padding: 1rem; display: flex; align-items: center; gap: 1rem;
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  transition: transform var(--fast) var(--ease), box-shadow var(--fast) ease, border-color var(--fast) ease;
}
.ui-card:hover { transform: translateX(-8px); box-shadow: 0 12px 32px rgba(0,0,0,0.15); border-color: rgba(255,255,255,0.4); }
.ui-card-img { width: 48px; height: 48px; background: rgba(255,255,255,0.2); border-radius: 8px; }
.ui-card .ui-line--xs { width: 120px; height: 8px; background: rgba(255,255,255,0.5); border-radius: 4px; margin:0; }

@media (max-width: 768px) {
  .ui-body { grid-template-columns: 1fr; gap: 2rem; }
  .ui-nav { margin-bottom: 2rem; }
  .hero-interactive-ui { padding: 1.5rem; min-height: auto; }
}

/* --------------------------------------------------------------------------
   BROWSER FRAME
   -------------------------------------------------------------------------- */
.browser-frame {
  background: var(--bg); border: 1px solid var(--border);
  border-radius: var(--r); overflow: hidden;
  box-shadow: 0 8px 40px rgba(0,0,0,0.08), 0 2px 12px rgba(0,0,0,0.04);
}
.browser-bar {
  display: flex; align-items: center; gap: 0.5rem;
  padding: 0.6875rem 1rem; border-bottom: 1px solid var(--border); background: var(--bg-alt);
}
.browser-dots { display: flex; gap: 6px; }
.browser-dot { width: 8px; height: 8px; border-radius: 50%; }
.browser-dot--r { background: #EC6A5E; }
.browser-dot--y { background: #F4BF4F; }
.browser-dot--g { background: #61C554; }
.browser-url { flex: 1; text-align: center; }
.browser-url span {
  font-size: 0.6875rem; color: var(--text-s);
  background: var(--bg); padding: 0.1875rem 0.625rem;
  border-radius: 4px; border: 1px solid var(--border);
}
.browser-img { width: 100%; display: block; }
.browser-meta {
  display: flex; align-items: center; justify-content: space-between;
  padding: 0.5rem 1rem; border-top: 1px solid var(--border); background: var(--bg-alt);
}
.browser-meta span {
  font-size: 0.625rem; color: var(--text-s); letter-spacing: 0.02em;
}
.status-live {
  display: inline-flex; align-items: center; gap: 0.375rem; font-weight: 500;
}
.status-live::before {
  content: ''; width: 6px; height: 6px; border-radius: 50%; background: var(--accent);
  animation: pulse 2s ease-in-out infinite;
}
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: 0.35; } }

/* --------------------------------------------------------------------------
   CAPABILITIES (Interactive Features)
   -------------------------------------------------------------------------- */
.work { position: relative; z-index: 1; padding-top: clamp(6rem, 8vw, 8rem); }
.work-header { margin-bottom: clamp(3rem, 5vw, 5rem); }
.work-header h2 { margin-bottom: 0.625rem; }
.work-header p { color: var(--text-s); font-size: 0.9375rem; }

.cap-feature {
  display: grid; grid-template-columns: 0.8fr 1.2fr; gap: clamp(3rem, 5vw, 6rem);
  align-items: center; margin-bottom: clamp(6rem, 10vw, 12rem);
}
.cap-feature--reversed { grid-template-columns: 1.2fr 0.8fr; }
.cap-feature--reversed .cap-text { order: 2; }
.cap-feature--reversed .cap-visual { order: 1; }

.cap-num { font-size: 0.75rem; font-weight: 500; color: var(--text-s); letter-spacing: 0.08em; display: block; margin-bottom: 0.5rem; }
.cap-title { font-size: clamp(1.75rem, 3vw, 2.5rem); letter-spacing: -0.025em; margin-bottom: 1rem; }
.cap-desc { font-size: 1.0625rem; color: var(--text-s); line-height: 1.65; margin-bottom: 1.5rem; }

/* Flip Button */
.btn-flip {
  display: inline-flex; align-items: center; gap: 0.5rem;
  font-size: 0.875rem; font-weight: 500; color: var(--text);
  padding: 0.625rem 1.25rem; border: 1px solid var(--border); border-radius: 6px;
  background: var(--bg); transition: background var(--fast) ease;
}
.btn-flip:hover { background: var(--bg-alt); }
.btn-flip svg { width: 14px; height: 14px; }

/* Feature 01: 3D Flip Card */
.cap-visual { perspective: 1000px; width: 100%; }
.flip-container {
  width: 100%; height: 380px; position: relative;
}
.flip-inner {
  position: relative; width: 100%; height: 100%;
  transition: transform 0.8s var(--ease);
  -webkit-transform-style: preserve-3d;
  transform-style: preserve-3d;
}
.flip-container.flipped .flip-inner { transform: rotateY(180deg); }
.flip-front, .flip-back {
  position: absolute; inset: 0;
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
  border-radius: var(--r); overflow: hidden;
  box-shadow: 0 12px 48px rgba(0,0,0,0.06); border: 1px solid var(--border);
}
.flip-front {
  -webkit-transform: rotateY(0deg) translateZ(1px);
  transform: rotateY(0deg) translateZ(1px);
  transition: opacity 0.15s ease-out, visibility 0s;
}
.flip-container.flipped .flip-front {
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.15s ease-out, visibility 0s 0.15s;
}
.flip-back {
  -webkit-transform: rotateY(180deg) translateZ(1px);
  transform: rotateY(180deg) translateZ(1px);
  background: #111; color: #E5E5E5;
}

/* Front: UI Component */
.ui-component-demo {
  background: var(--bg-alt) url('../img/flip-mock-bg.jpg') center/cover no-repeat;
  height: 100%; padding: 2.5rem; display: flex; flex-direction: column; justify-content: center;
  position: relative;
}
.ui-component-demo::before {
  content: ''; position: absolute; inset: 0; background: rgba(255,255,255,0.3);
}
.ui-comp-header, .ui-comp-text, .ui-comp-action { position: relative; z-index: 2; }
.ui-comp-header { display: flex; align-items: center; gap: 1rem; margin-bottom: 1.5rem; }
.ui-comp-avatar { width: 56px; height: 56px; border-radius: 50%; background: rgba(255,255,255,0.4); border: 1px solid rgba(255,255,255,0.7); box-shadow: 0 4px 12px rgba(0,0,0,0.05); display: flex; align-items: center; justify-content: center; font-size: 1.5rem; font-weight: 600; color: var(--text); -webkit-backface-visibility: hidden; backface-visibility: hidden; transform: translateZ(0); }
.ui-comp-meta strong { display: block; font-size: 1.125rem; font-weight: 600; color: var(--text); }
.ui-comp-meta span { font-size: 0.875rem; color: var(--text-s); }
.ui-comp-text { font-size: 1.125rem; line-height: 1.5; color: var(--text); margin-bottom: 2rem; max-width: 90%; font-weight: 500; }
.ui-comp-action {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 0 1.25rem; height: 40px; background: rgba(255,255,255,0.7); border: 1px solid rgba(255,255,255,1); color: var(--text);
  border-radius: 20px; font-size: 0.8125rem; font-weight: 600; text-decoration: none;
  box-shadow: 0 4px 12px rgba(0,0,0,0.04);
  -webkit-backface-visibility: hidden; backface-visibility: hidden; transform: translateZ(0);
}

/* Back: Code Component */
.code-window { font-family: 'SF Mono', 'Fira Code', 'Menlo', monospace; font-size: 0.8125rem; line-height: 1.6; background: #0d1117; color: #c9d1d9; height: 100%; display: flex; flex-direction: column; text-align: left; border-radius: inherit; }
.code-header { display: flex; align-items: center; padding: 0.875rem 1rem; border-bottom: 1px solid rgba(255,255,255,0.08); background: #161b22; }
.code-dots { display: flex; gap: 6px; }
.code-dot { width: 10px; height: 10px; border-radius: 50%; }
.code-dot.red { background: #ff5f56; }
.code-dot.yellow { background: #ffbd2e; }
.code-dot.green { background: #27c93f; }
.code-title { margin-left: 1rem; font-size: 0.75rem; color: #8b949e; letter-spacing: 0.02em; }
.code-body { padding: 1.5rem; overflow-x: auto; flex: 1; }
.code-line { white-space: pre; }
.code-kw { color: #ff7b72; }      /* keywords */
.code-fn { color: #d2a8ff; }      /* functions / components */
.code-op { color: #c9d1d9; }      /* operators / punctuation */
.code-str { color: #a5d6ff; }     /* strings */
.code-tag { color: #7ee787; }     /* HTML/JSX tags */
.code-attr { color: #79c0ff; }    /* attributes */
.code-num { color: #79c0ff; }     /* numbers */
.code-txt { color: #c9d1d9; }     /* standard text */

/* Feature 02: Resizer */
.resize-presets {
  display: flex; align-items: center; justify-content: center; gap: 0.5rem;
  position: absolute; top: 0.75rem; left: 50%; transform: translateX(-50%);
  z-index: 15; background: var(--bg); padding: 0.25rem 0.5rem;
  border: 1px solid var(--border); border-radius: 20px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.04);
}
.preset-pill {
  position: absolute; top: 0.25rem; bottom: 0.25rem; left: 0; width: 0;
  background: var(--text); border-radius: 14px;
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 0; pointer-events: none;
}
.preset-btn {
  position: relative; z-index: 1;
  font-size: 0.6875rem; font-weight: 500; letter-spacing: 0.02em;
  padding: 0.25rem 0.75rem; border-radius: 14px;
  background: transparent; border: none; color: var(--text-s);
  transition: all var(--fast) ease; cursor: pointer;
}
.preset-btn:hover {
  color: var(--text);
}
.preset-btn.active {
  color: var(--bg);
}
.resize-wrapper {
  position: relative; width: 100%; height: 420px;
  background: var(--bg-alt) url('../img/resizer-mock-bg.jpg') center/cover no-repeat; border-radius: var(--r); border: none;
  display: flex; align-items: center; padding: 3.5rem 0 2rem 0; overflow: hidden;
}
.resize-container {
  position: relative;
  height: 100%; background: rgba(255,255,255,0.1); border: 1px solid rgba(255,255,255,0.2);
  border-left: none; border-radius: 0 var(--r) var(--r) 0;
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  box-shadow: 0 12px 32px rgba(0,0,0,0.15); overflow: hidden;
  min-width: 90px; max-width: 100%;
}
.resize-handle {
  position: absolute; right: 0; top: 50%; transform: translateY(-50%) translateX(50%);
  width: 32px; height: 48px; background: rgba(255,255,255,0.9); border-radius: 16px; border: 1px solid rgba(0,0,0,0.05);
  display: flex; align-items: center; justify-content: space-between; padding: 0 4px;
  color: var(--text); cursor: ew-resize; z-index: 10;
}
.resize-handle svg { width: 12px; height: 12px; pointer-events: none; }
.resize-content { padding: 2rem; width: 100%; height: 100%; }
.rc-header { width: 60%; height: 24px; background: rgba(255,255,255,0.4); border-radius: 4px; margin-bottom: 2rem; }
.rc-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 1rem; }
.rc-card { height: 120px; background: rgba(255,255,255,0.15); border-radius: 8px; border: 1px solid rgba(255,255,255,0.2); }

@media (max-width: 768px) {
  .resize-wrapper { height: 230px; padding-top: 3rem; }
  .resize-content { padding: 1rem; }
  .rc-header { height: 16px; margin-bottom: 1rem; }
  .rc-grid { grid-template-columns: repeat(auto-fit, minmax(60px, 1fr)); gap: 0.5rem; }
  .rc-card { height: 60px; border-radius: 6px; }
  .preset-btn { font-size: 0.625rem; padding: 0.2rem 0.5rem; }
}

/* --------------------------------------------------------------------------
   GALERIE (Completed Works)
   -------------------------------------------------------------------------- */
.gallery { background: var(--bg); padding: clamp(4rem, 6vw, 8rem) 0; }
.gallery-header { margin-bottom: clamp(3rem, 5vw, 5rem); }
.gallery-header h2 { margin-bottom: 0.625rem; }
.gallery-header p { color: var(--text-s); font-size: 0.9375rem; }
.gallery-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); gap: clamp(2rem, 4vw, 3rem);
}
.gallery-item {
  display: flex; flex-direction: column; gap: 1rem;
}
.gallery-visual {
  width: 100%; aspect-ratio: 16 / 10; border-radius: var(--r); overflow: hidden;
  background: var(--bg-alt); border: 1px solid var(--border); position: relative;
}
.gallery-link {
  text-decoration: none; color: inherit; display: block;
}
.gallery-img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform var(--med) var(--ease);
  display: block;
}
.gallery-item:hover .gallery-img {
  transform: scale(1.05);
}
.gallery-placeholder {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  background: repeating-linear-gradient(45deg, rgba(0,0,0,0.02), rgba(0,0,0,0.02) 10px, transparent 10px, transparent 20px);
  color: var(--text-s); font-size: 0.8125rem; font-weight: 500; font-family: monospace;
}
.gallery-info { display: flex; flex-direction: column; gap: 0.25rem; }
.gallery-meta { font-size: 0.75rem; color: var(--text-s); font-weight: 500; text-transform: uppercase; letter-spacing: 0.05em; }
.gallery-title { font-size: 1.125rem; font-weight: 600; letter-spacing: -0.01em; }

/* Feature 03: Architecture (Modern Stack) */
.stack-visual {
  position: relative; width: 100%; height: 320px;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  perspective: 1000px;
}
.stack-layer {
  position: absolute; width: min(100%, 280px); height: 100px;
  background: var(--bg-alt); border: 1px solid var(--border);
  border-radius: 12px; backdrop-filter: blur(10px);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  transition: all 0.6s cubic-bezier(0.16, 1, 0.3, 1);
  transform-style: preserve-3d;
  box-shadow: 0 10px 30px rgba(0,0,0,0.05);
}
.stack-layer::before {
  content: ''; position: absolute; inset: 0; border-radius: 12px;
  background: linear-gradient(135deg, rgba(255,255,255,0.1) 0%, transparent 100%);
  opacity: 0.5; pointer-events: none;
}
.layer-title { font-size: 0.875rem; font-weight: 500; color: var(--text-s); text-transform: uppercase; letter-spacing: 0.1em; margin-bottom: 0.25rem; pointer-events: none; }
.layer-tech { font-size: 1.25rem; font-weight: 600; color: var(--text); pointer-events: none; }

/* Initial State (Stacked) */
.layer-front { transform: translateY(-30px) translateZ(60px) rotateX(60deg) rotateZ(-45deg); z-index: 3; cursor: pointer; }
.layer-api   { transform: translateY(0px) translateZ(0px) rotateX(60deg) rotateZ(-45deg); z-index: 2; border-color: rgba(74, 107, 138, 0.3); cursor: pointer; }
.layer-back  { transform: translateY(30px) translateZ(-60px) rotateX(60deg) rotateZ(-45deg); z-index: 1; cursor: pointer; }

/* Hover State (Separated) */
.stack-visual:hover .layer-front { transform: translateY(-70px) translateZ(100px) rotateX(60deg) rotateZ(-45deg); }
.stack-visual:hover .layer-api   { transform: translateY(0px) translateZ(0px) rotateX(60deg) rotateZ(-45deg); }
.stack-visual:hover .layer-back  { transform: translateY(70px) translateZ(-100px) rotateX(60deg) rotateZ(-45deg); }

/* Specific Layer Highlight */
.stack-layer:hover, .stack-layer.active {
  border-color: var(--accent) !important;
  background: rgba(74, 107, 138, 0.15) !important;
}

@media (max-width: 1024px) {
  .cap-feature, .cap-feature--reversed { grid-template-columns: 1fr; gap: 3rem; }
  .cap-feature--reversed .cap-text { order: 1; }
  .cap-feature--reversed .cap-visual { order: 2; }
  .perf-dashboard { flex-direction: column; align-items: center; gap: 4rem; padding: 4rem 2rem; }
  .perf-metric { width: 100%; max-width: 160px; }
}
@media (max-width: 768px) {
  .stack-visual { height: 280px; }
  .stack-layer { width: min(100%, 210px); height: 80px; }
  .layer-tech { font-size: 1.1rem; }
  .layer-front { transform: translateY(-20px) translateZ(40px) rotateX(60deg) rotateZ(-45deg); }
  .layer-back  { transform: translateY(20px) translateZ(-40px) rotateX(60deg) rotateZ(-45deg); }
  
  .stack-visual:hover .layer-front, .stack-visual.active .layer-front { transform: translateY(-50px) translateZ(70px) rotateX(60deg) rotateZ(-45deg); }
  .stack-visual:hover .layer-back, .stack-visual.active .layer-back  { transform: translateY(50px) translateZ(-70px) rotateX(60deg) rotateZ(-45deg); }
}

/* --------------------------------------------------------------------------
   STATEMENT
   -------------------------------------------------------------------------- */
.statement { 
  background: var(--bg-alt) url('../img/light_abstract_hero_1786392498931.jpg') center/cover no-repeat fixed;
  border-top: none;
  position: relative;
}
.statement::before {
  content: ''; position: absolute; inset: 0; background: rgba(255,255,255,0.2);
}
.statement .container { position: relative; z-index: 2; }
.statement-quote {
  font-size: clamp(1.625rem, 3vw, 2.375rem);
  font-weight: 600; line-height: 1.2; letter-spacing: -0.025em;
  max-width: 22ch; margin-bottom: clamp(2.5rem, 4vw, 3.5rem);
}

/* Responsive Demo */
.responsive-demo {
  display: flex; align-items: flex-end; gap: clamp(1rem, 2vw, 2rem);
  justify-content: center;
  padding: clamp(2rem, 3vw, 3rem) 0;
}
.device {
  background: var(--bg); border: 1px solid var(--border);
  border-radius: var(--r); overflow: hidden;
  box-shadow: 0 4px 16px rgba(0,0,0,0.06);
  flex-shrink: 0;
}
.device-desktop { width: clamp(280px, 35vw, 420px); }
.device-tablet { width: clamp(170px, 20vw, 240px); }
.device-mobile { width: clamp(90px, 11vw, 130px); }
.device-topbar {
  display: flex; align-items: center; gap: 4px;
  padding: 6px 8px; border-bottom: 1px solid var(--border); background: var(--bg-alt);
}
.device-topbar .dot { width: 5px; height: 5px; border-radius: 50%; background: var(--border); }
.device-screen { padding: 0; }

/* Abstract site content inside devices */
.mini-site { padding: 8px; }
.mini-nav { display: flex; gap: 4px; margin-bottom: 8px; }
.mini-nav span { width: 16px; height: 2px; background: var(--border); border-radius: 1px; }
.mini-nav span:first-child { width: 24px; background: var(--text); }
.mini-hero { height: 40px; background: var(--bg-alt); border-radius: 4px; margin-bottom: 6px; }
.mini-text { height: 3px; background: var(--border); border-radius: 1px; margin-bottom: 4px; }
.mini-text:nth-child(2) { width: 75%; }
.mini-text:nth-child(3) { width: 50%; }
.mini-btn { width: 32px; height: 8px; background: var(--text); border-radius: 2px; margin-top: 6px; }
.mini-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; margin-top: 8px; }
.mini-card { height: 28px; background: var(--bg-alt); border-radius: 3px; }

.device-label {
  text-align: center; padding-top: 0.75rem;
  font-size: 0.6875rem; font-weight: 500; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--text-s);
}

/* Tablet: fewer elements */
.device-tablet .mini-grid { grid-template-columns: 1fr; }
.device-tablet .mini-card:nth-child(2) { display: none; }

/* Mobile: even simpler */
.device-mobile .mini-nav span:nth-child(n+3) { display: none; }
.device-mobile .mini-grid { display: none; }
.device-mobile .mini-hero { height: 28px; }

/* --------------------------------------------------------------------------
   SERVICES
   -------------------------------------------------------------------------- */
.services { border-top: 1px solid var(--border); }
.services-tabular {
  display: flex; flex-direction: column;
}
.service-row {
  display: grid; grid-template-columns: minmax(3rem, auto) 1fr 2fr; gap: clamp(1.5rem, 3vw, 3rem);
  padding: clamp(2.5rem, 5vw, 4rem) 0;
  border-bottom: 1px solid var(--border);
  align-items: start;
}
.service-row:first-child { border-top: 1px solid var(--border); }
.service-num {
  font-size: 0.8125rem; font-weight: 500; color: var(--text-s);
  padding-top: 0.35rem; /* optical alignment */
}
.service-title {
  font-size: clamp(1.25rem, 1.8vw, 1.625rem); font-weight: 500; letter-spacing: -0.01em; margin: 0;
}
.service-desc {
  font-size: 1rem; color: var(--text-s); line-height: 1.6; margin: 0; max-width: 55ch;
}

/* --------------------------------------------------------------------------
   PROCESS
   -------------------------------------------------------------------------- */
.process { background: var(--bg-alt); }
.process-header { margin-bottom: clamp(2rem, 3vw, 3rem); }
.process-steps {
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: clamp(1rem, 2vw, 2rem); position: relative;
}
.process-line {
  position: absolute; top: 1.1875rem; left: 12.5%; right: 12.5%;
  height: 1px; background: var(--border);
}
.process-line-fill {
  height: 100%; width: 0%; background: var(--accent);
  transition: width 0.08s linear;
}
.process-line-vertical { display: none; }
.process-step { text-align: center; position: relative; z-index: 1; }
.step-num {
  display: inline-flex; align-items: center; justify-content: center;
  width: 2.375rem; height: 2.375rem; border-radius: 50%;
  border: 1.5px solid var(--border); background: var(--bg-alt);
  font-size: 0.75rem; font-weight: 600; color: var(--text-s);
  margin-bottom: 0.75rem;
  transition: border-color var(--med) ease, color var(--med) ease, background var(--med) ease;
}
.process-step.active .step-num { border-color: var(--accent); color: var(--accent); background: var(--bg); }
.step-title { font-size: 0.9375rem; font-weight: 600; margin-bottom: 0.25rem; }
.step-desc { font-size: 0.8125rem; color: var(--text-s); line-height: 1.45; max-width: 18ch; margin: 0 auto; }

/* --------------------------------------------------------------------------
   ABOUT
   -------------------------------------------------------------------------- */
.about-grid {
  display: grid; grid-template-columns: 1.3fr 0.7fr;
  gap: clamp(2rem, 4vw, 4rem); align-items: start;
}
.about-text h2 { margin-bottom: 0.5rem; }
.about-role { font-size: 1rem; color: var(--text-s); margin-bottom: 1.25rem; }
.about-body { font-size: 1rem; line-height: 1.7; color: var(--text-s); }
.about-details { display: flex; flex-direction: column; gap: 0; }
.about-detail {
  font-size: 0.6875rem; font-weight: 500; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--text-s); padding: 0.75rem 0; border-bottom: 1px solid var(--border);
}
.about-detail:first-child { border-top: 1px solid var(--border); }

/* --------------------------------------------------------------------------
   CTA + CONTACT (BLACK SECTION)
   -------------------------------------------------------------------------- */
.cta-contact {
  background: var(--bg-dark); color: var(--text-inv);
  padding: clamp(4rem, 6vw, 6rem) 0;
}
.cta-grid {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: clamp(3rem, 5vw, 5rem); align-items: start;
}
.cta-content { }
.cta-content h2 {
  color: var(--text-inv); font-size: clamp(2rem, 3.5vw, 2.75rem);
  margin-bottom: 1rem;
}
.cta-content .cta-sub {
  font-size: 1rem; color: rgba(255,255,255,0.55); margin-bottom: 1.75rem; max-width: 36ch;
}
.cta-content .btn-primary {
  background: var(--text-inv); color: var(--text);
  font-size: 0.9375rem; padding: 0.8125rem 1.625rem;
}
.cta-content .btn-primary:hover { opacity: 0.9; }
.cta-content .cta-alt {
  display: block; margin-top: 1rem;
  font-size: 0.875rem; color: rgba(255,255,255,0.4);
  transition: color var(--fast) ease;
}
.cta-content .cta-alt:hover { color: rgba(255,255,255,0.7); }

/* Dark form */
.dark-form { }
.dark-form .form-group { margin-bottom: 1.125rem; }
.dark-form .form-label {
  display: block; font-size: 0.8125rem; font-weight: 500;
  color: rgba(255,255,255,0.5); margin-bottom: 0.375rem;
}
.dark-form .form-input,
.dark-form .form-textarea {
  width: 100%; font-family: var(--font); font-size: 1rem;
  color: var(--text-inv);
  background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.12);
  border-radius: 6px; padding: 0.6875rem 0.875rem;
  transition: border-color var(--fast) ease, background var(--fast) ease;
  appearance: none;
}
.dark-form .form-input:focus,
.dark-form .form-textarea:focus {
  outline: none; border-color: rgba(255,255,255,0.3); background: rgba(255,255,255,0.08);
}
.dark-form .form-input::placeholder,
.dark-form .form-textarea::placeholder { color: rgba(255,255,255,0.25); }
.dark-form .form-textarea { resize: vertical; min-height: 100px; }
.dark-form .form-checkbox {
  display: flex; align-items: flex-start; gap: 0.5rem; margin-bottom: 1.25rem;
}
.dark-form .form-checkbox input[type="checkbox"] {
  width: 16px; height: 16px; margin-top: 2px; accent-color: var(--accent); flex-shrink: 0;
}
.dark-form .form-checkbox label {
  font-size: 0.75rem; color: rgba(255,255,255,0.4); line-height: 1.5;
}
.dark-form .form-checkbox a {
  color: rgba(255,255,255,0.6); text-decoration: underline; text-underline-offset: 2px;
}
.dark-form .form-submit {
  display: inline-flex; align-items: center; gap: 0.5rem;
  font-family: var(--font); font-size: 0.875rem; font-weight: 500;
  color: var(--text); background: var(--text-inv);
  border: none; padding: 0.75rem 1.5rem; border-radius: 6px; cursor: pointer;
  transition: opacity var(--fast) ease, transform var(--fast) ease;
}
.dark-form .form-submit:hover { opacity: 0.9; transform: translateY(-1px); }
.dark-form .form-submit:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }
.dark-form .form-submit svg { width: 14px; height: 14px; }

/* Dark Mode Overrides for CTA + Contact Form (White Section) */
[data-theme="dark"] .cta-contact {
  background: var(--text); color: var(--bg);
}
[data-theme="dark"] .cta-content h2 {
  color: var(--bg);
}
[data-theme="dark"] .cta-content .cta-sub {
  color: rgba(17, 17, 17, 0.55);
}
[data-theme="dark"] .cta-content .btn-primary {
  background: var(--bg); color: var(--text);
}
[data-theme="dark"] .cta-content .cta-alt {
  color: rgba(17, 17, 17, 0.4);
}
[data-theme="dark"] .cta-content .cta-alt:hover {
  color: rgba(17, 17, 17, 0.7);
}

[data-theme="dark"] .dark-form .form-label {
  color: rgba(17, 17, 17, 0.5);
}
[data-theme="dark"] .dark-form .form-input,
[data-theme="dark"] .dark-form .form-textarea {
  color: var(--bg);
  background: rgba(17, 17, 17, 0.04);
  border: 1px solid rgba(17, 17, 17, 0.12);
}
[data-theme="dark"] .dark-form .form-input:focus,
[data-theme="dark"] .dark-form .form-textarea:focus {
  border-color: rgba(17, 17, 17, 0.3);
  background: rgba(17, 17, 17, 0.06);
}
[data-theme="dark"] .dark-form .form-input::placeholder,
[data-theme="dark"] .dark-form .form-textarea::placeholder {
  color: rgba(17, 17, 17, 0.35);
}
[data-theme="dark"] .dark-form .form-checkbox label {
  color: rgba(17, 17, 17, 0.6);
}
[data-theme="dark"] .dark-form .form-checkbox a {
  color: rgba(17, 17, 17, 0.8);
}
[data-theme="dark"] .dark-form .form-submit {
  color: var(--text);
  background: var(--bg);
}

/* --------------------------------------------------------------------------
   FOOTER
   -------------------------------------------------------------------------- */
.footer { padding: clamp(2rem, 3vw, 2.5rem) 0; border-top: 1px solid var(--border); }
.footer-inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1.5rem; flex-wrap: wrap;
}
.footer-brand { display: flex; align-items: center; gap: 0.5rem; font-size: 0.875rem; font-weight: 600; letter-spacing: -0.01em; }
.footer-brand img { height: 28px; width: auto; display: block; }
.footer-brand small { font-weight: 400; color: var(--text-s); margin-left: 0.5rem; font-size: 0.75rem; }
.footer-links { display: flex; gap: 1.5rem; align-items: center; flex-wrap: wrap; justify-content: center; }
.footer-link { font-size: 0.75rem; color: var(--text-s); transition: color var(--fast) ease; }
.footer-link:hover { color: var(--text); }
.footer-copy { font-size: 0.6875rem; color: var(--text-s); }

/* --------------------------------------------------------------------------
   TOAST
   -------------------------------------------------------------------------- */
.toast {
  position: fixed; bottom: 1.5rem; left: 50%; transform: translateX(-50%) translateY(100%);
  background: var(--text); color: var(--text-inv);
  font-size: 0.8125rem; font-weight: 500; padding: 0.75rem 1.25rem; border-radius: 6px;
  z-index: 200; opacity: 0; transition: transform var(--med) var(--ease), opacity var(--med) var(--ease);
  pointer-events: none;
}
.toast.show { transform: translateX(-50%) translateY(0); opacity: 1; }
.toast.error { background: #c0392b; }

/* --------------------------------------------------------------------------
   SCROLL REVEAL
   -------------------------------------------------------------------------- */
.reveal {
  opacity: 0; transform: translateY(20px);
  transition: opacity var(--slow) var(--ease), transform var(--slow) var(--ease);
}
.reveal.visible { opacity: 1; transform: translateY(0); }
.reveal-d1 { transition-delay: 80ms; }
.reveal-d2 { transition-delay: 160ms; }
.reveal-d3 { transition-delay: 240ms; }
.reveal-d4 { transition-delay: 320ms; }

/* --------------------------------------------------------------------------
   DEV LABELS
   -------------------------------------------------------------------------- */
.dev-label {
  display: inline-flex; align-items: center; gap: 0.3rem;
  font-size: 0.6875rem; font-family: 'SF Mono', 'Fira Code', monospace;
  color: var(--text-s); opacity: 0.65; letter-spacing: 0.01em;
}
.dev-label .ck { color: var(--accent); }

/* --------------------------------------------------------------------------
   RESPONSIVE – TABLET
   -------------------------------------------------------------------------- */
/* --------------------------------------------------------------------------
   RESPONSIVE – TABLET & LAPTOP (< 1024px)
   -------------------------------------------------------------------------- */
@media (max-width: 1024px) {
  .project--split-lr,
  .project--split-rl { grid-template-columns: 1fr; }
  .hide-mobile-tablet { display: none !important; }
  
  /* Services Tabular Responsive */
  .service-row {
    grid-template-columns: 1fr;
    gap: 0.75rem;
    padding: clamp(2rem, 4vw, 2.5rem) 0;
  }
  .service-num { padding-top: 0; }
  .service-desc { max-width: 100%; }
  .about-grid { grid-template-columns: 1fr 1fr; }
  .responsive-demo { flex-wrap: nowrap; }
}

/* --------------------------------------------------------------------------
   RESPONSIVE – MOBILE (< 767px)
   -------------------------------------------------------------------------- */
@media (max-width: 767px) {
  /* Touch-Target Expansion for small buttons */
  .theme-toggle-btn,
  .nav-toggle,
  .btn-flip,
  .ui-comp-action,
  .preset-btn {
    position: relative;
  }
  
  .theme-toggle-btn::after,
  .nav-toggle::after,
  .btn-flip::after,
  .ui-comp-action::after,
  .preset-btn::after {
    content: '';
    position: absolute;
    top: -12px;
    right: -12px;
    bottom: -12px;
    left: -12px;
    z-index: 1; /* Ensure it stays clickable above background */
  }

  /* Global Spacing & Typography Overrides */
  .section { padding: 3rem 0; }
  .work { padding-top: 4rem; }
  h1 { font-size: clamp(2.25rem, 8vw, 3rem); }
  h2 { font-size: clamp(1.5rem, 6vw, 2rem); }
  .hero-desc { font-size: 1rem; }

  /* Nav */
  .nav-links { display: none; }
  .nav-toggle { display: block; }
  .mobile-menu {
    display: flex; flex-direction: column; justify-content: center; align-items: center;
    position: fixed; inset: 0; background: var(--bg); z-index: 100;
    opacity: 0; visibility: hidden; transition: opacity var(--med) var(--ease), visibility var(--med), background-color var(--med) var(--ease);
    backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
    touch-action: none; overscroll-behavior: none;
  }
  .mobile-menu.open { opacity: 1; visibility: visible; }
  .mm-links { display: flex; flex-direction: column; align-items: center; gap: 1.75rem; }
  .mm-link {
    font-size: 1.5rem; font-weight: 500; color: var(--text);
    padding: 0.75rem 1.5rem; /* Large touch target */
    opacity: 0; transform: translateY(12px);
    transition: opacity var(--med) var(--ease), transform var(--med) var(--ease), color var(--fast) ease;
  }
  .mobile-menu.open .mm-link { opacity: 1; transform: translateY(0); }
  .mobile-menu.open .mm-link:nth-child(1) { transition-delay: 40ms; }
  .mobile-menu.open .mm-link:nth-child(2) { transition-delay: 80ms; }
  .mobile-menu.open .mm-link:nth-child(3) { transition-delay: 120ms; }
  .mobile-menu.open .mm-link:nth-child(4) { transition-delay: 160ms; }
  .mm-link:hover, .mm-link:active { color: var(--accent); }
  .mm-cta {
    opacity: 0; transform: translateY(12px);
    transition: opacity var(--med) var(--ease), transform var(--med) var(--ease);
    transition-delay: 220ms; min-height: 48px; padding: 0.85rem 1.75rem;
  }
  .mobile-menu.open .mm-cta { opacity: 1; transform: translateY(0); }
  
  /* Global Touch Targets */
  .btn-primary, .btn-secondary, .btn-tertiary {
    min-height: 48px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }
  .hero-actions .btn-primary, .hero-actions .btn-secondary {
    width: 100%;
  }

  /* Hero (Native App/Phone Mockup Canvas) */
  .hero { padding-top: calc(64px + 1.25rem); }
  .hero-browser { margin: 2rem 0 -1rem 0; padding: 0; }
  .browser-bar { display: none; }
  .browser-frame { border: 1px solid var(--border); box-shadow: 0 16px 40px rgba(0,0,0,0.08); border-radius: 1.25rem; }
  .ui-body { grid-template-columns: 1fr; gap: 1.25rem; }
  .ui-hero-text .ui-line { height: 16px; margin-bottom: 0.5rem; }
  .ui-hero-text .ui-line--l { height: 28px; margin-bottom: 0.75rem; }
  .ui-btn { width: 90px; height: 36px; }
  .ui-nav { margin-bottom: 1.25rem; }
  .ui-logo { width: 28px; height: 28px; }
  .ui-nav-links span { width: 32px; height: 4px; }
  .ui-cards { gap: 0.5rem; }
  .ui-card { padding: 0.625rem; gap: 0.75rem; }
  .ui-card-img { width: 28px; height: 28px; }
  .hero-interactive-ui { padding: 1.25rem 1rem; min-height: auto; }

  /* Capabilities: 3D Flip Card Mobile Adaptation */
  .flip-container { height: 350px; }
  .ui-component-demo { padding: 1.5rem 1.25rem; }
  .code-window { font-size: 0.75rem; line-height: 1.55; }
  .code-body { padding: 1.25rem 1rem; }
  .code-header { padding: 0.75rem 1rem; }
  .ui-comp-action, .btn-flip { min-height: 44px; display: inline-flex; align-items: center; justify-content: center; }

  /* Capabilities: Fluid Resizer Mobile Touch Polish */
  .resize-wrapper { padding: 3.25rem 0 1.5rem 0; height: 230px; }
  .resize-handle { width: 44px; height: 56px; border-radius: 20px; } /* Ergonomic 44px touch target */

  /* Modern Stack Mobile Grid */
  .stack-visual { height: 280px; }
  .stack-layer { width: min(100%, 250px); height: 80px; }
  .layer-title { font-size: 0.75rem; }
  .layer-tech { font-size: 1.05rem; }

  /* Projects / Gallery */
  .gallery-grid { grid-template-columns: 1fr; gap: 1.5rem; }
  .gallery-visual { aspect-ratio: 16 / 10; border-radius: var(--r); }

  /* Statement */
  .statement-quote { max-width: none; font-size: clamp(1.375rem, 5vw, 1.875rem); }

  /* Responsive demo */
  .preview-device--desktop { width: 45vw; max-width: 200px; height: 130px; }
  .preview-device--tablet { width: 28vw; max-width: 130px; height: 130px; }
  .preview-device--mobile { width: 15vw; max-width: 70px; height: 110px; }

  /* Process Vertical Timeline Line for Mobile */
  .process-steps { grid-template-columns: 1fr; gap: 1.75rem; position: relative; }
  .process-line { display: none; }
  .process-line-vertical {
    display: block; position: absolute; top: 1rem; bottom: 1rem; left: 1.15rem;
    width: 2px; background: var(--border); z-index: 1; border-radius: 1px;
  }
  .process-line-fill-v {
    width: 100%; height: 0%; background: var(--accent);
    transition: height 100ms linear; border-radius: 1px;
  }
  .process-step {
    text-align: left; display: grid; grid-template-columns: 2.375rem 1fr;
    gap: 1rem; align-items: start; position: relative; z-index: 2;
  }
  .step-num {
    margin-bottom: 0; background: var(--bg); border: 1.5px solid var(--border);
    border-radius: 50%; width: 2.375rem; height: 2.375rem;
    display: flex; align-items: center; justify-content: center;
    font-size: 0.8125rem; font-weight: 600; color: var(--text-s);
    transition: all var(--med) ease;
  }
  .process-step.active .step-num {
    background: var(--text); color: var(--text-inv); border-color: var(--text);
  }
  .step-desc { max-width: none; margin: 0; }
  .step-content { padding-top: 0.2rem; }

  /* About */
  .about-grid { grid-template-columns: 1fr; gap: 2rem; }

  /* CTA + Contact Form Ergonomics */
  .cta-grid { grid-template-columns: 1fr; gap: 2.5rem; }
  .dark-form .form-input,
  .dark-form .form-textarea {
    font-size: 16px; /* Prevents auto-zoom on iOS */
    padding: 0.8125rem 1rem;
    min-height: 48px;
  }
  .dark-form .form-checkbox { margin-bottom: 1.5rem; }
  .dark-form .form-checkbox input[type="checkbox"] { width: 20px; height: 20px; margin-top: 0; }
  .dark-form .form-submit {
    width: 100%; justify-content: center; min-height: 48px; font-size: 0.9375rem;
  }

  /* Footer */
  .footer-inner { flex-direction: column; text-align: center; gap: 1.25rem; }
  .footer-links { justify-content: center; gap: 1.25rem; }
  .footer-link { padding: 0.25rem 0.5rem; }
}

/* --------------------------------------------------------------------------
   SMALL MOBILE (< 479px)
   -------------------------------------------------------------------------- */
@media (max-width: 479px) {
  h1 { font-size: clamp(1.875rem, 7.5vw, 2.25rem); word-break: break-word; }
  .hero-actions { flex-direction: column; align-items: stretch; width: 100%; }
  .responsive-demo { gap: 3vw; }
  .preview-device--desktop { width: 45vw; max-width: 140px; height: 90px; }
  .preview-device--tablet { width: 28vw; max-width: 80px; height: 90px; }
  .preview-device--mobile { width: 15vw; max-width: 45px; height: 75px; }
  .preview-code { font-size: 0.75rem; padding: 0.75rem; }

  /* Extra scaling for Design block on very small screens */
  .preview-block--tall { height: 50px; }
  .preview-block--short { height: 25px; }
  .preview-block--full { height: 18px; }
  .preview-design { gap: 6px; }
}

/* --------------------------------------------------------------------------
   REDUCED MOTION
   -------------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important; animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important; scroll-behavior: auto !important;
  }
  .reveal { opacity: 1; transform: none; }
}

body.no-scroll { overflow: hidden; overscroll-behavior: none; }

@media print {
  .nav, .mobile-menu, .toast { display: none !important; }
  body { background: #fff; color: #000; }
}

/* --------------------------------------------------------------------------
   AI BADGE
   -------------------------------------------------------------------------- */
.ai-bg-note {
  position: absolute;
  font-size: 0.625rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  color: #ffffff;
  text-transform: uppercase;
  z-index: 10;
  pointer-events: none;
  opacity: 0.8;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.7);
}

.ai-bg-note--br {
  bottom: clamp(1rem, 2vw, 1.5rem);
  right: clamp(1rem, 2vw, 1.5rem);
}

.ai-bg-note--tr {
  top: clamp(1rem, 2vw, 1.5rem);
  right: clamp(1rem, 2vw, 1.5rem);
}

/* --------------------------------------------------------------------------
   LOGO BREAK ANIMATION (AGENCY-GRADE PRECISION REVEAL)
   -------------------------------------------------------------------------- */
.logo-break {
  min-height: 300vh;
  position: relative;
  background-color: var(--bg-dark);
  color: #FFFFFF;
}
.lb-sticky {
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  z-index: 5;
}
.lb-canvas {
  position: relative;
  width: 100%;
  max-width: 1200px;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2rem;
}
.lb-background-grid {
  position: absolute;
  inset: 0;
  background-image: 
    radial-gradient(circle at center, rgba(255,255,255,0.12) 0%, transparent 65%),
    linear-gradient(to right, rgba(255,255,255,0.04) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255,255,255,0.04) 1px, transparent 1px);
  background-size: 100% 100%, 40px 40px, 40px 40px;
  background-position: center center;
  pointer-events: none;
  opacity: 0.85;
  transition: opacity 0.3s ease;
}
.lb-core-badge {
  position: absolute;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  z-index: 1;
  pointer-events: none;
  will-change: transform, opacity;
  opacity: 0;
  transform: scale(0.85);
}
.lb-badge-tag {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.25em;
  color: var(--accent);
  text-transform: uppercase;
  margin-bottom: 0.75rem;
}
.lb-badge-title {
  font-size: clamp(1.75rem, 4vw, 3.25rem);
  font-weight: 600;
  letter-spacing: -0.02em;
  color: #FFFFFF;
  line-height: 1.2;
  text-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}
.lb-logo-wrap {
  position: relative;
  width: clamp(130px, 16vw, 220px);
  height: clamp(130px, 16vw, 220px);
  margin-bottom: 1.5rem;
  z-index: 2;
  perspective: 1200px;
  transform-style: preserve-3d;
  filter: drop-shadow(0 12px 28px rgba(0, 0, 0, 0.45));
}
.lb-svg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  fill: #FFFFFF;
  will-change: transform;
  transform-origin: center center;
}
.lb-logo-intact {
  z-index: 3;
  will-change: opacity;
}
.lb-text-wrap {
  font-size: clamp(2rem, 5vw, 4.25rem);
  font-weight: 600;
  letter-spacing: -0.02em;
  display: flex;
  color: #FFFFFF;
  z-index: 2;
  overflow: visible;
  perspective: 1200px;
  transform-style: preserve-3d;
}
.lb-char {
  display: inline-block;
  will-change: transform;
  transform-origin: center center;
  backface-visibility: hidden;
  transition: color 0.2s ease;
}
.lb-dot {
  color: var(--accent);
}

/* --------------------------------------------------------------------------
   LANDINGPAGE STYLES
   -------------------------------------------------------------------------- */

/* LP Hero */
.lp-hero {
  padding-top: calc(64px + clamp(3rem, 5vw, 4.5rem));
  padding-bottom: clamp(3rem, 5vw, 4.5rem);
}
.lp-hero-inner {
  max-width: 720px;
}

/* LP Section Header (reusable) */
.lp-section-header {
  margin-bottom: clamp(2rem, 3vw, 3rem);
}
.lp-section-header h2 {
  margin-bottom: 0.5rem;
}
.lp-section-header p {
  color: var(--text-s);
  font-size: 0.9375rem;
}

/* LP Problem Rows */
.lp-problem-list {
  display: flex;
  flex-direction: column;
}
.lp-problem-row {
  display: grid;
  grid-template-columns: 24px 1fr;
  gap: 1.25rem;
  padding: clamp(1.5rem, 3vw, 2rem) 0;
  border-bottom: 1px solid var(--border);
  align-items: start;
}
.lp-problem-row:first-child {
  border-top: 1px solid var(--border);
}
.lp-problem-icon {
  width: 24px;
  height: 24px;
  color: var(--text-s);
  flex-shrink: 0;
  margin-top: 0.125rem;
}
.lp-problem-text {
  font-size: 1rem;
  line-height: 1.6;
  color: var(--text-s);
  max-width: 60ch;
}
.lp-problem-text strong {
  color: var(--text);
  font-weight: 500;
}

/* LP Solution Grid */
.lp-solution-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: clamp(2rem, 4vw, 4rem);
  align-items: start;
}
.lp-solution-text h2 {
  margin-bottom: 1rem;
}
.lp-solution-text p {
  color: var(--text-s);
  font-size: 1rem;
  line-height: 1.65;
}
.lp-solution-points {
  display: flex;
  flex-direction: column;
}
.lp-solution-point {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.875rem 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--text);
}
.lp-solution-point:first-child {
  border-top: 1px solid var(--border);
}
.lp-solution-check {
  width: 16px;
  height: 16px;
  color: var(--accent);
  flex-shrink: 0;
}

/* LP Benefits */
.lp-benefits-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: clamp(2rem, 3vw, 3rem);
}
.lp-benefit {
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
}
.lp-benefit-title {
  font-size: 1.125rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  margin-bottom: 0.5rem;
  color: var(--text);
}
.lp-benefit-desc {
  font-size: 0.9375rem;
  color: var(--text-s);
  line-height: 1.6;
}

/* FAQ Accordion */
.faq-list {
  display: flex;
  flex-direction: column;
}
.faq-item {
  border-bottom: 1px solid var(--border);
}
.faq-item:first-child {
  border-top: 1px solid var(--border);
}
.faq-question {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  width: 100%;
  padding: clamp(1.25rem, 2vw, 1.5rem) 0;
  font-size: 1rem;
  font-weight: 500;
  text-align: left;
  color: var(--text);
  cursor: pointer;
  background: none;
  border: none;
  font-family: var(--font);
  transition: color var(--fast) ease;
}
.faq-question:hover {
  color: var(--accent);
}
.faq-chevron {
  width: 18px;
  height: 18px;
  color: var(--text-s);
  flex-shrink: 0;
  transition: transform var(--med) var(--ease);
}
.faq-item.open .faq-chevron {
  transform: rotate(180deg);
}
.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height var(--med) var(--ease);
}
.faq-answer-inner {
  padding-bottom: clamp(1.25rem, 2vw, 1.5rem);
  font-size: 0.9375rem;
  line-height: 1.65;
  color: var(--text-s);
  max-width: 60ch;
}

/* LP Final CTA */
.lp-final-cta {
  background: var(--bg-dark);
  color: var(--text-inv);
  padding: clamp(4rem, 6vw, 6rem) 0;
  text-align: center;
}
.lp-final-cta h2 {
  color: var(--text-inv);
  font-size: clamp(2rem, 3.5vw, 2.75rem);
  margin-bottom: 1rem;
}
.lp-final-cta p {
  color: rgba(255,255,255,0.55);
  font-size: 1rem;
  margin: 0 auto 1.75rem auto;
  max-width: 40ch;
}
.lp-final-cta .btn-primary {
  background: var(--text-inv);
  color: var(--text);
  font-size: 0.9375rem;
  padding: 0.8125rem 1.625rem;
}
.lp-final-cta .btn-primary:hover {
  opacity: 0.9;
}
.lp-final-cta .cta-alt {
  display: block;
  margin-top: 1rem;
  font-size: 0.875rem;
  color: rgba(255,255,255,0.4);
  transition: color var(--fast) ease;
}
.lp-final-cta .cta-alt:hover {
  color: rgba(255,255,255,0.7);
}

/* Dark Mode: LP Final CTA */
[data-theme="dark"] .lp-final-cta {
  background: var(--text);
  color: var(--bg);
}
[data-theme="dark"] .lp-final-cta h2 {
  color: var(--bg);
}
[data-theme="dark"] .lp-final-cta p {
  color: rgba(17, 17, 17, 0.55);
}
[data-theme="dark"] .lp-final-cta .btn-primary {
  background: var(--bg);
  color: var(--text);
}
[data-theme="dark"] .lp-final-cta .cta-alt {
  color: rgba(17, 17, 17, 0.4);
}
[data-theme="dark"] .lp-final-cta .cta-alt:hover {
  color: rgba(17, 17, 17, 0.7);
}

/* LP Responsive – Tablet */
@media (max-width: 1024px) {
  .lp-solution-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
}

/* LP Responsive – Mobile */
@media (max-width: 767px) {
  .lp-benefits-grid {
    grid-template-columns: 1fr;
  }
  .lp-hero {
    padding-top: calc(64px + 1.25rem);
  }
  .lp-final-cta .btn-primary {
    width: 100%;
    justify-content: center;
    min-height: 48px;
  }
}
