/* Fonts loaded via <link> in HTML for fast non-blocking load.
   Do NOT re-add @import here — it causes a render-blocking waterfall. */

/* ═══════════════════════════════════════════
   V8 PRODUCTION — White Theme (Orbitron Variant)
   Cinematic Precision · Minimalist
   ═══════════════════════════════════════════ */

:root {
  /* Core Palette */
  --bg-primary: #ffffff;
  --bg-secondary: #f8f9fa;
  --bg-card: #f8f9fa;
  --bg-card-hover: #ffffff;

  /* Accent */
  --accent: #000000;
  --accent-soft: rgba(0, 0, 0, 0.05);

  /* Text */
  --text: #191c1d;
  --text-dim: #5b5f63;
  --text-muted: #7e7576;

  /* Borders */
  --border: #edeeef;
  --border-hover: #000000;

  /* Typography */
  --font-primary: 'Outfit', sans-serif;
  --font-secondary: 'Orbitron', sans-serif;

  /* Spacing — fluid so layout never breaks at any viewport width */
  --gutter: clamp(1rem, 4vw, 4rem);
  --section-padding: clamp(3.5rem, 6vw, 8rem) var(--gutter);
  --max-width: 1200px;
  --content-width: min(var(--max-width), 100% - var(--gutter) * 2);
  --radius: 4px;
}

/* ═══ RESET ═══ */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scrollbar-width: thin;
  scrollbar-color: var(--text-dim) var(--bg-primary);
}

body {
  font-family: var(--font-primary);
  background: var(--bg-primary);
  color: var(--text);
  overflow-x: hidden;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  -webkit-tap-highlight-color: transparent;
}

img { max-width: 100%; display: block; }
a { text-decoration: none; color: inherit; }
ul { list-style: none; }

/* ═══════════════════════════════════════════
   NAVBAR
   ═══════════════════════════════════════════ */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 100;
  padding: 1rem var(--gutter);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
  transition: padding 0.4s ease;
}

/* Aesthetics Logo */
.nav-logo {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.nav-logo-icon {
  width: 44px;
  height: 44px;
  object-fit: contain;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--bg-primary);
  padding: 2px;
  transition: transform 0.4s ease;
}

.nav-logo:hover .nav-logo-icon {
  transform: rotate(-10deg) scale(1.05);
}

.nav-brand-text {
  font-family: var(--font-secondary);
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  color: var(--text);
  margin-top: 2px;
}

.nav-links {
  display: flex;
  gap: 2.5rem;
}

.nav-links a {
  color: var(--text-dim);
  font-size: 0.85rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-weight: 500;
  position: relative;
  padding: 0.3rem 0;
  transition: color 0.3s ease;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 1px;
  background: var(--accent);
  transition: width 0.3s ease;
}

.nav-links a:hover {
  color: var(--accent);
}

.nav-links a:hover::after {
  width: 100%;
}

.nav-cta {
  padding: 0.6rem 1.6rem;
  background: var(--accent);
  border: 1px solid var(--accent);
  color: var(--bg-primary);
  font-family: var(--font-secondary);
  font-size: 0.75rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  font-weight: 600;
  border-radius: 50px;
  transition: background 0.3s ease, color 0.3s ease;
  display: inline-block;
}

.nav-cta:hover {
  background: transparent;
  color: var(--accent);
}

/* Mobile Toggle */
.menu-toggle-input {
  display: none;
}

.mobile-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 0.5rem;
}

.mobile-toggle span {
  width: 24px;
  height: 1.5px;
  background: var(--accent);
  transition: transform 0.3s ease, opacity 0.3s ease;
  display: block;
}

/* CSS-only mobile menu toggle */
.menu-toggle-input:checked ~ .mobile-toggle span:nth-child(1) {
  transform: rotate(45deg) translate(4px, 4px);
}
.menu-toggle-input:checked ~ .mobile-toggle span:nth-child(2) {
  opacity: 0;
}
.menu-toggle-input:checked ~ .mobile-toggle span:nth-child(3) {
  transform: rotate(-45deg) translate(4px, -4px);
}
.menu-toggle-input:checked ~ .mobile-menu {
  opacity: 1;
  visibility: visible;
  pointer-events: all;
}

