/* =====================================================
   Galant — site stylesheet
   Design tokens lifted from Figma file (Galant.fig)
   ===================================================== */

:root {
  --bg: #ffffff;
  --bg-paper: #faf3ed;
  --bg-cream: #faede4;
  --bg-cream-light: #f2efeb;
  --bg-warm: #f6f4f3;
  --bg-ink: #322c36;
  --ink: #302833;
  --ink-2: #153131;
  --ink-soft: rgba(21, 49, 49, 0.6);
  --ink-muted: rgba(21, 49, 49, 0.1);
  --teal: #153131;
  --brown: #6d4c4c;
  --muted: #aaaaaa;
  --white-70: rgba(255, 255, 255, 0.7);

  --r-sm: 4px;
  --r-md: 5px;
  --r-lg: 8px;

  --maxw: 1400px;
  --pad-x: 80px;

  --font-sans: "Plus Jakarta Sans", "Uncut Sans", "Manrope", -apple-system,
    BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  --font-form: "Manrope", var(--font-sans);
  --font-mono: "JetBrains Mono", "IBM Plex Mono", ui-monospace, "SF Mono",
    Menlo, Consolas, monospace;
}

/* ------ reset ------ */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  visibility: visible;
  font-family: var(--font-sans);
  font-weight: 400;
  font-size: 16px;
  line-height: 1.5;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; border: 0; background: none; color: inherit; }
img { display: block; max-width: 100%; }
input, textarea { font: inherit; color: inherit; }

/* ------ utilities ------ */
.container { max-width: var(--maxw); margin: 0 auto; padding: 0 var(--pad-x); }
.eyebrow {
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.14em;
  line-height: 1;
  text-transform: uppercase;
  color: var(--ink);
  margin: 0;
}
.h1 {
  font-size: clamp(40px, 4.6vw, 64px);
  font-weight: 500;
  line-height: 1.05;
  letter-spacing: -0.02em;
  color: var(--ink);
  margin: 0;
  text-wrap: balance;
}
.h2 {
  font-size: clamp(32px, 3.4vw, 48px);
  font-weight: 500;
  line-height: 1.05;
  letter-spacing: -0.02em;
  margin: 0;
  text-wrap: balance;
}
.lead {
  font-size: 16px;
  line-height: 1.55;
  color: var(--ink-soft);
  max-width: 56ch;
  margin: 0;
}

