/* Architag Studio
   Layout: left-aligned asymmetric grid, plaster-white ground, one petrol accent,
   the studio's "tag" as the recurring mark (captions, launcher). */
:root {
  --bg: #f2f3f1;
  --surface: #ffffff;
  --ink: #1b2129;
  --muted: #5b6470;
  --line: #d4d9d6;
  --accent: #0e6b6b;
  --accent-ink: #ffffff;
  --accent-soft: #dcedeb;
  --dark-bg: #1b2129;
  --dark-ink: #eceeea;
  --dark-muted: #a9b2ba;
  --shadow: 0 18px 50px -24px rgba(27, 33, 41, .45);
  --font-display: "Archivo", "Helvetica Neue", Arial, sans-serif;
  --font-body: "Source Sans 3", "Source Sans Pro", "Segoe UI", system-ui, sans-serif;
  --radius: 4px;
  --wrap: 1180px;
  --gutter-l: max(20px, env(safe-area-inset-left, 0px));
  --gutter-r: max(20px, env(safe-area-inset-right, 0px));
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #141921; --surface: #1c232c; --ink: #eceeea; --muted: #a3acb5; --line: #2c3540;
    --accent: #4fc1b9; --accent-ink: #0d1b1a; --accent-soft: #173434;
    --dark-bg: #0e1218; --shadow: 0 18px 50px -24px rgba(0, 0, 0, .8);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #141921; --surface: #1c232c; --ink: #eceeea; --muted: #a3acb5; --line: #2c3540;
  --accent: #4fc1b9; --accent-ink: #0d1b1a; --accent-soft: #173434;
  --dark-bg: #0e1218; --shadow: 0 18px 50px -24px rgba(0, 0, 0, .8);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.55;
}
img { max-width: 100%; height: auto; display: block; }
[hidden] { display: none !important; }
a { color: var(--accent); text-underline-offset: .15em; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
h1, h2, h3 { font-family: var(--font-display); font-weight: 700; line-height: 1.05; margin: 0; text-wrap: balance; letter-spacing: -.02em; }
h2 { font-size: clamp(2rem, 1.4rem + 2.6vw, 3.25rem); font-stretch: 112%; }
h3 { font-size: 1.25rem; font-stretch: 105%; }
p { margin: 0; }
.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-left: var(--gutter-l); padding-right: var(--gutter-r); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 1rem; top: -4rem; background: var(--accent); color: var(--accent-ink); padding: .5rem .9rem; z-index: 100; }
.skip:focus { top: 1rem; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  background: var(--accent); color: var(--accent-ink);
  font-family: var(--font-display); font-weight: 600; font-size: .95rem; font-stretch: 105%;
  padding: .85rem 1.4rem; border-radius: var(--radius); border: 2px solid var(--accent);
  text-decoration: none; cursor: pointer; transition: transform .15s ease, background .15s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--ink); }
.btn-small { padding: .55rem 1rem; font-size: .9rem; }
.cta-row { display: flex; flex-wrap: wrap; gap: .75rem; }

/* Tag chip: the studio's logo shape as a caption */
.tag {
  display: inline-block; position: relative;
  background: var(--surface); color: var(--ink);
  font-family: var(--font-display); font-size: .82rem; font-weight: 600; font-stretch: 105%;
  padding: .4rem .75rem .4rem 1.45rem; border-radius: 3px 3px 3px 999px / 3px 3px 3px 999px;
  clip-path: polygon(0 50%, .7rem 0, 100% 0, 100% 100%, .7rem 100%);
}
.tag::before { content: ""; position: absolute; left: .62rem; top: 50%; width: .32rem; height: .32rem; border-radius: 50%; background: var(--accent); transform: translateY(-50%); }

