/* Biemmesport Fossombrone — stile principale */

:root {
    --red: #ff0510;
    --red-dark: #d1000a;
    --ink: #0d0d0f;
    --ink-2: #16161a;
    --ink-3: #1f1f25;
    --line: rgba(255, 255, 255, .09);
    --text: #f4f4f5;
    --muted: #a1a1aa;
    --light: #f6f6f7;
    --light-text: #18181b;
    --light-muted: #5b5b66;
    --green: #22c55e;
    --radius: 18px;
    --radius-sm: 12px;
    --shadow: 0 20px 50px -20px rgba(0, 0, 0, .55);
    --font-display: "Barlow Condensed", "Arial Narrow", Impact, sans-serif;
    --font-body: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    --header-h: 72px;
    --bar-h: 0px;
}

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

html {
    scroll-behavior: smooth;
    scroll-padding-top: calc(var(--header-h) + 8px);
    -webkit-text-size-adjust: 100%;
}

body {
    margin: 0;
    background: var(--ink);
    color: var(--text);
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
    padding-bottom: var(--bar-h);
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, h4 { margin: 0; line-height: 1.05; }
p { margin: 0; }
svg { flex-shrink: 0; }

::selection { background: var(--red); color: #fff; }

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

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.sr-only {
    position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
    overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}

.skip-link {
    position: absolute; left: 12px; top: -60px; z-index: 200;
    background: var(--red); color: #fff; padding: 10px 16px; border-radius: 8px;
    font-weight: 600; transition: top .2s;
}
.skip-link:focus { top: 12px; }

/* ===== Brand ===== */

.brand {
    font-family: var(--font-display);
    font-weight: 800;
    font-style: italic;
    font-size: 28px;
    letter-spacing: .5px;
    line-height: 1;
    color: #fff;
    white-space: nowrap;
}
.brand .r { color: var(--red); }

/* ===== Buttons ===== */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-height: 52px;
    padding: 0 26px;
    border-radius: 999px;
    border: 2px solid transparent;
    font-family: var(--font-body);
    font-weight: 600;
    font-size: 16px;
    cursor: pointer;
    transition: transform .2s ease, background-color .2s ease, border-color .2s ease, box-shadow .2s ease, color .2s ease;
    -webkit-tap-highlight-color: transparent;
}
.btn svg { width: 20px; height: 20px; }

.btn-primary {
    background: var(--red);
    color: #fff;
    box-shadow: 0 10px 30px -10px rgba(255, 5, 16, .7);
}
.btn-primary:hover { background: var(--red-dark); transform: translateY(-2px); }

.btn-ghost {
    border-color: rgba(255, 255, 255, .35);
    color: #fff;
    background: rgba(255, 255, 255, .06);
    -webkit-backdrop-filter: blur(6px);
    backdrop-filter: blur(6px);
}
.btn-ghost:hover { border-color: #fff; background: rgba(255, 255, 255, .14); transform: translateY(-2px); }

.btn:active { transform: translateY(0); }

/* ===== Header / Nav ===== */

.site-header {
    position: fixed;
    inset: 0 0 auto 0;
    z-index: 100;
    height: var(--header-h);
    display: flex;
    align-items: center;
    transition: background-color .3s ease, box-shadow .3s ease, border-color .3s ease;
    border-bottom: 1px solid transparent;
}
.site-header.is-scrolled,
.site-header.menu-open {
    background: rgba(13, 13, 15, .88);
    -webkit-backdrop-filter: saturate(160%) blur(14px);
    backdrop-filter: saturate(160%) blur(14px);
    border-bottom-color: var(--line);
}

.nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 4px;
    list-style: none;
    margin: 0;
    padding: 0;
}
.nav-links a {
    display: block;
    padding: 10px 14px;
    border-radius: 999px;
    font-size: 15px;
    font-weight: 500;
    color: rgba(255, 255, 255, .85);
    transition: color .2s, background-color .2s;
}
.nav-links a:hover,
.nav-links a.is-active { color: #fff; background: rgba(255, 255, 255, .08); }
.nav-links .nav-cta a { background: var(--red); color: #fff; margin-left: 8px; padding: 10px 20px; }
.nav-links .nav-cta a:hover { background: var(--red-dark); }

.nav-toggle {
    display: none;
    width: 48px;
    height: 48px;
    border: 0;
    border-radius: 12px;
    background: rgba(255, 255, 255, .08);
    color: #fff;
    cursor: pointer;
    position: relative;
    -webkit-tap-highlight-color: transparent;
}
.nav-toggle span {
    position: absolute;
    left: 14px;
    width: 20px;
    height: 2px;
    background: currentColor;
    border-radius: 2px;
    transition: transform .3s ease, opacity .2s ease, top .3s ease;
}
.nav-toggle span:nth-child(1) { top: 17px; }
.nav-toggle span:nth-child(2) { top: 23px; }
.nav-toggle span:nth-child(3) { top: 29px; }
.menu-open .nav-toggle span:nth-child(1) { top: 23px; transform: rotate(45deg); }
.menu-open .nav-toggle span:nth-child(2) { opacity: 0; }
.menu-open .nav-toggle span:nth-child(3) { top: 23px; transform: rotate(-45deg); }

/* ===== Hero ===== */

.hero {
    position: relative;
    min-height: 100vh;
    min-height: 100svh;
    display: flex;
    align-items: flex-end;
    padding: calc(var(--header-h) + 40px) 0 72px;
    isolation: isolate;
    overflow: hidden;
}
.hero-bg {
    position: absolute;
    inset: 0;
    z-index: -2;
    background: url(../img/sport.jpg) center 40% / cover no-repeat;
    transform: scale(1.06);
    animation: heroZoom 14s ease-out forwards;
}
.hero::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background:
        radial-gradient(ellipse at 70% 30%, rgba(255, 5, 16, .18), transparent 55%),
        linear-gradient(180deg, rgba(13, 13, 15, .35) 0%, rgba(13, 13, 15, .25) 40%, rgba(13, 13, 15, .92) 88%, var(--ink) 100%);
}
@keyframes heroZoom { to { transform: scale(1); } }

.hero-content { max-width: 820px; }
.hero-content .eyebrow { display: flex; width: max-content; max-width: 100%; }

.status-pill {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 8px 16px 8px 12px;
    border-radius: 999px;
    background: rgba(13, 13, 15, .55);
    border: 1px solid var(--line);
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
    font-size: 14px;
    font-weight: 500;
    color: #e4e4e7;
    margin-bottom: 24px;
}
.status-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--muted);
    position: relative;
}
.is-open .status-dot { background: var(--green); }
.is-open .status-dot::after {
    content: "";
    position: absolute;
    inset: -4px;
    border-radius: 50%;
    border: 2px solid var(--green);
    opacity: 0;
    animation: pulse 2s ease-out infinite;
}
.is-closed .status-dot { background: var(--red); }
@keyframes pulse {
    0% { transform: scale(.6); opacity: .9; }
    100% { transform: scale(1.6); opacity: 0; }
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 2.5px;
    color: var(--red);
    margin-bottom: 14px;
}
.eyebrow::before {
    content: "";
    width: 28px;
    height: 2px;
    background: currentColor;
}