/* Mobile Menu */
.mobile-menu {
  position: fixed;
  inset: 0;
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(10px);
  z-index: 99;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2rem;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.4s ease, visibility 0.4s ease;
}

.mobile-menu a {
  font-family: var(--font-secondary);
  color: var(--accent);
  font-size: 1.8rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  transition: opacity 0.3s ease;
}

.mobile-menu a:hover {
  opacity: 0.6;
}

/* ═══════════════════════════════════════════
   HERO
   ═══════════════════════════════════════════ */
.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  align-items: center;
  background: var(--bg-primary);
  padding: clamp(5rem, 8vw, 8rem) var(--gutter) clamp(2.5rem, 4vw, 4rem);
}

.hero-container {
  width: var(--content-width);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(2rem, 4vw, 4rem);
  align-items: center;
}

.hero-text-content {
  text-align: left;
  animation: heroSlideUp 1s ease-out both;
}

.hero-title {
  font-family: var(--font-secondary);
  font-size: clamp(2.5rem, 5vw, 4.5rem);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: 0.02em;
  margin-bottom: 1rem;
}

.hero-tagline {
  font-family: var(--font-secondary);
  font-size: clamp(0.9rem, 1.5vw, 1.15rem);
  font-weight: 500;
  color: var(--text-dim);
  letter-spacing: 0.1em;
  margin-bottom: 3rem;
  line-height: 1.5;
}

.hero-ctas {
  display: flex;
  gap: 1.2rem;
}

/* Underbean-style Interactive Button */
.btn-interactive {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 1.2rem 2.8rem;
  background: transparent;
  color: var(--accent);
  border: 1px solid var(--accent);
  font-family: var(--font-secondary);
  font-size: 0.8rem;
  letter-spacing: 0.15em;
  font-weight: 600;
  text-transform: uppercase;
  border-radius: 50px;
  position: relative;
  overflow: hidden;
  transition: color 0.4s cubic-bezier(0.25, 1, 0.5, 1);
  z-index: 1;
  cursor: pointer;
}

.btn-interactive::before {
  content: '';
  position: absolute;
  top: 100%;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--accent);
  border-radius: 50%;
  transition: transform 0.5s cubic-bezier(0.25, 1, 0.5, 1), top 0.5s cubic-bezier(0.25, 1, 0.5, 1);
  z-index: -1;
  transform: scale(1.5);
}

.btn-interactive:hover {
  color: var(--bg-primary);
}

.btn-interactive:hover::before {
  top: 0;
  border-radius: 0;
  transform: scale(1);
}

.hero-visual {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  animation: heroFadeIn 1.5s ease-out both;
  animation-delay: 0.3s;
}

.hero-image {
  width: 100%;
  max-width: 550px;
  height: auto;
  animation: float 6s ease-in-out infinite;
}

/* Hero Keyframes */
@keyframes heroSlideUp {
  from { opacity: 0; transform: translateY(30px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes heroFadeIn {
  from { opacity: 0; transform: scale(0.95); }
  to { opacity: 1; transform: scale(1); }
}

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

/* ═══════════════════════════════════════════
   SECTION COMMON
   ═══════════════════════════════════════════ */
section {
  position: relative;
  padding: var(--section-padding);
}

.section-header {
  text-align: center;
  margin-bottom: clamp(2.5rem, 4vw, 5rem);
}

.section-label {
  font-family: var(--font-secondary);
  font-size: 0.75rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--text-dim);
  margin-bottom: 1rem;
  display: block;
  font-weight: 600;
}

.section-title {
  font-family: var(--font-secondary);
  font-size: clamp(2rem, 4.5vw, 3rem);
  font-weight: 700;
  letter-spacing: 0.05em;
  margin-bottom: 1.5rem;
}

.section-desc {
  max-width: 600px;
  margin: 0 auto;
  color: var(--text-dim);
  font-weight: 400;
  line-height: 1.8;
  font-size: 1rem;
}

/* ═══════════════════════════════════════════
   SERVICES
   ═══════════════════════════════════════════ */
.services {
  background: var(--bg-secondary);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr));
  gap: clamp(1rem, 2vw, 2rem);
  width: var(--content-width);
  margin: 0 auto;
}

