﻿/* Bernardini Cartomanzia — insegna e listino
   Rosso saturo dichiarato dalla cliente + incisioni popolari messicane. */

:root {
  --red-deep:      oklch(0.38 0.140 27);
  --red-ink:       oklch(0.26 0.095 27);
  --red-bright:    oklch(0.55 0.190 28);
  --red-line:      oklch(0.48 0.140 27);
  --red-line-soft: oklch(0.42 0.130 27);
  --red-line-dim:  oklch(0.40 0.100 27);
  --red-line-mid:  oklch(0.50 0.110 27);
  --bone:          oklch(0.95 0.018 82);
  --bone-dim:      oklch(0.86 0.028 80);
  --bone-dimmer:   oklch(0.80 0.030 78);
  --ink:           oklch(0.22 0.030 40);
  --ink-soft:      oklch(0.42 0.030 40);
  --stamp-ink:     oklch(0.20 0.050 45);
  --marigold:      oklch(0.80 0.150 68);
  --rule:          oklch(0.68 0.045 70);

  --font-display: "Alfa Slab One", Georgia, serif;
  --font-body: "Karla", "Helvetica Neue", Arial, sans-serif;

  --header-h: 64px;
  --wrap: 1120px;
  --wrap-narrow: 780px;
  --pad: 22px;

  --step-1: 1.125rem;
  --step-2: clamp(1.35rem, 1.1rem + 1.1vw, 1.75rem);
  --step-3: clamp(1.7rem, 1.1rem + 2.6vw, 2.75rem);
  --step-4: clamp(2rem, 1rem + 7vw, 5rem);
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 12px); }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  overflow-x: hidden;
  background: var(--bone);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: var(--step-1);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }

figure { margin: 0; }

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 400;
  line-height: 1.04;
  letter-spacing: -0.005em;
  margin: 0;
  overflow-wrap: break-word;
  hyphens: auto;
}

p { margin: 0 0 1.1em; }
p:last-child { margin-bottom: 0; }

a { color: inherit; }

:focus-visible {
  outline: 3px solid var(--marigold);
  outline-offset: 3px;
  box-shadow: 0 0 0 6px var(--stamp-ink);
}

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: var(--pad);
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 100;
  background: var(--bone);
  color: var(--ink);
  padding: 12px 18px;
  font-weight: 700;
}
.skip-link:focus { left: 8px; top: 8px; }

/* ---------- header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: var(--red-ink);
  color: var(--bone);
  border-bottom: 2px solid var(--red-line-soft);
}

.header-inner {
  min-height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.wordmark {
  display: flex;
  flex-direction: column;
  text-decoration: none;
  font-family: var(--font-display);
  line-height: 1;
  letter-spacing: 0.005em;
}
.wordmark-1 { font-size: 1.05rem; color: var(--bone); }
.wordmark-2 { font-size: 0.72rem; color: var(--marigold); letter-spacing: 0.09em; }

.nav-desktop { display: none; }

.nav-desktop a {
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--bone-dim);
  padding: 10px 2px;
  border-bottom: 2px solid transparent;
  transition: color 0.15s ease, border-color 0.15s ease;
}
.nav-desktop a:hover { color: var(--bone); border-bottom-color: var(--marigold); }

.burger {
  width: 46px;
  height: 46px;
  display: grid;
  place-content: center;
  gap: 5px;
  padding: 0;
  background: transparent;
  border: 2px solid var(--red-line-mid);
  border-radius: 3px;
  cursor: pointer;
}
.burger-bar {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--bone);
  transition: transform 0.2s ease, opacity 0.2s ease;
}
.burger[aria-expanded="true"] .burger-bar:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.burger[aria-expanded="true"] .burger-bar:nth-child(2) { opacity: 0; }
.burger[aria-expanded="true"] .burger-bar:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.drawer {
  position: fixed;
  left: 0;
  right: 0;
  top: calc(var(--header-h) + 2px);
  background: var(--red-ink);
  border-bottom: 2px solid var(--red-line-soft);
  display: flex;
  flex-direction: column;
  padding: 8px var(--pad) 20px;
  transform: translateY(calc(-100% - var(--header-h) - 8px));
  visibility: hidden;
  transition: transform 0.28s ease, visibility 0.28s;
  z-index: 39;
}
.drawer.is-open { transform: translateY(0); visibility: visible; }

.drawer a {
  text-decoration: none;
  color: var(--bone);
  font-family: var(--font-display);
  font-size: 1.25rem;
  padding: 14px 0;
  min-height: 44px;
  border-bottom: 1px solid var(--red-line-dim);
}
.drawer a:last-child { border-bottom: 0; }

@media (prefers-reduced-motion: reduce) {
  .drawer { transition: none; }
  .burger-bar { transition: none; }
}

/* ---------- hero ---------- */