.hero h1 {
    font-family: var(--font-display);
    font-weight: 800;
    font-style: italic;
    text-transform: uppercase;
    font-size: clamp(48px, 11vw, 112px);
    line-height: .92;
    letter-spacing: -.5px;
    margin-bottom: 22px;
    text-shadow: 0 4px 30px rgba(0, 0, 0, .4);
}
.hero h1 .r { color: var(--red); }

.hero-lead {
    font-size: clamp(17px, 2.2vw, 21px);
    color: #d4d4d8;
    max-width: 560px;
    margin-bottom: 32px;
}

.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; }

.scroll-hint {
    position: absolute;
    right: 28px;
    bottom: 32px;
    width: 26px;
    height: 42px;
    border: 2px solid rgba(255, 255, 255, .4);
    border-radius: 14px;
}
.scroll-hint::before {
    content: "";
    position: absolute;
    left: 50%;
    top: 8px;
    width: 4px;
    height: 8px;
    margin-left: -2px;
    background: #fff;
    border-radius: 2px;
    animation: scrollHint 1.8s ease-in-out infinite;
}
@keyframes scrollHint {
    0% { transform: translateY(0); opacity: 1; }
    100% { transform: translateY(14px); opacity: 0; }
}

/* ===== Sections ===== */

.section { padding: 110px 0; position: relative; }