.service-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  padding: 3.5rem 3rem;
  border-radius: var(--radius);
  position: relative;
  overflow: hidden;
  transition: all 0.4s ease;
}

.service-card:hover {
  background: var(--bg-card-hover);
  border-color: var(--accent);
  box-shadow: 0 10px 40px rgba(0,0,0,0.03);
  transform: translateY(-5px);
}

.service-number {
  font-family: var(--font-secondary);
  font-size: 0.9rem;
  color: var(--text-muted);
  letter-spacing: 0.2em;
  margin-bottom: 2rem;
  font-weight: 600;
}

.service-card h3 {
  font-family: var(--font-secondary);
  font-size: 1.6rem;
  font-weight: 700;
  margin-bottom: 1.2rem;
  letter-spacing: 0.05em;
}

.service-card p {
  color: var(--text-dim);
  font-size: 1rem;
  line-height: 1.7;
}

/* ═══════════════════════════════════════════
   ABOUT
   ═══════════════════════════════════════════ */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(2.5rem, 5vw, 6rem);
  width: var(--content-width);
  margin: 0 auto;
  align-items: center;
}

.about-image-wrap {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 2rem;
  background: var(--bg-secondary);
  border-radius: 50%;
  border: 1px solid var(--border);
}

.about-image-wrap img {
  width: 100%;
  max-width: 400px;
  height: auto;
  transition: transform 0.6s ease;
}

.about-image-wrap:hover img {
  transform: scale(1.05);
}

.about-text h3 {
  font-family: var(--font-secondary);
  font-size: 1.8rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
  line-height: 1.3;
  letter-spacing: 0.02em;
}

.about-text p {
  color: var(--text-dim);
  line-height: 1.8;
  font-size: 1.05rem;
  margin-bottom: 1.5rem;
}

.about-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  margin-top: 3rem;
  padding-top: 3rem;
  border-top: 1px solid var(--border);
}

.stat-item {
  text-align: left;
}

.stat-number {
  font-family: var(--font-secondary);
  font-size: 2.5rem;
  font-weight: 800;
  color: var(--accent);
  display: block;
  line-height: 1;
}

.stat-label {
  font-family: var(--font-secondary);
  font-size: 0.75rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.15em;
  margin-top: 0.8rem;
  display: block;
  font-weight: 600;
}

/* ═══════════════════════════════════════════
   GALLERY
   ═══════════════════════════════════════════ */
.gallery {
  background: var(--bg-primary);
}

.gallery-story-container {
  display: flex;
  flex-direction: column;
  gap: clamp(4rem, 6vw, 8rem);
  width: var(--content-width);
  margin: 0 auto;
}

.story-block {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: clamp(2rem, 4vw, 5rem);
  align-items: center;
  opacity: 0;
  transform: translateY(60px);
  transition: opacity 1s cubic-bezier(0.25, 1, 0.5, 1), transform 1s cubic-bezier(0.25, 1, 0.5, 1);
}

.story-block.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.story-block.reverse {
  grid-template-columns: 1fr 1.2fr;
}

.story-block.reverse .story-collage {
  order: 2;
}
.story-block.reverse .story-text {
  order: 1;
}

