@import url('https://api.fontshare.com/v2/css?f[]=cabinet-grotesk@400,500,700,800&f[]=satoshi@300,400,500,700&f[]=jetbrains-mono@400&display=swap');

/* ============ Tokens ============ */
:root {
  --bg: #FAF7F2;
  --bg-alt: #F2ECE0;
  --ink: #1A1816;
  --ink-2: #2B2724;
  --muted: #6E6660;
  --line: #E8E1D7;
  --line-strong: #D6CCBE;
  --accent: #B8956A;
  --accent-dark: #8E6F47;
  --max: 1240px;
  --gutter: clamp(40px, 7vw, 120px);
  --radius: 2px;
  --ease: cubic-bezier(.22, 1, .36, 1);
}

/* ============ Reset ============ */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--ink-2);
  font-family: 'Satoshi', -apple-system, sans-serif;
  font-size: 17px;
  line-height: 1.6;
  font-weight: 400;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img, svg, video { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; background: none; border: 0; color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

/* (no anti-FOUC blocker: i18n applies in-place, brief flash for EN is acceptable) */

/* ============ Typography ============ */
.display, h1, h2 {
  font-family: 'Cabinet Grotesk', -apple-system, sans-serif;
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.02;
  color: var(--ink);
}
h3 {
  font-family: 'Cabinet Grotesk', sans-serif;
  font-weight: 500;
  letter-spacing: -0.015em;
  line-height: 1.15;
  color: var(--ink);
}
h4 {
  font-family: 'Satoshi', sans-serif;
  font-weight: 500;
  font-size: 1.05rem;
  letter-spacing: -0.005em;
  color: var(--ink);
}
.kicker {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.72rem;
  font-weight: 400;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent-dark);
}
.mono { font-family: 'JetBrains Mono', monospace; }
p { max-width: 62ch; }
.lead { font-size: 1.18rem; line-height: 1.55; color: var(--ink-2); max-width: 56ch; }
.muted { color: var(--muted); }

/* ============ Layout primitives ============ */
.wrap {
  max-width: var(--max);
  margin: 0 auto;
  padding-left: max(var(--gutter), env(safe-area-inset-left));
  padding-right: max(var(--gutter), env(safe-area-inset-right));
}
.section { padding-top: clamp(72px, 11vw, 140px); padding-bottom: clamp(72px, 11vw, 140px); }
.section-tight { padding-top: clamp(48px, 7vw, 96px); padding-bottom: clamp(48px, 7vw, 96px); }
.rule { height: 1px; background: var(--line); border: 0; margin: 0; }
.rule-strong { background: var(--line-strong); }

/* ============ Header ============ */
.header {
  position: fixed; inset: 0 0 auto 0;
  z-index: 60;
  background: rgba(250, 247, 242, 0.82);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color .3s var(--ease), background .3s var(--ease);
}
.header.scrolled { border-bottom-color: var(--line); }
.nav {
  max-width: var(--max);
  margin: 0 auto;
  padding: 18px var(--gutter);
  display: flex;
  align-items: center;
  gap: 32px;
}
.brand {
  font-family: 'Cabinet Grotesk', sans-serif;
  font-weight: 700;
  font-size: 1.1rem;
  letter-spacing: -0.01em;
  color: var(--ink);
}
.brand .dot { color: var(--accent); }
.nav-menu {
  display: flex; gap: 30px; align-items: center;
  margin-left: auto; list-style: none;
}
.nav-menu a {
  font-size: 0.92rem; font-weight: 500;
  color: var(--ink-2);
  position: relative; padding: 8px 0;
  transition: color .2s var(--ease);
}
.nav-menu a:hover, .nav-menu a.active { color: var(--ink); }
.nav-menu a.active::after {
  content: ''; position: absolute; left: 0; right: 0; bottom: 2px;
  height: 1px; background: var(--accent);
}
.lang-toggle {
  display: inline-flex; gap: 0; align-items: center;
  border: 1px solid var(--line-strong);
  border-radius: 2px;
  padding: 2px; margin-left: 12px;
}
.lang-toggle button {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.7rem; letter-spacing: 0.1em;
  padding: 5px 9px;
  color: var(--muted);
  transition: all .2s var(--ease);
}
.lang-toggle button.active {
  background: var(--ink); color: var(--bg);
}
.nav-toggle {
  display: none;
  position: relative;
  width: 44px; height: 44px;
  margin-left: auto;
  flex-direction: column; justify-content: center; align-items: center; gap: 5px;
  z-index: 70;
}
.nav-toggle span {
  width: 24px; height: 2px;
  background: var(--ink);
  transition: transform .25s var(--ease), opacity .15s var(--ease);
  transform-origin: 50% 50%;
}
.nav-toggle.active span { display: none; }
.nav-toggle::after {
  content: '';
  display: none;
}
.nav-toggle.active::before {
  content: '\00D7';  /* × */
  display: block;
  position: absolute;
  inset: 0;
  font-family: 'Cabinet Grotesk', sans-serif;
  font-size: 2.6rem;
  line-height: 44px;
  font-weight: 400;
  color: var(--ink);
  text-align: center;
}