/* Header */
.site-header { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 40; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.header-row { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 68px; }
.brand { display: inline-flex; align-items: center; gap: .6rem; color: var(--ink); text-decoration: none; }
.brand-mark { width: 30px; height: 30px; color: var(--accent); }
.brand-text { display: flex; flex-direction: column; line-height: 1; font-family: var(--font-display); }
.brand-text strong { font-size: 1.15rem; font-weight: 800; font-stretch: 120%; letter-spacing: -.01em; text-transform: uppercase; }
.brand-text small { font-size: .78rem; color: var(--muted); margin-top: .15rem; }
.nav { display: flex; align-items: center; gap: 1.5rem; }
.nav a { color: var(--ink); text-decoration: none; font-weight: 600; font-size: 1rem; }
.nav a:hover { color: var(--accent); }
.nav-toggle { display: none; width: 44px; height: 44px; border: 0; background: none; cursor: pointer; flex-direction: column; justify-content: center; gap: 6px; align-items: center; }
.nav-toggle span { display: block; width: 24px; height: 2px; background: var(--ink); transition: transform .2s; }
.nav-toggle[aria-expanded="true"] span:first-child { transform: translateY(4px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:last-child { transform: translateY(-4px) rotate(-45deg); }

/* Hero */
.hero { padding-block: clamp(2.5rem, 6vw, 5.5rem) 0; }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: clamp(2rem, 5vw, 5rem); align-items: center; }
.hero-copy { container-type: inline-size; min-width: 0; }
.steps-title { display: grid; font-size: clamp(2rem, 9.6cqw, 5rem); font-weight: 800; font-stretch: 115%; line-height: .98; letter-spacing: -.035em; }
.steps-title span { display: block; }
.steps-title span:nth-child(2) { padding-left: .4em; }
.steps-title span:nth-child(3) { padding-left: .8em; }
.steps-title span:nth-child(4) { padding-left: 1.2em; }
.hero-copy .lead { margin-top: 1.75rem; max-width: 34em; }
.hero-copy .cta-row { margin-top: 1.75rem; }
.lead { font-size: 1.2rem; color: var(--muted); }
.hero-media { margin: 0; position: relative; }
.hero-media img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: var(--radius); box-shadow: var(--shadow); }
.hero-media .tag { position: absolute; left: 1rem; bottom: 1rem; }
.facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; margin-top: clamp(2.5rem, 5vw, 4.5rem); padding-block: 1.25rem; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); color: var(--muted); font-size: .98rem; }
.facts p { padding-left: 1rem; border-left: 2px solid var(--accent); }

/* Sections */
.section { padding-block: clamp(3.5rem, 8vw, 7rem); }
.section-alt { background: var(--surface); }
.section-head { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); gap: 1.5rem 3rem; align-items: end; margin-bottom: 2.5rem; }
.section-head p { color: var(--muted); font-size: 1.15rem; max-width: 36em; }

/* Projects */
.filters { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: 1.5rem; }
.chip { background: transparent; color: var(--ink); border: 1px solid var(--line); border-radius: 999px; padding: .45rem 1rem; font: inherit; font-size: .95rem; cursor: pointer; }
.chip:hover { border-color: var(--ink); }
.chip.is-active { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.projects { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); grid-auto-flow: dense; gap: 10px; }
.project { min-width: 0; }
.project.span-2 { grid-column: span 2; }
.project[hidden] { display: none; }
.project button { position: relative; display: block; width: 100%; padding: 0; border: 0; background: var(--line); cursor: pointer; border-radius: var(--radius); overflow: hidden; }
.project img { width: 100%; aspect-ratio: 1; object-fit: cover; transition: transform .5s ease; }
.project.span-2 img { aspect-ratio: 2 / 1; }
.project button:hover img { transform: scale(1.03); }
.project .tag { position: absolute; left: .75rem; bottom: .75rem; }
.project img.focus-left { object-position: 15% 50%; }
.projects-empty { color: var(--muted); padding-block: 2rem; }

