/* Titan Fitness - plain PHP rebuild */

:root {
    --red: #dd3333;
    --red-dark: #b62727;
    --orange: #ff5e1a;
    --ink: #ffffff;
    --muted: #a9a9ad;
    --bg: #17171a;
    --bg-2: #1f1f23;
    --bg-3: #26262b;
    --line: rgba(255, 255, 255, .09);
    --wrap: 1220px;
    --radius: 14px;
    --font-head: "Oswald", "Arial Narrow", sans-serif;
    --font-body: "Roboto", system-ui, sans-serif;
}

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

html { scroll-behavior: smooth; }

body {
    margin: 0;
    background: var(--bg);
    color: var(--ink);
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
}

img, video { max-width: 100%; display: block; }

a { color: inherit; text-decoration: none; }

h1, h2, h3, h4 {
    font-family: var(--font-head);
    font-weight: 700;
    letter-spacing: .01em;
    margin: 0;
    line-height: 1.12;
}

p { margin: 0 0 1rem; }

.wrap {
    width: 100%;
    max-width: var(--wrap);
    margin-inline: auto;
    padding-inline: 20px;
}

.skip-link {
    position: absolute;
    left: -9999px;
    top: 0;
    background: var(--red);
    color: #fff;
    padding: 10px 16px;
    z-index: 200;
}
.skip-link:focus { left: 0; }

/* ---------- Buttons ---------- */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .5rem;
    padding: 14px 30px;
    border: 1px solid transparent;
    border-radius: 999px;
    font-family: var(--font-body);
    font-size: .95rem;
    font-weight: 500;
    cursor: pointer;
    transition: background .25s, color .25s, border-color .25s, transform .25s;
}

.btn--primary { background: var(--red); color: #fff; }
.btn--primary:hover { background: var(--red-dark); transform: translateY(-2px); }

.btn--ghost { border-color: rgba(255, 255, 255, .35); color: #fff; }
.btn--ghost:hover { background: #fff; color: #17171a; transform: translateY(-2px); }

.btn--block { width: 100%; }

/* ---------- Topbar + header ---------- */

.topbar {
    background: var(--bg-3);
    font-size: .86rem;
    color: var(--muted);
}

.topbar__inner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 12px;
    min-height: 46px;
}

.topbar a { transition: color .2s; }
.topbar a:hover { color: var(--red); }
.topbar__ico { color: var(--red); margin-right: 8px; font-size: .7em; vertical-align: middle; }
.topbar__sep { color: var(--red); }

.header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(31, 31, 35, .96);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--line);
}

.header__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    min-height: 84px;
}

.header__logo img { width: 175px; height: auto; }

.nav ul {
    display: flex;
    gap: 34px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.nav a {
    font-family: var(--font-head);
    font-size: .95rem;
    font-weight: 500;
    letter-spacing: .06em;
    color: #e9e9ec;
    position: relative;
    padding-block: 6px;
    transition: color .2s;
}

.nav a::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: 0;
    height: 2px;
    width: 0;
    background: var(--red);
    transition: width .25s;
}

.nav a:hover, .nav a.is-active { color: var(--red); }
.nav a.is-active::after, .nav a:hover::after { width: 100%; }

.header__actions { display: flex; align-items: center; gap: 14px; }

