/* =========================================================
   TRAP SIDE NYC - minimal
   ========================================================= */

:root {
    --bg: #0a0a0a;
    --surface: #111111;
    --text: #f5f5f5;
    --dim: rgba(245, 245, 245, 0.64);
    --mute: rgba(245, 245, 245, 0.4);
    --line: rgba(255, 255, 255, 0.1);

    --f-head: 'Mersad', 'Geist', 'Segoe UI', sans-serif;
    --f-body: 'Geist', 'Segoe UI', sans-serif;

    --wrap: 1200px;
    --gutter: clamp(16px, 4vw, 32px);
    --radius: 14px;
    --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

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

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
    margin: 0;
    font-family: var(--f-body);
    font-size: 16px;
    line-height: 1.6;
    color: var(--text);
    background: var(--bg);
    overflow-x: hidden;
}

::selection { background: var(--text); color: var(--bg); }

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }

h1, h2, h3 {
    margin: 0;
    font-family: var(--f-head);
    font-weight: 700;
    line-height: 1.1;
    letter-spacing: -0.02em;
}

.wrap {
    width: 100%;
    max-width: var(--wrap);
    margin: 0 auto;
    padding: 0 var(--gutter);
}

/* ---------- Navbar ---------- */
.navbar {
    position: fixed;
    inset: 0 0 auto 0;
    z-index: 100;
    border-bottom: 1px solid transparent;
    transition: background 0.3s, border-color 0.3s;
}

.navbar.scrolled,
.nav-open .navbar {
    background: rgba(10, 10, 10, 0.92);
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
    border-color: var(--line);
}

.nav-inner {
    max-width: var(--wrap);
    margin: 0 auto;
    padding: 0 var(--gutter);
    height: 72px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
}

.brand {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    font-family: var(--f-head);
    font-weight: 700;
    font-size: 1.05rem;
}

.brand img {
    width: 40px;
    height: 40px;
    object-fit: contain;
    filter: invert(1);
}

.nav-links {
    display: flex;
    gap: 2rem;
}

.nav-link {
    font-size: 0.92rem;
    color: var(--dim);
    transition: color 0.2s;
}

.nav-link:hover,
.nav-link.active { color: var(--text); }

.nav-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.nav-toggle {
    display: none;
    width: 40px;
    height: 40px;
    padding: 0;
    background: none;
    border: 1px solid var(--line);
    border-radius: 10px;
    color: var(--text);
    cursor: pointer;
}

.nav-toggle svg { width: 18px; height: 18px; }

.nav-links-mobile {
    display: none;
    flex-direction: column;
    padding: 0.5rem var(--gutter) 1.25rem;
}

.nav-links-mobile .nav-link {
    padding: 0.75rem 0;
    font-size: 1.05rem;
    border-bottom: 1px solid var(--line);
}

.nav-open .nav-links-mobile { display: flex; }

/* ---------- Buttons ---------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.85rem 1.5rem;
    font: 500 0.92rem/1 var(--f-body);
    color: var(--bg);
    background: var(--text);
    border: 1px solid var(--text);
    border-radius: 999px;
    transition: background 0.2s, color 0.2s, border-color 0.2s;
    white-space: nowrap;
    cursor: pointer;
}

.btn:hover { background: #d9d9d9; border-color: #d9d9d9; }

.btn-line {
    color: var(--text);
    background: transparent;
    border-color: rgba(255, 255, 255, 0.3);
}

.btn-line:hover { background: rgba(255, 255, 255, 0.08); border-color: var(--text); }

.btn-sm { padding: 0.6rem 1.1rem; font-size: 0.85rem; }

.btn svg { width: 16px; height: 16px; }

/* ---------- Photo slots ---------- */
.media {
    position: relative;
    overflow: hidden;
    isolation: isolate;
    background: var(--surface);
}