/* ============ Buttons ============ */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: 'Satoshi', sans-serif; font-weight: 500;
  font-size: 0.92rem; letter-spacing: 0.01em;
  padding: 13px 22px;
  border-radius: 2px;
  transition: all .3s var(--ease);
  cursor: pointer;
  border: 1px solid transparent;
}
.btn::after { content: '→'; transition: transform .3s var(--ease); font-family: serif; }
.btn-primary { background: var(--ink); color: var(--bg); }
.btn-primary:hover { background: var(--accent-dark); }
.btn-primary:hover::after { transform: translateX(4px); }
.btn-ghost { color: var(--ink); border-color: var(--line-strong); }
.btn-ghost:hover { border-color: var(--ink); background: var(--ink); color: var(--bg); }
.btn-ghost:hover::after { transform: translateX(4px); }
.link-arrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-weight: 500; color: var(--ink);
  border-bottom: 1px solid var(--line-strong);
  padding-bottom: 4px;
  transition: border-color .25s var(--ease), color .25s var(--ease);
}
.link-arrow:hover { color: var(--accent-dark); border-bottom-color: var(--accent); }
.link-arrow::after { content: '→'; font-family: serif; transition: transform .25s var(--ease); }
.link-arrow:hover::after { transform: translateX(4px); }

/* ============ Hero (home) ============ */
.hero {
  min-height: 100dvh;
  display: grid;
  grid-template-columns: 7fr 5fr;
  align-items: center;
  gap: clamp(40px, 6vw, 88px);
  padding-top: 96px;
}
.hero-text { max-width: 640px; }
.hero-text .kicker { display: block; margin-bottom: 28px; }
.hero h1 {
  font-size: clamp(3.2rem, 8.5vw, 7.6rem);
  font-weight: 800;
}
.hero h1 .line2 { display: block; color: var(--accent-dark); font-weight: 500; font-style: italic; font-family: 'Cabinet Grotesk', sans-serif; }
.hero .lead { margin-top: 28px; font-size: clamp(1.05rem, 1.4vw, 1.25rem); }
.hero-cta { margin-top: 40px; display: flex; gap: 14px; flex-wrap: wrap; }
.hero-media {
  position: relative;
  aspect-ratio: 4/5;
  overflow: hidden;
  background: var(--bg-alt);
}
.hero-media img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.2s var(--ease); }
.hero:hover .hero-media img { transform: scale(1.03); }
.hero-meta {
  position: absolute; bottom: 16px; left: 16px;
  background: rgba(26, 24, 22, 0.78);
  color: var(--bg);
  padding: 10px 14px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.7rem; letter-spacing: 0.1em;
  backdrop-filter: blur(8px);
}
.scroll-hint {
  position: absolute; bottom: 32px; left: 50%; transform: translateX(-50%);
  font-family: 'JetBrains Mono', monospace; font-size: 0.68rem;
  color: var(--muted); letter-spacing: 0.15em;
  display: flex; flex-direction: column; align-items: center; gap: 10px;
}
.scroll-hint::after {
  content: ''; width: 1px; height: 38px; background: var(--ink);
  animation: scroll-line 2.4s ease-in-out infinite;
  transform-origin: top;
}
@keyframes scroll-line {
  0%, 100% { transform: scaleY(0.2); opacity: 0.3; }
  50% { transform: scaleY(1); opacity: 1; }
}

