:root {
  --bg: #f5f1ea;
  --surface: rgba(255, 255, 255, 0.8);
  --ink: #161616;
  --muted: #5f5a55;
  --line: rgba(22, 22, 22, 0.12);
  --accent: #f56b2a;
  --accent-2: #0f8f79;
  --dark: #0d1117;
  --radius: 26px;
  --shadow: 0 24px 80px rgba(16, 18, 24, 0.12);
  --max: 1220px;
  --mobile-header-top: 0.85rem;
}

* { box-sizing: border-box; }
html {
  scroll-behavior: smooth;
  scrollbar-gutter: stable both-edges;
}
html,
body {
  scroll-padding-top: 12px;
}
body.menu-open {
  touch-action: none;
  overscroll-behavior: none;
}
body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  font-family: "Manrope", "Segoe UI", sans-serif;
  background:
    radial-gradient(circle at top left, rgba(245, 107, 42, 0.18), transparent 28%),
    radial-gradient(circle at top right, rgba(15, 143, 121, 0.16), transparent 22%),
    linear-gradient(180deg, #fbf8f2 0%, #f2ede4 100%);
}
.nav-overlay {
  position: fixed;
  inset: 0;
  background: rgba(7, 10, 16, 0.42);
  backdrop-filter: blur(5px);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 220ms ease, visibility 0s linear 220ms;
  z-index: 52;
}
.nav-overlay.is-open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transition: opacity 220ms ease, visibility 0s linear 0s;
}
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button, input, textarea, select { font: inherit; }

.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 60;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: calc(env(safe-area-inset-top, 0px) + 1.2rem) 2rem 1.2rem;
}
.site-header::before {
  content: "";
  position: absolute;
  inset: calc(env(safe-area-inset-top, 0px) + 0.75rem) 1rem auto;
  height: calc(100% - 1.5rem);
  border-radius: 999px;
  background: rgba(13, 17, 23, 0.32);
  border: 1px solid rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(18px);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.16);
  z-index: 0;
}
.site-header.compact {
  position: sticky;
  background: transparent;
  backdrop-filter: none;
  border-bottom: 0;
}
.site-header.compact::before {
  background: rgba(251, 248, 242, 0.88);
  border: 1px solid var(--line);
  box-shadow: 0 18px 44px rgba(16, 18, 24, 0.08);
}
.brand img { width: 132px; }
.brand {
  position: relative;
  z-index: 56;
  flex: 0 0 auto;
}
.site-nav {
  display: flex;
  align-items: center;
  gap: 1.1rem;
  padding: 0.7rem 1rem;
  border-radius: 999px;
  background: rgba(13, 17, 23, 0.28);
  backdrop-filter: blur(16px);
  color: white;
  flex: 0 1 auto;
  position: relative;
  z-index: 61;
}
.mobile-drawer {
  display: none;
}
.mobile-drawer a {
  color: inherit;
  text-decoration: none;
}
.mobile-drawer .nav-pill {
  display: inline-flex;
  justify-content: center;
  align-items: center;
}
.mobile-drawer-light {
  background: rgba(255, 255, 255, 0.96);
  color: var(--ink);
  border: 1px solid var(--line);
}
.mobile-drawer-light .nav-pill {
  background: rgba(22, 22, 22, 0.08);
}
.site-nav.dark {
  background: rgba(255, 255, 255, 0.8);
  color: var(--ink);
  border: 1px solid var(--line);
}
.site-nav a {
  white-space: nowrap;
  line-height: 1.15;
}
.nav-pill {
  padding: 0.6rem 1rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
}
.nav-toggle {
  display: none;
  width: 52px;
  height: 52px;
  border: 0;
  border-radius: 50%;
  background: rgba(13, 17, 23, 0.28);
  backdrop-filter: blur(16px);
  cursor: pointer;
  position: relative;
  z-index: 60;
  flex: 0 0 auto;
}
.nav-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  margin: 5px auto;
  background: white;
  transition: transform 180ms ease, opacity 180ms ease;
}
.nav-toggle-dark {
  background: rgba(255, 255, 255, 0.84);
  border: 1px solid var(--line);
}
.nav-toggle-dark span {
  background: var(--ink);
}
.nav-toggle.is-open span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.nav-toggle.is-open span:nth-child(2) {
  opacity: 0;
}
.nav-toggle.is-open span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