.section-head { max-width: 680px; margin-bottom: 48px; }
.section-head h2 {
    font-family: var(--font-display);
    font-weight: 800;
    text-transform: uppercase;
    font-size: clamp(38px, 6vw, 64px);
    line-height: .95;
    margin-bottom: 16px;
}
.section-head p { color: var(--muted); font-size: 18px; }

/* ===== Reparti ===== */

.reparti-grid {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: 20px;
}

.card {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    min-height: 420px;
    padding: 28px;
    border-radius: var(--radius);
    overflow: hidden;
    isolation: isolate;
    background: var(--ink-3);
    border: 1px solid var(--line);
    box-shadow: var(--shadow);
    scroll-margin-top: calc(var(--header-h) + 20px);
}
.card:nth-child(1) { grid-column: span 7; }
.card:nth-child(2) { grid-column: span 5; }
.card:nth-child(3) { grid-column: span 5; }
.card:nth-child(4) { grid-column: span 7; }

.card-img {
    position: absolute;
    inset: 0;
    z-index: -2;
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: brightness(1.35) saturate(1.1);
    transition: transform .8s cubic-bezier(.2, .7, .2, 1);
}
.card::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background: linear-gradient(180deg, rgba(13, 13, 15, 0) 25%, rgba(13, 13, 15, .6) 55%, rgba(13, 13, 15, .96) 100%);
}
.card:hover .card-img { transform: scale(1.06); }

.card-num {
    position: absolute;
    top: 22px;
    left: 28px;
    font-family: var(--font-display);
    font-weight: 800;
    font-style: italic;
    font-size: 18px;
    color: #fff;
    background: var(--red);
    padding: 4px 12px;
    border-radius: 8px;
}

.card h3 {
    font-family: var(--font-display);
    font-weight: 800;
    font-style: italic;
    text-transform: uppercase;
    font-size: clamp(34px, 4vw, 48px);
    margin-bottom: 10px;
}
.card p { color: #d4d4d8; max-width: 420px; margin-bottom: 20px; }

.card-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    align-self: flex-start;
    font-weight: 600;
    color: #fff;
    padding: 12px 18px;
    border-radius: 999px;
    background: rgba(255, 255, 255, .1);
    border: 1px solid rgba(255, 255, 255, .2);
    -webkit-backdrop-filter: blur(6px);
    backdrop-filter: blur(6px);
    transition: background-color .2s, border-color .2s, gap .2s;
}
.card-link svg { width: 18px; height: 18px; }
.card-link:hover { background: var(--red); border-color: var(--red); gap: 12px; }

/* ===== Contatti (sezione chiara) ===== */

.section-light {
    background: var(--light);
    color: var(--light-text);
    border-radius: 32px 32px 0 0;
}
.section-light .section-head p { color: var(--light-muted); }

.contact-layout {
    display: grid;
    grid-template-columns: 1fr 1.15fr;
    gap: 24px;
    align-items: start;
}

.contact-list { display: grid; gap: 14px; }

