/* ═══════════════════════════════════════════════════════════════════
   Italian Padel Hub — styles
   Palette "Verde guida": white page, green = anything you tap,
   red = markers (steps, dates, badges). The official flag colours
   appear ONLY in the .flag stripe. See docs/design/design-decisions.md
   ═══════════════════════════════════════════════════════════════════ */

@font-face { font-family: "Titillium Web"; font-style: normal; font-weight: 400; font-display: swap;
  src: url("../fonts/titillium-400-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Titillium Web"; font-style: normal; font-weight: 400; font-display: swap;
  src: url("../fonts/titillium-400-latinext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Titillium Web"; font-style: normal; font-weight: 600; font-display: swap;
  src: url("../fonts/titillium-600-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Titillium Web"; font-style: normal; font-weight: 600; font-display: swap;
  src: url("../fonts/titillium-600-latinext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Titillium Web"; font-style: normal; font-weight: 700; font-display: swap;
  src: url("../fonts/titillium-700-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Titillium Web"; font-style: normal; font-weight: 700; font-display: swap;
  src: url("../fonts/titillium-700-latinext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }

:root {
  /* colour: contrast-checked, all text pairs ≥ 5.6:1 (WCAG AA) */
  --green:       oklch(0.500 0.130 152);   /* #05773b — action */
  --green-hover: oklch(0.440 0.120 152);
  --green-deep:  oklch(0.300 0.070 152);   /* #0a371b — footer */
  --green-tint:  oklch(0.955 0.025 152);
  --red:         oklch(0.500 0.190 25);    /* #b71824 — marker */
  --red-tint:    oklch(0.950 0.030 23);
  --ink:         oklch(0.230 0.012 152);   /* #191f1a */
  --ink-2:       oklch(0.440 0.012 152);   /* #4e554f */
  --bg:          #ffffff;
  --surface:     oklch(0.975 0.006 152);
  --line:        oklch(0.915 0.008 152);
  --on-deep:     #ffffff;
  --on-deep-2:   oklch(0.880 0.025 152);
  --flag-green:  #009246;                  /* stripe only — fails AA as text */
  --flag-red:    #CE2B37;                  /* stripe only */

  /* type — one family, fluid display sizes, fixed body */
  --font: "Titillium Web", system-ui, -apple-system, "Segoe UI", sans-serif;
  --t-sm: 0.875rem;
  --t-body: 1.0625rem;
  --t-lead: 1.1875rem;
  --t-h3: 1.25rem;
  --t-h2: clamp(1.75rem, 1.35rem + 1.8vw, 2.5rem);
  --t-h1: clamp(2.5rem, 1.7rem + 3.8vw, 4.25rem);

  /* space & shape */
  --gutter: clamp(1.25rem, 4vw, 3rem);
  --section: clamp(3.5rem, 2.5rem + 5vw, 6.5rem);
  --max: 72rem;
  --r: 1rem;
  --r-sm: 0.625rem;
  --pill: 999px;
  --header-h: 4rem;

  /* layers */
  --z-sticky: 10;
  --z-menu: 20;

  --ease-out: cubic-bezier(0.22, 1, 0.36, 1); /* quint-ish */
}

*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--header-h) + 1rem); }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
body {
  font-family: var(--font); font-size: var(--t-body); line-height: 1.6;
  color: var(--ink); background: var(--bg);
  font-kerning: normal; text-rendering: optimizeLegibility;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
h1, h2, h3 { line-height: 1.05; font-weight: 700; text-wrap: balance; }
p { text-wrap: pretty; }
ul[role="list"], ol[role="list"] { list-style: none; padding: 0; }

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

.skip { position: absolute; left: 1rem; top: -4rem; z-index: calc(var(--z-menu) + 1);
  background: var(--ink); color: #fff; padding: 0.6rem 1rem; border-radius: var(--r-sm); text-decoration: none; }
.skip:focus { top: 1rem; }

.wrap { width: min(100% - 2 * var(--gutter), var(--max)); margin-inline: auto; }
.section { padding-block: var(--section); }
.section--surface { background: var(--surface); }
.section h2 { font-size: var(--t-h2); letter-spacing: -0.015em; }
.section-intro { margin-top: 0.75rem; color: var(--ink-2); font-size: var(--t-lead); max-width: 52ch; }

/* ── the flag: official colours, used exactly here and nowhere else ── */
.flag { display: flex; height: 6px; }
.flag span { flex: 1; }
.flag span:nth-child(1) { background: var(--flag-green); }
.flag span:nth-child(2) { background: #fff; }
.flag span:nth-child(3) { background: var(--flag-red); }

/* ── buttons ── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  min-height: 3.25rem; padding: 0 1.75rem; border-radius: var(--pill);
  font: 700 1.0625rem/1 var(--font); text-decoration: none; cursor: pointer; border: 0;
  background: var(--green); color: #fff;
  transition: background-color 160ms var(--ease-out), transform 160ms var(--ease-out);
}
.btn:hover { background: var(--green-hover); }
.btn:active { transform: translateY(1px); }
.btn--light { background: #fff; color: var(--green); }
.btn--light:hover { background: var(--green-tint); }
.btn--ghost { background: transparent; color: var(--green); padding-inline: 0.75rem; }
.btn--ghost:hover { background: var(--green-tint); }
.btn--sm { min-height: 2.5rem; padding: 0 1.1rem; font-size: 0.9375rem; }
.btn svg { width: 1.25rem; height: 1.25rem; flex: none; }

/* ── header ── */
.site-header { position: sticky; top: 0; z-index: var(--z-sticky); background: rgb(255 255 255 / 0.96);
  backdrop-filter: saturate(1.4) blur(8px); }
.site-header .bar { display: flex; align-items: center; gap: 0.5rem; min-height: var(--header-h); }
.brand { display: flex; align-items: center; gap: 0.6rem; text-decoration: none; margin-right: auto; }
.brand-mark { display: grid; place-items: center; width: 2.4rem; height: 2.4rem; border-radius: 50%;
  background: var(--green); color: #fff; font-weight: 700; font-size: 0.8rem; letter-spacing: 0.02em; }
.brand-name { font-weight: 700; font-size: 1.0625rem; line-height: 1.1; }
.nav-desktop { display: none; gap: 0.25rem; margin-right: 0.5rem; }
.nav-desktop a, .lang, .menu-btn {
  font: 600 0.9375rem/1 var(--font); color: var(--ink); text-decoration: none;
  padding: 0.65rem 0.7rem; border-radius: var(--r-sm); background: none; border: 0; cursor: pointer; }
.nav-desktop a:hover, .lang:hover, .menu-btn:hover { background: var(--surface); }

/* mobile menu — native popover: works without JavaScript */
.menu { position: fixed; inset: auto 0 0 0; margin: 0; width: 100%; max-width: none; border: 0;
  padding: 0.75rem var(--gutter) 1.5rem; border-radius: 1.25rem 1.25rem 0 0; background: #fff; color: var(--ink);
  z-index: var(--z-menu); }
.menu::backdrop { background: rgb(10 30 18 / 0.45); }
.menu-head { display: flex; align-items: center; justify-content: space-between; padding-bottom: 0.5rem; }
.menu-head strong { font-size: var(--t-h3); }
.menu-close { width: 2.75rem; height: 2.75rem; display: grid; place-items: center; border-radius: 50%;
  border: 0; background: var(--surface); color: var(--ink); cursor: pointer; }
.menu nav a { display: block; padding: 0.9rem 0; border-bottom: 1px solid var(--line);
  font-size: 1.125rem; font-weight: 600; text-decoration: none; }
.menu .btn { width: 100%; margin-top: 1.25rem; }
.menu .menu-lang { display: block; text-align: center; margin-top: 0.75rem; padding: 0.6rem; color: var(--green); font-weight: 600; }
@media (prefers-reduced-motion: no-preference) {
  .menu:popover-open { animation: sheet-in 280ms var(--ease-out); }
  @keyframes sheet-in { from { transform: translateY(100%); } }
}

@media (min-width: 60rem) {
  .nav-desktop { display: flex; }
  .menu-btn { display: none; }
}

/* ── hero ── */
.hero { padding-block: clamp(2.5rem, 2rem + 4vw, 5.5rem) var(--section); }
.hero-grid { display: grid; gap: 2.5rem; align-items: center; }
.kicker { font-size: var(--t-sm); font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--red); }
.hero h1 { font-size: var(--t-h1); letter-spacing: -0.02em; margin-top: 0.75rem; }
.hero h1 span { display: block; color: var(--green); }
.hero .lead { margin-top: 1.25rem; font-size: var(--t-lead); color: var(--ink-2); max-width: 36rem; }
.hero-actions { margin-top: 2rem; display: grid; gap: 0.75rem; justify-items: start; }
.hero-actions .btn:first-child { width: 100%; }
.hero-note { display: flex; gap: 0.5rem; align-items: flex-start; font-size: var(--t-sm); color: var(--ink-2); }
.hero-note svg { flex: none; width: 1.1rem; height: 1.1rem; margin-top: 0.15rem; color: var(--green); }
.hero-photo { position: relative; }
.hero-photo img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: var(--r); }
.hero-photo figcaption { margin-top: 0.75rem; font-size: var(--t-sm); color: var(--ink-2); display: flex; gap: 0.5rem; align-items: center; }
.hero-photo figcaption b { color: var(--ink); }
.qr { display: none; align-items: center; gap: 1rem; margin-top: 1.5rem; font-size: var(--t-sm); color: var(--ink-2); }
.qr img { width: 5.5rem; height: 5.5rem; border: 1px solid var(--line); border-radius: var(--r-sm); padding: 0.35rem; background: #fff; }
@media (min-width: 40rem) { .hero-actions .btn:first-child { width: auto; } }
@media (min-width: 60rem) {
  .hero-grid { grid-template-columns: 1.05fr 1fr; gap: clamp(2.5rem, 5vw, 5rem); }
  .qr:not([hidden]) { display: flex; }
}
@media (prefers-reduced-motion: no-preference) {
  .hero-copy > * { animation: rise 700ms var(--ease-out) both; }
  .hero-copy > :nth-child(2) { animation-delay: 60ms; }
  .hero-copy > :nth-child(3) { animation-delay: 120ms; }
  .hero-copy > :nth-child(4) { animation-delay: 180ms; }
  .hero-photo img { animation: settle 900ms var(--ease-out) both; }
  @keyframes rise { from { opacity: 0; transform: translateY(14px); } }
  @keyframes settle { from { opacity: 0; transform: scale(0.97); } }
}

/* ── how it works: a real sequence, so numbers earn their place ── */
.steps { counter-reset: step; display: grid; gap: 0; margin-top: 2rem; padding: 0; list-style: none; }
.steps li { counter-increment: step; display: grid; grid-template-columns: 2.75rem 1fr; column-gap: 1rem;
  padding: 1.25rem 0; border-top: 1px solid var(--line); }
.steps li::before { content: counter(step); grid-row: span 2; display: grid; place-items: center;
  width: 2.75rem; height: 2.75rem; border-radius: 50%; background: var(--red); color: #fff; font-weight: 700; font-size: 1.125rem; }
.steps h3 { font-size: var(--t-h3); line-height: 1.25; }
.steps p { color: var(--ink-2); margin-top: 0.25rem; }
.how .btn { margin-top: 2rem; }
@media (min-width: 60rem) {
  .steps { grid-template-columns: repeat(3, 1fr); gap: 2.5rem; }
  .steps li { grid-template-columns: 1fr; border-top: 0; padding: 0; }
  .steps li::before { grid-row: auto; margin-bottom: 1rem; }
}

/* ── what we do: the monthly tournament leads ── */
.do-grid { display: grid; gap: 1.25rem; margin-top: 2rem; }
.do-card { background: #fff; border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; display: flex; flex-direction: column; }
.do-card picture { display: block; }
.do-card img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.do-card .body { padding: 1.25rem 1.25rem 1.5rem; }
.do-card h3 { font-size: var(--t-h3); }
.do-card p { color: var(--ink-2); margin-top: 0.4rem; }
.do-card--lead h3 { font-size: clamp(1.5rem, 1.2rem + 1.2vw, 2rem); }
.badge { display: inline-block; font-size: 0.8125rem; font-weight: 700; line-height: 1; padding: 0.4rem 0.7rem;
  border-radius: var(--pill); background: var(--red-tint); color: var(--red); margin-bottom: 0.6rem; }
@media (min-width: 48rem) {
  .do-grid { grid-template-columns: 1.4fr 1fr; grid-template-rows: auto auto; }
  .do-card--lead { grid-row: span 2; }
  .do-card--lead picture { flex: 1; min-height: 18rem; }
  .do-card--lead img { height: 100%; aspect-ratio: auto; }
  .do-card:not(.do-card--lead) { flex-direction: row; }
  .do-card:not(.do-card--lead) picture { flex: 0 0 42%; }
  .do-card:not(.do-card--lead) img { height: 100%; aspect-ratio: auto; }
  .do-card:not(.do-card--lead) .body { align-self: center; }
}

/* ── events ── */
.events-grid { display: grid; gap: 2rem; }
.updated { margin-top: 0.5rem; font-size: var(--t-sm); color: var(--ink-2); }
.event-list { list-style: none; padding: 0; }
.event { display: flex; gap: 1rem; padding: 1.25rem 0; border-bottom: 1px solid var(--line); }
.event:first-child { border-top: 1px solid var(--line); }
.event-date { flex: none; display: grid; place-content: center; text-align: center; width: 4.25rem; height: 4.75rem;
  border-radius: var(--r-sm); background: var(--red); color: #fff; line-height: 1.05; }
.event-date .dow, .event-date .mon { font-size: 0.75rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; }
.event-date .day { font-size: 1.75rem; font-weight: 700; }
.event h3 { font-size: 1.1875rem; line-height: 1.25; }
.event .meta { color: var(--ink-2); font-size: 0.9375rem; margin-top: 0.15rem; }
.event .badge { margin-bottom: 0.35rem; }
.signup-note { margin-top: 1.5rem; padding: 1rem 1.25rem; border-radius: var(--r-sm); background: #fff; border: 1px solid var(--line); }
.signup-note strong { display: block; }
.signup-note p { color: var(--ink-2); font-size: 0.9375rem; margin-top: 0.15rem; }
.signup-note a { color: var(--green); font-weight: 700; }
.empty { padding: 1.5rem; border-radius: var(--r-sm); background: #fff; border: 1px solid var(--line); }
.empty strong { display: block; font-size: 1.125rem; }
.empty p { color: var(--ink-2); margin-top: 0.35rem; }
.empty .btn { margin-top: 1.25rem; }
@media (min-width: 60rem) { .events-grid { grid-template-columns: 1fr 1.6fr; gap: 4rem; } }

/* ── levels ── */
.levels { list-style: none; padding: 0; margin-top: 2rem; display: grid; }
.levels li { display: grid; grid-template-columns: auto 1fr; gap: 0.25rem 1rem; padding: 1.1rem 0; border-top: 1px solid var(--line); }
.pips { display: flex; gap: 0.3rem; padding-top: 0.45rem; }
.pips i { width: 0.6rem; height: 0.6rem; border-radius: 50%; border: 1.5px solid var(--green); }
.pips i.on { background: var(--green); }
.levels h3 { font-size: 1.125rem; line-height: 1.4; }
.levels p { grid-column: 2; color: var(--ink-2); }
@media (min-width: 48rem) { .levels { grid-template-columns: 1fr 1fr; column-gap: 3rem; } }

/* ── where we play ── */
.clubs { list-style: none; padding: 0; margin-top: 2rem; display: grid; }
.clubs li { display: flex; align-items: center; gap: 1rem; padding: 1rem 0; border-top: 1px solid var(--line); }
.clubs .name { flex: 1; font-weight: 700; font-size: 1.125rem; line-height: 1.3; }
.clubs .name small { display: block; font-weight: 400; font-size: var(--t-sm); color: var(--ink-2); }
.pin { flex: none; width: 2.5rem; height: 2.5rem; border-radius: 50%; display: grid; place-items: center; background: var(--green-tint); color: var(--green); }
.pin svg { width: 1.2rem; height: 1.2rem; }
.maps { font-weight: 700; color: var(--green); text-decoration: none; padding: 0.5rem 0.75rem; border-radius: var(--r-sm); white-space: nowrap; }
.maps:hover { background: var(--green-tint); }
@media (min-width: 48rem) { .clubs { grid-template-columns: 1fr 1fr; column-gap: 3rem; } }

/* ── about ── */
.about-grid { display: grid; gap: 2rem; align-items: center; }
.about-grid img { width: 100%; aspect-ratio: 2 / 1; object-fit: cover; border-radius: var(--r); }
.about-text p { margin-top: 1rem; color: var(--ink-2); max-width: 60ch; }
.about-text .who { color: var(--ink); font-weight: 600; }
@media (min-width: 60rem) { .about-grid { grid-template-columns: 1.2fr 1fr; gap: 4rem; } }

/* ── FAQ ── */
.faq { max-width: 48rem; margin-top: 2rem; }
.faq details { border-top: 1px solid var(--line); }
.faq details:last-child { border-bottom: 1px solid var(--line); }
.faq summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 1rem;
  padding: 1.15rem 0; font-weight: 700; font-size: 1.125rem; line-height: 1.35; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: ""; flex: none; margin-left: auto; width: 0.7rem; height: 0.7rem;
  border-right: 2.5px solid var(--green); border-bottom: 2.5px solid var(--green); transform: rotate(45deg) translateY(-3px);
  transition: transform 200ms var(--ease-out); }
.faq details[open] summary::after { transform: rotate(-135deg) translateY(-2px); }
.faq details p { padding-bottom: 1.25rem; color: var(--ink-2); max-width: 62ch; }

/* ── final CTA + footer ── */
.closing { background: var(--green-deep); color: var(--on-deep); }
.closing .cta-block { padding-block: var(--section) 3rem; text-align: center; display: grid; justify-items: center; gap: 1rem; }
.closing h2 { font-size: var(--t-h2); }
.closing .cta-block p { color: var(--on-deep-2); font-size: var(--t-lead); max-width: 40ch; }
.closing .btn { margin-top: 0.5rem; }
.site-footer { border-top: 1px solid rgb(255 255 255 / 0.14); padding-block: 2.5rem; font-size: 0.9375rem; color: var(--on-deep-2); }
.footer-grid { display: grid; gap: 1.5rem; }
.site-footer strong { color: var(--on-deep); font-size: 1.0625rem; }
.site-footer a { color: var(--on-deep); font-weight: 600; text-underline-offset: 3px; }
.site-footer ul { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 0.25rem 1.25rem; margin-top: 0.4rem; }
.site-footer .legal { margin-top: 1.5rem; font-size: var(--t-sm); }
@media (min-width: 60rem) { .footer-grid { grid-template-columns: 1fr 1.4fr; gap: 4rem; } }

/* ── 404 ── */
.notfound { min-height: 70vh; display: grid; place-content: center; text-align: center; gap: 1rem; padding: var(--section) var(--gutter); }
.notfound h1 { font-size: var(--t-h1); }
.notfound p { color: var(--ink-2); font-size: var(--t-lead); }
.notfound .btn { justify-self: center; margin-top: 1rem; }

.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.notfound .en-note { font-size: 1rem; }
.notfound .en-note a { color: var(--green); font-weight: 600; }
.notfound .kicker { color: var(--red); }