.story-collage {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.collage-hero {
  width: 80%;
  height: auto;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  box-shadow: 0 20px 40px rgba(0,0,0,0.04);
  transform: translateX(-10%);
  transition: transform 0.6s ease;
}

.story-block.reverse .collage-hero {
  transform: translateX(10%);
}

.collage-inset {
  position: absolute;
  width: 45%;
  height: auto;
  bottom: -15%;
  right: 0;
  border-radius: var(--radius);
  border: 4px solid var(--bg-primary);
  box-shadow: 0 15px 35px rgba(0,0,0,0.06);
  transition: transform 0.6s ease;
}

.story-block.reverse .collage-inset {
  left: 0;
  right: auto;
}

.story-collage:hover .collage-hero {
  transform: scale(1.02) translateX(-10%);
}
.story-block.reverse .story-collage:hover .collage-hero {
  transform: scale(1.02) translateX(10%);
}

.story-collage:hover .collage-inset {
  transform: translateY(-10px);
}

.story-text {
  padding: 0 2rem;
}

.story-category {
  font-family: var(--font-secondary);
  font-size: 0.75rem;
  color: var(--text-muted);
  letter-spacing: 0.2em;
  margin-bottom: 1rem;
  display: block;
  font-weight: 600;
}

.story-text h3 {
  font-family: var(--font-secondary);
  font-size: 2.2rem;
  font-weight: 800;
  margin-bottom: 1.5rem;
  letter-spacing: 0.05em;
  color: var(--accent);
}

.story-text p {
  color: var(--text-dim);
  font-size: 1.05rem;
  line-height: 1.8;
  margin-bottom: 2.5rem;
}

.story-link {
  font-family: var(--font-secondary);
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: 0.15em;
  text-decoration: none;
  position: relative;
  padding-bottom: 5px;
}

.story-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--accent);
  transition: width 0.3s ease;
}

.story-link:hover::after {
  width: 100%;
}

/* ═══════════════════════════════════════════
   FOOTER
   ═══════════════════════════════════════════ */
.footer {
  background: var(--bg-secondary);
  padding: clamp(3rem, 5vw, 6rem) var(--gutter) 2rem;
  border-top: 1px solid var(--border);
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: clamp(1.5rem, 3vw, 3rem);
  width: var(--content-width);
  margin: 0 auto;
}

.footer-brand p {
  color: var(--text-dim);
  font-size: 0.95rem;
  line-height: 1.7;
  margin-top: 1.5rem;
}

.footer h4 {
  font-family: var(--font-secondary);
  font-size: 0.85rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  margin-bottom: 1.5rem;
  color: var(--accent);
  font-weight: 700;
}

.footer ul li {
  margin-bottom: 0.8rem;
}

.footer ul a {
  font-family: var(--font-primary);
  color: var(--text-dim);
  font-size: 0.95rem;
  transition: color 0.3s ease;
}

.footer ul a:hover {
  color: var(--accent);
}

.footer-bottom {
  width: var(--content-width);
  margin: 4rem auto 0;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.footer-bottom p {
  font-family: var(--font-secondary);
  color: var(--text-muted);
  font-size: 0.75rem;
  letter-spacing: 0.1em;
}

.footer-socials {
  display: flex;
  gap: 1.5rem;
}

.footer-socials a {
  font-family: var(--font-secondary);
  color: var(--text-dim);
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  transition: color 0.3s ease;
}

.footer-socials a:hover {
  color: var(--accent);
}

/* ═══════════════════════════════════════════
   PROJECT MODAL (overlay — base styles required for all viewports)
   ═══════════════════════════════════════════ */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem 1.5rem;
  background: rgba(25, 28, 29, 0.55);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.35s ease, visibility 0.35s ease;
}

.modal-overlay.active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

/* Drag-handle hint shown on mobile (cosmetic only) */
.modal-content::before {
  content: '';
  display: none;
  width: 36px;
  height: 4px;
  border-radius: 2px;
  background: var(--border);
  margin: 0 auto 1.25rem;
}

.modal-content {
  position: relative;
  width: 100%;
  max-width: 720px;
  max-height: 90vh;
  overflow-y: auto;
  background: var(--bg-primary);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.12);
  padding: 2.5rem 2.5rem 2rem;
}