.hero {
  background: var(--red-deep);
  color: var(--bone);
  padding-top: clamp(44px, 8vw, 90px);
}

.hero-place {
  font-size: 0.85rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--marigold);
  margin-bottom: 18px;
}

.hero-title {
  font-size: var(--step-4);
  margin-bottom: 22px;
  text-wrap: balance;
}

.hero-lead {
  font-size: var(--step-2);
  line-height: 1.45;
  max-width: 30ch;
  color: var(--bone-dim);
  margin-bottom: 28px;
}

.btn {
  display: inline-block;
  min-height: 48px;
  padding: 13px 26px;
  background: var(--marigold);
  color: var(--stamp-ink);
  font-weight: 700;
  font-size: 1rem;
  text-decoration: none;
  border: 2px solid var(--stamp-ink);
  border-radius: 2px;
  box-shadow: 4px 4px 0 var(--stamp-ink);
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}
.btn:hover { transform: translate(2px, 2px); box-shadow: 2px 2px 0 var(--stamp-ink); }
.btn:active { transform: translate(4px, 4px); box-shadow: 0 0 0 var(--stamp-ink); }

@media (prefers-reduced-motion: reduce) {
  .btn { transition: none; }
}

.hero-art {
  margin-block: 34px 0;
  overflow: hidden;
}
.hero-art img {
  width: 100%;
  mix-blend-mode: multiply;
  opacity: 0.92;
}

.modes {
  list-style: none;
  margin-block: 0;
  padding-block: 18px 22px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 22px;
  border-top: 2px solid var(--red-line);
  font-size: 0.9rem;
  letter-spacing: 0.03em;
  color: var(--bone-dim);
}

/* ---------- section shells ---------- */

.paper {
  background: var(--bone);
  color: var(--ink);
  padding-block: clamp(52px, 9vw, 96px);
}

.deep {
  background: var(--red-deep);
  color: var(--bone);
  padding-block: clamp(52px, 9vw, 96px);
}

.paper h2, .deep h2 {
  font-size: var(--step-3);
  margin-bottom: 20px;
  text-wrap: balance;
}
.deep h2 { color: var(--bone); }

.section-lead {
  font-size: var(--step-2);
  line-height: 1.45;
  max-width: 34ch;
  margin-bottom: 34px;
}
.deep .section-lead { color: var(--bone-dim); }
.paper .section-lead { color: var(--ink-soft); }

/* ---------- chi ---------- */

.chi-grid { display: grid; gap: 36px; }

.chi-copy p { max-width: 56ch; }