/* ============ Bento practice ============ */
.bento {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 1px;
  background: var(--line-strong);
  border-top: 1px solid var(--line-strong);
  border-bottom: 1px solid var(--line-strong);
}
.bento-tile {
  background: var(--bg);
  padding: clamp(28px, 3.5vw, 48px);
  display: flex; flex-direction: column; justify-content: space-between;
  min-height: 380px;
  position: relative;
}
.bento-tile.t1 { grid-column: span 4; min-height: 460px; }
.bento-tile.t2 { grid-column: span 2; }
.bento-tile.t3 { grid-column: span 3; }
.bento-tile.t4 { grid-column: span 3; }
.bento-img {
  position: absolute; inset: 0;
  background-size: cover; background-position: center;
  opacity: 0.18;
  transition: opacity .6s var(--ease), transform 1s var(--ease);
}
.bento-tile:hover .bento-img { opacity: 0.32; transform: scale(1.04); }
.bento-tile > * { position: relative; z-index: 1; }
.bento-num { font-family: 'JetBrains Mono', monospace; font-size: 0.7rem; letter-spacing: 0.12em; color: var(--accent-dark); }
.bento-title { margin-top: auto; padding-top: 24px; font-size: clamp(1.4rem, 2.3vw, 2.1rem); }
.bento-body { margin-top: 14px; color: var(--muted); max-width: 38ch; }

/* ============ Section heads ============ */
.head {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(28px, 5vw, 80px);
  align-items: end;
  padding-bottom: 56px;
}
.head .kicker { display: block; margin-bottom: 16px; }
.head h2 { font-size: clamp(2.2rem, 5vw, 4rem); max-width: 14ch; }
.head .lead { align-self: end; }

/* ============ Bio strip ============ */
.bio {
  display: grid;
  grid-template-columns: 5fr 7fr;
  gap: clamp(40px, 6vw, 96px);
  align-items: center;
}
.bio-img { aspect-ratio: 4/5; overflow: hidden; background: var(--bg-alt); }
.bio-img img { width: 100%; height: 100%; object-fit: cover; }
.bio-text h2 { font-size: clamp(2rem, 3.5vw, 3.2rem); }
.bio-text .lead { margin-top: 24px; }
.bio-text .link-arrow { margin-top: 36px; }
.stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  margin-top: 56px;
  border-top: 1px solid var(--line-strong);
}
.stat {
  padding: 28px 20px 20px 20px;
  border-right: 1px solid var(--line);
}
.stat:first-child { padding-left: 0; }
.stat:last-child { border-right: 0; padding-right: 0; }
.stat-num {
  font-family: 'Cabinet Grotesk', sans-serif;
  font-weight: 700;
  font-size: clamp(2.4rem, 4vw, 3.4rem);
  letter-spacing: -0.03em;
  color: var(--ink);
  line-height: 1;
}
.stat-label {
  margin-top: 8px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  color: var(--muted);
  max-width: 14ch;
}

/* ============ Featured gallery (home) ============ */
.featured-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 18px;
}
.f-card {
  position: relative;
  overflow: hidden;
  background: var(--bg-alt);
}
.f-card img { width: 100%; height: 100%; object-fit: cover; transition: transform 1s var(--ease); }
.f-card:hover img { transform: scale(1.04); }
.f-card .label {
  position: absolute; bottom: 14px; left: 14px;
  background: rgba(26, 24, 22, 0.78);
  color: var(--bg);
  padding: 6px 10px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.66rem;
  letter-spacing: 0.1em;
  backdrop-filter: blur(8px);
}
.f-a { grid-column: span 7; aspect-ratio: 4/3; }
.f-b { grid-column: span 5; aspect-ratio: 1/1; }
.f-c { grid-column: span 4; aspect-ratio: 3/4; }
.f-d { grid-column: span 5; aspect-ratio: 4/3; }
.f-e { grid-column: span 3; aspect-ratio: 3/4; }

