/* ============ MEMORIZZE · MINIMAL WIREFRAME SYSTEM ============ */
:root {
  --ink: #0f1115;
  --ink-2: #3a3f4a;
  --ink-3: #6b7280;
  --line: #e5e7eb;
  --line-2: #d1d5db;
  --paper: #ffffff;
  --paper-2: #f7f6f3;
  --accent: #b88a4e;
  --ui: 'Inter', system-ui, sans-serif;
  --mono: 'IBM Plex Mono', ui-monospace, monospace;
  --serif: 'Fraunces', serif;
  --display: 'Archivo', system-ui, sans-serif;
}
* { box-sizing: border-box; }
html {
  overflow-x: clip;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}
html, body {
  margin: 0; padding: 0;
  background: #fff;
  color: var(--ink);
  font-family: var(--ui);
  font-size: 14px;
  -webkit-font-smoothing: antialiased;
}
body { min-width: 0; overflow-x: hidden; }
body.mem-nav-open { overflow: hidden; }
a { color: inherit; text-decoration: none; }
.mem-auto-link {
  color: inherit;
  text-decoration: underline;
  text-decoration-color: rgba(184, 138, 78, .55);
  text-decoration-thickness: 1px;
  text-underline-offset: .18em;
}
.mem-auto-link:hover {
  color: var(--accent);
  text-decoration-color: currentColor;
}
img, picture, video, canvas, svg { max-width: 100%; display: block; }
button, input, select, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }

/* --- PAGE CHROME (kept for demo context bar) --- */
.demo-bar {
  position: sticky; top: 0; z-index: 60;
  background: #0f1115; color: #e8e7e2;
  font-family: var(--mono); font-size: 10px;
  letter-spacing: 1.5px; text-transform: uppercase;
  padding: 8px 22px;
  display: flex; gap: 22px; align-items: center;
  border-bottom: 1px solid #1f222a;
}
.demo-bar .sep { color: #3a3f4a; }
.demo-bar a { color: #b8bbc4; cursor: pointer; }
.demo-bar a:hover, .demo-bar a.active { color: #fff; }
.demo-bar .tag-right { margin-left: auto; color: #6b7280; }

/* --- SITE NAV --- */
.nav {
  position: relative;
  z-index: 1000;
  display: flex; align-items: center; gap: 28px;
  padding: 20px 48px;
  border-bottom: 1px solid var(--ink);
  background: #fff;
}
.nav .logo {
  font-family: var(--display); font-size: 17px; font-weight: 800;
  letter-spacing: -.01em; margin-right: auto;
}
.nav .link {
  font-size: 12px; font-weight: 600;
  text-transform: uppercase; letter-spacing: 1.2px;
  color: var(--ink-2); cursor: pointer;
}
.nav .link:hover, .nav .link.active { color: var(--ink); }
.nav-menu {
  display: flex;
  align-items: center;
  gap: 28px;
}
.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid var(--ink);
  border-radius: 0;
  background: #fff;
  color: var(--ink);
  cursor: pointer;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
}
.nav-toggle span {
  width: 18px;
  height: 2px;
  background: currentColor;
  transition: transform .18s ease, opacity .18s ease;
}
.nav.is-open .nav-toggle span:first-child { transform: translateY(7px) rotate(45deg); }
.nav.is-open .nav-toggle span:nth-child(2) { opacity: 0; }
.nav.is-open .nav-toggle span:last-child { transform: translateY(-7px) rotate(-45deg); }

.btn-primary {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--ui); font-weight: 600; font-size: 12px;
  padding: 10px 18px; border-radius: 0;
  background: var(--accent); color: #fff; border: 1px solid var(--accent);
  text-transform: uppercase; letter-spacing: 1px;
  cursor: pointer;
}
.btn-ghost {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--ui); font-weight: 600; font-size: 12px;
  padding: 10px 18px; border-radius: 0;
  background: transparent; color: var(--ink); border: 1px solid var(--ink);
  text-transform: uppercase; letter-spacing: 1px;
  cursor: pointer;
}
.btn-primary.lg, .btn-ghost.lg { padding: 14px 22px; font-size: 13px; }

/* --- FOOTER --- */
.footer {
  background: var(--ink); color: #b8bbc4;
  padding: 56px 48px 28px;
  border-top: 1px solid var(--ink);
}
.footer-grid {
  display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 40px; padding-bottom: 40px; border-bottom: 1px solid #2a2e38;
}
.footer h4 {
  font-family: var(--display); font-size: 11px; font-weight: 800;
  text-transform: uppercase; letter-spacing: 1.5px;
  color: #fff; margin: 0 0 14px;
}
.footer .brand-lg {
  font-family: var(--display); font-size: 28px; font-weight: 900;
  letter-spacing: -.02em; color: #fff;
}
.footer ul { list-style: none; padding: 0; margin: 0; }
.footer li { padding: 4px 0; font-size: 12px; }
.footer li a { color: #8b8f99; }
.footer li a:hover { color: #fff; }
.footer-bottom {
  display: flex; justify-content: space-between; align-items: center;
  padding-top: 24px;
  font-family: var(--mono); font-size: 10px;
  text-transform: uppercase; letter-spacing: 1.5px;
  color: #6b7280;
}

/* --- COMMON BLOCKS --- */
.eyebrow {
  font-family: var(--mono); font-size: 10px;
  text-transform: uppercase; letter-spacing: 2.5px;
  color: var(--ink-3);
}
.eyebrow.accent { color: var(--accent); }
.h-display {
  font-family: var(--display); font-weight: 900;
  letter-spacing: -.04em; line-height: .92;
}
.h-serif {
  font-family: var(--serif); font-weight: 400;
  letter-spacing: -.02em; line-height: 1.05;
}
.tag {
  display: inline-block; font-size: 11px;
  font-weight: 500; padding: 3px 10px; border-radius: 999px;
  border: 1px solid var(--line-2); background: #fff;
  color: var(--ink-2);
}

/* placeholder for images */
.ph {
  border: 1px solid var(--line);
  background: #f3f2ee;
  display: flex; align-items: center; justify-content: center;
  position: relative; overflow: hidden;
}
.ph > img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
}
.ph::before, .ph::after {
  content: ''; position: absolute; inset: 0;
  background:
    linear-gradient(to top right, transparent calc(50% - .5px), var(--line) calc(50% - .5px), var(--line) calc(50% + .5px), transparent calc(50% + .5px)),
    linear-gradient(to bottom right, transparent calc(50% - .5px), var(--line) calc(50% - .5px), var(--line) calc(50% + .5px), transparent calc(50% + .5px));
  opacity: .6;
}
.ph.photo::before,
.ph.photo::after {
  display: none;
}
.ph .label {
  position: relative; z-index: 1;
  font-family: var(--mono); font-size: 10px;
  color: var(--ink-3); background: #fff;
  padding: 3px 8px; border: 1px solid var(--line);
  text-transform: uppercase; letter-spacing: 1px;
}
.ph.dark { background: #1a1d24; border-color: #2a2e38; }
.ph.dark::before, .ph.dark::after {
  background:
    linear-gradient(to top right, transparent calc(50% - .5px), #2a2e38 calc(50% - .5px), #2a2e38 calc(50% + .5px), transparent calc(50% + .5px)),
    linear-gradient(to bottom right, transparent calc(50% - .5px), #2a2e38 calc(50% - .5px), #2a2e38 calc(50% + .5px), transparent calc(50% + .5px));
}
.ph.dark .label { background: #0f1115; color: #8b8f99; border-color: #2a2e38; }

.seo-image-block {
  padding: 30px 48px 48px;
  border-bottom: 1px solid var(--ink);
  background: #fff;
}
.seo-image-card {
  margin: 0;
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 10;
  min-height: 260px;
  border: 1px solid var(--ink);
  background: #101217;
}
.seo-image-card picture,
.seo-image-card img {
  display: block;
  width: 100%;
  height: 100%;
}
.seo-image-card img {
  object-fit: cover;
  object-position: top;
}
.seo-image-card figcaption {
  position: absolute;
  left: 14px;
  bottom: 14px;
  max-width: calc(100% - 28px);
  padding: 6px 10px;
  background: rgba(15, 17, 21, .78);
  color: #fff;
  border: 1px solid rgba(255,255,255,.18);
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 1.4px;
  line-height: 1.4;
  text-transform: uppercase;
}

.sect { padding: 56px 48px; }
.sect.tight { padding: 40px 48px; }
.sect.bg-soft { background: var(--paper-2); }
.sect.bg-dark { background: var(--ink); color: #e8e7e2; }
.sect.bordered { border-bottom: 1px solid var(--ink); }
.sect.bordered-t { border-top: 1px solid var(--ink); }

.container {
  width: min(calc(100% - 96px), 1280px);
  max-width: 1280px;
  margin: 0 auto;
}
.sect .container { width: min(100%, 1280px); }

/* generated static page families */
.breadcrumbs {
  padding: 16px max(20px, calc((100vw - 1280px) / 2 + 48px));
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--ink-3);
  border-bottom: 1px solid var(--line);
}
.breadcrumbs a { color: var(--ink-3); }
.breadcrumbs a:hover { color: var(--accent); }
.page-hero {
  padding: clamp(56px, 8vw, 104px) 0 clamp(38px, 5.6vw, 72px);
  border-bottom: 1px solid var(--ink);
  background: linear-gradient(180deg, #fff 0%, #fbfaf8 100%);
}
.page-hero h1 {
  max-width: 960px;
  margin: 14px 0 16px;
  font-family: var(--display);
  font-size: clamp(44px, 8vw, 98px);
  font-weight: 900;
  letter-spacing: -.045em;
  line-height: .94;
  overflow-wrap: anywhere;
}
.page-hero .kicker,
.page-hero .label {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--accent);
}
.page-hero .lead {
  max-width: 780px;
  margin: 0;
  font-size: clamp(17px, 2vw, 22px);
  line-height: 1.6;
  color: var(--ink-2);
}
.page-hero .actions,
.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 26px;
}
.meta-row,
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-top: 28px;
}
.meta-item,
.stat {
  min-width: 0;
  padding: 18px;
  border: 1px solid var(--line);
  background: #fff;
}
.meta-item .label,
.stat .l {
  display: block;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 1.6px;
  text-transform: uppercase;
  color: var(--ink-3);
}
.meta-item .value,
.stat .n {
  display: block;
  margin-top: 8px;
  font-family: var(--display);
  font-size: clamp(22px, 3vw, 34px);
  font-weight: 900;
  line-height: 1;
  color: var(--accent);
  overflow-wrap: anywhere;
}
main > section.container {
  padding: clamp(42px, 6vw, 70px) 0;
  border-bottom: 1px solid var(--line);
}
main > section.container h2,
main > section[id] h2 {
  margin: 0 0 18px;
  font-family: var(--display);
  font-size: clamp(30px, 4.5vw, 54px);
  font-weight: 900;
  letter-spacing: -.03em;
  line-height: 1;
  overflow-wrap: anywhere;
}
main > section.container p,
main > section[id] p {
  max-width: 820px;
  font-size: 15px;
  line-height: 1.75;
  color: var(--ink-2);
}
.link-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 10px;
  padding: 0;
  margin: 0;
  list-style: none;
}
.link-list li,
.link-list a {
  min-width: 0;
  overflow-wrap: anywhere;
}
.link-list li {
  padding: 14px 16px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink-2);
}
.link-list a {
  display: block;
  color: var(--ink);
  font-weight: 700;
}
.link-list a:hover { color: var(--accent); }
.faq-item summary {
  cursor: pointer;
}
.faq-item summary h3 {
  display: inline;
}
.cta-band {
  padding: clamp(48px, 7vw, 76px) 48px;
  border-bottom: 1px solid var(--ink);
  background: var(--ink);
  color: #fff;
}
.cta-band .container {
  width: min(calc(100% - 96px), 1280px);
}
.cta-band h2 {
  max-width: 900px;
  margin: 0 0 12px;
  font-family: var(--display);
  font-size: clamp(34px, 5.8vw, 72px);
  font-weight: 900;
  letter-spacing: -.035em;
  line-height: 1;
  color: #fff;
}
.cta-band p {
  max-width: 720px;
  margin: 0 0 24px;
  font-size: 15px;
  line-height: 1.65;
  color: #b8bbc4;
}
.cta-band .actions { margin-top: 0; }
#memorizze-whatsapp-float,
.whatsapp-float {
  right: max(18px, env(safe-area-inset-right)) !important;
  bottom: max(18px, env(safe-area-inset-bottom)) !important;
}

/* simple responsive safeguard */
@media (max-width: 900px) {
  .nav {
    position: sticky;
    top: 0;
    flex-wrap: nowrap;
    gap: 12px;
    padding: 12px 18px;
  }
  .nav .logo { margin-right: auto; }
  .nav-toggle { display: inline-flex; }
  .nav-menu {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    display: grid;
    grid-template-columns: 1fr;
    gap: 0;
    max-height: 0;
    padding: 0 18px;
    overflow: hidden;
    background: #fff;
    border-bottom: 1px solid var(--ink);
    box-shadow: 0 18px 38px rgba(15,17,21,.12);
    opacity: 0;
    pointer-events: none;
    transition: max-height .22s ease, opacity .18s ease, padding .18s ease;
  }
  .nav.is-open .nav-menu {
    max-height: calc(100vh - 68px);
    max-height: calc(100dvh - 68px);
    padding: 8px 18px 18px;
    overflow-y: auto;
    opacity: 1;
    pointer-events: auto;
  }
  .nav .link {
    display: flex;
    align-items: center;
    min-height: 44px;
    border-bottom: 1px solid var(--line);
    white-space: normal;
  }
  .nav .nav-cta {
    width: 100%;
    min-height: 48px;
    margin-top: 12px;
    justify-content: center;
  }
  .container,
  .cta-band .container {
    width: min(calc(100% - 40px), 1280px);
  }
  .sect { padding: 40px 20px; }
  .seo-image-block { padding: 22px 20px 34px; }
  .seo-image-card { aspect-ratio: 4 / 3; min-height: 220px; }
  .footer { padding: 40px 20px 20px; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-bottom {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }
  .meta-row,
  .stats-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .breadcrumbs {
    padding: 14px 20px;
    white-space: normal;
  }
}

@media (max-width: 640px) {
  .page-hero h1 {
    font-size: clamp(28px, 7.8vw, 32px);
    line-height: .98;
    overflow-wrap: normal;
    word-break: normal;
    hyphens: none;
  }

  :where(.grid, [class$="-grid"], [class*="-grid"], .split, .compare, .timeline, .tl-grid, .stats-grid, .meta-row) {
    grid-template-columns: 1fr !important;
  }
  :where(.hero, .port-head, .h1p, [class$="-hero"], [class*="-hero"]) {
    padding: 48px 16px 34px !important;
  }
  :where(.hero h1, .hero-copy h1, .port-head h1, .h1p h1, .hub-title, .contact-title, .portal-title, .svc-title, .dp-title, .bg-title, .ab-title, .pg-title, .cta-final h2, .hub-bottom h2, .h-display) {
    font-size: clamp(36px, 12vw, 56px) !important;
    line-height: .98 !important;
    letter-spacing: -.035em !important;
  }
  :where(.hero-lede, .hero-desc, .contact-lead, .portal-lead, .hub-lead, .bg-lead, .ab-lead, .pg-lead, .lead-copy) {
    font-size: 17px !important;
    line-height: 1.62 !important;
  }
  :where(.hero-actions, .actions, [class$="-actions"], [class*="-actions"], .cta-final .row, .cta-band .row) {
    width: 100%;
    justify-content: stretch !important;
    align-items: stretch !important;
  }
  :where(.section, .hub-section, .bg-section, .ab-section, .portal-section, .contact-section, .svc-section, .dp-section, .pg-section) {
    padding: 40px 16px !important;
  }
  .tl-line { display: none !important; }
  .map-block > *,
  .map-gallery,
  .map-block .side {
    min-width: 0 !important;
    width: 100% !important;
  }
  .map-gallery {
    grid-template-columns: 1fr !important;
    gap: 10px !important;
    padding: 16px !important;
  }
  .map-block .side {
    padding: 34px 16px !important;
  }
  .map-shot,
  .map-shot.big {
    min-height: 220px !important;
  }
  :where(.pilar, .tl-step, .num-cell, .reg-cell, .depo-cell, .feature, .trust-cell, .state, .segment, .role-card, .step, .hub-card, .dp-card, .svc-card, .contact-stat, .portal-stat) {
    border-right: none !important;
  }
  .btn-primary,
  .btn-ghost {
    width: 100%;
    min-height: 46px;
    justify-content: center;
    text-align: center;
    white-space: normal;
  }
  .nav .btn-primary { width: 100%; }
  .footer-grid { grid-template-columns: 1fr; gap: 28px; }
  .container,
  .cta-band .container {
    width: min(calc(100% - 32px), 1280px);
  }
  .sect,
  .sect.tight {
    padding: 34px 16px;
  }
  .page-hero {
    padding: 48px 0 34px;
  }
  .page-hero h1,
  .h-display,
  .h-serif,
  h1,
  h2,
  h3 {
    overflow-wrap: anywhere;
  }
  .page-hero h1 {
    font-size: clamp(28px, 7.8vw, 32px);
    letter-spacing: -.035em;
    overflow-wrap: normal;
    word-break: normal;
    hyphens: none;
  }
  .page-hero .lead {
    font-size: 17px;
  }
  main > section.container {
    padding: 36px 0;
  }
  .link-list {
    grid-template-columns: 1fr;
  }
  .cta-band {
    padding: 44px 16px;
  }
  .cta-band h2 {
    font-size: clamp(34px, 12vw, 50px);
  }
  :where(.tag, .eyebrow, .hub-pill, [class$="-pill"], [class*="-pill"], [class$="-kicker"], [class*="-kicker"], [class$="-label"], [class*="-label"]) {
    white-space: normal !important;
  }
  #memorizze-whatsapp-float,
  .whatsapp-float {
    width: 52px !important;
    height: 52px !important;
    right: 14px !important;
    bottom: 14px !important;
  }
}

@media (max-width: 420px) {
  .nav {
    padding-inline: 14px;
  }
  .nav .logo {
    font-size: 16px;
  }
  .container,
  .cta-band .container {
    width: min(calc(100% - 28px), 1280px);
  }
  .btn-primary,
  .btn-ghost {
    padding-inline: 14px;
    letter-spacing: .7px;
  }
}
