/* ═══════════════════════════════════════════════════════════════════
   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: only things you tap */
  --green-hover: oklch(0.440 0.120 152);
  --green-deep:  oklch(0.300 0.070 152);   /* #0a371b — closing band */
  --green-tint:  oklch(0.955 0.025 152);
  --red:         oklch(0.500 0.190 25);    /* #b71824 — marker: dates, step numbers */
  --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; hierarchy from size, not weight */
  --font: "Titillium Web", system-ui, -apple-system, "Segoe UI", sans-serif;
  --t-sm: 0.875rem;                        /* 14 */
  --t-body: 1.0625rem;                     /* 17 */
  --t-lead: 1.1875rem;                     /* 19 */
  --t-h3: 1.25rem;                         /* 20 */
  --t-h2: clamp(1.75rem, 1.35rem + 1.8vw, 2.5rem);
  --t-h1: clamp(2.5rem, 1.7rem + 3.8vw, 4.25rem);

  /* space (4px grid) & shape */
  --gutter: clamp(1.25rem, 4vw, 3rem);
  --section: clamp(4rem, 3rem + 5vw, 7rem);
  --max: 72rem;
  --r: 0.75rem;                            /* 12 — photos, cards */
  --r-ctl: 0.625rem;                       /* 10 — buttons, inputs */
  --r-sm: 0.5rem;                          /* 8 — small things */
  --header-h: 4rem;

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

  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
}

*, *::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.1; font-weight: 600; 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.5rem 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); }
/* two white sections in a row get a hairline at content width instead of a colour band */
.section:not(.section--surface) + .section:not(.section--surface) {
  background: linear-gradient(var(--line), var(--line)) top center / min(100% - 2 * var(--gutter), var(--max)) 1px no-repeat; }
.section h2 { font-size: var(--t-h2); letter-spacing: -0.015em; }
.section-intro { margin-top: 1rem; color: var(--ink-2); font-size: var(--t-lead); max-width: 52ch; }