.modal-close {
  position: absolute;
  top: 1.25rem;
  right: 1.25rem;
  z-index: 2;
  width: 2.5rem;
  height: 2.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-primary);
  color: var(--accent);
  font-size: 1.1rem;
  line-height: 1;
  cursor: pointer;
  transition: background 0.25s ease, border-color 0.25s ease, color 0.25s ease;
}

.modal-close:hover {
  background: var(--bg-secondary);
  border-color: var(--accent);
}

.modal-header {
  margin-bottom: 2rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--border);
  padding-right: 3rem;
}

.modal-header h2 {
  font-family: var(--font-secondary);
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 800;
  letter-spacing: 0.05em;
  margin-bottom: 0.75rem;
  color: var(--accent);
}

.modal-category {
  font-family: var(--font-secondary);
  font-size: 0.75rem;
  letter-spacing: 0.2em;
  color: var(--text-muted);
  font-weight: 600;
}

.modal-desc {
  font-size: 1rem;
  line-height: 1.8;
  color: var(--text-dim);
  margin-bottom: 2rem;
}

.technical-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  padding: 2rem;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.tech-item {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.tech-label {
  font-family: var(--font-secondary);
  font-size: 0.7rem;
  letter-spacing: 0.15em;
  color: var(--text-muted);
  font-weight: 600;
}

.tech-value {
  font-family: var(--font-primary);
  font-size: 0.95rem;
  color: var(--text);
  font-weight: 500;
}

/* Gallery “View project” is a <button> — match link appearance */
button.story-link {
  font: inherit;
  background: none;
  border: none;
  cursor: pointer;
  text-align: left;
}

/* ═══════════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════════ */

/* --- Tablet (≤1024px) --- */
@media (max-width: 1024px) {
  /* Spacing & gaps are now fluid via clamp() — no overrides needed */

  .about-grid {
    grid-template-columns: 1fr;
  }

  .about-image-wrap {
    max-width: 320px;
    margin: 0 auto;
  }

  .about-stats {
    grid-template-columns: repeat(2, 1fr);
  }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }

  .story-text h3 {
    font-size: 1.8rem;
  }
}

