/*
 * Digitennis landing page (/): only what this page has on top of the one public stylesheet.
 * /css/public.css (PublicTheme) owns the palette, the type scale, links, focus rings, buttons, the language switch,
 * the brand mark, the eyebrow and the "by Digithrone" footer; this file is linked after it and must not repeat any of
 * that. No JS, no CDN, no url(): the CSP of this page is style-src 'self' and img-src 'self' data:.
 * Mobile first: everything below is the 360px layout, the media queries at the end add columns.
 */

body {
    background:
        radial-gradient(90rem 30rem at 50% -14rem, rgba(0, 93, 164, .12), transparent 70%),
        var(--dt-bg);
}

.container {
    --bs-gutter-x: 2rem;
    max-width: 72rem;
    padding-left: max(1rem, env(safe-area-inset-left));
    padding-right: max(1rem, env(safe-area-inset-right));
}

/* The skip link, in the theme's colours (Bootstrap's visually-hidden-focusable does the hiding). */
.skip-link {
    position: absolute;
    top: .5rem;
    left: .5rem;
    z-index: 1000;
    padding: .5rem 1rem;
    background: var(--dt-surface);
    border: 2px solid var(--dt-blue);
    border-radius: var(--dt-radius-sm);
}

/* ---- Header: brand on the left, the section links as a sideways-scrolling row on a phone. ---- */
.site-header {
    position: relative;
    z-index: 20;
    background: rgba(255, 255, 255, .86);
    -webkit-backdrop-filter: saturate(1.6) blur(14px);
    backdrop-filter: saturate(1.6) blur(14px);
    border-bottom: 1px solid var(--dt-line);
    padding-top: env(safe-area-inset-top);
}

.site-header-inner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0 1rem;
    padding-top: .4rem;
    padding-bottom: .4rem;
}

.site-nav {
    flex: 1 1 100%;
    margin: 0 -1rem;
    overflow-x: auto;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
}

.site-nav::-webkit-scrollbar {
    display: none;
}

.site-nav ul {
    display: flex;
    gap: .35rem;
    width: max-content;
    margin: 0;
    padding: .15rem 1rem .4rem;
    list-style: none;
}

.site-nav a {
    display: inline-flex;
    align-items: center;
    min-height: 40px;
    padding: .35rem .9rem;
    border-radius: var(--dt-pill);
    background: var(--dt-blue-soft);
    color: var(--dt-blue-deep);
    font-size: .93rem;
    font-weight: 650;
    text-decoration: none;
    white-space: nowrap;
}

.site-nav a:hover {
    background: #dbe7f6;
    color: var(--dt-blue-dark);
}

.site-nav a.site-nav-cta {
    background: var(--dt-blue);
    color: #fff;
}

.site-nav a.site-nav-cta:hover {
    background: var(--dt-blue-dark);
}

/* ---- Hero: a full-bleed blue band with the court in white hairlines and the flag as its baseline. ---- */
.landing-hero {
    position: relative;
    overflow: hidden;
    isolation: isolate;
    padding: 2.25rem 0 2.75rem;
    color: #fff;
    background:
        radial-gradient(60% 80% at 100% 0%, rgba(255, 255, 255, .14), transparent 60%),
        linear-gradient(135deg, var(--dt-blue-bright) 0%, var(--dt-blue) 40%, var(--dt-blue-deep) 100%);
}

.landing-hero::before {
    content: "";
    position: absolute;
    z-index: -1;
    top: -30%;
    bottom: -30%;
    left: 45%;
    width: 85%;
    border: 2px solid rgba(255, 255, 255, .14);
    border-radius: 6px;
    background:
        linear-gradient(90deg, transparent calc(50% - 1px), rgba(255, 255, 255, .18) calc(50% - 1px) calc(50% + 1px), transparent calc(50% + 1px)),
        linear-gradient(0deg, transparent calc(28% - 1px), rgba(255, 255, 255, .1) calc(28% - 1px) calc(28% + 1px), transparent calc(28% + 1px)),
        linear-gradient(0deg, transparent calc(72% - 1px), rgba(255, 255, 255, .1) calc(72% - 1px) calc(72% + 1px), transparent calc(72% + 1px));
    transform: rotate(-14deg);
    pointer-events: none;
}