.media-bg {
    position: absolute;
    inset: 0;
    z-index: -2;
    background: url('images/bg.png') no-repeat;
    background-size: var(--fb-size, cover);
    background-position: var(--fb-pos, center);
    filter: grayscale(1);
    transition: transform 0.8s var(--ease);
}

.media.has-img .media-bg {
    background-size: cover;
    background-position: var(--img-pos, center);
}

.media-shade {
    position: absolute;
    inset: 0;
    z-index: -1;
    background: var(--shade, linear-gradient(180deg, rgba(10, 10, 10, 0.2), rgba(10, 10, 10, 0.85)));
}

.slot-hint {
    display: none;
    position: absolute;
    top: 10px;
    left: 10px;
    padding: 0.2rem 0.45rem;
    font-size: 0.65rem;
    background: rgba(0, 0, 0, 0.75);
    border: 1px dashed rgba(255, 255, 255, 0.4);
    color: var(--dim);
}

body.show-slots .media:not(.has-img) > .slot-hint { display: block; }

/* ---------- Common ---------- */
.section { padding: clamp(4rem, 9vw, 7rem) 0; }

.eyebrow {
    display: block;
    margin-bottom: 0.9rem;
    font-size: 0.78rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--mute);
}

.section-head {
    max-width: 560px;
    margin-bottom: 2.75rem;
}

.section-head h2 { font-size: clamp(1.9rem, 4vw, 2.8rem); }

.section-head p { margin: 0.9rem 0 0; color: var(--dim); }

.actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

/* ---------- Hero ---------- */
.hero {
    min-height: 100svh;
    display: flex;
    align-items: flex-end;
    padding: 120px 0 clamp(4rem, 10vh, 7rem);
    --shade: linear-gradient(90deg, rgba(10, 10, 10, 0.88) 0%, rgba(10, 10, 10, 0.45) 60%, rgba(10, 10, 10, 0.25) 100%),
             linear-gradient(180deg, transparent 55%, var(--bg) 100%);
}

.hero-content { max-width: 620px; }

.hero h1 {
    font-size: clamp(3rem, 8vw, 6rem);
    font-weight: 800;
    line-height: 1;
    letter-spacing: -0.03em;
}

.hero p {
    margin: 1.25rem 0 2rem;
    font-size: 1.08rem;
    color: var(--dim);
}

/* ---------- Cards (quick links) ---------- */
.cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.25rem;
}

.card {
    display: flex;
    flex-direction: column;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    overflow: hidden;
    background: var(--surface);
    transition: border-color 0.25s;
}

.card:hover { border-color: rgba(255, 255, 255, 0.28); }

.card-img {
    aspect-ratio: 4 / 3;
    --shade: linear-gradient(180deg, transparent 60%, rgba(17, 17, 17, 0.6));
}

.card:hover .media-bg { transform: scale(1.04); }

.card-body { padding: 1.4rem 1.5rem 1.6rem; }

.card h3 { font-size: 1.3rem; margin-bottom: 0.45rem; }

.card p { margin: 0 0 1.1rem; color: var(--dim); font-size: 0.95rem; }

.card-link {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.9rem;
    font-weight: 500;
}

.card-link svg { width: 15px; height: 15px; transition: transform 0.2s; }
.card:hover .card-link svg { transform: translateX(3px); }

/* ---------- About ---------- */
.about {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: clamp(2rem, 5vw, 4rem);
    align-items: center;
}

.about-img {
    aspect-ratio: 4 / 5;
    border-radius: var(--radius);
    --shade: none;
}

.features {
    display: grid;
    margin-top: 2rem;
    border-top: 1px solid var(--line);
}

.feature {
    display: grid;
    grid-template-columns: 40px 1fr;
    gap: 1rem;
    padding: 1.25rem 0;
    border-bottom: 1px solid var(--line);
}

