/* Heritail — sito vetrina. Solo tema chiaro, caratteri di sistema, nessuna animazione. */

:root {
  --paper: #faf8f5;
  --surface: #ffffff;
  --line: #e6e0d7;
  --line-strong: #cfc7bb;
  --ink: #1c1a17;
  --muted: #6b655c;
  --green: #2f6b5e;
  --green-deep: #1e4a40;
  --amber: #e8a33d;
  --amber-deep: #9a5b0b;
  --amber-wash: #fbebd1;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --wrap: 1120px;
  --gutter: clamp(16px, 4vw, 32px);
  color-scheme: light;
}

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 1.0625rem/1.6 var(--sans);
  overflow-wrap: break-word;
}

@media (min-width: 700px) {
  body {
    font-size: 1.125rem;
  }
}

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

a {
  color: var(--green);
  text-underline-offset: 0.18em;
  transition: color 0.15s;
}

a:hover {
  color: var(--green-deep);
}

:focus-visible {
  outline: 3px solid var(--green);
  outline-offset: 3px;
  border-radius: 2px;
}

main:focus {
  outline: none;
}

h1,
h2,
h3 {
  font-family: var(--serif);
  font-weight: 400;
  line-height: 1.12;
  text-wrap: balance;
  margin: 0;
}

p {
  margin: 0 0 1em;
}

.wrap {
  max-width: var(--wrap);
  margin: 0 auto;
  padding-inline: var(--gutter);
}

/* ---------- salta al contenuto ---------- */
.skip {
  position: absolute;
  left: 16px;
  top: -100px;
  z-index: 10;
  padding: 0.6rem 1rem;
  background: var(--ink);
  color: var(--paper);
  border-radius: 4px;
}

.skip:focus {
  top: 12px;
  color: var(--paper);
}

/* ---------- intestazione ---------- */
.site-header {
  border-bottom: 1px solid var(--line);
}

.bar {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  padding-block: 14px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  margin-right: auto;
  color: var(--ink);
  font-family: var(--serif);
  font-size: 1.35rem;
  text-decoration: none;
}

.brand:hover {
  color: var(--green-deep);
}

.brand img {
  display: block;
  border-radius: 7px;
}

.menu {
  display: none;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.25rem 1.5rem;
  font-size: 0.9375rem;
}

.menu a {
  color: var(--ink);
  text-decoration: none;
}

.menu a:hover {
  color: var(--green);
  text-decoration: underline;
}

@media (min-width: 760px) {
  .menu {
    display: flex;
  }
}

/* Lingue: tendina con details, senza JavaScript */
.lang {
  position: relative;
  border-top: 0;
  font-size: 0.9375rem;
  letter-spacing: 0.04em;
}

.lang summary {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  min-height: 2.5rem;
  padding: 0 0.75rem;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  font-family: var(--sans);
  font-size: inherit;
  font-weight: 600;
  line-height: 1;
}

.lang summary::after,
.lang[open] summary::after {
  content: "\25BE";
  position: static;
  font-size: 0.8em;
  line-height: 1;
}

.lang[open] summary::after {
  content: "\25B4";
}

.lang ul {
  position: absolute;
  right: 0;
  top: calc(100% + 0.35rem);
  z-index: 5;
  min-width: 11rem;
  max-width: calc(100vw - 2 * var(--gutter));
  margin: 0;
  padding: 0.35rem 0;
  list-style: none;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 6px;
  box-shadow: 0 8px 20px -10px rgba(28, 26, 23, 0.35);
}

.lang li a,
.lang li span {
  display: block;
  padding: 0.5rem 1rem;
  border-left: 3px solid transparent;
  color: var(--ink);
  text-decoration: none;
}

.lang li a:hover {
  background: var(--amber-wash);
}

.lang li [aria-current] {
  border-left-color: var(--amber);
  font-weight: 600;
}

/* ---------- apertura ---------- */
.hero {
  border-bottom: 1px solid var(--line);
  padding-block: clamp(2.5rem, 7vw, 5.5rem);
}

.hero-grid {
  display: grid;
  gap: 3rem;
  align-items: center;
}

.eyebrow {
  margin: 0 0 1.25rem;
  color: var(--green);
  font-size: 0.95rem;
  font-variant-caps: all-small-caps;
  letter-spacing: 0.1em;
  font-weight: 600;
}

.hero h1 {
  font-size: clamp(2.4rem, 6vw, 4.4rem);
  line-height: 1.04;
  letter-spacing: -0.01em;
}

.lede {
  max-width: 34em;
  margin: 1.5rem 0 1.75rem;
}

.stores {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin: 0 0 1rem;
  padding: 0;
  list-style: none;
}

.store {
  display: inline-block;
  padding: 0.5rem 0.9rem;
  border: 1px dashed var(--line-strong);
  border-radius: 6px;
  color: var(--ink);
  font-size: 0.95rem;
  line-height: 1.3;
}

.store-link {
  border: 1px solid var(--green);
  background: var(--green);
  color: #fff;
  text-decoration: none;
}