/* ============ Page hero (interior pages) ============ */
.phero {
  padding-top: clamp(140px, 18vw, 220px);
  padding-bottom: clamp(60px, 9vw, 120px);
  border-bottom: 1px solid var(--line);
}
.phero .kicker { display: block; margin-bottom: 24px; }
.phero h1 {
  font-size: clamp(2.8rem, 7vw, 6rem);
  max-width: 16ch;
}
.phero .lead { margin-top: 28px; max-width: 58ch; }
.phero-meta {
  margin-top: 48px;
  display: flex; gap: 32px; flex-wrap: wrap;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.78rem; letter-spacing: 0.06em;
  color: var(--muted);
}
.phero-meta span strong { color: var(--ink); font-weight: 400; }

/* ============ About philosophy ============ */
.philosophy {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(48px, 8vw, 120px);
}
.philosophy .col-l { padding-top: 24px; }
.philosophy h2 { font-size: clamp(2rem, 3.6vw, 3.2rem); max-width: 16ch; }
.philosophy p { margin-top: 22px; }

/* ============ Values grid ============ */
.values {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  border-top: 1px solid var(--line-strong);
  border-bottom: 1px solid var(--line-strong);
}
.value {
  padding: 36px 28px;
  border-right: 1px solid var(--line);
}
.value:first-child { padding-left: 0; }
.value:last-child { border-right: 0; padding-right: 0; }
.value h4 { margin-top: 6px; }
.value p { margin-top: 14px; color: var(--muted); font-size: 0.96rem; }
.value .v-num {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.72rem; letter-spacing: 0.1em; color: var(--accent-dark);
}

/* ============ Gallery page ============ */
.gallery-filter {
  display: flex; flex-wrap: wrap; gap: 8px;
  padding: 28px 0 40px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 48px;
}
.gallery-filter button {
  font-family: 'Satoshi', sans-serif; font-weight: 500;
  font-size: 0.86rem;
  padding: 9px 16px;
  border: 1px solid var(--line-strong);
  color: var(--muted);
  border-radius: 2px;
  transition: all .25s var(--ease);
}
.gallery-filter button:hover { color: var(--ink); border-color: var(--ink); }
.gallery-filter button.active { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 14px;
}
.g {
  position: relative;
  overflow: hidden;
  background: var(--bg-alt);
  transition: opacity .35s var(--ease);
}
.g.hidden { display: none; }
.g img { width: 100%; height: 100%; object-fit: cover; transition: transform 1s var(--ease); }
.g:hover img { transform: scale(1.04); }
.g .label {
  position: absolute; bottom: 12px; left: 12px;
  background: rgba(26, 24, 22, 0.78);
  color: var(--bg);
  padding: 5px 9px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.64rem;
  letter-spacing: 0.1em;
  backdrop-filter: blur(8px);
}
.g-1 { grid-column: span 6; aspect-ratio: 4/3; }
.g-2 { grid-column: span 6; aspect-ratio: 4/3; }
.g-3 { grid-column: span 4; aspect-ratio: 3/4; }
.g-4 { grid-column: span 4; aspect-ratio: 3/4; }
.g-5 { grid-column: span 4; aspect-ratio: 3/4; }
.g-6 { grid-column: span 8; aspect-ratio: 16/10; }
.g-7 { grid-column: span 4; aspect-ratio: 4/5; }
.g-8 { grid-column: span 3; aspect-ratio: 3/4; }
.g-9 { grid-column: span 5; aspect-ratio: 4/3; }
.g-10 { grid-column: span 4; aspect-ratio: 1/1; }

/* ============ Process steps ============ */
.steps { display: flex; flex-direction: column; }
.step {
  display: grid;
  grid-template-columns: 1fr 7fr;
  gap: clamp(24px, 5vw, 80px);
  padding: clamp(40px, 6vw, 80px) 0;
  border-bottom: 1px solid var(--line);
  align-items: start;
}
.step:last-child { border-bottom: 0; }
.step-num {
  font-family: 'Cabinet Grotesk', sans-serif;
  font-weight: 700;
  font-size: clamp(2.6rem, 5vw, 4.6rem);
  letter-spacing: -0.04em;
  color: var(--accent-dark);
  line-height: 1;
}
.step h3 { font-size: clamp(1.6rem, 2.6vw, 2.4rem); margin-bottom: 18px; }
.step p { max-width: 56ch; }
.step ul {
  margin-top: 28px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 32px;
  list-style: none;
  font-size: 0.95rem;
  color: var(--muted);
}
.step ul li::before {
  content: '·'; color: var(--accent); margin-right: 10px; font-weight: 700;
}