.quote {
  margin: 30px 0 0;
  padding: 22px 0 0;
  border-top: 2px solid var(--rule);
}
.quote p {
  font-family: var(--font-display);
  font-size: var(--step-2);
  line-height: 1.2;
  margin-bottom: 12px;
}
.quote cite {
  font-style: normal;
  font-size: 0.9rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.chi-art img { border: 1px solid var(--rule); }
.chi-art figcaption {
  margin-top: 10px;
  font-size: 0.85rem;
  color: var(--ink-soft);
}

/* ---------- come si lavora ---------- */

.ways { display: grid; gap: 18px; }

.way {
  background: var(--red-ink);
  border: 2px solid var(--red-line);
  padding: 26px 24px;
}
.way h3 {
  font-size: var(--step-2);
  color: var(--marigold);
  margin-bottom: 12px;
}
.way p { color: var(--bone-dim); }

.ways-note {
  margin-top: 26px;
  font-size: 1rem;
  color: var(--bone-dim);
}

/* ---------- listino (elemento firma) ---------- */

.listino-wrap > * { max-width: var(--wrap-narrow); }

.listino {
  margin: 0;
  border-top: 3px solid var(--ink);
  border-bottom: 3px solid var(--ink);
}

.voce {
  display: flex;
  align-items: baseline;
  gap: 12px;
  padding: 22px 0;
}

.voce dt {
  font-size: var(--step-2);
  font-weight: 500;
}

.voce::after {
  content: "";
  flex: 1 1 auto;
  align-self: end;
  margin-bottom: 0.35em;
  border-bottom: 2px dotted var(--rule);
  order: 1;
}

.voce dd {
  order: 2;
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(2rem, 1.3rem + 3.2vw, 3.4rem);
  line-height: 1;
  color: var(--red-bright);
  white-space: nowrap;
}

/* ---------- bottega ---------- */

.bottega-grid { display: grid; gap: 32px; }

.bottega-art img {
  width: 100%;
  border: 2px solid var(--red-line);
}

.bottega-copy p { color: var(--bone-dim); max-width: 46ch; }

/* ---------- dove ---------- */

.dove-wrap > * { max-width: var(--wrap-narrow); }

.dove-list {
  list-style: none;
  margin: 0;
  padding: 0;
  border-top: 2px solid var(--rule);
}
.dove-list li {
  padding: 18px 0;
  border-bottom: 2px solid var(--rule);
  font-size: var(--step-1);
}

/* ---------- footer ---------- */

.site-footer {
  background: var(--red-ink);
  color: var(--bone-dim);
  padding-block: 42px 34px;
  font-size: 0.9rem;
}

.footer-brand {
  font-family: var(--font-display);
  font-size: 1.15rem;
  color: var(--bone);
  margin-bottom: 14px;
}

.footer-note { max-width: 52ch; margin-bottom: 12px; }

.footer-attr {
  max-width: 52ch;
  font-size: 0.82rem;
  color: var(--bone-dimmer);
  margin-bottom: 18px;
}

/* ---------- badge Weeby ---------- */

.weeby-badge {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 9999;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: rgba(10, 10, 10, 0.92);
  color: #fff;
  padding: 8px 16px 8px 8px;
  border-radius: 999px;
  text-decoration: none;
  font-size: 13px;
  font-weight: 500;
  line-height: 1;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  box-shadow: 0 12px 32px -8px rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition: transform 0.2s ease, padding 0.25s ease;
  animation: weebyBadgeIn 0.6s ease 1.5s both;
}
.weeby-badge:hover {
  transform: translateY(-2px);
  padding-right: 20px;
}
.weeby-badge img {
  width: 26px;
  height: 26px;
  border-radius: 7px;
  display: block;
}
.weeby-badge .label { color: rgba(255, 255, 255, 0.9); }
.weeby-badge .label strong { color: #fff; font-weight: 700; }
.weeby-badge .cta {
  max-width: 0;
  opacity: 0;
  overflow: hidden;
  white-space: nowrap;
  color: #ffb547;
  font-weight: 600;
  margin-left: -6px;
  transition: max-width 0.3s ease, opacity 0.2s ease 0.05s, margin-left 0.3s ease;
}
.weeby-badge:hover .cta {
  max-width: 200px;
  opacity: 1;
  margin-left: 0;
}
@keyframes weebyBadgeIn {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}
@media (max-width: 720px) {
  .weeby-badge {
    bottom: 14px;
    right: 14px;
    padding: 6px 14px 6px 6px;
    font-size: 12px;
  }
  .weeby-badge img { width: 22px; height: 22px; border-radius: 6px; }
}
@media (prefers-reduced-motion: reduce) {
  .weeby-badge { animation: none; transition: none; }
  .weeby-badge:hover { transform: none; }
}

/* ---------- breakpoints ---------- */

@media (min-width: 768px) {
  .burger { display: none; }
  .drawer { display: none; }

  .nav-desktop {
    display: flex;
    gap: 26px;
  }

  .wordmark-1 { font-size: 1.25rem; }
  .wordmark-2 { font-size: 0.8rem; }

  .chi-grid {
    grid-template-columns: 1.15fr 0.85fr;
    gap: 48px;
    align-items: start;
  }

  .ways { grid-template-columns: 1fr 1fr; gap: 22px; }

  .bottega-grid {
    grid-template-columns: 0.8fr 1.2fr;
    gap: 52px;
    align-items: center;
  }

  .modes { gap: 10px 34px; font-size: 0.95rem; }
}

@media (min-width: 1024px) {
  :root { --header-h: 76px; }

  .hero { padding-top: 96px; }
  .hero-lead { max-width: 34ch; }
  .hero-art { margin-top: 48px; }
}