.store-link:hover {
  background: var(--green-deep);
  border-color: var(--green-deep);
  color: #fff;
}

.note {
  margin: 0;
  color: var(--muted);
  font-size: 0.9375rem;
}

.note + .note {
  margin-top: 0.35rem;
}

/* ---------- fotografie ---------- */
.photo-band {
  padding-top: clamp(2rem, 5vw, 3.5rem);
}

.band,
.gallery figure {
  margin: 0;
  border-radius: 6px;
  overflow: hidden;
  background: var(--line);
}

.band {
  aspect-ratio: 3 / 2;
}

.band img,
.gallery img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.band img {
  object-position: center 45%;
}

@media (min-width: 760px) {
  .band {
    aspect-ratio: 21 / 9;
  }
}

/* sotto 760 px: cuccioli in alto a tutta larghezza, cane e gatto affiancati sotto */
.gallery {
  padding-block: clamp(2.5rem, 6vw, 4.5rem);
  border-bottom: 1px solid var(--line);
}

.gallery-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 1rem;
}

.gallery .g-dog,
.gallery .g-cat {
  aspect-ratio: 1;
}

.gallery .g-puppies {
  grid-column: 1 / -1;
  order: -1;
  aspect-ratio: 3 / 2;
}

.g-dog img {
  object-position: 50% 25%;
}

.g-puppies img {
  object-position: 50% 55%;
}

.g-cat img {
  object-position: 48% 40%;
}

@media (min-width: 760px) {
  .gallery-grid {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.5fr) minmax(0, 1fr);
  }

  .gallery figure {
    height: clamp(240px, 30vw, 380px);
  }

  .gallery .g-dog,
  .gallery .g-cat,
  .gallery .g-puppies {
    aspect-ratio: auto;
  }

  .gallery .g-puppies {
    grid-column: auto;
    order: 0;
  }
}

/* ---------- schermate dell'app ---------- */
.shot {
  margin: 0;
  width: 100%;
  max-width: 300px;
  border: 1px solid var(--line-strong);
  border-radius: 28px;
  overflow: hidden;
  background: var(--surface);
  box-shadow: 0 1px 2px rgba(28, 26, 23, 0.12), 0 12px 20px -14px rgba(28, 26, 23, 0.35);
}

.shot img {
  display: block;
  width: 100%;
  height: auto;
}

.hero .shot {
  justify-self: start;
}

@media (min-width: 900px) {
  .hero.has-shot .hero-grid {
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: 5rem;
  }

  .hero .shot {
    justify-self: end;
    max-width: 320px;
    /* sporge un po' sotto il bordo della sezione */
    margin-bottom: -7rem;
    position: relative;
  }

  .hero.has-shot + .photo-band {
    padding-top: 9rem;
  }
}

/* ---------- sezioni ---------- */
.section {
  padding-block: clamp(3rem, 8vw, 6rem);
  border-bottom: 1px solid var(--line);
}

.section h2 {
  font-size: clamp(1.9rem, 4vw, 2.7rem);
  line-height: 1.1;
  margin-bottom: 1.5rem;
}

/* Come funziona: elenco numerato, un filetto sopra ogni voce */
.how-grid {
  display: grid;
  gap: 1rem;
}

@media (min-width: 900px) {
  .how-grid {
    grid-template-columns: minmax(0, 1fr) minmax(0, 2fr);
    gap: 4rem;
  }
}

.steps {
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: step;
}

.steps li {
  counter-increment: step;
  display: grid;
  grid-template-columns: 3.5rem minmax(0, 1fr);
  gap: 0.5rem;
  padding: 1.25rem 0;
  border-top: 1px solid var(--line);
}

.steps li::before {
  content: counter(step);
  font-family: var(--serif);
  font-size: 2.6rem;
  line-height: 1;
  color: var(--amber-deep);
}

.steps p {
  margin: 0;
  max-width: 34em;
}

/* Sezioni con schermata: due colonne alternate */
.feature-grid {
  display: grid;
  gap: 2.5rem;
  align-items: center;
}

.feature-text p {
  max-width: 34em;
}

.feature .shot {
  justify-self: start;
}

@media (min-width: 900px) {
  .feature.has-shot .feature-grid {
    grid-template-columns: minmax(0, 1fr) 300px;
    gap: 6rem;
  }

  .feature.flip.has-shot .feature-grid {
    grid-template-columns: 300px minmax(0, 1fr);
  }

  .feature.flip .shot {
    order: -1;
  }

  .feature:not(.flip) .shot {
    justify-self: end;
  }
}

.small {
  margin-top: 1.5rem;
  padding-left: 0.8rem;
  border-left: 2px solid var(--amber);
  color: var(--muted);
  font-size: 0.9375rem;
}

/* l'unica sezione a fondo pieno */
.dark {
  background: var(--green-deep);
  color: #f3f0e8;
  border-bottom: 0;
}

.dark h2 {
  color: #fff;
}