/* --- Mobile (≤768px) --- */
@media (max-width: 768px) {

  /* Navbar padding is fluid via var(--gutter) */

  .nav-links,
  .nav-cta {
    display: none;
  }

  .mobile-toggle {
    display: flex;
    z-index: 101;
  }

  .nav-logo-icon {
    width: 34px;
    height: 34px;
  }

  .nav-brand-text {
    font-size: 0.9rem;
    letter-spacing: 0.12em;
  }

  /* ── Hero ── */
  .hero {
    min-height: auto;
  }

  .hero-container {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 2rem;
  }

  .hero-text-content {
    text-align: center;
    order: 2;
  }

  .hero-visual {
    order: 1;
  }

  .hero-image {
    max-width: 200px;
    margin: 0 auto;
  }

  .hero-title {
    font-size: clamp(1.9rem, 8vw, 2.8rem);
  }

  .hero-tagline {
    font-size: clamp(0.72rem, 2.8vw, 0.92rem);
    margin-bottom: 2rem;
    letter-spacing: 0.08em;
  }

  .hero-ctas {
    justify-content: center;
  }

  .btn-interactive {
    padding: 0.95rem 2rem;
    font-size: 0.68rem;
  }

  /* ── Section headers ── */
  .section-header {
    margin-bottom: 2.5rem;
  }

  .section-title {
    font-size: clamp(1.4rem, 6vw, 2rem);
  }

  .section-desc {
    font-size: 0.9rem;
    line-height: 1.7;
  }

  /* ── Services — auto-fit handles column count automatically ── */

  .service-card {
    padding: 1.75rem 1.25rem;
  }

  .service-card h3 {
    font-size: 1rem;
    margin-bottom: 0.75rem;
  }

  .service-card p {
    font-size: 0.88rem;
    line-height: 1.65;
  }

  .service-number {
    margin-bottom: 1rem;
    font-size: 0.75rem;
  }

  /* ── About ── */
  .about-grid {
    /* already 1-col from tablet breakpoint */
  }

  .about-image-wrap {
    max-width: 220px;
    margin: 0 auto;
    padding: 1.25rem;
  }

  .about-text h3 {
    font-size: 1.35rem;
    text-align: center;
  }

  .about-text p {
    font-size: 0.93rem;
    text-align: center;
  }

  .about-stats {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.25rem;
    margin-top: 2rem;
    padding-top: 2rem;
  }

  .stat-item {
    text-align: center;
  }

  .stat-number {
    font-size: 1.9rem;
  }

  /* ── Gallery — gap is now fluid via clamp ── */

  .story-block,
  .story-block.reverse {
    grid-template-columns: 1fr;
    gap: 0;
    text-align: center;
  }

  /* Image always on top, text below */
  .story-block .story-collage,
  .story-block.reverse .story-collage {
    order: 1;
    margin-bottom: 2rem;
  }

  .story-block .story-text,
  .story-block.reverse .story-text {
    order: 2;
  }

  .story-text {
    padding: 0;
  }

  .story-text h3 {
    font-size: 1.45rem;
    margin-bottom: 1rem;
  }

  .story-text p {
    font-size: 0.93rem;
    line-height: 1.75;
    margin-bottom: 1.5rem;
  }

  /* Flat image layout on mobile — no overlapping inset */
  .collage-hero {
    transform: none !important;
    width: 100%;
    margin: 0 auto;
  }

  .story-block.reverse .collage-hero {
    transform: none !important;
  }

  .collage-inset {
    display: none;
  }

  .story-collage:hover .collage-hero,
  .story-block.reverse .story-collage:hover .collage-hero {
    transform: none !important;
  }

  button.story-link {
    text-align: center;
    margin: 0 auto;
    display: block;
  }

  /* Footer padding is fluid via clamp/gutter */

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .footer-brand {
    text-align: center;
  }

  .footer-brand .nav-logo {
    justify-content: center;
  }

  .footer-brand p {
    font-size: 0.9rem;
  }

  .footer h4 {
    font-size: 0.78rem;
    margin-bottom: 0.9rem;
  }

  .footer ul li {
    margin-bottom: 0.65rem;
  }

  .footer ul a {
    font-size: 0.9rem;
  }

  .footer-bottom {
    flex-direction: column;
    gap: 1rem;
    text-align: center;
    margin-top: 2.5rem;
    padding-top: 1.5rem;
  }

  .footer-bottom p {
    font-size: 0.7rem;
  }

  .footer-socials {
    gap: 1.25rem;
  }

  /* ── Modal — bottom sheet on mobile ── */
  .modal-overlay {
    padding: 0;
    align-items: flex-end;
  }

  .modal-content {
    width: 100%;
    max-width: 100%;
    max-height: 92dvh;
    border-radius: 16px 16px 0 0;
    padding: 0.5rem 1.25rem 2rem;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    transform: translateY(20px);
    transition: transform 0.35s cubic-bezier(0.25, 1, 0.5, 1);
  }

  .modal-overlay.active .modal-content {
    transform: translateY(0);
  }

  .modal-content::before {
    display: block;
  }

  .modal-close {
    top: 1rem;
    right: 1rem;
    width: 2.25rem;
    height: 2.25rem;
    font-size: 1rem;
  }

  .modal-header {
    margin-bottom: 1.25rem;
    padding-bottom: 1.25rem;
    padding-right: 3rem;
  }

  .modal-header h2 {
    font-size: 1.35rem;
  }

  .modal-desc {
    font-size: 0.93rem;
    margin-bottom: 1.5rem;
  }

  .modal-gallery {
    grid-template-columns: 1fr 1fr !important;
    gap: 0.6rem !important;
    margin-bottom: 1.5rem !important;
  }

  .modal-gallery img {
    aspect-ratio: 3/4 !important;
  }

  .technical-grid {
    grid-template-columns: 1fr 1fr;
    padding: 1.25rem;
    gap: 1rem;
  }

  .tech-label {
    font-size: 0.62rem;
  }

  .tech-value {
    font-size: 0.83rem;
  }
}