/* ============ Services ============ */
.services-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 0;
  border-top: 1px solid var(--line-strong);
}
.svc {
  grid-column: span 4;
  padding: clamp(36px, 4vw, 56px) clamp(24px, 3vw, 40px);
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.svc:nth-child(3n) { border-right: 0; }
.svc-num { font-family: 'JetBrains Mono', monospace; font-size: 0.72rem; letter-spacing: 0.12em; color: var(--accent-dark); }
.svc h3 { margin-top: 28px; font-size: clamp(1.4rem, 2.1vw, 1.9rem); }
.svc p { margin-top: 18px; color: var(--ink-2); }
.svc ul { margin-top: 22px; list-style: none; }
.svc ul li {
  padding: 8px 0;
  border-bottom: 1px dashed var(--line);
  font-size: 0.92rem;
  color: var(--muted);
}
.svc ul li:last-child { border-bottom: 0; }

/* ============ Consult banner ============ */
.consult {
  background: var(--ink);
  color: var(--bg);
  padding: clamp(48px, 7vw, 96px) clamp(28px, 5vw, 80px);
  display: grid;
  grid-template-columns: 5fr 7fr;
  gap: clamp(40px, 6vw, 96px);
  align-items: center;
}
.consult .kicker { color: var(--accent); }
.consult h2 { color: var(--bg); font-size: clamp(2rem, 3.6vw, 3.2rem); }
.consult p { color: rgba(250, 247, 242, 0.7); margin-top: 22px; }
.consult ul {
  margin-top: 32px;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px 24px;
  list-style: none;
  font-size: 0.92rem;
  color: rgba(250, 247, 242, 0.85);
}
.consult ul li::before {
  content: '·'; color: var(--accent); margin-right: 10px; font-weight: 700;
}
.consult .note {
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px solid rgba(250, 247, 242, 0.18);
  font-size: 0.86rem;
  color: rgba(250, 247, 242, 0.55);
  font-style: italic;
}

/* ============ Contact ============ */
.contact-grid {
  display: grid;
  grid-template-columns: 5fr 7fr;
  gap: clamp(40px, 6vw, 96px);
  padding-top: clamp(40px, 6vw, 80px);
}
.contact-list { display: flex; flex-direction: column; gap: 32px; }
.contact-list-wide {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: clamp(28px, 4vw, 56px) clamp(48px, 7vw, 96px);
  padding-top: clamp(40px, 6vw, 80px);
  max-width: 880px;
}
.contact-item {
  padding-bottom: 22px;
  border-bottom: 1px solid var(--line);
}
.contact-item .label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  color: var(--muted);
  text-transform: uppercase;
}
.contact-item .value {
  margin-top: 8px;
  font-family: 'Cabinet Grotesk', sans-serif;
  font-weight: 500;
  font-size: clamp(1.05rem, 1.4vw, 1.3rem);
  color: var(--ink);
}
.form { display: grid; gap: 22px; }
.field { display: grid; gap: 8px; }
.field label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.7rem; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--muted);
}
.field input, .field textarea {
  font: inherit;
  background: transparent;
  border: 0; border-bottom: 1px solid var(--line-strong);
  padding: 10px 0;
  color: var(--ink);
  transition: border-color .2s var(--ease);
}
.field textarea { min-height: 120px; resize: vertical; }
.field input:focus, .field textarea:focus { border-bottom-color: var(--ink); outline: 0; }