/* ------ NAV ------ */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  height: 80px;
  display: flex;
  align-items: center;
  padding: 0 var(--pad-x);
  background: rgba(255, 255, 255, 0.0);
  transition: background 0.3s ease, box-shadow 0.3s ease, color 0.3s ease;
}
.nav.is-solid {
  background: rgba(50, 44, 54, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.1);
  color: #fff;
}
.nav.is-solid .nav-link { color: rgba(255,255,255,0.85); }
.nav.is-solid .nav-link:hover { color: #fff; }
.nav.is-solid .logo-img { filter: brightness(0) invert(1); }
.nav.is-solid .nav-cta { background: var(--bg-cream); color: var(--ink-2); }
.nav.is-solid .nav-cta:hover { background: #fff; }
.nav.is-solid .nav-burger span,
.nav.is-solid .nav-burger span::before,
.nav.is-solid .nav-burger span::after { background: #fff; }
.nav.is-dark { color: var(--bg-cream); }
.nav.is-dark .nav-link { color: var(--bg-cream); }
.nav.is-dark .logo { color: var(--bg-cream); }
.nav.is-dark.is-solid { background: rgba(50, 44, 54, 0.85); color: #fff; }

.nav-inner {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
}
.logo {
  font-size: 26px;
  font-weight: 600;
  letter-spacing: 0.18em;
  line-height: 1;
  color: var(--ink);
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.logo-mark { display: none; }
.logo-img {
  display: block;
  height: 44px;
  width: auto;
}
.nav.is-dark .logo-img { filter: brightness(0) invert(1); }
.logo > span:not(.logo-mark) { display: none; }
.nav-links {
  display: flex;
  gap: 36px;
  align-items: center;
  margin-left: auto;
}
.nav-link {
  font-size: 18px;
  font-weight: 500;
  color: var(--ink);
  position: relative;
  padding: 6px 0;
  transition: color 0.2s ease;
}
.nav-link::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  height: 1px;
  width: 0;
  background: currentColor;
  transition: width 0.25s ease;
}
.nav-link:hover::after { width: 100%; }
.nav-link.is-active::after { width: 100%; }

.nav-cta {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 22px;
  border-radius: var(--r-sm);
  background: var(--ink);
  color: var(--bg-cream);
  font-weight: 500;
  font-size: 15px;
  white-space: nowrap;
  transition: transform 0.2s ease, background 0.2s ease;
}
.nav-cta:hover { background: var(--ink-2); transform: translateY(-1px); }
.nav.is-dark .nav-cta { background: var(--bg-cream); color: var(--ink-2); }
.nav.is-dark .nav-cta:hover { background: #fff; }

.nav-burger {
  display: none;
  width: 44px;
  height: 44px;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  margin-left: 8px;
}
.nav-burger span {
  display: block;
  width: 22px;
  height: 1.5px;
  background: currentColor;
  position: relative;
}
.nav-burger span::before,
.nav-burger span::after {
  content: "";
  position: absolute;
  left: 0;
  width: 22px;
  height: 1.5px;
  background: currentColor;
  transition: transform 0.3s ease, top 0.3s ease;
}
.nav-burger span::before { top: -7px; }
.nav-burger span::after { top: 7px; }
.is-menu-open .nav-burger span { background: transparent; }
.is-menu-open .nav-burger span::before { top: 0; transform: rotate(45deg); }
.is-menu-open .nav-burger span::after { top: 0; transform: rotate(-45deg); }

/* ------ MOBILE MENU ------ */
.mobile-menu {
  position: fixed;
  inset: 0;
  z-index: 49;
  background: var(--ink-2);
  color: var(--bg-cream);
  padding: 100px 32px 32px;
  display: none;
  flex-direction: column;
  gap: 8px;
  transform: translateX(100%);
  visibility: hidden;
  transition: transform 0.35s cubic-bezier(0.65, 0, 0.35, 1), visibility 0s linear 0.35s;
}
.is-menu-open .mobile-menu {
  transform: translateX(0);
  visibility: visible;
  transition: transform 0.35s cubic-bezier(0.65, 0, 0.35, 1), visibility 0s linear 0s;
}
.mobile-menu a {
  font-size: 32px;
  font-weight: 500;
  padding: 16px 0;
  border-bottom: 1px solid rgba(250, 237, 228, 0.15);
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.mobile-menu a::after {
  content: "→";
  font-size: 24px;
  opacity: 0.5;
}
.mobile-menu .contact-row {
  margin-top: auto;
  font-size: 15px;
  color: var(--bg-cream);
  opacity: 0.7;
  border: none;
}
.mobile-menu .contact-row::after { content: ""; }

/* ------ HERO ------ */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: flex-end;
  padding: 0 var(--pad-x) 64px;
  background: var(--bg-paper);
  overflow: hidden;
}
.hero-bg {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(180deg, rgba(21,49,49,0.2) 0%, rgba(21,49,49,0.4) 60%, rgba(21,49,49,0.6) 100%),
    url("img/projects/_ABC4877.jpg");
  background-size: cover;
  background-position: center;
}
/* placeholder image vibe */
.hero-bg::before {
  content: "";
  position: absolute;
  inset: 0;
}
.hero-tag {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 13px;
  letter-spacing: 0.2em;
  color: rgba(48, 40, 51, 0.5);
  text-transform: uppercase;
  text-align: center;
}
.hero-tag span { display: block; font-size: 11px; margin-top: 6px; opacity: 0.75; }

.hero-content {
  position: relative;
  width: 100%;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: end;
  gap: 32px;
  padding-bottom: 24px;
}
.hero-title {
  max-width: 760px;
  font-size: clamp(38px, 4.4vw, 56px);
  font-weight: 500;
  line-height: 1.05;
  letter-spacing: -0.02em;
  color: #fff;
  margin: 0;
}
.btn-glass {
  display: inline-flex;
  align-items: center;
  gap: 20px;
  padding: 20px 28px;
  border-radius: var(--r-sm);
  background: rgba(255, 255, 255, 0.55);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: var(--ink);
  font-size: 18px;
  font-weight: 500;
  white-space: nowrap;
  transition: background 0.25s ease, transform 0.25s ease;
}
.btn-glass:hover {
  background: rgba(255, 255, 255, 0.8);
  transform: translateY(-2px);
}
.btn-glass .arrow { transition: transform 0.25s ease; }
.btn-glass:hover .arrow { transform: translateX(6px); }

/* ------ ABOUT ------ */
.about {
  background: var(--bg);
  padding: 140px var(--pad-x);
}
.about-grid {
  max-width: var(--maxw);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 220px 1fr 1fr;
  gap: 80px;
  align-items: start;
}
.about-grid .eyebrow { padding-top: 12px; }
.about-grid .lead { padding-top: 12px; max-width: 44ch; }
.about-grid .h1 { color: var(--ink); }

/* stat strip */
.stats {
  background: var(--bg);
  padding: 0 var(--pad-x) 140px;
}
.stats-grid {
  max-width: var(--maxw);
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  border-top: 1px solid rgba(48, 40, 51, 0.1);
  padding-top: 64px;
}
.stat {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.stat-num {
  font-size: clamp(48px, 5vw, 72px);
  font-weight: 300;
  line-height: 1;
  color: var(--ink);
  letter-spacing: -0.03em;
}
.stat-label {
  font-size: 16px;
  color: var(--ink-soft);
}

/* ------ PROJECTS GRID (Home) ------ */
.projects {
  background: var(--bg-ink);
  padding: 88px 0 140px;
  color: #fff;
}
.projects-head {
  margin: 0 0 56px;
  padding: 0 var(--pad-x);
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 32px;
}
.projects-head-text {
  display: flex;
  flex-direction: column;
  gap: 14px;
  max-width: 640px;
}
.projects-eyebrow {
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 13px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.55);
  margin: 0;
}
.projects-sub {
  font-size: clamp(15px, 1vw, 17px);
  line-height: 1.55;
  color: rgba(255, 255, 255, 0.72);
  margin: 0;
  max-width: 560px;
  font-weight: 400;
}
.projects-head .h2 { max-width: 540px; color: #fff; margin: 0; }
.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 16px;
  font-weight: 500;
  color: #fff;
}
.link-arrow .arrow { transition: transform 0.25s ease; }
.link-arrow:hover .arrow { transform: translateX(4px); }

.proj-grid {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 var(--pad-x);
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 24px;
}
.proj-card {
  position: relative;
  display: block;
  border-radius: var(--r-sm);
  overflow: hidden;
  background: var(--bg-cream-light);
  transition: transform 0.35s ease, box-shadow 0.35s ease;
}
.proj-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 24px 48px -16px rgba(48, 40, 51, 0.18);
}
.proj-card .ph {
  aspect-ratio: 4/3;
}
.proj-card.tall .ph { aspect-ratio: 3/4; }
.proj-card .meta {
  position: absolute;
  inset: auto 0 0 0;
  padding: 18px 22px;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.55), rgba(0, 0, 0, 0));
  color: #fff;
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 12px;
}
.proj-card .meta strong { font-weight: 500; font-size: 18px; }
.proj-card .meta small { font-size: 13px; opacity: 0.85; }

.proj-grid > .span-6 { grid-column: span 6; }
.proj-grid > .span-4 { grid-column: span 4; }
.proj-grid > .span-8 { grid-column: span 8; }

/* ------ PROJECTS CAROUSEL (Home) ------ */
.proj-carousel {
  width: 100vw;
  position: relative;
  left: 50%;
  right: 50%;
  margin-left: -50vw;
  margin-right: -50vw;
  overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 4vw, #000 calc(100% - 4vw), transparent 100%);
          mask-image: linear-gradient(90deg, transparent 0, #000 4vw, #000 calc(100% - 4vw), transparent 100%);
}
.proj-track {
  display: flex;
  gap: 24px;
  width: max-content;
  animation: proj-marquee 50s linear infinite;
  will-change: transform;
}
@keyframes proj-marquee {
  from { transform: translate3d(0, 0, 0); }
  to   { transform: translate3d(-50%, 0, 0); }
}
.proj-slide {
  position: relative;
  display: block;
  flex: 0 0 auto;
  width: clamp(320px, 26vw, 480px);
  border-radius: 0;
  overflow: hidden;
  background: var(--bg-cream-light);
}
.proj-slide .ph {
  aspect-ratio: 4/5;
  border-radius: 0;
}
.proj-slide .meta { display: none; }

@media (prefers-reduced-motion: reduce) {
  .proj-track { animation: none; }
}

/* ------ PLACEHOLDER ------ */
.ph {
  position: relative;
  width: 100%;
  background:
    repeating-linear-gradient(
      135deg,
      rgba(48, 40, 51, 0.045) 0,
      rgba(48, 40, 51, 0.045) 1px,
      transparent 1px,
      transparent 12px
    ),
    linear-gradient(135deg, #ece4dc 0%, #d6c8b8 100%);
  display: flex;
  align-items: center;
  justify-content: center;
}
.ph::before {
  content: "";
  position: absolute;
  inset: 12px;
  border: 1px dashed rgba(48, 40, 51, 0.18);
  border-radius: 2px;
  pointer-events: none;
}
.ph-label {
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(48, 40, 51, 0.55);
  text-align: center;
  padding: 8px 16px;
  background: rgba(255, 255, 255, 0.5);
  border-radius: 999px;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

/* real-image fill: when .ph has data-img, swap the placeholder for the photo */
.ph[data-img] {
  background-size: cover !important;
  background-position: center !important;
  background-repeat: no-repeat !important;
}
.ph[data-img] .ph-label { display: none; }
.ph[data-img]::before { display: none; }

/* color variants for ph (so the page has visual rhythm) */
.ph.tone-cream { background:
    repeating-linear-gradient(135deg, rgba(48,40,51,0.04) 0, rgba(48,40,51,0.04) 1px, transparent 1px, transparent 12px),
    linear-gradient(135deg, #f4e8d8, #e3d2bd); }
.ph.tone-rose { background:
    repeating-linear-gradient(135deg, rgba(48,40,51,0.04) 0, rgba(48,40,51,0.04) 1px, transparent 1px, transparent 12px),
    linear-gradient(135deg, #f1d8d2, #d6a09a); }
.ph.tone-green { background:
    repeating-linear-gradient(135deg, rgba(48,40,51,0.04) 0, rgba(48,40,51,0.04) 1px, transparent 1px, transparent 12px),
    linear-gradient(135deg, #cdd6c0, #8fa085); }
.ph.tone-dark { background:
    repeating-linear-gradient(135deg, rgba(255,255,255,0.04) 0, rgba(255,255,255,0.04) 1px, transparent 1px, transparent 12px),
    linear-gradient(135deg, #4a3d3a, #2b2222);
  color: rgba(255,255,255,0.7);
}
.ph.tone-dark .ph-label { background: rgba(255,255,255,0.12); color: rgba(255,255,255,0.85); }
.ph.tone-dark::before { border-color: rgba(255,255,255,0.18); }
.ph.tone-warm { background:
    repeating-linear-gradient(135deg, rgba(48,40,51,0.04) 0, rgba(48,40,51,0.04) 1px, transparent 1px, transparent 12px),
    linear-gradient(135deg, #d9c8b3, #ad8f6d); }
.ph.tone-grey { background:
    repeating-linear-gradient(135deg, rgba(48,40,51,0.04) 0, rgba(48,40,51,0.04) 1px, transparent 1px, transparent 12px),
    linear-gradient(135deg, #e6e2dc, #b8b3aa); }

/* ------ FAQ + LEFT-COL CTA ------ */

/* ------ CE FACEM NOI (Services) ------ */
.svc {
  background: #f1eeea;
  padding: 140px 0;
  position: relative;
}
.svc-grid {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 var(--pad-x);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: start;
}
.svc-photo {
  position: relative;
  width: 100%;
  aspect-ratio: 3/4;
  overflow: hidden;
}
.svc-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 0.5s ease;
}
.svc-img.is-active { opacity: 1; }
.svc-content {
  padding-top: 8px;
}
.svc-subtitle {
  font-size: 20px;
  color: var(--ink-soft);
  line-height: 1.5;
  margin-top: 16px;
  max-width: 480px;
}
.svc-accordion {
  margin-top: 48px;
  display: flex;
  flex-direction: column;
}
.svc-item {
  border-top: 1px solid rgba(48, 40, 51, 0.12);
}
.svc-item:last-child {
  border-bottom: 1px solid rgba(48, 40, 51, 0.12);
}
.svc-toggle {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 22px 0;
  background: none;
  border: none;
  cursor: pointer;
  font-family: var(--font-sans);
  font-size: 20px;
  font-weight: 500;
  color: var(--ink);
  text-align: left;
  transition: color 0.2s ease;
}
.svc-toggle:hover { color: var(--ink-2); }
.svc-icon {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid rgba(48, 40, 51, 0.2);
  position: relative;
  flex: none;
  transition: transform 0.3s ease, background 0.2s ease;
}
.svc-icon::before, .svc-icon::after {
  content: "";
  position: absolute;
  background: var(--ink);
  left: 50%; top: 50%;
}
.svc-icon::before { width: 12px; height: 1.5px; transform: translate(-50%, -50%); }
.svc-icon::after { width: 1.5px; height: 12px; transform: translate(-50%, -50%); transition: transform 0.25s ease; }
.svc-item.is-open .svc-icon { background: var(--ink); }
.svc-item.is-open .svc-icon::before { background: var(--bg-cream); }
.svc-item.is-open .svc-icon::after { transform: translate(-50%, -50%) scaleY(0); }
.svc-body {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.35s ease;
}
.svc-body-inner { overflow: hidden; }
.svc-item.is-open .svc-body { grid-template-rows: 1fr; }
.svc-body-inner > div {
  padding: 0 0 24px;
  font-size: 16px;
  line-height: 1.7;
  color: var(--ink-soft);
  max-width: 560px;
}

@media (max-width: 1024px) {
  .svc-grid { grid-template-columns: 1fr 2fr; gap: 40px; }
}
@media (max-width: 768px) {
  .svc { padding: 80px 0; }
  .svc-grid { grid-template-columns: 1fr; gap: 32px; }
  .svc-photo { aspect-ratio: 4/3; max-height: 400px; }
}

/* ------ FAQ ------ */
.faq {
  background: var(--bg-paper);
  padding: 140px 0;
  position: relative;
}
.faq-grid {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 var(--pad-x);
  display: grid;
  grid-template-columns: 352px 1fr;
  gap: 80px;
  align-items: start;
}
.faq-aside {
  position: sticky;
  top: 120px;
}
.faq-aside .h2 { color: var(--ink); margin-top: 18px; }
.faq-aside .lead { margin-top: 16px; max-width: 30ch; }
.btn-dark {
  display: inline-flex;
  align-items: center;
  gap: 20px;
  padding: 18px 24px;
  border-radius: var(--r-sm);
  background: rgba(48, 40, 51, 0.92);
  color: var(--bg-cream);
  font-size: 18px;
  font-weight: 500;
  margin-top: 32px;
  transition: background 0.2s ease, transform 0.2s ease;
}
.btn-dark:hover { background: var(--ink); transform: translateY(-2px); }
.btn-dark .arrow { transition: transform 0.25s ease; }
.btn-dark:hover .arrow { transform: translateX(4px); }

.faq-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.faq-item {
  background: #fff;
  border: 1px solid rgba(48, 40, 51, 0.08);
  border-radius: var(--r-sm);
  overflow: hidden;
  transition: box-shadow 0.25s ease, border-color 0.25s ease;
}
.faq-item.is-open { border-color: rgba(48, 40, 51, 0.18); box-shadow: 0 8px 24px -12px rgba(32, 48, 71, 0.12); }
.faq-q {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  padding: 24px 28px;
  text-align: left;
  font-size: 20px;
  font-weight: 500;
  color: var(--ink);
}
.faq-icon {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid rgba(48, 40, 51, 0.2);
  position: relative;
  flex: none;
  transition: transform 0.3s ease, background 0.2s ease;
}
.faq-icon::before, .faq-icon::after {
  content: "";
  position: absolute;
  background: var(--ink);
  left: 50%; top: 50%;
}
.faq-icon::before { width: 12px; height: 1.5px; transform: translate(-50%, -50%); }
.faq-icon::after { width: 1.5px; height: 12px; transform: translate(-50%, -50%); transition: transform 0.25s ease; }
.faq-item.is-open .faq-icon { background: var(--ink); }
.faq-item.is-open .faq-icon::before { background: var(--bg-cream); }
.faq-item.is-open .faq-icon::after { transform: translate(-50%, -50%) scaleY(0); }

.faq-a {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.3s ease;
}
.faq-a-inner { overflow: hidden; }
.faq-item.is-open .faq-a { grid-template-rows: 1fr; }
.faq-a-inner > div {
  padding: 0 28px 28px;
  font-size: 16px;
  line-height: 1.6;
  color: var(--ink-soft);
  max-width: 60ch;
}

/* ------ CONTACT ------ */
.contact {
  background: var(--bg-ink);
  padding: 140px var(--pad-x);
  position: relative;
}
.contact-card {
  max-width: var(--maxw);
  margin: 0 auto;
  background: none;
  border-radius: var(--r-sm);
  padding: 0;
  display: grid;
  grid-template-columns: 1fr 580px;
  gap: 80px;
  color: #fff;
}
.contact-info .eyebrow { color: var(--bg-cream); }
.contact-info .h2 { color: #fff; margin-top: 16px; }
.contact-info .lead {
  color: var(--white-70);
  margin-top: 16px;
  max-width: 44ch;
}
.contact-meta {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 16px 32px;
  margin-top: 64px;
  font-size: 16px;
  align-items: baseline;
}
.contact-meta dt { color: var(--white-70); margin: 0; font-weight: 400; }
.contact-meta dd { color: #fff; margin: 0; }
.contact-meta dd a { color: #fff; transition: color 0.2s ease; }
.contact-meta dd a:hover { color: var(--bg-cream); }

.socials {
  margin-top: 56px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  color: var(--white-70);
  font-size: 16px;
}
.socials-row { display: flex; gap: 18px; }
.socials-row a {
  width: 28px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  border-radius: 50%;
  transition: transform 0.2s ease, color 0.2s ease;
}
.socials-row a:hover { transform: translateY(-2px); color: var(--bg-cream); }

/* form */
.contact-form {
  background: #fff;
  border-radius: var(--r-sm);
  padding: 40px;
  color: var(--ink-2);
  display: flex;
  flex-direction: column;
  gap: 24px;
}
.field { display: flex; flex-direction: column; gap: 8px; }
.field label {
  font-family: var(--font-form);
  font-weight: 500;
  font-size: 16px;
  color: var(--ink-2);
}
.field input,
.field textarea {
  border: 1px solid rgba(21, 49, 49, 0.1);
  background: rgba(242, 239, 235, 0.5);
  border-radius: var(--r-sm);
  padding: 17px 19px;
  font-size: 16px;
  color: var(--ink-2);
  outline: none;
  transition: border-color 0.2s ease, background 0.2s ease;
}
.field input::placeholder,
.field textarea::placeholder { color: var(--ink-soft); }
.field input:focus,
.field textarea:focus {
  border-color: var(--teal);
  background: #fff;
}
.field.has-error input,
.field.has-error textarea { border-color: #b45353; background: rgba(180, 83, 83, 0.05); }
.field-error {
  font-family: var(--font-form);
  font-size: 13px;
  color: #b45353;
  display: none;
}
.field.has-error .field-error { display: block; }
.field textarea { min-height: 120px; resize: vertical; font-family: var(--font-sans); }
.btn-submit {
  align-self: stretch;
  background: var(--bg-ink);
  color: #fff;
  font-size: 18px;
  font-weight: 500;
  padding: 20px 24px;
  border-radius: var(--r-sm);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  transition: background 0.2s ease, transform 0.2s ease;
}
.btn-submit:hover { background: #453e4a; transform: translateY(-1px); }
.btn-submit.is-success { background: #2c6b4a; }

/* ------ FOOTER ------ */
.footer {
  background: var(--bg-ink);
  padding: 0 var(--pad-x) 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.15);
}
.footer-card {
  max-width: var(--maxw);
  margin: 0 auto;
  background: none;
  border-radius: var(--r-sm);
  padding: 64px 0;
  color: var(--white-70);
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 48px;
}
.footer-grid h4 {
  font-size: 14px;
  color: var(--bg-cream);
  margin: 0 0 16px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-weight: 500;
}
.footer-grid ul { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 10px; }
.footer-grid a { color: var(--white-70); transition: color 0.2s ease; }
.footer-grid a:hover { color: #fff; }
.footer-logo {
  font-size: 28px;
  font-weight: 600;
  letter-spacing: 0.16em;
  color: var(--bg-cream);
  margin-bottom: 16px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.footer-logo .logo-mark { background-color: var(--bg-cream); }
.footer-logo .logo-img { height: 56px; filter: brightness(0) invert(1); }
.footer-logo > :not(.logo-img):not(.logo-mark) { display: none; }
.footer-tag { font-size: 14px; max-width: 30ch; }
.footer-bottom {
  margin-top: 56px;
  padding-top: 24px;
  border-top: 1px solid rgba(250, 237, 228, 0.15);
  display: flex;
  justify-content: space-between;
  font-size: 14px;
}
.footer-legal { display: inline-flex; gap: 10px; align-items: center; }
.footer-legal a { color: var(--white-70); transition: color 0.2s ease; }
.footer-legal a:hover { color: #fff; }

/* ===========================================
   GALLERY PAGE
   =========================================== */
.page-gallery { background: var(--bg-paper); }

/* hero */
.gallery-hero {
  padding: 160px var(--pad-x) 80px;
  background: var(--bg-paper);
}
.gallery-hero-inner {
  max-width: var(--maxw);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 80px;
  align-items: start;
}
.gallery-hero .eyebrow { padding-top: 14px; }
.gallery-hero-body { max-width: 760px; }
.gallery-hero h1 {
  font-size: clamp(48px, 6vw, 80px);
  font-weight: 500;
  letter-spacing: -0.025em;
  line-height: 1.0;
  margin: 0;
  color: var(--ink);
  text-wrap: balance;
}
.gallery-hero p {
  color: var(--ink-soft);
  font-size: 17px;
  line-height: 1.6;
  max-width: 60ch;
  margin: 28px 0 0;
}

/* filters band */
.filters-band {
  position: sticky;
  top: 0;
  z-index: 30;
  background: var(--bg-paper);
  border-bottom: 1px solid transparent;
  transition: border-color 0.25s ease, background 0.25s ease, box-shadow 0.25s ease;
}
.filters-band.is-stuck {
  background: rgba(250, 243, 237, 0.88);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom-color: rgba(48, 40, 51, 0.1);
  box-shadow: 0 1px 0 rgba(48, 40, 51, 0.04);
}
.filters-inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 24px var(--pad-x);
}
.filters {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: center;
}
.filter-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  font-weight: 500;
  padding: 12px 22px;
  border-radius: var(--r-sm);
  border: 1px solid rgba(48, 40, 51, 0.14);
  background: #fff;
  color: var(--ink);
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}
.filter-btn:hover {
  border-color: rgba(48, 40, 51, 0.3);
  transform: translateY(-1px);
}
.filter-btn.is-active {
  background: var(--bg-ink);
  color: #fff;
  border-color: var(--bg-ink);
}

/* grid */
.gallery-grid {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 48px var(--pad-x) 140px;
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 40px 24px;
}
.gallery-item {
  grid-column: span 4;
  cursor: zoom-in;
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 14px;
  transition: transform 0.4s cubic-bezier(0.65, 0, 0.35, 1);
}
.gallery-item:hover { transform: translateY(-3px); }

.gallery-item .ph {
  aspect-ratio: 4/5;
  border-radius: var(--r-sm);
  overflow: hidden;
  background: var(--bg-cream-light);
  border: 1px solid rgba(48, 40, 51, 0.06);
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}
.gallery-item:hover .ph {
  border-color: rgba(48, 40, 51, 0.14);
  box-shadow: 0 16px 36px -18px rgba(48, 40, 51, 0.22);
}

/* large + companion = paired row, equal height. companion ratio tuned to match
   large height once the 24px column gap is accounted for (8col + 7 inner gaps
   vs 4col + 3 inner gaps shifts the column ratio away from 2:1). */
.gallery-item.is-large { grid-column: span 8; }
.gallery-item.is-large .ph { aspect-ratio: 4/3; }
.gallery-item.is-companion { grid-column: span 4; }
.gallery-item.is-companion .ph { aspect-ratio: 13/20; }

/* uniform mode: when a category filter is active, drop the modular pattern
   so the grid stays consistent regardless of which items remain visible. */
.gallery-grid.is-uniform .gallery-item.is-large,
.gallery-grid.is-uniform .gallery-item.is-companion { grid-column: span 4; }
.gallery-grid.is-uniform .gallery-item.is-large .ph,
.gallery-grid.is-uniform .gallery-item.is-companion .ph { aspect-ratio: 4/5; }

/* caption strip — fixed min-height so 1-line vs 2-line titles don't stagger captions */
.gallery-caption {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 0 2px;
  min-height: 72px;
}
.gallery-title {
  font-size: 17px;
  font-weight: 500;
  letter-spacing: -0.005em;
  line-height: 1.3;
  color: var(--ink);
  margin: 0;
}
.gallery-meta {
  font-size: 13px;
  color: var(--ink-soft);
  line-height: 1.4;
  margin: 0;
}

.gallery-item.is-hidden { display: none; }

/* filtering reflow guard */
.gallery-grid.is-filtering .gallery-item,
.gallery-grid.is-filtering .gallery-item .ph { transition: none !important; }
.gallery-grid.is-filtering .gallery-item:hover { transform: none !important; }
.gallery-grid.is-filtering .gallery-item:hover .ph {
  border-color: rgba(48, 40, 51, 0.06) !important;
  box-shadow: none !important;
}

@media (max-width: 880px) {
  .gallery-hero-inner { grid-template-columns: 1fr; gap: 24px; }
  .gallery-hero .eyebrow { padding-top: 0; }
}

/* lightbox */
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(21, 49, 49, 0.92);
  z-index: 100;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 40px;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.lightbox.is-open { display: flex; }
.lightbox-frame {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  max-width: 90vw;
  max-height: 88vh;
  border-radius: var(--r-sm);
  overflow: hidden;
  background: transparent;
}
.lightbox-img {
  display: block;
  max-width: 90vw;
  max-height: 88vh;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: var(--r-sm);
}
.lightbox-frame .ph {
  width: min(1000px, 90vw);
  aspect-ratio: 16/10;
}
.lightbox-info {
  position: absolute;
  left: 32px;
  bottom: 32px;
  color: #fff;
  background: rgba(0,0,0,0.45);
  padding: 14px 22px 16px;
  border-radius: var(--r-sm);
  backdrop-filter: blur(6px);
  display: flex;
  flex-direction: column;
  gap: 4px;
  max-width: min(560px, calc(100% - 64px));
}
.lightbox-info .lb-counter {
  font-family: var(--font-sans);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.7);
  margin-bottom: 2px;
}
.lightbox-info strong {
  display: block;
  font-size: 20px;
  font-weight: 500;
  letter-spacing: -0.01em;
  line-height: 1.2;
}
.lightbox-info .lb-meta {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.75);
  font-weight: 400;
}
.lightbox-close,
.lightbox-prev,
.lightbox-next {
  position: absolute;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  transition: background 0.2s ease, transform 0.2s ease;
}
.lightbox-close { top: 32px; right: 32px; }
.lightbox-prev { left: 32px; top: 50%; transform: translateY(-50%); }
.lightbox-next { right: 32px; top: 50%; transform: translateY(-50%); }
.lightbox-close:hover,
.lightbox-prev:hover,
.lightbox-next:hover { background: rgba(255, 255, 255, 0.22); }
.lightbox-prev:hover { transform: translateY(-50%) translateX(-3px); }
.lightbox-next:hover { transform: translateY(-50%) translateX(3px); }

/* ===========================================
   MATERIALS PAGE
   =========================================== */
/* HERO — Frame 106 */
.materials-hero {
  padding: 140px var(--pad-x) 64px;
  background: var(--bg-warm);
}
.materials-hero-inner {
  max-width: var(--maxw);
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 80px;
  align-items: end;
}
.materials-hero .mh-title {
  font-size: clamp(56px, 6.5vw, 96px);
  font-weight: 500;
  line-height: 1.0;
  letter-spacing: -0.025em;
  color: var(--ink);
  margin: 0;
  max-width: 12ch;
}
.materials-hero .mh-desc {
  color: var(--ink-soft);
  font-size: 16px;
  line-height: 1.65;
  margin: 0;
  max-width: 60ch;
  padding-bottom: 12px;
}

/* MATERIAL GRID — Frame 108 */
.mat-grid-section {
  padding: 140px var(--pad-x) 96px;
  background: var(--bg-warm);
}
.mat-grid-inner {
  max-width: var(--maxw);
  margin: 0 auto;
  background: #fff;
  border-radius: 32px;
  padding: 48px 56px 64px;
}
.mat-tabs2 {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: center;
  margin: 0 auto 40px;
  padding-bottom: 24px;
  border-bottom: 1px solid rgba(48, 40, 51, 0.12);
  max-width: 900px;
}
.mat-tab2 {
  appearance: none;
  background: transparent;
  border: 1px solid rgba(48, 40, 51, 0.18);
  border-radius: var(--r-sm);
  padding: 14px 28px;
  flex: 1 1 0;
  min-width: 140px;
  text-align: center;
  font: inherit;
  font-size: 14px;
  font-weight: 500;
  color: var(--ink);
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}
.mat-tab2:hover { background: rgba(48, 40, 51, 0.06); }
.mat-tab2.is-active {
  background: var(--ink);
  color: #fff;
  border-color: var(--ink);
}

.mat-cards {
  display: none;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}
.mat-cards.is-active { display: grid; }
.mat-cards[data-panel="pal"],
.mat-cards[data-panel="blat"] { display: none; grid-template-columns: 1fr; gap: 32px; }
.mat-cards[data-panel="pal"].is-active,
.mat-cards[data-panel="blat"].is-active { display: block; }

/* PAL sub-tabs (Kronospan / Egger / Cleaf) */
.mat-subtabs {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  justify-content: center;
  margin: 0 auto 28px;
  padding: 4px;
  background: var(--bg-warm);
  border: 1px solid rgba(48, 40, 51, 0.08);
  border-radius: var(--r-sm);
  max-width: 480px;
}
.mat-subtab {
  appearance: none;
  background: transparent;
  border: none;
  border-radius: 2px;
  padding: 10px 24px;
  font: inherit;
  font-size: 13px;
  font-weight: 500;
  color: var(--ink-soft);
  cursor: pointer;
  flex: 1 1 0;
  min-width: 100px;
  text-align: center;
  transition: background 0.2s ease, color 0.2s ease;
}
.mat-subtab:hover { color: var(--ink); }
.mat-subtab.is-active {
  background: var(--ink);
  color: var(--bg-cream);
}

.mat-subcards {
  display: none;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}
.mat-subcards.is-active { display: grid; }

.mat-card {
  background: var(--bg-warm);
  border-radius: 16px;
  overflow: hidden;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.mat-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 40px -20px rgba(48, 40, 51, 0.25);
}
.mat-card-img {
  aspect-ratio: 274 / 260;
  width: 100%;
}
.mat-card-meta {
  padding: 16px 18px 20px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.mat-card-meta strong {
  font-size: 15px;
  font-weight: 600;
  color: var(--ink);
}
.mat-card-meta span {
  font-size: 13px;
  color: var(--ink-soft);
}

/* ============== RESPONSIVE ============== */
@media (max-width: 1100px) {
  :root { --pad-x: 40px; }
  .about-grid,
  .gallery-hero-inner,
  .materials-hero-inner,
  .faq-grid { grid-template-columns: 1fr; gap: 40px; }
  .contact-card { grid-template-columns: 1fr; padding: 56px 40px; }
  .footer-grid { grid-template-columns: 1.4fr 1fr 1fr; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); gap: 40px; }
  .mat-cards, .mat-subcards { grid-template-columns: repeat(3, 1fr); }
  .gallery-item, .gallery-item.is-companion { grid-column: span 6; }
  .gallery-item.is-large { grid-column: span 12; }
  .gallery-item.is-large .ph { aspect-ratio: 16/10; }
  .gallery-item.is-companion .ph { aspect-ratio: 4/5; }
  .proj-grid > .span-6, .proj-grid > .span-4, .proj-grid > .span-8 { grid-column: span 6; }
}

@media (max-width: 720px) {
  :root { --pad-x: 24px; }
  .nav { height: 64px; }
  .nav-links { display: none; }
  .nav-cta { display: none; }
  .nav-burger { display: inline-flex; }
  .mobile-menu { display: flex; }
  .hero { padding-bottom: 32px; min-height: 92vh; }
  .hero-content {
    grid-template-columns: 1fr;
    align-items: start;
    gap: 24px;
  }
  .hero-title { font-size: 32px; }
  .btn-glass { padding: 16px 22px; font-size: 16px; gap: 16px; align-self: start; }
  .about, .projects, .faq, .stats { padding: 80px 0; }
  .about, .stats { padding-left: var(--pad-x); padding-right: var(--pad-x); }
  .projects-head { flex-direction: column; align-items: start; gap: 16px; }
  .proj-grid { grid-template-columns: 1fr; }
  .proj-grid > .span-6, .proj-grid > .span-4, .proj-grid > .span-8 { grid-column: span 1; }
  .stats-grid { grid-template-columns: 1fr 1fr; padding-top: 40px; }
  .stat-num { font-size: 44px; }
  .gallery-grid { grid-template-columns: 1fr; padding-bottom: 80px; gap: 28px; }
  .gallery-item, .gallery-item.is-large, .gallery-item.is-companion { grid-column: span 1; }
  .gallery-item .ph,
  .gallery-item.is-large .ph,
  .gallery-item.is-companion .ph { aspect-ratio: 4/5; }
  .filters { padding: 24px var(--pad-x) 32px; }
  .contact { padding: 0 var(--pad-x); }
  .contact-card { padding: 40px 24px; }
  .contact-meta { grid-template-columns: 1fr; gap: 4px 0; margin-top: 40px; }
  .contact-meta dt { margin-top: 12px; font-size: 13px; }
  .contact-form { padding: 24px; }
  .footer-card { padding: 40px 24px; }
  .footer-grid { grid-template-columns: 1fr; gap: 32px; }
  .footer-bottom { flex-direction: column; gap: 12px; }
  .mat-cards, .mat-subcards { grid-template-columns: repeat(2, 1fr); gap: 16px; }
  .mat-grid-inner { padding: 32px 24px 40px; border-radius: 24px; }
  .gallery-hero { padding-top: 100px; padding-bottom: 32px; }
  .materials-hero { padding-top: 100px; padding-bottom: 32px; }
  .lightbox { padding: 16px; }
  .lightbox-close { top: 16px; right: 16px; width: 44px; height: 44px; }
  .lightbox-prev, .lightbox-next { width: 44px; height: 44px; }
  .lightbox-prev { left: 8px; }
  .lightbox-next { right: 8px; }
  .lightbox-info { left: 16px; bottom: 16px; padding: 10px 14px; }
}

/* ------ Section markers (editorial numbering) ------ */
.section-marker {
  position: absolute;
  top: 140px;
  left: var(--pad-x);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 28px;
  pointer-events: none;
  user-select: none;
  z-index: 1;
}
.section-marker-num {
  font-family: var(--font-mono);
  font-size: clamp(56px, 6vw, 96px);
  font-weight: 300;
  line-height: 0.9;
  letter-spacing: -0.04em;
  color: rgba(48, 40, 51, 0.10);
}
.section-marker-eyebrow {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  color: rgba(48, 40, 51, 0.45);
  display: inline-flex;
  align-items: center;
  gap: 14px;
  margin-left: 6px;
}
.section-marker-eyebrow::before {
  content: "";
  display: block;
  width: 1px;
  height: 36px;
  background: rgba(48, 40, 51, 0.28);
}
.section-marker--dark .section-marker-num { color: rgba(255, 255, 255, 0.08); }
.section-marker--dark .section-marker-eyebrow { color: rgba(255, 255, 255, 0.5); }
.section-marker--dark .section-marker-eyebrow::before { background: rgba(255, 255, 255, 0.22); }
@media (max-width: 1500px) {
  .section-marker { display: none; }
}

/* ------ Gallery side rails (Proiecte page) ------ */
.gallery-rail {
  position: fixed;
  top: 50%;
  transform: translateY(-50%);
  z-index: 5;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  opacity: 0;
  transition: opacity 0.4s ease;
  pointer-events: none;
}
.gallery-rail.is-active { opacity: 1; }
.gallery-rail--left { left: calc((100vw - var(--maxw)) / 2 - 80px); }
.gallery-rail--right { right: calc((100vw - var(--maxw)) / 2 - 80px); }
.gallery-rail--right.is-active { pointer-events: auto; }

.gallery-rail-eyebrow {
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.34em;
  text-transform: uppercase;
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  color: rgba(48, 40, 51, 0.55);
  display: inline-flex;
  align-items: center;
  gap: 18px;
}
.gallery-rail-eyebrow::before {
  content: "";
  display: block;
  width: 1px;
  height: 60px;
  background: rgba(48, 40, 51, 0.3);
}

.gallery-progress {
  width: 3px;
  height: 300px;
  background: rgba(48, 40, 51, 0.12);
  position: relative;
  overflow: hidden;
}
.gallery-progress-fill {
  position: absolute;
  inset: 0;
  background: var(--ink);
  transform: scaleY(0);
  transform-origin: top;
  transition: transform 0.1s linear;
}

.gallery-back-top {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--ink);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 20px;
  line-height: 1;
  border: 0;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.3s ease, transform 0.3s ease, background 0.2s ease;
  pointer-events: none;
}
.gallery-back-top.is-visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}
.gallery-back-top:hover { background: var(--ink-2); }

@media (max-width: 1500px) {
  .gallery-rail { display: none; }
}

/* ============== MOBILE AUDIT FIXES (M1, M2, M3, M4) ============== */
@media (max-width: 720px) {
  /* M1 — Tap targets ≥ 44px on footer links + mobile menu links */
  .footer-grid a,
  .footer-bottom a,
  .footer-legal a,
  .mobile-menu a,
  .contact-row a {
    display: inline-block;
    min-height: 44px;
    padding: 10px 4px;
    line-height: 1.3;
  }
  /* Mobile menu links — also need full-width row with padding */
  .mobile-menu a {
    padding: 14px 24px;
    min-height: 48px;
    display: flex;
    align-items: center;
  }
  /* Contact-row inside mobile-menu: keep dual-phone visible, normal padding */
  .mobile-menu .contact-row {
    padding: 16px 24px;
    line-height: 1.6;
    min-height: auto;
  }
  .mobile-menu .contact-row a { padding: 0; min-height: auto; display: inline; }

  /* M2 — Font sizes ≥ 13px in footer + materials cards */
  .footer-grid h4 {
    font-size: 13px;
    letter-spacing: 0.10em;
  }
  .footer-grid a,
  .footer-grid li,
  .footer-tag {
    font-size: 14px;
  }
  .footer-bottom { font-size: 13px; }

  .mat-card-meta strong { font-size: 14px; }
  .mat-card-meta span { font-size: 12.5px; }
  .mat-card-meta { padding: 12px 14px 16px; }

  /* M3 — Slow project marquee on mobile + add tap-to-pause + bigger "see all" CTA */
  .proj-track { animation-duration: 90s; }
  .projects .link-arrow {
    display: inline-block;
    min-height: 44px;
    padding: 10px 4px;
    font-size: 16px;
  }
  /* Hint that more content slides past — subtle pulse on right edge mask */
  .proj-carousel {
    position: relative;
  }
  .proj-carousel::after {
    content: "← swipe →";
    position: absolute;
    bottom: 8px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 11px;
    color: var(--ink-soft);
    background: rgba(250, 243, 237, 0.85);
    padding: 4px 10px;
    border-radius: 999px;
    pointer-events: none;
    opacity: 0.7;
  }

  /* M4 — Materials grid: keep 2 cols but bump min readable area */
  .mat-cards,
  .mat-subcards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
  }
}

/* Extra-tight phones (iPhone SE 375 and below) */
@media (max-width: 400px) {
  .footer-grid { gap: 24px; }
  .mat-card-meta { padding: 10px 12px 14px; }
  .mat-card-meta strong { font-size: 13.5px; }
  .mat-card-meta span { font-size: 12px; }
}

/* Accessibility — respect reduced-motion users on marquee */
@media (prefers-reduced-motion: reduce) {
  .proj-carousel::after { display: none; }
}