.hero {
  position: relative;
  min-height: 100svh;
  padding: 8rem 2rem 2rem;
  overflow: clip;
}
.hero-video, .hero-overlay {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
.hero-video { object-fit: cover; }
.hero-overlay {
  background:
    linear-gradient(90deg, rgba(9, 12, 17, 0.82) 0%, rgba(9, 12, 17, 0.52) 42%, rgba(9, 12, 17, 0.2) 100%),
    linear-gradient(180deg, rgba(9, 12, 17, 0.35), rgba(9, 12, 17, 0.62));
}
.hero-grid,
.section,
.catalog-hero,
.admin-hero,
.admin-grid,
.admin-stats {
  width: min(var(--max), calc(100% - 2rem));
  margin: 0 auto;
}
.hero-grid {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(280px, 0.65fr);
  align-items: end;
  gap: 2rem;
  min-height: calc(100svh - 10rem);
}
.hero-copy { color: white; max-width: 700px; }
.hero-mark { width: 180px; margin-bottom: 1rem; }
.eyebrow {
  margin: 0 0 1rem;
  font-family: "Space Grotesk", sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 0.77rem;
  color: var(--accent);
}
.hero h1,
.catalog-hero h1,
.admin-hero h1 {
  margin: 0;
  font-size: clamp(2.9rem, 6vw, 6.1rem);
  line-height: 0.96;
  letter-spacing: -0.05em;
}
.hero-body, .catalog-copy p, .admin-hero p {
  max-width: 42rem;
  margin: 1.4rem 0 0;
  font-size: 1.06rem;
  line-height: 1.7;
}
.hero-actions, .form-actions, .admin-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
  margin-top: 1.5rem;
}
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.95rem 1.3rem;
  border: 1px solid transparent;
  border-radius: 999px;
  cursor: pointer;
  transition: transform 180ms ease;
}
.admin-actions .button,
.form-actions .button {
  padding: 0.4rem 0.8rem !important;
  font-size: 0.88rem !important;
  min-width: auto;
  min-height: auto;
  height: auto;
  white-space: nowrap;
}
.admin-actions {
  align-items: center;
  gap: 0.6rem;
}
.button:hover { transform: translateY(-2px); }
.button-primary { background: var(--accent); color: white; }
.story-cta {
  gap: 0.35rem 0.45rem;
  flex-wrap: wrap;
  text-align: center;
  line-height: 1.15;
}
.button-secondary {
  background: rgba(255, 255, 255, 0.1);
  color: inherit;
  border-color: rgba(255, 255, 255, 0.2);
}

.hero-aside,
.quote-panel,
.story-panel,
.metric-card,
.service-feature,
.team-card,
.contact-card,
.contact-form,
.catalog-card,
.admin-stat,
.admin-form,
.admin-list-shell {
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.hero-aside {
  max-width: 340px;
  padding: 1.5rem;
  color: white;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(16px);
}
.aside-label {
  margin: 0 0 1rem;
  font-size: 0.76rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  opacity: 0.75;
}
.hero-flow { margin: 0; padding-left: 1rem; display: grid; gap: 0.85rem; }

.section { padding: 5rem 0; }
.section[id],
.hero[id],
main[id],
#catalogo,
#dashboard,
#contatti,
#chi-siamo,
#team,
#servizi,
#storia {
  scroll-margin-top: 12px;
}
.section-heading {
  display: grid;
  gap: 0.7rem;
  max-width: 900px;
  margin-bottom: 2.2rem;
}
.section-heading h2 {
  margin: 0;
  font-size: clamp(2rem, 4vw, 3.6rem);
  line-height: 1.02;
  letter-spacing: -0.04em;
}
.section p { color: var(--muted); }
.intro-layout,
.preview-layout,
.contact-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(280px, 0.95fr);
  gap: 1.4rem;
}
.intro-text, .preview-copy { font-size: 1.06rem; line-height: 1.75; }
.intro-visual {
  overflow: hidden;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.intro-visual img {
  width: 100%;
  height: 100%;
  min-height: 360px;
  object-fit: cover;
}
.quote-panel {
  padding: 2rem;
  background: linear-gradient(160deg, #181717, #212b33);
  color: white;
}
.quote-panel p { color: rgba(255, 255, 255, 0.75); font-size: 1.1rem; line-height: 1.7; }
.quote-mark { display: inline-block; margin-bottom: 1rem; font-size: 1.7rem; font-weight: 800; }

.team-grid,
.metrics-grid,
.admin-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(220px, 1fr));
  gap: 1rem;
}
.admin-stats {
  margin: 1rem auto 1.5rem;
  width: min(var(--max), calc(100% - 2rem));
}
.admin-stats .admin-stat {
  min-width: 220px;
  justify-self: stretch;
}
.team-story {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(320px, 0.85fr);
  gap: 1rem;
}
.team-story-card {
  padding: 1.75rem;
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.8);
  border: 1px solid rgba(22, 22, 22, 0.08);
  box-shadow: var(--shadow);
}
.team-story-card.accent {
  background: linear-gradient(160deg, #10211c, #1d3b34);
  color: white;
}
.team-story-card.accent p {
  color: rgba(255, 255, 255, 0.78);
}
.team-card,
.metric-card,
.admin-stat {
  padding: 0.75rem 0.9rem;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.66);
  backdrop-filter: blur(12px);
  min-height: auto;
  font-size: 0.95rem;
}
.team-card span, .story-year {
  font-family: "Space Grotesk", sans-serif;
  color: var(--accent);
}
.team-card h3,
.service-feature h3,
.catalog-card h3,
.detail-content h2,
.admin-form h2,
.list-header h2 {
  margin: 0.85rem 0 0.5rem;
  font-size: 1.25rem;
}