/* ============ FAQ ============ */
.faq { display: flex; flex-direction: column; }
.faq-item {
  border-top: 1px solid var(--line);
  padding: 28px 0;
}
.faq-item:last-child { border-bottom: 1px solid var(--line); }
.faq-q {
  display: flex; justify-content: space-between; align-items: baseline; gap: 24px;
  width: 100%; text-align: left;
  font-family: 'Cabinet Grotesk', sans-serif;
  font-weight: 500;
  font-size: clamp(1.05rem, 1.5vw, 1.3rem);
  color: var(--ink);
}
.faq-q::after {
  content: '+';
  font-family: 'JetBrains Mono', monospace; font-size: 1.2rem;
  transition: transform .3s var(--ease);
  color: var(--accent-dark);
}
.faq-item.open .faq-q::after { transform: rotate(45deg); }
.faq-a {
  max-height: 0; overflow: hidden;
  transition: max-height .4s var(--ease), padding .4s var(--ease);
}
.faq-a-inner { padding-top: 16px; color: var(--muted); max-width: 58ch; }
.faq-item.open .faq-a { max-height: 400px; }

/* ============ CTA band (home end) ============ */
.cta-band {
  background: var(--ink);
  color: var(--bg);
  padding: clamp(64px, 9vw, 120px) 0;
  text-align: left;
}
.cta-band .wrap { display: grid; grid-template-columns: 7fr 5fr; gap: clamp(40px, 6vw, 96px); align-items: center; }
.cta-band h2 { color: var(--bg); font-size: clamp(2.4rem, 5vw, 4.2rem); max-width: 14ch; }
.cta-band p { color: rgba(250, 247, 242, 0.7); margin-top: 24px; max-width: 48ch; }
.cta-band .btn { background: var(--accent); color: var(--ink); border-color: var(--accent); }
.cta-band .btn:hover { background: var(--bg); color: var(--ink); }

/* ============ Footer ============ */
.footer {
  border-top: 1px solid var(--line);
  padding: 48px var(--gutter);
  font-size: 0.86rem;
  color: var(--muted);
}
.footer-grid {
  max-width: var(--max);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 40px;
  align-items: end;
}
.footer-brand .brand { font-size: 1.4rem; }
.footer-brand .tagline { margin-top: 8px; font-size: 0.86rem; color: var(--muted); }
.footer-meta { display: flex; flex-direction: column; gap: 8px; text-align: right; }
.footer-meta .credit { font-family: 'JetBrains Mono', monospace; font-size: 0.7rem; letter-spacing: 0.08em; }
.footer-meta a { color: var(--muted); transition: color .2s var(--ease); }
.footer-meta a:hover { color: var(--ink); }

/* ============ Reveal animation ============ */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .9s var(--ease), transform .9s var(--ease); }
.reveal.in { opacity: 1; transform: translateY(0); }
.reveal-stagger > * { opacity: 0; transform: translateY(24px); transition: opacity .8s var(--ease), transform .8s var(--ease); }
.reveal-stagger.in > * { opacity: 1; transform: translateY(0); }
.reveal-stagger.in > *:nth-child(1) { transition-delay: 0.05s; }
.reveal-stagger.in > *:nth-child(2) { transition-delay: 0.15s; }
.reveal-stagger.in > *:nth-child(3) { transition-delay: 0.25s; }
.reveal-stagger.in > *:nth-child(4) { transition-delay: 0.35s; }

/* ============ Responsive ============ */
@media (max-width: 1024px) {
  .hero { grid-template-columns: 1fr 1fr; }
  .bento-tile.t1 { grid-column: span 6; min-height: 380px; }
  .bento-tile.t2 { grid-column: span 6; }
  .bento-tile.t3 { grid-column: span 6; }
  .bento-tile.t4 { grid-column: span 6; }
  .featured-grid { grid-template-columns: repeat(6, 1fr); }
  .f-a { grid-column: span 6; }
  .f-b { grid-column: span 6; }
  .f-c { grid-column: span 3; }
  .f-d { grid-column: span 3; }
  .f-e { grid-column: span 6; }
  .values { grid-template-columns: repeat(2, 1fr); }
  .value:nth-child(2n) { border-right: 0; }
  .value:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
  .svc { grid-column: span 6; }
  .svc:nth-child(3n) { border-right: 1px solid var(--line); }
  .svc:nth-child(2n) { border-right: 0; }
}