.contact-item {
    display: flex;
    align-items: center;
    gap: 18px;
    padding: 20px 22px;
    background: #fff;
    border-radius: var(--radius);
    border: 1px solid #e7e7ea;
    transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
a.contact-item:hover {
    transform: translateY(-3px);
    border-color: rgba(255, 5, 16, .35);
    box-shadow: 0 16px 40px -20px rgba(255, 5, 16, .45);
}

.contact-icon {
    display: grid;
    place-items: center;
    width: 52px;
    height: 52px;
    border-radius: 14px;
    background: rgba(255, 5, 16, .09);
    color: var(--red);
    flex-shrink: 0;
}
.contact-icon svg { width: 24px; height: 24px; }

.contact-label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1.6px;
    color: var(--light-muted);
    margin-bottom: 2px;
}
.contact-value {
    display: block;
    font-weight: 600;
    font-size: 18px;
    line-height: 1.35;
    word-break: break-word;
}
.contact-arrow { margin-left: auto; color: #b4b4bc; width: 20px; height: 20px; }

.hours-card {
    background: var(--ink);
    color: var(--text);
    border-radius: var(--radius);
    padding: 30px;
    box-shadow: var(--shadow);
}
.hours-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 18px;
}
.hours-top h3 {
    font-family: var(--font-display);
    font-weight: 800;
    font-style: italic;
    text-transform: uppercase;
    font-size: 32px;
}
.hours-card .status-pill { margin: 0; background: var(--ink-3); }