.services-layout {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
  align-items: stretch;
}
.service-feature {
  height: 100%;
  min-height: 290px;
  padding: 1.6rem;
  background: rgba(255, 255, 255, 0.86);
  border: 1px solid rgba(22, 22, 22, 0.08);
  display: flex;
  flex-direction: column;
}
.service-feature p {
  line-height: 1.7;
}
.service-feature img {
  width: 58px;
  height: 58px;
  object-fit: contain;
}
.service-tall {
  background: linear-gradient(180deg, rgba(245, 107, 42, 0.08), rgba(255, 255, 255, 0.92));
}
.counter {
  display: block;
  margin-bottom: 0.4rem;
  font-size: clamp(2.2rem, 4vw, 3.5rem);
  line-height: 1;
  letter-spacing: -0.05em;
}
.metrics-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 0.8fr);
  gap: 1rem;
  align-items: stretch;
}
.metrics-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.metrics-visual {
  overflow: hidden;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.metrics-visual img {
  width: 100%;
  height: 100%;
  min-height: 100%;
  object-fit: cover;
}

.story-layout {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem;
}
.story-media-grid {
  display: grid;
  gap: 1rem;
}
.story-images {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}
.story-images img {
  width: 100%;
  height: 100%;
  min-height: 260px;
  object-fit: cover;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.story-panel {
  padding: 1.5rem;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.6);
}
.story-panel.accent {
  background: linear-gradient(160deg, #10211c, #1d3b34);
  color: white;
}
.story-panel.accent p { color: rgba(255, 255, 255, 0.76); }

.preview-categories {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}
.preview-categories span {
  padding: 1.6rem;
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.75);
  border: 1px solid rgba(22, 22, 22, 0.08);
  text-align: center;
  font-weight: 700;
}

.contact-callout,
.contact-card,
.contact-form {
  padding: 1.7rem;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(22, 22, 22, 0.08);
}
.contact-section .section-heading {
  max-width: 760px;
  margin-bottom: 1.25rem;
}
.contact-callout {
  display: grid;
  justify-items: center;
  gap: 0.5rem;
  width: 100%;
  margin: 0 0 1.1rem;
  padding-block: 1.45rem;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  text-align: center;
}
.contact-callout-copy {
  margin: 0;
  font-size: 0.98rem;
}
.contact-phone {
  display: inline-block;
  margin: 0.2rem 0 0;
  font-size: clamp(1.6rem, 4vw, 2.8rem);
  font-weight: 500;
  color: #31a79b;
}
.contact-layout {
  grid-template-columns: minmax(320px, 0.92fr) minmax(0, 1.08fr);
  align-items: stretch;
}
.contact-visual {
  overflow: hidden;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  min-height: 100%;
}
.contact-visual img {
  width: 100%;
  height: 100%;
  min-height: 620px;
  object-fit: cover;
}
.contact-stack {
  display: grid;
  gap: 1rem;
  align-content: start;
}
.contact-lead {
  margin: 0 0 0.9rem;
  color: var(--accent);
  font-family: "Space Grotesk", sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 0.77rem;
}
.contact-form,
.admin-form {
  display: grid;
  gap: 1rem;
}
.contact-form {
  align-content: start;
  padding: 1.55rem 1.75rem 1.65rem;
}
.contact-form h3 {
  margin: 0 0 0.2rem;
  color: var(--ink);
  font-size: clamp(2rem, 4vw, 3.3rem);
  line-height: 0.95;
  letter-spacing: -0.05em;
}
.contact-form label,
.admin-form label {
  display: grid;
  gap: 0.45rem;
  color: var(--ink);
  font-weight: 600;
}
.keep-together {
  white-space: nowrap;
}
.contact-form input,
.contact-form textarea,
.admin-form input,
.admin-form textarea,
.admin-form select,
.list-filters select {
  width: 100%;
  padding: 0.95rem 1rem;
  padding: 0.75rem 0.85rem;
  border: 1px solid rgba(22, 22, 22, 0.24);
  border-radius: 0;
  background: rgba(255, 255, 255, 0.98);
}
.contact-form textarea {
  resize: vertical;
  min-height: 180px;
}
.contact-form .checkbox {
  display: flex;
  align-items: flex-start;
  gap: 0.7rem;
  font-size: 0.92rem;
}
.contact-form .checkbox span {
  line-height: 1.5;
}
.contact-form .button {
  justify-self: start;
  padding-inline: 1rem;
  min-width: 88px;
  border-radius: 12px;
}
.board-card {
  display: grid;
  gap: 0;
  padding: 1.35rem 1.5rem;
  background: rgba(255, 255, 255, 0.96);
}
.board-card p {
  margin: 0;
  line-height: 1.5;
}
.board-row {
  display: grid;
  gap: 0.2rem;
  padding: 0.95rem 0;
}
.board-row + .board-row {
  border-top: 1px solid rgba(22, 22, 22, 0.08);
}
.board-row strong {
  color: var(--ink);
  font-size: 0.94rem;
  line-height: 1.35;
}
.board-row p {
  color: var(--muted);
}
.contact-form .checkbox input {
  width: auto;
  margin: 0.18rem 0 0;
  flex: 0 0 auto;
}

.catalog-hero,
.admin-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(280px, 0.75fr);
  gap: 1rem;
  padding: 3rem 0 1.2rem;
}
.catalog-side {
  display: grid;
  gap: 0.8rem;
  align-self: end;
}
.catalog-side span {
  padding: 1rem 1.1rem;
  border-radius: 999px;
  border: 1px solid rgba(22, 22, 22, 0.1);
  background: rgba(255, 255, 255, 0.8);
  text-align: center;
  font-weight: 700;
}
.legal-page {
  padding-top: 6.4rem;
}
.legal-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(280px, 0.75fr);
  gap: 1rem;
  width: min(var(--max), calc(100% - 2rem));
  margin: 0 auto;
  padding: 3rem 0 1.2rem;
}
.legal-copy p {
  max-width: 42rem;
  margin: 1.4rem 0 0;
  font-size: 1.06rem;
  line-height: 1.7;
}
.legal-side {
  display: grid;
  gap: 0.8rem;
  align-self: end;
}
.legal-side span {
  padding: 1rem 1.1rem;
  border-radius: 999px;
  border: 1px solid rgba(22, 22, 22, 0.1);
  background: rgba(255, 255, 255, 0.8);
  text-align: center;
  font-weight: 700;
}
.legal-section {
  padding-top: 1rem;
}
.legal-card {
  padding: 2rem;
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid rgba(22, 22, 22, 0.08);
}
.legal-card h2 {
  margin: 2rem 0 0.8rem;
  font-size: clamp(1.4rem, 2.4vw, 2rem);
  line-height: 1.1;
}
.legal-card h2:first-child {
  margin-top: 0;
}
.legal-card p {
  margin: 0.8rem 0 0;
  color: var(--muted);
  line-height: 1.75;
}
.legal-list {
  margin: 0.9rem 0 0;
  padding-left: 1.2rem;
  color: var(--muted);
  line-height: 1.75;
}
.inline-link {
  color: var(--accent-2);
  text-decoration: underline;
  text-underline-offset: 0.18em;
}
.site-footer {
  margin-top: 2rem;
  padding: 1.45rem 0 1.1rem;
  background: #020202;
  color: rgba(255, 255, 255, 0.86);
}
.footer-inner {
  width: min(var(--max), calc(100% - 2rem));
  margin: 0 auto;
  display: grid;
  justify-items: center;
  gap: 0.55rem;
  text-align: center;
}
.footer-brand img {
  width: min(120px, 34vw);
}
.footer-copy {
  display: grid;
  gap: 0.2rem;
}
.footer-tagline {
  margin: 0;
  font-size: clamp(0.86rem, 1.5vw, 1.02rem);
  font-weight: 800;
  color: white;
}
.footer-meta,
.footer-partner {
  margin: 0;
  color: rgba(255, 255, 255, 0.82);
  font-size: 0.88rem;
  line-height: 1.35;
}
.footer-link {
  color: #4cc0d6;
  text-decoration: none;
}
.footer-link:hover {
  color: white;
}
.footer-socials {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.45rem;
}
.social-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.08);
  color: white;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.01em;
  text-decoration: none;
}
.social-chip.is-facebook { background: #4267b2; }
.social-chip.is-x {
  background: #111111;
  border-color: rgba(255, 255, 255, 0.22);
}
.social-chip.is-instagram { background: linear-gradient(135deg, #f58529, #dd2a7b 55%, #8134af); }
.social-chip.is-linkedin { background: #0a66c2; }
.legal-updated {
  margin-top: 2rem;
  padding-top: 1.4rem;
  border-top: 1px solid rgba(22, 22, 22, 0.08);
}
.catalog-toolbar, .filter-group {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
}
.catalog-toolbar {
  justify-content: space-between;
  margin-bottom: 1.6rem;
}
.filter-chip {
  padding: 0.75rem 1rem;
  border: 1px solid rgba(22, 22, 22, 0.1);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.8);
  cursor: pointer;
}
.filter-chip.active { background: var(--ink); color: white; }
.catalog-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}
.catalog-card {
  overflow: hidden;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(22, 22, 22, 0.08);
}
.catalog-card img.cover {
  aspect-ratio: 4 / 3;
  width: 100%;
  object-fit: cover;
}
.catalog-card-body { padding: 1.2rem; }
.catalog-card-topline,
.detail-topline,
.admin-item-topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.catalog-card-topline img,
.detail-topline img {
  width: 48px;
  height: 48px;
  object-fit: contain;
}
.catalog-badges,
.detail-meta,
.admin-item-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin-top: 1rem;
}
.badge {
  padding: 0.45rem 0.7rem;
  border-radius: 999px;
  background: rgba(15, 143, 121, 0.1);
  color: #116655;
  font-size: 0.82rem;
  font-weight: 700;
}
.badge.draft { background: rgba(240, 195, 107, 0.2); color: #8d6410; }
.badge.trash { background: rgba(207, 80, 80, 0.18); color: #8f2d2d; }

.detail-modal {
  width: min(1080px, calc(100% - 2rem));
  border: 0;
  border-radius: 30px;
  padding: 0;
  background: white;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.35);
}
.detail-modal::backdrop {
  background: rgba(9, 12, 17, 0.72);
  backdrop-filter: blur(6px);
}
.modal-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 50%;
  background: rgba(9, 12, 17, 0.08);
  font-size: 2rem;
  line-height: 1;
  transform: rotate(45deg);
  cursor: pointer;
}
.detail-shell {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 0.9fr);
}
.detail-gallery img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}
.detail-thumbs {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.55rem;
  padding: 0.8rem;
}
.detail-thumbs button {
  border: 0;
  padding: 0;
  background: transparent;
  cursor: pointer;
}
.detail-thumbs img {
  border-radius: 14px;
  aspect-ratio: 1;
  object-fit: cover;
}
.detail-content { padding: 2rem; }