/* Studio */
.studio-grid { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); gap: clamp(2rem, 5vw, 5rem); align-items: start; }
.studio-copy { display: grid; gap: 1.1rem; max-width: 40em; }
.testo-blocco { display: contents; } /* paragrafi modificabili dal programma: restano nella griglia del genitore */
.studio-copy h2 { margin-bottom: .5rem; }
.qualities { margin: .25rem 0 .5rem; padding: 0; list-style: none; display: grid; grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr)); gap: .5rem 1.5rem; }
.qualities li { padding-left: 1.1rem; position: relative; font-weight: 600; }
.qualities li::before { content: ""; position: absolute; left: 0; top: .62em; width: .5rem; height: .5rem; background: var(--accent); }
.founders { display: grid; grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr)); gap: 1rem; margin-top: 1rem; }
.founder { display: flex; align-items: center; gap: .9rem; padding: 1rem; border: 1px solid var(--line); border-radius: var(--radius); }
.founder-initials { flex: none; width: 3rem; height: 3rem; display: grid; place-items: center; border-radius: 50%; background: var(--accent-soft); color: var(--accent); font-family: var(--font-display); font-weight: 800; font-stretch: 110%; }
.founder p { line-height: 1.35; }
.studio-media { margin: 0; position: sticky; top: 90px; }
.studio-media img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; border-radius: var(--radius); }

/* Services */
.services { display: grid; grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); }
.service { background: var(--bg); padding: 1.75rem 1.5rem 2rem; display: grid; gap: .75rem; align-content: start; }
.service h3 { padding-top: .9rem; border-top: 3px solid var(--accent); }
.service p { color: var(--muted); }

/* Method */
.section-dark { background: var(--dark-bg); color: var(--dark-ink); }
.section-dark .section-head p { color: var(--dark-muted); }
.method { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 2rem 1.5rem; counter-reset: step; }
.method li { display: grid; gap: .6rem; align-content: start; padding-top: 1.25rem; border-top: 1px solid color-mix(in srgb, var(--dark-ink) 25%, transparent); }
.method-n { font-family: var(--font-display); font-weight: 800; font-stretch: 120%; font-size: 2.4rem; line-height: 1; color: var(--accent); }
.method h3 { font-size: 1.35rem; }
.method p { color: var(--dark-muted); }
.method li:nth-child(2) { margin-top: 1.5rem; }
.method li:nth-child(3) { margin-top: 3rem; }
.method li:nth-child(4) { margin-top: 4.5rem; }