.burger {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: 0;
    padding: 8px;
    cursor: pointer;
}
.burger span { width: 24px; height: 2px; background: #fff; transition: transform .25s, opacity .25s; }
.burger[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.burger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- Hero ---------- */

.hero {
    position: relative;
    height: clamp(520px, 78vh, 760px);
    overflow: hidden;
}

.hero__slide {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    opacity: 0;
    transition: opacity .9s ease;
    pointer-events: none;
}

.hero__slide::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(100deg, rgba(10, 10, 12, .82) 0%, rgba(10, 10, 12, .45) 48%, rgba(10, 10, 12, .12) 100%);
}

.hero__slide.is-active { opacity: 1; pointer-events: auto; }

.hero__inner { position: relative; }

.hero__title {
    max-width: 16ch;
    font-size: clamp(2.4rem, 6vw, 4.6rem);
    text-transform: uppercase;
    color: var(--red);
    text-shadow: 0 6px 30px rgba(0, 0, 0, .55);
    margin-bottom: 28px;
}

.hero__cta { display: flex; flex-wrap: wrap; gap: 14px; }

.hero__dots {
    position: absolute;
    left: 50%;
    bottom: 28px;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
    z-index: 3;
}

.hero__dots button {
    width: 30px;
    height: 4px;
    border: 0;
    border-radius: 4px;
    background: rgba(255, 255, 255, .4);
    cursor: pointer;
    transition: background .25s, width .25s;
}
.hero__dots button.is-active { background: var(--red); width: 46px; }

/* ---------- Page banner ---------- */

.banner {
    position: relative;
    padding: 90px 0;
    background: url("../img/page-banner.jpg") center/cover no-repeat;
}
.banner::before {
    content: "";
    position: absolute;
    inset: 0;
    background: rgba(12, 12, 14, .74);
}
.banner .wrap { position: relative; }
.banner__title {
    font-size: clamp(2rem, 4.5vw, 3.2rem);
    text-transform: uppercase;
}

/* ---------- Sections ---------- */

.section { padding: 96px 0; }
.section--tint { background: var(--bg-2); }

.section__head { max-width: 720px; margin: 0 auto 56px; text-align: center; }
.section__title {
    font-size: clamp(1.9rem, 3.6vw, 3rem);
    text-transform: uppercase;
    margin-bottom: 20px;
}
.section__head .section__title { margin-bottom: 0; }
.section__lead { color: var(--muted); margin-top: 16px; }

.eyebrow {
    font-family: var(--font-head);
    font-size: .85rem;
    font-weight: 500;
    letter-spacing: .22em;
    color: var(--red);
    text-transform: uppercase;
    margin-bottom: 12px;
}

.accent { color: var(--orange); }

/* ---------- Why us ---------- */

.section--why { background: var(--bg-2); }

.why {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 70px;
    align-items: center;
}

.why__media { position: relative; }

.why__media img {
    position: relative;
    border-radius: 50%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    width: 100%;
}

.why__curve {
    position: absolute;
    left: -8%;
    top: -12%;
    width: 118%;
    height: 124%;
    background: url("../img/curve.png") left top/contain no-repeat;
    opacity: .95;
}

.features {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 34px 28px;
    margin-top: 40px;
}

.features--row { grid-template-columns: repeat(4, minmax(0, 1fr)); margin-top: 0; }

.feature__icon {
    display: grid;
    place-items: center;
    width: 68px;
    height: 68px;
    border-radius: var(--radius);
    background: var(--bg-3);
    border: 1px solid var(--line);
    color: var(--red);
    margin-bottom: 18px;
    transition: background .25s, color .25s, transform .25s;
}
.feature__icon svg { width: 32px; height: 32px; }

.feature:hover .feature__icon {
    background: var(--red);
    color: #fff;
    transform: translateY(-4px);
}

.feature__title {
    font-size: 1.35rem;
    text-transform: uppercase;
    margin-bottom: 8px;
}

.feature__desc { color: var(--muted); font-size: .95rem; margin: 0; }

/* ---------- Video ---------- */

.video {
    position: relative;
    display: block;
    width: 100%;
    padding: 0;
    border: 0;
    border-radius: var(--radius);
    overflow: hidden;
    cursor: pointer;
    background: none;
    margin-bottom: 60px;
}

.video img {
    width: 100%;
    aspect-ratio: 16 / 7;
    object-fit: cover;
    transition: transform .6s;
}
.video:hover img { transform: scale(1.04); }

.video::after {
    content: "";
    position: absolute;
    inset: 0;
    background: rgba(10, 10, 12, .35);
}

.video__play {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 92px;
    height: 92px;
    border-radius: 50%;
    background: var(--red);
    z-index: 2;
    display: grid;
    place-items: center;
    box-shadow: 0 0 0 0 rgba(221, 51, 51, .55);
    animation: pulse 2.4s infinite;
}

.video__play::before {
    content: "";
    border-style: solid;
    border-width: 12px 0 12px 20px;
    border-color: transparent transparent transparent #fff;
    margin-left: 5px;
}

@keyframes pulse {
    70%  { box-shadow: 0 0 0 26px rgba(221, 51, 51, 0); }
    100% { box-shadow: 0 0 0 0 rgba(221, 51, 51, 0); }
}

/* ---------- Cards ---------- */

.cards {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 30px;
}

.card {
    background: var(--bg-2);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    overflow: hidden;
    transition: transform .3s, border-color .3s;
}
.card:hover { transform: translateY(-6px); border-color: rgba(221, 51, 51, .6); }

.card__media { overflow: hidden; }
.card__media img {
    width: 100%;
    aspect-ratio: 3 / 2;
    object-fit: cover;
    transition: transform .5s;
}
.card:hover .card__media img { transform: scale(1.06); }

.card__body { padding: 26px 26px 30px; text-align: center; }

.card__title {
    font-size: 1.3rem;
    text-transform: uppercase;
    margin-bottom: 8px;
    transition: color .25s;
}
.card:hover .card__title { color: var(--red); }

.card__desc { color: var(--muted); font-size: .93rem; margin: 0; }

/* ---------- CTA strip ---------- */

.cta {
    background: linear-gradient(120deg, var(--red) 0%, var(--red-dark) 100%);
    padding: 56px 0;
}

.cta__inner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 26px;
}