.admin-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(360px, 0.9fr);
  gap: 1rem;
  padding-bottom: 3rem;
  align-items: start;
}
.admin-form,
.admin-list-shell {
  padding: 1.4rem;
  background: rgba(255, 255, 255, 0.86);
  border: 1px solid rgba(22, 22, 22, 0.08);
}
.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.9rem;
}
.span-2 { grid-column: span 2; }
.list-header,
.admin-item {
  display: grid;
  gap: 1rem;
}
.list-filters { display: flex; gap: 0.7rem; }
.admin-list { display: grid; gap: 0.9rem; }
.admin-item {
  padding: 1rem;
  border-radius: 22px;
  background: rgba(245, 241, 234, 0.95);
  border: 1px solid rgba(22, 22, 22, 0.08);
}
.admin-item-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}
.admin-item-actions button {
  padding: 0.62rem 0.9rem;
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  background: var(--ink);
  color: white;
}

.animate-ready [data-animate] {
  opacity: 0;
  transform: translateY(42px);
  filter: blur(6px);
  will-change: transform, opacity, filter;
  transition:
    opacity 820ms cubic-bezier(0.22, 1, 0.36, 1),
    transform 820ms cubic-bezier(0.22, 1, 0.36, 1),
    filter 820ms cubic-bezier(0.22, 1, 0.36, 1);
}
.animate-ready [data-animate="slide-left"] { transform: translateX(42px); }
.animate-ready [data-animate="slide-right"] { transform: translateX(-42px); }
.animate-ready [data-animate].is-visible {
  opacity: 1;
  transform: translate(0, 0);
  filter: blur(0);
}
.animate-ready .admin-page [data-animate] {
  opacity: 1 !important;
  transform: none !important;
  filter: none !important;
  transition: none !important;
}
.animate-ready .admin-page [data-animate="slide-left"],
.animate-ready .admin-page [data-animate="slide-right"] {
  transform: none !important;
}
.animate-ready .admin-page [data-animate].is-visible {
  opacity: 1 !important;
  transform: none !important;
  filter: none !important;
}