.feature svg {
    width: 22px;
    height: 22px;
    margin-top: 0.15rem;
    stroke: var(--text);
    fill: none;
    stroke-width: 1.6;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.feature h3 { font-size: 1.08rem; margin-bottom: 0.2rem; }
.feature p { margin: 0; color: var(--dim); font-size: 0.95rem; }

/* ---------- Gallery ---------- */
.gallery {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.75rem;
}

.shot {
    margin: 0;
    aspect-ratio: 4 / 3;
    border-radius: 10px;
    cursor: zoom-in;
    --shade: none;
}

.shot:hover .media-bg { transform: scale(1.04); }

.lightbox {
    position: fixed;
    inset: 0;
    z-index: 200;
    display: grid;
    place-items: center;
    padding: 5vh 5vw;
    background: rgba(0, 0, 0, 0.9);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s;
}

.lightbox.open { opacity: 1; pointer-events: auto; }

.lightbox-img {
    width: min(1100px, 100%);
    aspect-ratio: 16 / 9;
    max-height: 85vh;
    background: center / contain no-repeat;
    filter: grayscale(1);
}

.lightbox-close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 44px;
    height: 44px;
    font-size: 1.2rem;
    color: var(--text);
    background: none;
    border: 1px solid var(--line);
    border-radius: 50%;
    cursor: pointer;
}

/* ---------- CTA ---------- */
.cta {
    padding: clamp(5rem, 12vw, 9rem) 0;
    text-align: center;
    --shade: rgba(10, 10, 10, 0.72);
}

.cta h2 { font-size: clamp(2rem, 5vw, 3.4rem); font-weight: 800; }

.cta p { max-width: 480px; margin: 1rem auto 2rem; color: var(--dim); }

.cta .actions { justify-content: center; }

/* ---------- Footer ---------- */
footer { border-top: 1px solid var(--line); }

.footer-inner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 2rem 0;
}

.footer-links { display: flex; flex-wrap: wrap; gap: 0.5rem 1.5rem; }

.footer-links a { font-size: 0.9rem; color: var(--dim); transition: color 0.2s; }
.footer-links a:hover { color: var(--text); }

.footer-note { font-size: 0.85rem; color: var(--mute); }

/* =========================================================
   REGULAMIN
   ========================================================= */
.page-hero {
    padding: 150px 0 70px;
    --shade: linear-gradient(180deg, rgba(10, 10, 10, 0.55), var(--bg));
}

.page-hero h1 { font-size: clamp(2.6rem, 6vw, 4.5rem); font-weight: 800; letter-spacing: -0.03em; }

.page-hero p { max-width: 560px; margin: 1rem 0 0; color: var(--dim); }

.rules-layout {
    display: grid;
    grid-template-columns: 240px minmax(0, 1fr);
    gap: 4rem;
    align-items: start;
    padding: 3rem 0 6rem;
}

.toc {
    position: sticky;
    top: 96px;
}

.search { position: relative; display: block; margin-bottom: 1.5rem; }

.search input {
    width: 100%;
    padding: 0.75rem 0.9rem 0.75rem 2.4rem;
    font: inherit;
    font-size: 0.9rem;
    color: var(--text);
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 10px;
    outline: none;
    transition: border-color 0.2s;
}

.search input:focus { border-color: rgba(255, 255, 255, 0.4); }

.search svg {
    position: absolute;
    left: 0.8rem;
    top: 50%;
    width: 16px;
    height: 16px;
    transform: translateY(-50%);
    stroke: var(--mute);
    fill: none;
    stroke-width: 2;
}

.toc ol { list-style: none; margin: 0; padding: 0; }

.toc a {
    display: flex;
    gap: 0.7rem;
    padding: 0.4rem 0;
    font-size: 0.9rem;
    color: var(--mute);
    transition: color 0.2s;
}

.toc a span { min-width: 1.4rem; font-variant-numeric: tabular-nums; }
.toc a:hover, .toc a.active { color: var(--text); }

.rule-block {
    padding: 2.25rem 0;
    border-top: 1px solid var(--line);
    scroll-margin-top: 90px;
}