.landing-hero::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 6px;
    background: var(--dt-flag);
}

.landing-hero h1 {
    max-width: 18ch;
    font-size: clamp(2rem, 8.4vw, 3.4rem);
    font-weight: 800;
    letter-spacing: -.035em;
    line-height: 1.05;
}

.landing-lead {
    max-width: 44ch;
    margin: 1rem 0 1.5rem;
    color: rgba(255, 255, 255, .9);
    font-size: 1.08rem;
}

/* The language switch on blue: a translucent track, the current language a white chip. */
.landing-hero .lang-switch {
    margin-bottom: 1rem;
}

.landing-hero .lang-switch ul {
    background: rgba(255, 255, 255, .14);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .2);
}

.landing-hero .lang-switch .nav-link {
    color: #fff;
}

.landing-hero .lang-switch .nav-link:hover {
    color: #fff;
    background: rgba(255, 255, 255, .16);
}

.landing-hero .lang-switch .nav-link.active,
.landing-hero .lang-switch .nav-link[aria-current] {
    background: #fff;
    color: var(--dt-blue-deep);
}

.landing-hero :focus-visible {
    outline-color: #fff;
}

.landing-cta {
    display: flex;
    flex-direction: column;
    gap: .65rem;
    margin: 0 0 1.25rem;
}

.landing-cta .btn {
    white-space: normal;
}

.btn-light {
    --bs-btn-color: var(--dt-blue-deep);
    --bs-btn-bg: #fff;
    --bs-btn-border-color: #fff;
    --bs-btn-hover-color: var(--dt-blue-dark);
    --bs-btn-hover-bg: #eef4fb;
    --bs-btn-hover-border-color: #eef4fb;
    --bs-btn-active-bg: #e2ecf8;
    box-shadow: 0 14px 30px -14px rgba(0, 0, 0, .55);
}

.btn-ghost {
    --bs-btn-color: #fff;
    --bs-btn-bg: rgba(255, 255, 255, .08);
    --bs-btn-border-color: rgba(255, 255, 255, .55);
    --bs-btn-hover-color: #fff;
    --bs-btn-hover-bg: rgba(255, 255, 255, .18);
    --bs-btn-hover-border-color: #fff;
    --bs-btn-active-color: #fff;
    --bs-btn-active-bg: rgba(255, 255, 255, .24);
}

.landing-it {
    max-width: 52ch;
    margin: 0;
    color: rgba(255, 255, 255, .82);
    font-size: .93rem;
}

/* The chat sketch: hidden on phones (the page is long enough), a floating card from 60rem. */
.landing-visual {
    display: none;
}

.chat {
    width: 100%;
    max-width: 22rem;
    margin-left: auto;
    padding: 1rem;
    background: rgba(255, 255, 255, .97);
    color: var(--dt-ink);
    border-radius: var(--dt-radius-lg);
    box-shadow: 0 30px 60px -24px rgba(0, 0, 0, .55);
    transform: rotate(2deg);
}

.chat-head {
    display: flex;
    align-items: center;
    gap: .6rem;
    padding: 0 0 .8rem;
    margin-bottom: .8rem;
    border-bottom: 1px solid var(--dt-line);
}

.chat-head img {
    border-radius: 10px;
}

.chat-head span {
    display: grid;
    line-height: 1.2;
}

.chat-head small {
    color: var(--dt-muted);
}

.bubble {
    width: fit-content;
    max-width: 85%;
    margin: 0 0 .5rem;
    padding: .5rem .8rem;
    border-radius: 16px;
    font-size: .92rem;
    line-height: 1.4;
}

.bubble-in {
    background: #eef2f7;
    border-bottom-left-radius: 4px;
}

.bubble-out {
    margin-left: auto;
    background: #d9fdd3;
    border-bottom-right-radius: 4px;
    font-weight: 600;
}

.chat-status {
    display: flex;
    align-items: center;
    gap: .5rem;
    margin: .8rem 0 0;
    color: var(--dt-muted);
    font-size: .85rem;
    font-weight: 600;
}