@media (max-width: 1080px) {
  .hero-grid,
  .intro-layout,
  .team-story,
  .preview-layout,
  .contact-layout,
  .metrics-layout,
  .catalog-hero,
  .legal-hero,
  .admin-hero,
  .admin-grid,
  .detail-shell {
    grid-template-columns: 1fr;
  }
  .story-layout,
    .team-grid,
    .metrics-grid,
    .admin-stats,
    .services-layout,
    .story-images,
    .catalog-grid {
      grid-template-columns: repeat(2, minmax(0, 1fr));
    }
  .contact-visual img {
    min-height: 420px;
  }
}

@media (max-width: 1120px) {
  .site-header {
    inset: auto auto auto 50%;
    top: var(--mobile-header-top);
    width: min(calc(100vw - 2rem), 68rem);
    max-width: min(calc(100vw - 2rem), 68rem);
    padding: 0.5rem 0.6rem;
    gap: 0.65rem;
    justify-content: space-between;
    transform: translateX(-50%);
  }
  .site-header.compact {
    position: fixed;
    left: 50%;
    transform: translateX(-50%);
  }
  .site-header::before {
    inset: 0;
    height: 100%;
  }
  .nav-toggle { display: block; }
  .site-nav {
    display: none;
  }
  .mobile-drawer {
    position: fixed;
    top: 5.1rem;
    right: 1.35rem;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start;
    width: min(280px, calc(100vw - 4rem));
    min-height: calc(100svh - 6.25rem);
    max-height: calc(100svh - 6.25rem);
      padding: 1.2rem;
      overflow: auto;
      border-radius: 28px;
      background: rgba(13, 17, 23, 0.94);
      color: white;
      border: 1px solid rgba(255, 255, 255, 0.08);
      box-shadow: 0 24px 80px rgba(0, 0, 0, 0.35);
      z-index: 62;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateY(-10px) scale(0.98);
    transition:
      opacity 220ms ease,
      transform 220ms ease,
      visibility 0s linear 220ms;
  }
  .mobile-drawer.is-open {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateY(0) scale(1);
    transition:
      opacity 220ms ease,
      transform 220ms ease,
      visibility 0s linear 0s;
  }
  .mobile-drawer a,
  .nav-pill {
    width: 100%;
    padding: 0.9rem 0;
  }
  .nav-pill {
    text-align: center;
    background: rgba(255, 255, 255, 0.1);
  }
  .hero { padding-inline: 1rem; }
  .hero h1,
  .catalog-hero h1,
  .admin-hero h1,
  .section-heading h2 {
    font-size: clamp(2.2rem, 10vw, 3.6rem);
  }
  .hero-grid,
  .section,
  .catalog-hero,
  .legal-hero,
  .admin-hero,
  .admin-grid {
    width: min(var(--max), calc(100% - 1rem));
  }
  .footer-inner {
    width: min(var(--max), calc(100% - 1rem));
  }
  .story-layout,
  .team-grid,
  .metrics-grid,
  .admin-stats,
  .services-layout,
  .story-images,
  .catalog-grid,
  .preview-categories,
  .form-grid {
    grid-template-columns: 1fr;
  }
  .contact-form h3 {
    font-size: clamp(2rem, 9vw, 3rem);
  }
  .contact-callout {
    width: 100%;
  }
  .span-2 { grid-column: span 1; }
  .detail-thumbs { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 760px) {
  .brand img { width: 112px; }
  .site-header {
    top: var(--mobile-header-top);
    left: 50%;
    width: 94vw;
    max-width: 94vw;
    padding: 0.42rem 0.5rem;
    transform: translateX(-50%);
  }
  .site-header::before {
    inset: 0;
    height: 100%;
  }
  .mobile-drawer {
    top: 4.75rem;
    right: 1.9rem;
    width: min(236px, calc(100vw - 4rem));
    min-height: calc(100svh - 5.35rem);
    max-height: calc(100svh - 5.35rem);
  }
  .nav-toggle {
    width: 48px;
    height: 48px;
    margin-right: 0.1rem;
  }
  .nav-toggle span {
    width: 18px;
  }
  .site-footer {
    padding: 1.2rem 0 1rem;
  }
  .footer-meta,
  .footer-partner {
    font-size: 0.8rem;
  }
  .social-chip {
    width: 28px;
    height: 28px;
  }
}

.cookie-banner {
  position: fixed;
  inset: auto 1rem 1rem;
  z-index: 240;
  width: min(100%, 560px);
  background: rgba(255, 255, 255, 0.98);
  border: 1px solid rgba(22, 22, 22, 0.12);
  border-radius: 24px;
  box-shadow: 0 28px 90px rgba(16, 18, 24, 0.18);
  padding: 1.25rem;
  opacity: 0;
  visibility: hidden;
  transform: translateY(18px);
  transition: opacity 220ms ease, transform 220ms ease, visibility 220ms ease;
}

.cookie-banner-visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.cookie-banner-content {
  display: grid;
  gap: 1rem;
}

.cookie-banner-copy p {
  margin: 0;
  color: var(--ink);
  line-height: 1.6;
}

.cookie-banner-actions,
.cookie-preferences-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
}