.rule-block:first-child { padding-top: 0; border-top: none; }

.rule-block h2 {
    display: flex;
    align-items: baseline;
    gap: 0.9rem;
    margin-bottom: 1.2rem;
    font-size: clamp(1.4rem, 2.6vw, 1.8rem);
}

.rule-block h2 .num {
    font-size: 0.95rem;
    font-family: var(--f-body);
    font-weight: 500;
    color: var(--mute);
    font-variant-numeric: tabular-nums;
}

.rule-block ol, .rule-block ul { margin: 0; padding-left: 1.3rem; }

.rule-block li {
    margin-bottom: 0.55rem;
    padding-left: 0.3rem;
    color: var(--dim);
}

.rule-block li::marker { color: var(--mute); }
.rule-block li:last-child { margin-bottom: 0; }
.rule-block ol ul { margin: 0.55rem 0 0.7rem; }
.rule-block strong, .rule-block b { color: var(--text); font-weight: 600; }
.rule-block a { text-decoration: underline; text-underline-offset: 3px; }

mark { background: var(--text); color: var(--bg); padding: 0 0.1em; border-radius: 2px; }

.hidden { display: none !important; }

.rules-pending #rules-content, .rules-pending #rules-toc { visibility: hidden; }

.search-empty { display: none; padding: 2rem 0; color: var(--dim); }
.search-empty.show { display: block; }

.limits-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 10px; }

.limits-table { width: 100%; border-collapse: collapse; font-size: 0.95rem; }

.limits-table th, .limits-table td {
    padding: 0.8rem 1rem;
    text-align: left;
    border-bottom: 1px solid var(--line);
}

.limits-table thead th {
    font-size: 0.75rem;
    font-weight: 500;
    letter-spacing: 0.1em;
    color: var(--mute);
}

.limits-table thead th:not(:first-child),
.limits-table tbody td { text-align: center; width: 100px; }

.limits-table tbody th { font-weight: 500; }
.limits-table tbody tr:last-child > * { border-bottom: none; }
.limits-table .lim { font-variant-numeric: tabular-nums; font-weight: 600; }

.limits-note { margin: 0.9rem 0 0; font-size: 0.85rem; color: var(--mute); }

/* ---------- Reveal (subtle fade) ---------- */
.reveal {
    opacity: 0;
    transform: translateY(16px);
    transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}

.reveal.in { opacity: 1; transform: none; }

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
    .nav-links { display: none; }
    .nav-toggle { display: grid; place-items: center; }
    .cards { grid-template-columns: 1fr 1fr; }
    .about { grid-template-columns: 1fr; }
    .about-img { aspect-ratio: 16 / 10; }
    .rules-layout { grid-template-columns: minmax(0, 1fr); gap: 2rem; }
    .toc { position: static; }
    .toc ol { display: flex; flex-wrap: wrap; gap: 0.25rem 1.25rem; }
}

@media (max-width: 640px) {
    .nav-actions .btn { display: none; }
    .cards { grid-template-columns: 1fr; }
    .gallery { grid-template-columns: 1fr 1fr; }
    .hero .actions .btn { flex: 1 1 auto; }

    .limits-table thead { display: none; }
    .limits-table, .limits-table tbody, .limits-table tr { display: block; }
    .limits-wrap { border: none; }
    .limits-table tr {
        display: flex;
        flex-wrap: wrap;
        gap: 0.4rem 1.25rem;
        padding: 0.8rem 0;
        border-bottom: 1px solid var(--line);
    }
    .limits-table tbody th, .limits-table tbody td { padding: 0; border: none; width: auto; }
    .limits-table tbody th { flex: 1 1 100%; }
    .limits-table tbody td::before { content: attr(data-label) ' '; color: var(--mute); font-size: 0.8rem; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { transition: none !important; animation: none !important; }
    .reveal { opacity: 1; transform: none; }
}