.chat-status .dot {
    width: .6rem;
    height: .6rem;
    border-radius: 50%;
    background: var(--dt-wa);
    box-shadow: 0 0 0 4px rgba(15, 115, 104, .15);
}

/* ---- Sections ---- */
.landing-section {
    padding: 2.75rem 0 0;
}

.section-kicker {
    margin: 0 0 .35rem;
    color: var(--dt-red-text);
    font-size: .78rem;
    font-weight: 750;
    letter-spacing: .1em;
    text-transform: uppercase;
}

.section-title {
    margin: 0 0 1.25rem;
    font-size: var(--dt-size-h2);
}

.section-title-it {
    color: var(--dt-muted);
    font-size: .6em;
    font-weight: 600;
    letter-spacing: 0;
}

.panel {
    padding: 1.35rem 1.25rem;
    background: var(--dt-surface);
    border: 1px solid var(--dt-line);
    border-radius: var(--dt-radius-lg);
    box-shadow: var(--dt-shadow);
}

.panel .section-title {
    margin-bottom: .75rem;
}

/* How it works: numbered cards, one column on a phone. */
.steps {
    display: grid;
    gap: 1rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.step {
    position: relative;
    padding: 1.35rem 1.25rem;
    background: var(--dt-surface);
    border: 1px solid var(--dt-line);
    border-radius: var(--dt-radius-lg);
    box-shadow: var(--dt-shadow);
}

.step h3 {
    margin: .9rem 0 .4rem;
    font-size: var(--dt-size-h3);
}

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

.step-no {
    display: grid;
    place-items: center;
    width: 2.6rem;
    height: 2.6rem;
    border-radius: 14px;
    background: linear-gradient(135deg, var(--dt-blue-bright), var(--dt-blue-deep));
    color: #fff;
    font-weight: 800;
    font-size: 1.1rem;
    box-shadow: 0 8px 18px -8px rgba(0, 61, 165, .6);
}

.step-soon .step-no {
    background: var(--dt-blue-soft);
    color: var(--dt-blue-deep);
    box-shadow: none;
}

/* For organisers: text and a checklist, side by side from 48rem. */
.panel-split {
    display: grid;
    gap: 1.25rem;
}

.panel-split p {
    color: var(--dt-muted);
}

.checklist {
    display: grid;
    gap: .6rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.checklist li {
    position: relative;
    padding: .75rem .9rem .75rem 2.9rem;
    background: var(--dt-bg);
    border-radius: var(--dt-radius-sm);
    font-weight: 600;
}

.checklist li::before {
    content: "";
    position: absolute;
    left: .9rem;
    top: 50%;
    width: 1.35rem;
    height: 1.35rem;
    margin-top: -.675rem;
    border-radius: 50%;
    background: var(--dt-blue);
}

.checklist li::after {
    content: "";
    position: absolute;
    left: 1.27rem;
    top: 50%;
    width: .6rem;
    height: .33rem;
    margin-top: -.25rem;
    border: solid #fff;
    border-width: 0 0 2px 2px;
    transform: rotate(-45deg);
}

/* Open registrations. */
.open-list {
    display: grid;
    gap: 1rem;
    margin: 0 0 1rem;
    padding: 0;
    list-style: none;
}

.open-card {
    position: relative;
    overflow: hidden;
    padding: 1.25rem;
    background: var(--dt-surface);
    border: 1px solid var(--dt-line);
    border-radius: var(--dt-radius-lg);
    box-shadow: var(--dt-shadow);
}

.open-card::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 5px;
    background: linear-gradient(180deg, var(--dt-blue) 0 70%, var(--dt-red) 70%);
}

.open-card-head {
    display: flex;
    align-items: center;
    gap: .9rem;
    margin-bottom: 1rem;
}

.open-card-head h3 {
    margin: 0;
    font-size: 1.15rem;
    overflow-wrap: anywhere;
}

.open-card-logo {
    flex: 0 0 auto;
    width: 56px;
    height: 56px;
    object-fit: contain;
    padding: .25rem;
    border: 1px solid var(--dt-line);
    border-radius: var(--dt-radius-sm);
}

.open-card-ball {
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    width: 56px;
    height: 56px;
    border-radius: var(--dt-radius-sm);
    background: var(--dt-blue-soft);
    font-size: 1.6rem;
}

.open-card-actions {
    display: flex;
    flex-direction: column;
    gap: .6rem;
    margin: 0;
}

.open-more {
    margin: 0;
    font-weight: 600;
}

/* Italian: a soft blue panel. */
.panel-it {
    background: linear-gradient(135deg, #fff 0%, var(--dt-blue-soft) 100%);
}

.panel-it p {
    max-width: 70ch;
}

/* FAQ: native details/summary as an accordion. */
.faq {
    display: grid;
    gap: .65rem;
    max-width: 52rem;
}

.faq-item {
    background: var(--dt-surface);
    border: 1px solid var(--dt-line);
    border-radius: var(--dt-radius);
    box-shadow: var(--dt-shadow);
}

.faq-item summary {
    position: relative;
    display: flex;
    align-items: center;
    min-height: 3.5rem;
    padding: .85rem 3.25rem .85rem 1.15rem;
    cursor: pointer;
    list-style: none;
    border-radius: var(--dt-radius);
}

.faq-item summary::-webkit-details-marker {
    display: none;
}

.faq-item summary h3 {
    margin: 0;
    font-size: 1.02rem;
    font-weight: 700;
    letter-spacing: -.01em;
}

/* A plus that turns into a minus. */
.faq-item summary::before,
.faq-item summary::after {
    content: "";
    position: absolute;
    right: 1.25rem;
    top: 50%;
    width: .9rem;
    height: 2px;
    margin-top: -1px;
    background: var(--dt-blue);
    border-radius: 2px;
    transition: transform .2s ease;
}

.faq-item summary::after {
    transform: rotate(90deg);
}

.faq-item[open] summary::after {
    transform: rotate(0deg);
}

.faq-item p {
    margin: 0;
    padding: 0 1.15rem 1.1rem;
    color: var(--dt-muted);
}

/* The footer is the shared .dt-footer (PublicTheme): a content-width dark band. This page is not
   body.dt-body, so a side gutter keeps the band off the viewport edge. */
.dt-footer {
    width: calc(100% - 2rem);
    margin-top: 3.5rem;
}

.dt-footer a:focus-visible {
    outline-color: #f2f4f7;
}

.badge {
    border-radius: var(--dt-pill);
    font-size: .7rem;
    letter-spacing: .03em;
    vertical-align: middle;
}

/* ---- Larger screens ---- */
@media (min-width: 36rem) {
    .landing-cta,
    .open-card-actions {
        flex-direction: row;
        flex-wrap: wrap;
    }
}

@media (min-width: 48rem) {
    .site-header {
        position: sticky;
        top: 0;
    }

    .site-header-inner {
        flex-wrap: nowrap;
        min-height: 4rem;
    }

    .site-nav {
        flex: 0 1 auto;
        margin: 0;
        overflow: visible;
    }

    .site-nav ul {
        padding: 0;
    }

    .site-nav a {
        background: transparent;
    }

    .landing-hero {
        padding: 4rem 0 4.5rem;
    }

    .landing-section {
        padding-top: 4rem;
    }

    .steps {
        grid-template-columns: repeat(3, 1fr);
    }

    .panel,
    .open-card {
        padding: 2rem;
    }

    .panel-split {
        grid-template-columns: 1.1fr 1fr;
        align-items: center;
        gap: 2.5rem;
    }

    .open-list {
        grid-template-columns: repeat(auto-fill, minmax(22rem, 1fr));
    }
}

@media (min-width: 60rem) {
    .landing-hero-grid {
        display: grid;
        grid-template-columns: 1.35fr 1fr;
        align-items: center;
        gap: 3rem;
    }

    .landing-visual {
        display: block;
    }
}

@media (forced-colors: active) {
    .landing-hero::before,
    .landing-hero::after,
    .open-card::before,
    .checklist li::before,
    .checklist li::after {
        display: none;
    }

    .step,
    .panel,
    .open-card,
    .faq-item,
    .chat {
        border: 1px solid CanvasText;
    }
}