.cookie-banner-manage {
  border: 1px solid rgba(22, 22, 22, 0.12);
  background: transparent;
  color: var(--ink);
  padding: 0.85rem 1rem;
  border-radius: 999px;
  cursor: pointer;
}

.cookie-preferences {
  padding: 1rem 0.75rem 0.75rem;
  border-top: 1px solid rgba(22, 22, 22, 0.1);
  display: grid;
  gap: 0.85rem;
}

.cookie-preference-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.85rem;
  align-items: center;
  padding: 0.85rem 0;
  border-bottom: 1px solid rgba(22, 22, 22, 0.08);
}

.cookie-preference-row:last-child {
  border-bottom: none;
}

.cookie-preference-row strong {
  display: block;
  margin-bottom: 0.25rem;
}

.cookie-preference-row p {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
}

.switch {
  display: inline-flex;
  align-items: center;
}

.switch input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.switch-slider {
  width: 42px;
  height: 24px;
  border-radius: 999px;
  background: rgba(22, 22, 22, 0.16);
  position: relative;
  transition: background 180ms ease;
}

.switch-slider::after {
  content: "";
  position: absolute;
  inset: 2px auto 2px 2px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: white;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
  transition: transform 180ms ease;
}

.switch input:checked + .switch-slider {
  background: rgba(15, 143, 121, 0.9);
}

.switch input:checked + .switch-slider::after {
  transform: translateX(18px);
}

.cookie-duration-row {
  align-items: start;
}

.cookie-duration-row label {
  color: var(--ink);
  font-size: 0.95rem;
  margin-bottom: 0.25rem;
}

.cookie-duration-row select {
  width: 100%;
  min-width: 150px;
  padding: 0.8rem 0.95rem;
  border: 1px solid rgba(22, 22, 22, 0.2);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.95);
}

@media (max-width: 640px) {
  .cookie-banner {
    inset: auto 0.75rem 0.75rem;
    width: calc(100% - 1.5rem);
  }

  .cookie-banner-actions,
  .cookie-preferences-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .cookie-preference-row {
    grid-template-columns: 1fr;
  }

  .cookie-duration-row {
    align-items: flex-start;
  }
}