.hours-table { width: 100%; border-collapse: collapse; font-size: 15px; }
.hours-table th,
.hours-table td {
    padding: 13px 10px;
    border-bottom: 1px solid var(--line);
    text-align: left;
    font-weight: 400;
    font-variant-numeric: tabular-nums;
}
.hours-table th { font-weight: 600; width: 32%; }
.hours-table td { white-space: nowrap; }
.hours-table thead th {
    padding-top: 0;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1.4px;
    color: var(--muted);
    width: auto;
}
.hours-table tr:last-child th,
.hours-table tr:last-child td { border-bottom: 0; }
.hours-table td { color: #d4d4d8; }
.hours-table .closed { color: var(--muted); font-style: italic; }
.hours-table tr.is-today th,
.hours-table tr.is-today td { color: #fff; background: rgba(255, 5, 16, .14); }
.hours-table tr.is-today th { border-radius: 10px 0 0 10px; position: relative; }
.hours-table tr.is-today td:last-child { border-radius: 0 10px 10px 0; }
.today-tag {
    display: inline-block;
    margin-left: 6px;
    padding: 1px 8px;
    border-radius: 6px;
    background: var(--red);
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    vertical-align: 2px;
}
.hours-note { margin-top: 16px; font-size: 14px; color: var(--muted); }

/* ===== Map ===== */

.map-wrap {
    background: var(--light);
    padding: 0 0 110px;
}
.map-frame {
    position: relative;
    border-radius: var(--radius);
    overflow: hidden;
    border: 1px solid #e7e7ea;
    background: #e5e5e8;
    aspect-ratio: 16 / 7;
}
.map-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.map-overlay-btn {
    position: absolute;
    left: 16px;
    bottom: 16px;
    z-index: 2;
}

/* ===== Footer ===== */

.site-footer {
    background: var(--ink);
    padding: 56px 0 40px;
    color: var(--muted);
    font-size: 14px;
}
.footer-grid {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}
.footer-grid p { max-width: 520px; }
.footer-links { display: flex; flex-wrap: wrap; gap: 8px 22px; }
.footer-links a { color: #d4d4d8; transition: color .2s; }
.footer-links a:hover { color: var(--red); }
.footer-bottom {
    margin-top: 32px;
    padding-top: 24px;
    border-top: 1px solid var(--line);
    font-size: 13px;
}

/* ===== Barra azioni mobile ===== */

.action-bar { display: none; }

/* ===== Reveal on scroll ===== */

.reveal {
    opacity: 0;
    transform: translateY(28px);
    transition: opacity .8s ease, transform .8s cubic-bezier(.2, .7, .2, 1);
}
.reveal.is-visible { opacity: 1; transform: none; }
.no-js .reveal { opacity: 1; transform: none; }

/* ===== Responsive ===== */

@media (max-width: 960px) {
    .card:nth-child(n) { grid-column: span 6; }
    .contact-layout { grid-template-columns: 1fr; }
    .map-frame { aspect-ratio: 4 / 3; }
}

@media (max-width: 860px) {
    :root { --header-h: 64px; }

    .nav-toggle { display: block; }

    .nav-links {
        position: fixed;
        inset: var(--header-h) 0 0 0;
        flex-direction: column;
        align-items: stretch;
        gap: 4px;
        padding: 24px 20px calc(24px + env(safe-area-inset-bottom));
        background: rgba(13, 13, 15, .97);
        -webkit-backdrop-filter: blur(14px);
        backdrop-filter: blur(14px);
        opacity: 0;
        visibility: hidden;
        transform: translateY(-10px);
        transition: opacity .25s ease, transform .25s ease, visibility .25s;
        overflow-y: auto;
    }
    .menu-open .nav-links { opacity: 1; visibility: visible; transform: none; }
    .nav-links a {
        font-family: var(--font-display);
        font-weight: 800;
        font-style: italic;
        text-transform: uppercase;
        font-size: 34px;
        padding: 14px 8px;
        border-radius: 0;
        border-bottom: 1px solid var(--line);
    }
    .nav-links a:hover,
    .nav-links a.is-active { background: none; color: var(--red); }
    .nav-links .nav-cta a {
        margin: 20px 0 0;
        text-align: center;
        border-radius: 999px;
        border: 0;
        font-size: 24px;
    }
    body.menu-locked { overflow: hidden; }
}

@media (max-width: 640px) {
    :root { --bar-h: calc(68px + env(safe-area-inset-bottom)); }

    .container { padding: 0 16px; }
    .brand { font-size: 24px; }

    .hero { padding-bottom: 48px; }
    .hero-bg { background-position: 52% 40%; }
    .hero-actions .btn { flex: 1 1 100%; }
    .scroll-hint { display: none; }

    .section { padding: 72px 0; }
    .section-head { margin-bottom: 32px; }
    .section-head p { font-size: 16px; }

    .reparti-grid { gap: 14px; }
    .card:nth-child(n) { grid-column: 1 / -1; }
    .card { min-height: 340px; padding: 22px; }
    .card-num { left: 22px; top: 18px; }

    .section-light { border-radius: 24px 24px 0 0; }
    .contact-item { padding: 16px; gap: 14px; }
    .contact-icon { width: 46px; height: 46px; }
    .contact-value { font-size: 16px; }

    .hours-card { padding: 22px 16px; }
    .hours-top h3 { font-size: 28px; }
    .hours-table { font-size: 14px; }
    .hours-table th,
    .hours-table td { padding: 12px 8px; }
    .hours-table th { width: auto; }
    .hours-table th,
    .hours-table td { padding: 12px 6px; }
    .hours-table thead th { letter-spacing: .8px; font-size: 11px; }
    .today-tag { display: none; }

    /* il banner cookie resta sopra la barra azioni */
    #cookie-bar { bottom: var(--bar-h) !important; }

    .map-wrap { padding-bottom: 72px; }
    .map-frame { aspect-ratio: 1 / 1; }

    .footer-grid { flex-direction: column; align-items: flex-start; }

    .action-bar {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        position: fixed;
        inset: auto 0 0 0;
        z-index: 90;
        height: var(--bar-h);
        padding: 8px 10px env(safe-area-inset-bottom);
        gap: 8px;
        background: rgba(13, 13, 15, .92);
        -webkit-backdrop-filter: saturate(160%) blur(14px);
        backdrop-filter: saturate(160%) blur(14px);
        border-top: 1px solid var(--line);
    }
    .action-bar a {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 3px;
        height: 52px;
        border-radius: 14px;
        font-size: 12px;
        font-weight: 600;
        color: #e4e4e7;
        -webkit-tap-highlight-color: transparent;
        transition: background-color .2s;
    }
    .action-bar a:active { background: rgba(255, 255, 255, .08); }
    .action-bar a.primary { background: var(--red); color: #fff; }
    .action-bar svg { width: 22px; height: 22px; }
}

@media (max-width: 380px) {
    .hero h1 { font-size: 44px; }
    .hours-table { font-size: 13px; }
    .hours-table th,
    .hours-table td { padding: 11px 4px; }
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *,
    *::before,
    *::after {
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: .01ms !important;
    }
    .reveal { opacity: 1; transform: none; }
}