.dark .small {
  color: #cfe0da;
}

.dark :focus-visible {
  outline-color: var(--amber);
}

.dark .shot {
  border-color: rgba(255, 255, 255, 0.28);
}

/* Poche regole: tre voci affiancate, separate da filetti */
.rules {
  display: grid;
  margin: 2rem 0 0;
  padding: 0;
  list-style: none;
}

.rules li {
  padding: 1.25rem 0;
  border-top: 1px solid var(--line);
}

.rules h3 {
  font-size: 1.35rem;
  margin-bottom: 0.5rem;
}

.rules p {
  margin: 0;
  color: var(--muted);
}

@media (min-width: 760px) {
  .rules {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .rules li {
    padding: 0 2rem;
    border-top: 0;
    border-left: 1px solid var(--line);
  }

  .rules li:first-child {
    padding-left: 0;
    border-left: 0;
  }
}

/* Piani: tabella vera, scorre nel suo riquadro */
.plans-text {
  max-width: 34em;
}

.table-wrap {
  margin-top: 2rem;
  max-width: 100%;
  overflow-x: auto;
}

table {
  width: 100%;
  min-width: 34rem;
  border-collapse: separate;
  border-spacing: 0;
  /* tre colonne dei piani larghe uguali, qualunque sia il testo */
  table-layout: fixed;
  font-size: 1rem;
  font-variant-numeric: tabular-nums;
}

th,
td {
  padding: 0.85rem 1rem 0.85rem 0;
  border-top: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

thead th:first-child,
thead td:first-child {
  width: 31%;
}

thead th,
thead td {
  border-top: 0;
  border-bottom: 1px solid var(--line-strong);
}

thead th {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 1.2rem;
}

tbody th {
  min-width: 9rem;
  font-weight: 400;
}

tbody tr:last-child > * {
  border-bottom: 1px solid var(--line);
}

tbody th,
thead td {
  position: sticky;
  left: 0;
  background: var(--paper);
}

/* Domande: details senza JavaScript */
.faq-list {
  max-width: 44rem;
  border-bottom: 1px solid var(--line);
}

details {
  border-top: 1px solid var(--line);
}

summary {
  position: relative;
  padding: 1.1rem 2.25rem 1.1rem 0;
  font-family: var(--serif);
  font-size: 1.2rem;
  line-height: 1.3;
  cursor: pointer;
  list-style: none;
}

summary::-webkit-details-marker {
  display: none;
}

summary::after {
  content: "+";
  position: absolute;
  right: 0.25rem;
  top: 1rem;
  color: var(--green);
  font-family: var(--sans);
  font-size: 1.5rem;
  line-height: 1.2;
}

details[open] summary::after {
  content: "\2212";
}

details p {
  max-width: 34em;
  margin: 0 0 1.25rem;
  color: var(--muted);
}

/* ---------- pagine legali ---------- */
.legal {
  padding-block: clamp(2rem, 6vw, 4rem) 5rem;
}

.legal h1 {
  font-size: clamp(2rem, 5vw, 3rem);
  margin-bottom: 0.5rem;
}

.updated {
  color: var(--muted);
  font-size: 0.9375rem;
}

.translated {
  max-width: 68ch;
  margin: 0.5rem 0 2rem;
  color: var(--muted);
  font-size: 0.9375rem;
}

.legal-body {
  max-width: 68ch;
  overflow-wrap: anywhere;
}

.toc {
  margin: 2rem 0;
  padding: 1rem 0 0;
  border-top: 1px solid var(--line);
  font-size: 0.9375rem;
}

.toc ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.toc li {
  margin: 0.25rem 0;
}

.legal-body section {
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--line);
  scroll-margin-top: 1rem;
}

.legal-body h2 {
  font-size: 1.5rem;
  margin-bottom: 0.75rem;
}

.legal-body ul {
  margin: 0 0 1em;
  padding-left: 1.25rem;
}

.legal-body li {
  margin-bottom: 0.35rem;
}

/* ---------- 404 ---------- */
.notfound {
  padding-block: clamp(3rem, 10vw, 6rem);
}

.notfound h1,
.h1like {
  font-family: var(--serif);
  font-size: clamp(2rem, 5vw, 3rem);
  line-height: 1.1;
  margin: 0 0 0.75rem;
}

.notfound > div + div {
  margin-top: 2.5rem;
  padding-top: 2.5rem;
  border-top: 1px solid var(--line);
}

/* ---------- piè di pagina ---------- */
.site-footer {
  border-top: 1px solid var(--line);
  padding-block: 2.5rem 3rem;
  color: var(--muted);
  font-size: 0.9375rem;
}

.foot {
  display: grid;
  gap: 1.75rem;
}

.foot p {
  margin: 0 0 0.35rem;
}

.foot-brand .brand {
  margin-bottom: 0.5rem;
}

.foot-links {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

@media (min-width: 760px) {
  .foot {
    grid-template-columns: 1.4fr 1fr 1fr;
    gap: 3rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
  }
}