/* ----- Tablet/phone (≤ 820px) ----- */
@media (max-width: 820px) {
  :root { --gutter: 36px; }
  body { font-size: 16px; }

  /* CRITICAL: remove backdrop-filter from header on mobile.
     `backdrop-filter` creates a containing block for fixed descendants,
     trapping the mobile menu ul inside the 60px header instead of viewport. */
  .header {
    background-color: rgba(250, 247, 242, 0.96) !important;
    -webkit-backdrop-filter: none !important;
    backdrop-filter: none !important;
  }
  .header.scrolled { background-color: #FAF7F2 !important; }

  /* Nav: hide desktop links, show hamburger */
  .nav { padding: 14px var(--gutter); }
  .nav-menu { display: none; }
  .lang-toggle.desktop { display: none; }
  .nav-toggle { display: flex; margin-left: auto; }

  /* Menu mobile aperto: fullscreen opaco, sotto l'header */
  body.menu-open { overflow: hidden; }
  body.menu-open .header {
    background-color: #FAF7F2 !important;
    -webkit-backdrop-filter: none !important;
    backdrop-filter: none !important;
    border-bottom-color: var(--line) !important;
  }
  .nav-menu.open {
    display: flex !important;
    position: fixed;
    inset: 0;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    background-color: #FAF7F2;
    padding: 88px var(--gutter) 40px;
    gap: 0;
    z-index: 50;
    overflow-y: auto;
    list-style: none;
  }
  .nav-menu.open li { list-style: none; width: 100%; }
  .nav-menu.open li > a {
    display: block;
    font-size: 1.2rem;
    font-weight: 500;
    padding: 18px 0;
    border-bottom: 1px solid var(--line);
    color: var(--ink);
  }
  .nav-menu.open li > a::after { display: none; }
  .nav-menu.open .lang-toggle.desktop {
    display: inline-flex !important;
    margin-top: 28px;
    align-self: flex-start;
  }

  /* Section padding (longhand to not override .wrap horizontal padding) */
  .section { padding-top: 56px; padding-bottom: 56px; }
  .section-tight { padding-top: 40px; padding-bottom: 40px; }

  /* Hero home: stack 1 col, h1 più piccolo, foto contenuta */
  .hero {
    grid-template-columns: 1fr;
    padding-top: 96px;
    padding-bottom: 48px;
    min-height: auto;
    gap: 32px;
  }
  .hero-text { max-width: 100%; }
  .hero h1 { font-size: clamp(2.6rem, 13vw, 4.4rem); }
  .hero .lead { margin-top: 20px; font-size: 1.02rem; }
  .hero-cta { margin-top: 28px; gap: 10px; }
  .hero-cta .btn { width: 100%; justify-content: center; }
  .hero-media { aspect-ratio: 4/5; max-height: 60vh; }

  /* Page hero (about/gallery/etc) */
  .phero { padding-top: 100px; padding-bottom: 48px; }
  .phero h1 { font-size: clamp(2.2rem, 11vw, 3.6rem); }
  .phero .lead { font-size: 1.02rem; margin-top: 20px; }
  .phero-meta { margin-top: 28px; gap: 20px; font-size: 0.72rem; }

  /* Section heads */
  .head {
    grid-template-columns: 1fr;
    gap: 14px;
    padding-bottom: 32px;
    align-items: start;
  }
  .head h2 { font-size: clamp(1.9rem, 8vw, 2.6rem); max-width: none; }
  .head .lead { font-size: 1rem; }

  /* Bento: 1 col, tile compatti */
  .bento { grid-template-columns: 1fr; }
  .bento-tile,
  .bento-tile.t1,
  .bento-tile.t2,
  .bento-tile.t3,
  .bento-tile.t4 {
    grid-column: 1 / -1;
    min-height: 280px;
    padding: 28px 22px;
  }
  .bento-title { font-size: 1.4rem; padding-top: 16px; }
  .bento-body { font-size: 0.95rem; }
  .bento-img { opacity: 0.22; }

  /* Bio strip */
  .bio { grid-template-columns: 1fr; gap: 28px; }
  .bio-img { aspect-ratio: 4/3; max-height: 50vh; }
  .bio-text h2 { font-size: clamp(1.9rem, 7vw, 2.4rem); }
  .bio-text .lead { margin-top: 18px; font-size: 1rem; }

  /* Stats: 1 col stacked */
  .stats { grid-template-columns: 1fr; margin-top: 32px; }
  .stat { border-right: 0; border-bottom: 1px solid var(--line); padding: 18px 0; }
  .stat:last-child { border-bottom: 0; }
  .stat-num { font-size: 2.4rem; }

  /* Featured grid: 1 col */
  .featured-grid { grid-template-columns: 1fr; gap: 12px; }
  .f-card,
  .f-a, .f-b, .f-c, .f-d, .f-e {
    grid-column: 1 / -1;
    aspect-ratio: 4/3;
  }

  /* Gallery */
  .gallery-filter {
    padding: 18px 0 24px;
    margin-bottom: 28px;
    overflow-x: auto;
    flex-wrap: nowrap;
    -webkit-overflow-scrolling: touch;
  }
  .gallery-filter button { flex-shrink: 0; font-size: 0.84rem; padding: 8px 14px; }
  .gallery-grid { grid-template-columns: 1fr; gap: 12px; }
  .gallery-grid .g,
  .g-1, .g-2, .g-3, .g-4, .g-5, .g-6, .g-7, .g-8, .g-9, .g-10 {
    grid-column: 1 / -1;
    aspect-ratio: 4/3;
  }

  /* Process steps */
  .step {
    grid-template-columns: 1fr;
    gap: 16px;
    padding: 36px 0;
  }
  .step-num { font-size: 2.6rem; }
  .step h3 { font-size: 1.5rem; margin-bottom: 14px; }
  .step ul { grid-template-columns: 1fr; gap: 8px; margin-top: 20px; }

  /* Philosophy / About */
  .philosophy { grid-template-columns: 1fr; gap: 28px; }
  .philosophy h2 { font-size: clamp(1.8rem, 7vw, 2.4rem); }

  /* Values */
  .values { grid-template-columns: 1fr; }
  .value {
    border-right: 0;
    border-bottom: 1px solid var(--line);
    padding: 28px 0;
  }
  .value:last-child { border-bottom: 0; }

  /* Services */
  .services-grid { grid-template-columns: 1fr; }
  .svc {
    grid-column: 1 / -1 !important;
    border-right: 0 !important;
    padding: 32px 0;
  }
  .svc h3 { font-size: 1.4rem; }

  /* Consult banner */
  .consult {
    grid-template-columns: 1fr;
    padding: 36px var(--gutter);
    gap: 24px;
  }
  .consult h2 { font-size: clamp(1.8rem, 7vw, 2.3rem); }
  .consult ul { grid-template-columns: 1fr; }

  /* Contact */
  .contact-grid { grid-template-columns: 1fr; gap: 40px; padding-top: 32px; }
  .contact-list-wide { grid-template-columns: 1fr; gap: 24px; padding-top: 24px; }
  .contact-item .value { font-size: 1.1rem; }
  .form { margin-top: 8px; }

  /* FAQ */
  .faq-q { font-size: 1.05rem; gap: 16px; }
  .faq-item { padding: 22px 0; }

  /* CTA band */
  .cta-band { padding: 56px 0; }
  .cta-band .wrap { grid-template-columns: 1fr; gap: 24px; }
  .cta-band h2 { font-size: clamp(2rem, 8vw, 3rem); max-width: none; }
  .cta-band .btn { width: 100%; justify-content: center; }

  /* Footer */
  .footer { padding: 36px var(--gutter); }
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 24px;
    align-items: start;
  }
  .footer-meta { text-align: left; align-items: flex-start; }
}

/* ----- Small phones (≤ 380px) ----- */
@media (max-width: 380px) {
  :root { --gutter: 28px; }
  .brand { font-size: 1rem; }
  .hero { padding-top: 88px; }
  .hero h1 { font-size: clamp(2.2rem, 14vw, 3.4rem); }
  .hero .lead { font-size: 0.96rem; }
  .phero h1 { font-size: clamp(2rem, 12vw, 2.8rem); }
  .head h2 { font-size: 1.7rem; }
  .bento-title { font-size: 1.25rem; }
  .step-num { font-size: 2.2rem; }
  .step h3 { font-size: 1.3rem; }
  .stat-num { font-size: 2.1rem; }
}

/* ----- Reduce motion ----- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }
  .reveal, .reveal-stagger > * { opacity: 1; transform: none; }
}