/* --- Small Phone (≤480px) --- */
@media (max-width: 480px) {

  /* Navbar padding is fluid via var(--gutter) */

  .nav-brand-text {
    font-size: 0.82rem;
    letter-spacing: 0.1em;
  }

  .nav-logo-icon {
    width: 30px;
    height: 30px;
  }

  /* ── Hero — padding is fluid via clamp ── */

  .hero-image {
    max-width: 170px;
  }

  .hero-title {
    font-size: clamp(1.55rem, 9vw, 2.2rem);
  }

  .hero-tagline {
    font-size: 0.72rem;
    letter-spacing: 0.06em;
    margin-bottom: 1.75rem;
  }

  .btn-interactive {
    padding: 0.85rem 1.5rem;
    font-size: 0.63rem;
  }

  /* section-header margin is fluid via clamp */

  .section-title {
    font-size: clamp(1.25rem, 6.5vw, 1.65rem);
  }

  .section-label {
    font-size: 0.62rem;
  }

  .section-desc {
    font-size: 0.85rem;
  }

  /* services-grid auto-fit handles column count */

  .service-card {
    padding: 1.4rem 1.1rem;
  }

  .service-card h3 {
    font-size: 0.95rem;
    margin-bottom: 0.6rem;
  }

  .service-card p {
    font-size: 0.83rem;
    line-height: 1.6;
  }

  .service-number {
    margin-bottom: 0.85rem;
    font-size: 0.72rem;
  }

  /* ── About ── */
  .about-image-wrap {
    max-width: 180px;
    padding: 1rem;
  }

  .about-text h3 {
    font-size: 1.15rem;
  }

  .about-text p {
    font-size: 0.87rem;
  }

  .about-stats {
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
  }

  .stat-number {
    font-size: 1.6rem;
  }

  .stat-label {
    font-size: 0.62rem;
    margin-top: 0.4rem;
  }

  /* gallery gap is fluid via clamp */

  .story-text h3 {
    font-size: 1.25rem;
  }

  .story-text p {
    font-size: 0.87rem;
    line-height: 1.7;
    margin-bottom: 1.2rem;
  }

  .story-category {
    font-size: 0.62rem;
    margin-bottom: 0.5rem;
  }

  .story-link {
    font-size: 0.73rem;
  }

  /* Footer padding is fluid */

  .footer h4 {
    font-size: 0.72rem;
  }

  .footer ul a {
    font-size: 0.85rem;
  }

  .footer-bottom p {
    font-size: 0.65rem;
  }

  /* ── Modal ── */
  .modal-content {
    padding: 0.5rem 1rem 1.75rem;
    max-height: 94dvh;
    border-radius: 14px 14px 0 0;
  }

  .modal-header h2 {
    font-size: 1.2rem;
  }

  .modal-category {
    font-size: 0.68rem;
  }

  .modal-desc {
    font-size: 0.87rem;
    line-height: 1.7;
  }

  .modal-gallery {
    grid-template-columns: 1fr 1fr !important;
    gap: 0.5rem !important;
  }

  .modal-gallery img {
    aspect-ratio: 1/1 !important;
  }

  .technical-grid {
    grid-template-columns: 1fr 1fr;
    padding: 1rem;
    gap: 0.85rem;
  }

  .tech-value {
    font-size: 0.78rem;
  }

  .modal-aesthetic p {
    font-size: 0.84rem !important;
  }

  /* ── Mobile menu ── */
  .mobile-menu a {
    font-size: 1.35rem;
  }
}