/* ── the flag: official colours, the one decorative detail, used here only ── */
.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: 3rem; padding: 0 1.25rem; border-radius: var(--r-ctl);
  font: 600 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 120ms var(--ease-out);
}
.btn:hover { background: var(--green-hover); }
.btn:active { transform: scale(0.98); }
.btn--light { background: #fff; color: var(--green-deep); }
.btn--light:hover { background: var(--green-tint); }
.btn--sm { min-height: 2.25rem; padding: 0 1rem; font-size: 0.9375rem; border-radius: var(--r-sm); }
.btn svg { width: 1.25rem; height: 1.25rem; flex: none; }

/* ── header ── */
.site-header { position: sticky; top: 0; z-index: var(--z-sticky); background: #fff; }
.site-header .bar { display: flex; align-items: center; gap: 0.5rem; min-height: var(--header-h); }
.brand { display: flex; align-items: center; gap: 0.75rem; text-decoration: none; margin-right: auto; }
.brand-mark { display: grid; place-items: center; width: 2.5rem; height: 2.5rem; border-radius: 50%;
  background: var(--green); color: #fff; font-weight: 700; font-size: 0.8125rem; }
.brand-name { font-weight: 600; 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: 400 0.9375rem/1 var(--font); color: var(--ink); text-decoration: none;
  padding: 0.625rem 0.75rem; border-radius: var(--r-sm); background: none; border: 0; cursor: pointer;
  transition: background-color 160ms var(--ease-out); }
.nav-desktop a:hover, .lang:hover, .menu-btn:hover { background: var(--surface); }
.lang { color: var(--ink-2); }

/* 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: 1rem 1rem 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); font-weight: 600; }
.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: 1rem 0; border-bottom: 1px solid var(--line);
  font-size: 1.125rem; 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.5rem; color: var(--green); font-weight: 600; }
@media (prefers-reduced-motion: no-preference) {
  .menu:popover-open { animation: sheet-in 260ms var(--ease-out); }
  @keyframes sheet-in { from { transform: translateY(100%); } }
}
@media (min-width: 60rem) {
  .nav-desktop { display: flex; }
  .menu-btn { display: none; }
}

/* ── hero: text left, the group photo right, both inside the page margins ──
   Columns line up with .wrap: gutter | half | half | gutter */
.hero { display: grid; }
.hero-copy { padding: 3rem var(--gutter) 2.5rem; }
.hero h1 { font-size: var(--t-h1); letter-spacing: -0.025em; line-height: 1.04; }
.hero h1 span { display: block; }
.hero .lead { margin-top: 1.5rem; font-size: var(--t-lead); color: var(--ink-2); max-width: 34rem; }
.hero-actions { margin-top: 2rem; display: grid; gap: 0.75rem; justify-items: start; }
.hero-actions .btn { 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: 1rem; height: 1rem; margin-top: 0.25rem; }
.hero-photo { padding: 0 var(--gutter) 1rem; }
.hero-photo img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: var(--r); }
.qr { display: none; align-items: center; gap: 1rem; margin-top: 2.5rem; padding-top: 1.5rem;
  border-top: 1px solid var(--line); font-size: var(--t-sm); color: var(--ink-2); max-width: 34rem; }
.qr img { width: 4.5rem; height: 4.5rem; border: 1px solid var(--line); border-radius: var(--r-sm); padding: 0.25rem; background: #fff; }
@media (min-width: 40rem) { .hero-actions .btn { width: auto; } }
@media (min-width: 60rem) {
  .hero {
    grid-template-columns: minmax(var(--gutter), 1fr) minmax(0, calc(var(--max) / 2)) minmax(0, calc(var(--max) / 2)) minmax(var(--gutter), 1fr);
    align-items: center; padding-block: clamp(3rem, 2rem + 3vw, 5rem);
  }
  .hero-copy { grid-column: 2; padding: 0 clamp(2rem, 4vw, 4rem) 0 0; }
  .hero-photo { grid-column: 3; padding: 0; }
  .qr:not([hidden]) { display: flex; }
}
@media (prefers-reduced-motion: no-preference) {
  .hero-copy > * { animation: rise 600ms var(--ease-out) both; }
  .hero-copy > :nth-child(2) { animation-delay: 50ms; }
  .hero-copy > :nth-child(3) { animation-delay: 100ms; }
  .hero-copy > :nth-child(4) { animation-delay: 150ms; }
  .hero-photo img { animation: fade 700ms var(--ease-out) both; }
  @keyframes rise { from { opacity: 0; transform: translateY(8px); } }
  @keyframes fade { from { opacity: 0; } }
}

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

/* ── what we do: the monthly tournament leads; no card chrome, photos carry it ── */
.do-grid { display: grid; gap: 2rem; margin-top: 2.5rem; }
.do-card { display: flex; flex-direction: column; gap: 1.25rem; }
.do-card picture { display: block; }
.do-card img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: var(--r); }
.do-card h3 { font-size: var(--t-h3); }
.do-card p { color: var(--ink-2); margin-top: 0.5rem; max-width: 46ch; }
.do-card--lead h3 { font-size: clamp(1.5rem, 1.2rem + 1.2vw, 2rem); }
@media (min-width: 48rem) {
  .do-grid { grid-template-columns: 1.5fr 1fr; grid-template-rows: 1fr 1fr; column-gap: 3rem; row-gap: 2.5rem; }
  .do-card--lead { grid-row: span 2; }
  .do-card--lead picture { flex: 1; min-height: 20rem; }
  .do-card--lead img { height: 100%; aspect-ratio: auto; }
  .do-card:not(.do-card--lead) img { aspect-ratio: 16 / 10; }
}

/* ── events: the next one is a card, later ones are rows ── */
.events-grid { display: grid; gap: 2rem; }
.updated { margin-top: 0.75rem; font-size: var(--t-sm); color: var(--ink-2); }
.event-list { list-style: none; padding: 0; }
.event { display: flex; gap: 1.25rem; padding: 1.25rem 0; border-bottom: 1px solid var(--line); }
.event-date { flex: none; display: grid; place-content: center; text-align: center; width: 4rem; height: 4.5rem;
  border-radius: var(--r-sm); background: var(--red); color: #fff; line-height: 1.1; font-variant-numeric: tabular-nums; }
.event-date .dow, .event-date .mon { font-size: 0.8125rem; }
.event-date .day { font-size: 1.75rem; font-weight: 600; line-height: 1; }
.event h3 { font-size: 1.1875rem; line-height: 1.3; }
.event .meta { color: var(--ink-2); font-size: 0.9375rem; margin-top: 0.25rem; }
.event:first-child { background: #fff; border: 1px solid var(--line); border-radius: 1rem; padding: 1.5rem; gap: 1.5rem; }
.event:first-child .event-date { width: 5rem; height: 5.75rem; border-radius: var(--r-sm); }
.event:first-child .day { font-size: 2.5rem; }
.event:first-child h3 { font-size: clamp(1.375rem, 1.2rem + 0.8vw, 1.75rem); }
.event:first-child .meta { font-size: 1rem; }
.signup-note { margin-top: 1.5rem; font-size: 0.9375rem; color: var(--ink-2); }
.signup-note strong { color: var(--ink); font-weight: 600; }
.signup-note p { margin-top: 0.25rem; }
.signup-note a { color: var(--green); font-weight: 600; text-underline-offset: 3px; }
.empty { padding: 1.5rem; border-radius: 1rem; background: #fff; border: 1px solid var(--line); }
.empty strong { display: block; font-size: 1.125rem; font-weight: 600; }
.empty p { color: var(--ink-2); margin-top: 0.25rem; }
.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: 2.5rem; display: grid; }
.levels li { display: grid; grid-template-columns: 4rem 1fr; align-content: start; gap: 0.25rem 1rem;
  padding: 1.25rem 0; border-top: 1px solid var(--line); }
.pips { display: flex; gap: 0.25rem; padding-top: 0.5rem; }
.pips i { width: 0.625rem; height: 0.625rem; border-radius: 50%; border: 1.5px solid var(--ink-2); }
.pips i.on { background: var(--ink); border-color: var(--ink); }
.levels h3 { font-size: 1.125rem; line-height: 1.5; }
.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: 2.5rem; display: grid; }
.clubs li { display: flex; align-items: center; gap: 1rem; min-height: 4.5rem; padding: 0.75rem 0; border-top: 1px solid var(--line); }
.clubs .name { flex: 1; font-weight: 600; font-size: 1.125rem; line-height: 1.3; }
.clubs .name small { display: block; margin-top: 0.25rem; font-weight: 400; font-size: var(--t-sm); color: var(--ink-2); }
.maps { font-weight: 600; font-size: 0.9375rem; color: var(--green); text-decoration: none; padding: 0.5rem 0.75rem; margin-right: -0.75rem;
  border-radius: var(--r-sm); white-space: nowrap; transition: background-color 160ms var(--ease-out); }
.maps::after { content: " ↗"; }
.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; }
@media (min-width: 60rem) { .about-grid { grid-template-columns: 1.2fr 1fr; gap: 4rem; } }

/* ── FAQ ── */
.faq { max-width: 48rem; margin-top: 2.5rem; }
.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.25rem 0; font-weight: 600; font-size: 1.125rem; line-height: 1.4; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: ""; flex: none; margin-left: auto; width: 0.625rem; height: 0.625rem;
  border-right: 1.5px solid var(--ink-2); border-bottom: 1.5px solid var(--ink-2); transform: rotate(45deg) translateY(-3px);
  transition: transform 180ms 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; }

/* ── closing + footer ── */
.closing { background: var(--green-deep); color: var(--on-deep); }
.closing .cta-block { padding-block: var(--section) 4rem; display: grid; gap: 1rem; justify-items: start; }
.closing h2 { font-size: var(--t-h2); letter-spacing: -0.015em; }
.closing .cta-block p { color: var(--on-deep-2); font-size: var(--t-lead); max-width: 40ch; }
.closing .btn { margin-top: 0.5rem; }
@media (min-width: 60rem) {
  .closing .cta-block { grid-template-columns: 1fr auto; column-gap: 4rem; align-items: end; }
  .closing .cta-block .btn { grid-column: 2; grid-row: 1 / span 2; align-self: center; margin-top: 0; }
}
.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; font-weight: 600; }
.site-footer a { color: var(--on-deep); 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.5rem; }
.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); letter-spacing: -0.025em; }
.notfound p { color: var(--ink-2); font-size: var(--t-lead); }
.notfound .btn { justify-self: center; margin-top: 1rem; }
.notfound .code { color: var(--red); font-weight: 600; font-variant-numeric: tabular-nums; }
.notfound .en-note { font-size: 1rem; }
.notfound .en-note a { color: var(--green); font-weight: 600; }

.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