/* Contact */
.contact-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: clamp(2rem, 5vw, 5rem); align-items: start; }
.contact-info { display: grid; gap: 1.25rem; }
.contact-list { margin: .5rem 0 0; display: grid; gap: 1.25rem; }
.contact-list div { display: grid; grid-template-columns: 6rem minmax(0, 1fr); gap: 1rem; padding-top: 1rem; border-top: 1px solid var(--line); }
.contact-list dt { color: var(--muted); font-weight: 600; }
.contact-list dd { margin: 0; }
.copy { margin-left: .4rem; font: inherit; font-size: .8rem; padding: .15rem .55rem; border: 1px solid var(--line); border-radius: 999px; background: transparent; color: var(--muted); cursor: pointer; }
.copy:hover { border-color: var(--ink); color: var(--ink); }
.contact-form { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: clamp(1.25rem, 3vw, 2rem); display: grid; gap: 1rem; }
.contact-form h3 { font-size: 1.4rem; margin-bottom: .25rem; }
.field { display: grid; gap: .35rem; }
.field label { font-weight: 600; font-size: .95rem; }
.field input, .field select, .field textarea {
  width: 100%; font: inherit; color: var(--ink); background: var(--bg);
  border: 1px solid var(--line); border-radius: var(--radius); padding: .7rem .8rem;
}
.field textarea { resize: vertical; min-height: 7rem; }
.field input:focus, .field select:focus, .field textarea:focus { outline: 2px solid var(--accent); outline-offset: 0; border-color: var(--accent); }
.field.is-invalid input, .field.is-invalid textarea { border-color: #b3261e; }
.form-note { color: var(--muted); font-size: .92rem; }
.form-status { min-height: 1.4em; font-weight: 600; }
.form-status.ok { color: var(--accent); }
.form-status.err { color: #b3261e; }

/* Footer */
.site-footer { border-top: 1px solid var(--line); padding-block: 1.75rem; color: var(--muted); font-size: .95rem; }
.footer-row { display: flex; flex-wrap: wrap; gap: .75rem 2rem; justify-content: space-between; }

/* Lightbox */
/* Il dialog occupa tutto lo schermo e centra la foto: con una larghezza "auto" il browser lo dimensionava
   sulla foto prima del limite di altezza, e le foto verticali restavano spostate a sinistra. */
.lightbox { border: 0; padding: 0; margin: 0; background: transparent; width: 100vw; height: 100vh; height: 100dvh; max-width: none; max-height: none; }
.lightbox[open] { display: flex; align-items: center; justify-content: center; }
.lightbox::backdrop { background: rgba(10, 14, 18, .88); }
.lightbox figure { margin: 0; display: flex; flex-direction: column; align-items: center; gap: .75rem; max-width: 92vw; }
.lightbox img { display: block; max-width: 92vw; max-height: calc(100dvh - 7rem); width: auto; height: auto; object-fit: contain; border-radius: var(--radius); }
.lightbox .tag:empty { display: none; }
.lb-close, .lb-nav { position: fixed; z-index: 2; border: 0; background: rgba(255,255,255,.12); color: #fff; font-size: 2rem; line-height: 1; width: 48px; height: 48px; border-radius: 50%; cursor: pointer; display: grid; place-items: center; }
.lb-close { top: calc(1rem + env(safe-area-inset-top, 0px)); right: calc(1rem + env(safe-area-inset-right, 0px)); }
.lb-nav { top: 50%; transform: translateY(-50%); }
.lb-prev { left: calc(.75rem + env(safe-area-inset-left, 0px)); }
.lb-next { right: calc(.75rem + env(safe-area-inset-right, 0px)); }
.lb-close:hover, .lb-nav:hover { background: rgba(255,255,255,.25); }

/* Bot */
.bot { position: fixed; right: calc(1rem + env(safe-area-inset-right, 0px)); bottom: calc(1rem + env(safe-area-inset-bottom, 0px)); z-index: 60; display: grid; justify-items: end; gap: .75rem; }
.bot-launcher {
  display: inline-flex; align-items: center; gap: .55rem;
  background: var(--ink); color: var(--bg); border: 0; cursor: pointer;
  font-family: var(--font-display); font-weight: 700; font-stretch: 105%; font-size: .95rem;
  padding: .75rem 1.1rem .75rem .9rem; border-radius: 999px; box-shadow: var(--shadow);
  transition: transform .15s ease;
}
.bot-launcher:hover { transform: translateY(-2px); }
.bot-launcher svg { width: 22px; height: 22px; color: var(--accent); }
.bot-launcher[aria-expanded="true"] { display: none; }
.bot-nudge { position: relative; max-width: 280px; background: var(--surface); color: var(--ink); border: 1px solid var(--line); border-radius: 12px 12px 2px 12px; padding: .9rem 2.2rem .9rem 1rem; box-shadow: var(--shadow); display: grid; gap: .6rem; font-size: .95rem; animation: nudge .35s ease both; }
@keyframes nudge { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.bot-nudge button[data-open-bot] { justify-self: start; background: var(--accent); color: var(--accent-ink); border: 0; border-radius: 999px; padding: .4rem .9rem; font: inherit; font-weight: 600; cursor: pointer; }
.bot-nudge-close { position: absolute; top: .3rem; right: .4rem; border: 0; background: none; font-size: 1.3rem; color: var(--muted); cursor: pointer; }
.bot-panel {
  width: min(380px, calc(100vw - var(--gutter-l) - var(--gutter-r)));
  height: min(560px, calc(100vh - 2rem - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px)));
  background: var(--surface); color: var(--ink); border: 1px solid var(--line); border-radius: 14px;
  box-shadow: var(--shadow); display: grid; grid-template-rows: auto 1fr auto auto; overflow: hidden;
  animation: nudge .25s ease both;
}
.bot-panel[hidden] { display: none; }
.bot-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .9rem 1rem; background: var(--ink); color: var(--bg); }
.bot-head div { display: grid; line-height: 1.2; }
.bot-head strong { font-family: var(--font-display); font-stretch: 110%; font-size: 1.05rem; }
.bot-head span { font-size: .82rem; opacity: .75; }
.bot-close { border: 0; background: none; color: inherit; font-size: 1.6rem; line-height: 1; cursor: pointer; width: 36px; height: 36px; border-radius: 50%; }
.bot-close:hover { background: rgba(255,255,255,.15); }
.bot-log { overflow-y: auto; padding: 1rem; display: grid; gap: .6rem; align-content: start; scroll-behavior: smooth; }
.msg { max-width: 85%; padding: .6rem .85rem; border-radius: 12px; font-size: .97rem; line-height: 1.45; white-space: pre-line; overflow-wrap: anywhere; }
.msg a { color: inherit; font-weight: 600; }
.msg.from-bot { background: var(--bg); border: 1px solid var(--line); border-bottom-left-radius: 3px; justify-self: start; }
.msg.from-user { background: var(--accent); color: var(--accent-ink); border-bottom-right-radius: 3px; justify-self: end; }
.msg.typing { color: var(--muted); font-style: italic; }
.bot-chips { display: flex; flex-wrap: wrap; gap: .4rem; padding: 0 1rem .6rem; }
.bot-chips:empty { display: none; }
.bot-chips button { font: inherit; font-size: .88rem; padding: .35rem .8rem; border-radius: 999px; border: 1px solid var(--accent); background: transparent; color: var(--accent); cursor: pointer; }
.bot-chips button:hover { background: var(--accent-soft); }
.bot-form { display: flex; gap: .5rem; padding: .75rem; border-top: 1px solid var(--line); }
.bot-form input { flex: 1; min-width: 0; font: inherit; padding: .6rem .8rem; border: 1px solid var(--line); border-radius: 999px; background: var(--bg); color: var(--ink); }
.bot-form button { font: inherit; font-weight: 600; border: 0; border-radius: 999px; padding: .6rem 1rem; background: var(--accent); color: var(--accent-ink); cursor: pointer; }

/* Responsive */
@media (max-width: 960px) {
  .projects { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .method { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .method li:nth-child(n) { margin-top: 0; }
  .section-head { grid-template-columns: 1fr; align-items: start; }
}
@media (max-width: 820px) {
  .nav-toggle { display: flex; }
  .nav { position: absolute; left: 0; right: 0; top: 100%; flex-direction: column; align-items: stretch; gap: 0; background: var(--bg); border-bottom: 1px solid var(--line); padding: .5rem var(--gutter-r) 1rem var(--gutter-l); display: none; }
  .nav.is-open { display: flex; }
  .nav a { padding: .8rem 0; border-bottom: 1px solid var(--line); }
  .nav .btn { margin-top: 1rem; }
  .hero-grid, .studio-grid, .contact-grid { grid-template-columns: 1fr; }
  .studio-media { position: static; order: -1; }
  .studio-media img { aspect-ratio: 4 / 3; }
  .facts { grid-template-columns: 1fr; gap: .75rem; }
}
@media (max-width: 560px) {
  body { font-size: 1rem; }
  .projects { grid-template-columns: 1fr; }
  .project.span-2 { grid-column: auto; }
  .project.span-2 img { aspect-ratio: 4 / 3; }
  .method { grid-template-columns: 1fr; }
  .contact-list div { grid-template-columns: 1fr; gap: .25rem; }
  .bot-launcher span { display: none; }
  .bot-launcher { padding: .9rem; }
  .bot-launcher svg { width: 26px; height: 26px; }
  .bot-nudge { display: none; }
}

/* SEO/context line above the headline */
.kicker { font-family: var(--font-display); font-weight: 600; font-stretch: 110%; font-size: 1rem; color: var(--accent); margin-bottom: 1rem; }

/* Header tools: theme toggle + mobile menu button */
.header-tools { display: flex; align-items: center; gap: .25rem; order: 3; }
.theme-toggle { width: 42px; height: 42px; border: 1px solid var(--line); border-radius: 50%; background: transparent; color: var(--ink); cursor: pointer; display: grid; place-items: center; }
.theme-toggle:hover { border-color: var(--ink); }
.theme-toggle svg { width: 20px; height: 20px; grid-area: 1 / 1; }
.theme-toggle .icon-sun { display: none; }
.theme-toggle.is-dark .icon-sun { display: block; }
.theme-toggle.is-dark .icon-moon { display: none; }
@media (min-width: 821px) { .header-tools { order: 0; margin-left: auto; } .nav { margin-left: 1.5rem; } }

/* Project cards as links (home and related) */
.project a { position: relative; display: block; width: 100%; background: var(--line); border-radius: var(--radius); overflow: hidden; color: inherit; text-decoration: none; }
.project a img { width: 100%; aspect-ratio: 1; object-fit: cover; transition: transform .5s ease; }
.project.span-2 a img { aspect-ratio: 2 / 1; }
.project a:hover img { transform: scale(1.03); }
.project a:focus-visible { outline-offset: 2px; }
.projects-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }

/* Project page */
.project-page { padding-block: clamp(1.5rem, 4vw, 3rem) clamp(3rem, 7vw, 6rem); }
.crumbs { font-size: .95rem; color: var(--muted); display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: 1.5rem; }
.crumbs a { color: var(--muted); }
.crumbs [aria-current] { color: var(--ink); font-weight: 600; }
.project-head { display: grid; gap: .75rem; max-width: 46em; margin-bottom: 1.75rem; }
.project-head h1 { font-size: clamp(2.2rem, 1.5rem + 3.5vw, 4rem); font-stretch: 112%; letter-spacing: -.03em; }
.project-hero { margin: 0; position: relative; }
.project-hero button { display: block; width: 100%; padding: 0; border: 0; background: var(--line); border-radius: var(--radius); overflow: hidden; cursor: zoom-in; }
.project-hero img { width: 100%; max-height: 78vh; object-fit: cover; }
.project-hero .tag { position: absolute; left: 1rem; bottom: 1rem; }
.project-body { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); gap: clamp(1.5rem, 4vw, 4rem); margin-top: clamp(2rem, 4vw, 3rem); align-items: start; }
.project-sheet { margin: 0; align-content: start; }
.project-sheet div { grid-template-columns: 6.5rem minmax(0, 1fr); }
.project-text { display: grid; gap: 1rem; max-width: 40em; font-size: 1.1rem; }
.project-gallery { display: grid; grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr)); gap: 10px; margin-top: .5rem; }
.project-gallery figure { margin: 0; }
.project-gallery button { display: block; width: 100%; padding: 0; border: 0; background: var(--line); border-radius: var(--radius); overflow: hidden; cursor: zoom-in; }
.project-gallery img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; }
.project-cta { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: .75rem; }
.project-nav { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin-top: clamp(2.5rem, 5vw, 4rem); padding-top: 1.5rem; border-top: 1px solid var(--line); }
.project-nav a { display: grid; gap: .2rem; color: var(--ink); text-decoration: none; font-family: var(--font-display); font-weight: 700; font-stretch: 108%; font-size: 1.15rem; }
.project-nav a small { font-family: var(--font-body); font-weight: 400; color: var(--muted); font-size: .9rem; }
.project-nav a[rel="next"] { text-align: right; }
.project-nav a:hover { color: var(--accent); }
.related { margin-top: clamp(2.5rem, 5vw, 4rem); }
.related h2 { font-size: clamp(1.6rem, 1.2rem + 1.5vw, 2.2rem); margin-bottom: 1.25rem; }
.lightbox.single .lb-nav { display: none; }
@media (max-width: 820px) {
  .project-body { grid-template-columns: 1fr; }
  .projects-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 560px) {
  .projects-3 { grid-template-columns: 1fr; }
  .project-nav { grid-template-columns: 1fr; }
  .project-nav a[rel="next"] { text-align: left; }
  .project-sheet div { grid-template-columns: 1fr; }
}
