/* The whole site's look, shared by every page. Light by default, dark when the
   device asks for it. */

:root {
  --bg: #f6f3ec;
  --surface: #ffffff;
  --text: #1f2328;
  --muted: #5b6168;
  --line: #e3ddd0;
  --accent: #1d5c3f;      /* the green of a card table */
  --accent-text: #ffffff;
  --link: #1d5c3f;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #14171a;
    --surface: #1c2024;
    --text: #e8e6e1;
    --muted: #a3a8ad;
    --line: #2d3237;
    --accent: #5fbf8f;
    --accent-text: #0e1a14;
    --link: #7fd3a8;
  }
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 17px/1.6 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

a { color: var(--link); }

header.site {
  border-bottom: 1px solid var(--line);
  background: var(--surface);
}
header.site .inner, main, footer.site {
  max-width: 44rem;
  margin: 0 auto;
  padding: 0 16px;
}
header.site .inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 20px;
  padding-top: 14px;
  padding-bottom: 14px;
}
header.site .brand {
  font-weight: 700;
  letter-spacing: 0.08em;
  text-decoration: none;
  color: var(--text);
}
header.site nav { display: flex; flex-wrap: wrap; gap: 4px 16px; font-size: 15px; }
header.site nav a { text-decoration: none; }
header.site nav a:hover { text-decoration: underline; }

main { padding-top: 24px; padding-bottom: 48px; }

h1 { font-size: 1.9rem; line-height: 1.25; margin: 0.4em 0 0.6em; }
h2 { font-size: 1.3rem; margin: 1.8em 0 0.4em; }
h3 { font-size: 1.1rem; margin: 1.4em 0 0.3em; }

code {
  font-family: ui-monospace, Consolas, monospace;
  font-size: 0.9em;
  background: var(--line);
  padding: 0.05em 0.3em;
  border-radius: 4px;
}

/* Long URLs in the policies must wrap rather than widen the page on a phone. */
main p, main li { overflow-wrap: anywhere; }

.lang { color: var(--muted); font-size: 15px; }

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 20px;
  margin: 20px 0;
}
.card h2 { margin-top: 0; }

.stores { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; }
.button {
  display: inline-block;
  background: var(--accent);
  color: var(--accent-text);
  text-decoration: none;
  font-weight: 600;
  padding: 10px 18px;
  border-radius: 8px;
  border: 0;
  font-size: 16px;
  cursor: pointer;
}
.button:hover { filter: brightness(1.08); }

form label { display: block; font-weight: 600; margin: 16px 0 6px; }
form input, form textarea {
  width: 100%;
  font: inherit;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px;
}
form textarea { min-height: 10rem; resize: vertical; }
form .button { margin-top: 20px; }
.hidden { display: none; }

footer.site {
  color: var(--muted);
  font-size: 14px;
  padding-top: 16px;
  padding-bottom: 32px;
  border-top: 1px solid var(--line);
}

/* ── Language switch ────────────────────────────────────────────────────────
   lang.js sets data-lang on <html>; until it does (or with JavaScript off)
   both languages show. */
html[data-lang="it"] [data-l="en"],
html[data-lang="en"] [data-l="it"] { display: none !important; }

.langswitch { display: flex; gap: 6px; }
.langswitch > * {
  display: block;
  background: none;
  border: 2px solid transparent;
  border-radius: 50%;
  padding: 2px;
  cursor: pointer;
  line-height: 0;
  opacity: 0.55;
}
.langswitch > * img { width: 30px; height: 30px; display: block; }
.langswitch > [aria-pressed="true"] { opacity: 1; border-color: var(--accent); }
.langswitch > :hover, .langswitch > :focus-visible { opacity: 1; }
.nav-and-lang { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 18px; }

/* ── Home hero ──────────────────────────────────────────────────────────────
   The card-table photo, darkened so the title and text read on top of it. */
.hero {
  background: linear-gradient(rgba(8, 20, 14, 0.55), rgba(8, 20, 14, 0.75)),
              url("/images/background.jpg") center / cover no-repeat;
  color: #fff;
  text-align: center;
  padding: 48px 16px 40px;
}
.hero .title { width: min(560px, 100%); height: auto; }
.hero .tagline { font-size: 1.15rem; max-width: 34rem; margin: 18px auto 0; }
.hero .stores { justify-content: center; align-items: center; margin-top: 24px; gap: 14px; }
.hero .stores img { height: 52px; width: auto; display: block; }
main.home { padding-top: 8px; }
/* Without JavaScript both languages show; keep side-by-side labels apart. */
html:not([data-lang]) span[data-l="en"]::before { content: " / "; }