.cta .eyebrow { color: rgba(255, 255, 255, .8); }
.cta__actions { display: flex; flex-wrap: wrap; gap: 14px; }
.cta .btn--primary { background: #17171a; }
.cta .btn--primary:hover { background: #000; }

/* ---------- About ---------- */

.about {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 70px;
    align-items: center;
}

.about__media img {
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    border-radius: var(--radius);
}

.about__text { color: var(--muted); }

.stats {
    display: flex;
    flex-wrap: wrap;
    gap: 40px;
    margin-top: 34px;
    padding-top: 30px;
    border-top: 1px solid var(--line);
}

.stat strong {
    display: block;
    font-family: var(--font-head);
    font-size: 2.4rem;
    color: var(--red);
    line-height: 1;
}
.stat span { color: var(--muted); font-size: .9rem; }

.gallery {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 22px;
}

.gallery img {
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    border-radius: var(--radius);
    transition: transform .4s, filter .4s;
    filter: grayscale(.25);
}
.gallery img:hover { transform: translateY(-6px); filter: none; }

/* ---------- Plans ---------- */

.plans {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 26px;
}

.plan {
    position: relative;
    display: flex;
    flex-direction: column;
    background: var(--bg-2);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    overflow: hidden;
    transition: transform .3s, border-color .3s;
}
.plan:hover { transform: translateY(-6px); border-color: rgba(221, 51, 51, .6); }

.plan--featured { border-color: var(--red); }

.plan__badge {
    position: absolute;
    top: 14px;
    right: 14px;
    z-index: 2;
    background: var(--red);
    color: #fff;
    font-size: .72rem;
    letter-spacing: .1em;
    text-transform: uppercase;
    padding: 6px 12px;
    border-radius: 999px;
}

.plan__media img {
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
}

.plan__body {
    display: flex;
    flex-direction: column;
    flex: 1;
    padding: 24px 24px 28px;
}

.plan__cat {
    font-size: .74rem;
    letter-spacing: .18em;
    color: var(--red);
    margin-bottom: 6px;
}

.plan__title { font-size: 1.7rem; text-transform: uppercase; }
.plan__period { color: #d5d5d9; font-size: .92rem; margin: 6px 0 10px; }
.plan__note { color: var(--muted); font-size: .9rem; flex: 1; }

/* ---------- Contact ---------- */

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

.contact__list { list-style: none; margin: 30px 0 0; padding: 0; }

.contact__list li {
    display: grid;
    grid-template-columns: 110px 1fr;
    gap: 16px;
    padding: 14px 0;
    border-bottom: 1px solid var(--line);
}
.contact__list span {
    font-family: var(--font-head);
    letter-spacing: .1em;
    text-transform: uppercase;
    font-size: .85rem;
    color: var(--muted);
}
.contact__list a:hover { color: var(--red); }

.contact__form {
    background: var(--bg-2);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 34px;
}

.contact__form label {
    display: block;
    margin-bottom: 18px;
    font-size: .88rem;
    color: var(--muted);
}

.contact__form input,
.contact__form select,
.contact__form textarea {
    width: 100%;
    margin-top: 8px;
    padding: 13px 15px;
    background: var(--bg-3);
    border: 1px solid var(--line);
    border-radius: 10px;
    color: var(--ink);
    font-family: inherit;
    font-size: .95rem;
}

.contact__form input:focus,
.contact__form select:focus,
.contact__form textarea:focus {
    outline: none;
    border-color: var(--red);
}

.contact__form textarea { resize: vertical; }

.contact__form em {
    display: block;
    margin-top: 6px;
    color: #ff8080;
    font-style: normal;
    font-size: .82rem;
}

.alert {
    padding: 14px 18px;
    border-radius: 10px;
    margin-bottom: 22px;
    font-size: .92rem;
}
.alert--ok  { background: rgba(46, 160, 88, .16); border: 1px solid rgba(46, 160, 88, .5); }
.alert--err { background: rgba(221, 51, 51, .16); border: 1px solid rgba(221, 51, 51, .5); }

/* ---------- Footer ---------- */

.footer {
    background: var(--bg-2) url("../img/footer-bg.jpg") center/cover no-repeat;
    border-top: 1px solid var(--line);
}

.footer__grid {
    display: grid;
    grid-template-columns: 1.3fr 1fr 1.2fr 1.2fr;
    gap: 46px;
    padding-block: 80px 60px;
}

.footer__logo { width: 170px; height: auto; margin-bottom: 22px; }
.footer__about { color: var(--muted); font-size: .93rem; }
.footer__follow { font-weight: 700; margin: 26px 0 14px; }

.socials { display: flex; gap: 10px; list-style: none; margin: 0; padding: 0; }
.socials a {
    display: grid;
    place-items: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--bg-3);
    border: 1px solid var(--line);
    transition: background .25s, transform .25s;
}
.socials a:hover { background: var(--red); transform: translateY(-3px); }
.socials svg { width: 18px; height: 18px; }

.footer__title {
    font-size: 1.3rem;
    margin-bottom: 22px;
}

.footer__links, .footer__contact { list-style: none; margin: 0; padding: 0; }
.footer__links li, .footer__contact li { margin-bottom: 12px; }

.footer__links a { color: var(--muted); transition: color .2s, padding-left .2s; }
.footer__links a::before { content: "\00BB"; color: var(--red); margin-right: 10px; }
.footer__links a:hover { color: #fff; padding-left: 4px; }

.footer__lead { color: var(--muted); font-size: .92rem; }
.footer__contact a { color: var(--muted); font-size: .93rem; }
.footer__contact a:hover { color: var(--red); }

.footer__video { width: 100%; border-radius: 10px; }

.footer__bar { border-top: 1px solid var(--line); }
.footer__bar-inner {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 12px;
    padding-block: 22px;
    color: var(--muted);
    font-size: .87rem;
}

/* ---------- Back to top + lightbox ---------- */

.to-top {
    position: fixed;
    right: 26px;
    bottom: 26px;
    z-index: 90;
    display: grid;
    place-items: center;
    width: 46px;
    height: 46px;
    border-radius: 50%;
    background: var(--red);
    color: #fff;
    opacity: 0;
    pointer-events: none;
    transition: opacity .3s, transform .3s;
}
.to-top.is-visible { opacity: 1; pointer-events: auto; }
.to-top:hover { transform: translateY(-4px); }

.lightbox {
    position: fixed;
    inset: 0;
    z-index: 300;
    background: rgba(8, 8, 10, .93);
    display: grid;
    place-items: center;
    padding: 24px;
}
.lightbox[hidden] { display: none; }
.lightbox video { width: min(960px, 100%); border-radius: 10px; }

.lightbox__close {
    position: absolute;
    top: 20px;
    right: 26px;
    background: none;
    border: 0;
    color: #fff;
    font-size: 2.4rem;
    line-height: 1;
    cursor: pointer;
}

/* ---------- Responsive ---------- */

@media (max-width: 1024px) {
    .why, .about, .contact { grid-template-columns: 1fr; gap: 44px; }
    .why__curve { display: none; }
    .plans { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .features--row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .footer__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 860px) {
    .burger { display: flex; }

    .nav {
        position: absolute;
        left: 0;
        right: 0;
        top: 100%;
        background: var(--bg-2);
        border-bottom: 1px solid var(--line);
        display: none;
    }
    .nav.is-open { display: block; }
    .nav ul { flex-direction: column; gap: 0; padding: 12px 20px 20px; }
    .nav li { border-bottom: 1px solid var(--line); }
    .nav a { display: block; padding: 14px 0; }
    .nav a::after { display: none; }

    .header__inner { position: relative; }
    .header__actions .btn { display: none; }

    .section { padding: 68px 0; }
    .cards, .gallery { grid-template-columns: 1fr; }
    .topbar__inner { font-size: .78rem; }
}

@media (max-width: 560px) {
    .plans, .features, .features--row, .footer__grid { grid-template-columns: 1fr; }
    .hero__title { font-size: 2.1rem; }
    .contact__form { padding: 24px; }
    .contact__list li { grid-template-columns: 1fr; gap: 4px; }
}
