/* ============================================================
   PortfolioBot — luxury editorial theme
   ============================================================ */

:root {
    --bg: #0a0806;
    --bg-2: #110d09;
    --line: #1e1810;
    --text: #e8ddd0;
    --muted: #9b8a76;
    --dim: #6a5a4a;
    --gold: #c8b89a;
    --gold-soft: rgba(200, 184, 154, 0.16);
    --gold-hover: #d8c8aa;

    --serif: "Cormorant Garamond", "Times New Roman", serif;
    --sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

    --container: 1180px;
    --radius: 2px;
    --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
}

* {
    box-sizing: border-box;
}

html, body {
    margin: 0;
    padding: 0;
    background: var(--bg);
    color: var(--text);
    font-family: var(--sans);
    font-weight: 300;
    font-size: 16px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

a {
    color: inherit;
    text-decoration: none;
    transition: color 0.25s var(--ease);
}

a:hover {
    color: var(--gold-hover);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

h1, h2, h3 {
    font-family: var(--serif);
    font-weight: 400;
    letter-spacing: 0.01em;
    margin: 0 0 0.5em;
    line-height: 1.1;
}

.eyebrow,
.hero__eyebrow {
    text-transform: uppercase;
    letter-spacing: 0.35em;
    font-size: 11px;
    color: var(--muted);
    margin: 0 0 1em;
    font-family: var(--sans);
    font-weight: 400;
}

/* ---------- Navigation ---------- */

.nav {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(10, 8, 6, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--line);
}

.nav__inner {
    max-width: var(--container);
    margin: 0 auto;
    padding: 18px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.nav__brand {
    display: flex;
    align-items: baseline;
    gap: 10px;
    font-family: var(--serif);
}

.nav__brand--logo {
    align-items: center;
}

.logo-mark {
    flex: none;
    display: block;
}

.nav__name {
    font-size: 20px;
    font-style: italic;
    letter-spacing: 0.02em;
}

.nav__sep {
    color: var(--dim);
}

.nav__slug {
    color: var(--muted);
    font-size: 13px;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    font-family: var(--sans);
}

.nav__links {
    display: flex;
    gap: 28px;
    align-items: center;
    font-size: 13px;
    letter-spacing: 0.18em;
    text-transform: uppercase;
}

.nav__cta {
    border: 1px solid var(--gold);
    padding: 8px 18px;
    color: var(--gold);
}

.nav__cta:hover {
    background: var(--gold);
    color: var(--bg);
}

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

.btn {
    display: inline-block;
    padding: 14px 32px;
    font-size: 12px;
    letter-spacing: 0.3em;
    text-transform: uppercase;
    border: 1px solid var(--gold);
    color: var(--gold);
    background: transparent;
    cursor: pointer;
    transition: all 0.3s var(--ease);
    font-family: var(--sans);
    font-weight: 400;
}

.btn--gold:hover {
    background: var(--gold);
    color: var(--bg);
    letter-spacing: 0.35em;
}

/* ---------- Reveal ---------- */

.reveal {
    opacity: 0;
    transform: translateY(28px);
    transition: opacity 0.9s var(--ease), transform 0.9s var(--ease);
}

.reveal.is-visible {
    opacity: 1;
    transform: none;
}

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

.hero {
    max-width: var(--container);
    margin: 0 auto;
    padding: 80px 24px 60px;
}

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

.hero__photo {
    aspect-ratio: 3 / 4;
    background: var(--bg-2);
    overflow: hidden;
    position: relative;
}

.hero__photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 1.2s var(--ease);
}

.hero__photo:hover img {
    transform: scale(1.03);
}

.hero__placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--dim);
    font-family: var(--serif);
    font-style: italic;
}

.hero__name {
    font-size: clamp(48px, 7vw, 88px);
    font-style: italic;
    font-weight: 300;
    margin: 0 0 12px;
    color: var(--text);
}

.hero__sub {
    color: var(--muted);
    letter-spacing: 0.25em;
    text-transform: uppercase;
    font-size: 13px;
    margin: 0 0 36px;
}

.hero__about {
    font-size: 17px;
    color: var(--text);
    margin: 0 0 36px;
    max-width: 480px;
}

.hero__params {
    list-style: none;
    padding: 0;
    margin: 0 0 40px;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0;
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
}

.hero__params li {
    padding: 18px 12px;
    text-align: center;
    border-right: 1px solid var(--line);
}

.hero__params li:last-child {
    border-right: none;
}

.hero__params span {
    display: block;
    text-transform: uppercase;
    font-size: 10px;
    letter-spacing: 0.25em;
    color: var(--muted);
    margin-bottom: 6px;
}

.hero__params b {
    display: block;
    font-family: var(--serif);
    font-size: 24px;
    font-weight: 400;
    color: var(--gold);
}

/* ---------- Section heads ---------- */

.section__head {
    text-align: center;
    margin: 0 0 48px;
}

.section__head h2 {
    font-size: clamp(36px, 5vw, 56px);
    font-style: italic;
    font-weight: 300;
}

/* ---------- Gallery ---------- */

.gallery {
    max-width: var(--container);
    margin: 0 auto;
    padding: 80px 24px;
}

.filters {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 8px;
    margin: 0 0 48px;
}

.filter {
    background: transparent;
    border: 1px solid var(--line);
    color: var(--muted);
    padding: 10px 22px;
    cursor: pointer;
    text-transform: uppercase;
    font-size: 11px;
    letter-spacing: 0.25em;
    font-family: var(--sans);
    transition: all 0.25s var(--ease);
}

.filter:hover {
    color: var(--text);
    border-color: var(--dim);
}

.filter.is-active {
    color: var(--gold);
    border-color: var(--gold);
    background: var(--gold-soft);
}

.cat-desc {
    display: none;
    text-align: center;
    max-width: 680px;
    margin: 0 auto 32px;
    color: var(--muted);
    font-family: var(--serif);
    font-style: italic;
    font-size: 18px;
    line-height: 1.6;
}

.masonry {
    column-count: 3;
    column-gap: 16px;
}

@media (max-width: 900px) {
    .masonry { column-count: 2; }
}

@media (max-width: 540px) {
    .masonry { column-count: 1; }
}

.masonry__item {
    break-inside: avoid;
    margin: 0 0 16px;
    position: relative;
    overflow: hidden;
    background: var(--bg-2);
    cursor: zoom-in;
    opacity: 0;
    animation: fadeIn 0.7s var(--ease) forwards;
    animation-delay: calc(var(--i, 0) * 60ms);
}

.masonry__item.is-hidden {
    display: none;
}

@keyframes fadeIn {
    to { opacity: 1; }
}

.masonry__item img {
    width: 100%;
    transition: transform 0.8s var(--ease), filter 0.5s var(--ease);
}

.masonry__item figcaption {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 50%, rgba(10, 8, 6, 0.85) 100%);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 20px;
    opacity: 0;
    transition: opacity 0.4s var(--ease);
}

.masonry__item:hover figcaption {
    opacity: 1;
}

.masonry__item:hover img {
    transform: scale(1.05);
    filter: brightness(0.85);
}

.masonry__cat {
    color: var(--gold);
    text-transform: uppercase;
    letter-spacing: 0.25em;
    font-size: 11px;
}

.masonry__cap {
    color: var(--text);
    font-family: var(--serif);
    font-style: italic;
    font-size: 18px;
    margin-top: 4px;
}

.empty {
    text-align: center;
    color: var(--dim);
    font-family: var(--serif);
    font-style: italic;
    grid-column: 1 / -1;
    padding: 60px 0;
}

/* ---------- Details ---------- */

.details {
    max-width: 980px;
    margin: 0 auto;
    padding: 80px 24px;
}

.details__grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0;
    margin: 0;
}

.details__grid > div {
    padding: 22px 4px;
    border-bottom: 1px solid var(--line);
    display: flex;
    justify-content: space-between;
    gap: 16px;
}

.details__grid dt {
    text-transform: uppercase;
    letter-spacing: 0.25em;
    font-size: 11px;
    color: var(--muted);
    align-self: center;
}

.details__grid dd {
    margin: 0;
    font-family: var(--serif);
    font-size: 20px;
    color: var(--gold);
    text-align: right;
}

@media (max-width: 700px) {
    .details__grid { grid-template-columns: 1fr; }
}

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

.contact {
    max-width: var(--container);
    margin: 0 auto;
    padding: 80px 24px 100px;
    text-align: center;
}

.contact__line {
    font-family: var(--serif);
    font-style: italic;
    font-size: clamp(28px, 4vw, 40px);
    color: var(--gold);
    margin: 0 0 12px;
    word-break: break-word;
}

.contact__hint {
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.25em;
    font-size: 11px;
}

.socials {
    list-style: none;
    padding: 0;
    margin: 0 0 24px;
    display: flex;
    flex-direction: column;
    gap: 14px;
    align-items: center;
}

.socials__item {
    display: flex;
    gap: 14px;
    align-items: baseline;
    justify-content: center;
    flex-wrap: wrap;
}

.socials__label {
    text-transform: uppercase;
    letter-spacing: 0.25em;
    font-size: 11px;
    color: var(--muted);
    min-width: 90px;
    text-align: right;
}

.socials__value {
    font-family: var(--serif);
    font-style: italic;
    font-size: clamp(20px, 2.6vw, 28px);
    color: var(--gold);
    word-break: break-word;
}

.experience__text {
    max-width: 760px;
    margin: 0 auto;
    text-align: center;
    color: var(--text);
    font-size: 17px;
    line-height: 1.8;
    white-space: pre-line;
}

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

.footer {
    border-top: 1px solid var(--line);
    padding: 32px 24px;
    background: var(--bg-2);
}

.footer__inner {
    max-width: var(--container);
    margin: 0 auto;
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    justify-content: space-between;
    align-items: center;
    color: var(--muted);
    font-size: 12px;
    letter-spacing: 0.2em;
    text-transform: uppercase;
}

.footer__brand a {
    color: var(--gold);
}

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

@media (max-width: 820px) {
    .hero { padding: 48px 20px 32px; }
    .hero__grid { grid-template-columns: 1fr; gap: 32px; }
    .nav__links a:not(.nav__cta) { display: none; }
}

@media (max-width: 480px) {
    .hero__params { grid-template-columns: repeat(2, 1fr); }
    .hero__params li:nth-child(2) { border-right: none; }
    .hero__params li:nth-child(1),
    .hero__params li:nth-child(2) { border-bottom: 1px solid var(--line); }
}

/* ============================================================
   LANDING
   ============================================================ */

.landing-hero {
    max-width: 900px;
    margin: 0 auto;
    padding: 120px 24px 80px;
    text-align: center;
}

.landing-hero h1 {
    font-size: clamp(40px, 6vw, 76px);
    font-style: italic;
    font-weight: 300;
    margin: 0 0 24px;
}

.landing-hero__sub {
    color: var(--muted);
    font-size: 18px;
    max-width: 620px;
    margin: 0 auto 40px;
}

.features {
    max-width: var(--container);
    margin: 0 auto;
    padding: 80px 24px;
}

.features__grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
}

.features__grid > div {
    padding: 32px 24px;
    border: 1px solid var(--line);
    background: var(--bg-2);
    transition: border-color 0.3s var(--ease);
}

.features__grid > div:hover {
    border-color: var(--gold);
}

.features__grid h3 {
    font-size: 22px;
    color: var(--gold);
    font-style: italic;
}

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

@media (max-width: 820px) {
    .features__grid { grid-template-columns: 1fr; }
}

.pricing {
    max-width: var(--container);
    margin: 0 auto;
    padding: 80px 24px 100px;
}

.pricing__grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.plan {
    border: 1px solid var(--line);
    background: var(--bg-2);
    padding: 40px 28px;
    text-align: center;
    transition: transform 0.4s var(--ease), border-color 0.4s var(--ease);
}

.plan:hover {
    transform: translateY(-4px);
    border-color: var(--gold);
}

.plan--accent {
    border-color: var(--gold);
    background: linear-gradient(180deg, var(--bg-2), rgba(200, 184, 154, 0.04));
}

.plan h3 {
    text-transform: uppercase;
    letter-spacing: 0.3em;
    font-family: var(--sans);
    font-size: 14px;
    color: var(--muted);
    font-style: normal;
    margin: 0 0 24px;
}

.plan__price {
    font-family: var(--serif);
    font-size: 48px;
    color: var(--gold);
    margin: 0 0 28px;
}

.plan__price span {
    font-size: 14px;
    color: var(--muted);
    font-family: var(--sans);
    letter-spacing: 0.2em;
    text-transform: uppercase;
}

.plan ul {
    list-style: none;
    padding: 0;
    margin: 0;
    text-align: left;
}

.plan li {
    padding: 12px 0;
    border-bottom: 1px solid var(--line);
    color: var(--text);
}

.plan li:last-child { border-bottom: none; }

@media (max-width: 820px) {
    .pricing__grid { grid-template-columns: 1fr; }
}

/* ============================================================
   ERROR
   ============================================================ */

.error-page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 24px;
}

.error {
    text-align: center;
    max-width: 480px;
}

.error h1 {
    font-size: clamp(36px, 5vw, 56px);
    font-style: italic;
    margin: 16px 0 16px;
}

.error p {
    color: var(--muted);
    margin: 0 0 32px;
}

/* ============================================================
   TEMPLATE VARIANT — light (tpl-2)
   ============================================================ */

body.tpl-2 {
    --bg: #f7f3ec;
    --bg-2: #ffffff;
    --line: #e5dccd;
    --text: #2a2018;
    --muted: #6b5d4b;
    --dim: #a89a86;
    --gold: #8a6f45;
    --gold-soft: rgba(138, 111, 69, 0.1);
    --gold-hover: #6a5333;
}

body.tpl-2 .nav {
    background: rgba(247, 243, 236, 0.9);
}

/* tpl-3 — Editorial (тёплый тёмный) */
body.tpl-3 {
    --bg: #121214;
    --bg-2: #1a1a1d;
    --line: #242428;
    --text: #ebebeb;
    --muted: #9a9189;
    --dim: #6a655f;
    --gold: #bea078;
    --gold-soft: rgba(190, 160, 120, 0.16);
    --gold-hover: #d0b48c;
}

/* tpl-4 — Minimal (светлый чистый) */
body.tpl-4 {
    --bg: #ffffff;
    --bg-2: #f5f5f5;
    --line: #e6e6e6;
    --text: #161616;
    --muted: #6b6b6b;
    --dim: #a3a3a3;
    --gold: #787878;
    --gold-soft: rgba(120, 120, 120, 0.12);
    --gold-hover: #4a4a4a;
}
body.tpl-4 .nav { background: rgba(255, 255, 255, 0.92); }

/* tpl-5 — Magazine (тёмный с красным акцентом) */
body.tpl-5 {
    --bg: #0c0a0e;
    --bg-2: #16131a;
    --line: #221e26;
    --text: #f0ebe6;
    --muted: #9a8f97;
    --dim: #645a66;
    --gold: #d25a5a;
    --gold-soft: rgba(210, 90, 90, 0.16);
    --gold-hover: #e06a6a;
}

/* tpl-6 — Showcase (тёмно-синий с голубым акцентом) */
body.tpl-6 {
    --bg: #080c10;
    --bg-2: #131c24;
    --line: #182028;
    --text: #e1e8ee;
    --muted: #8aa0ac;
    --dim: #566571;
    --gold: #78b4c8;
    --gold-soft: rgba(120, 180, 200, 0.16);
    --gold-hover: #8cc6da;
}

/* tpl-7 — Noir (чёрно-белый высокий контраст) */
body.tpl-7 {
    --bg: #000000;
    --bg-2: #0d0d0d;
    --line: #1c1c1c;
    --text: #f2f2f2;
    --muted: #8a8a8a;
    --dim: #555555;
    --gold: #e6e6e6;
    --gold-soft: rgba(255, 255, 255, 0.12);
    --gold-hover: #ffffff;
}

/* tpl-8 — Rose (светлый пудровый, розовое золото) */
body.tpl-8 {
    --bg: #fdf6f4;
    --bg-2: #ffffff;
    --line: #f0dada;
    --text: #3a2a2a;
    --muted: #8a6f6f;
    --dim: #c0a8a8;
    --gold: #b76e79;
    --gold-soft: rgba(183, 110, 121, 0.12);
    --gold-hover: #9a5560;
}
body.tpl-8 .nav { background: rgba(253, 246, 244, 0.92); }

/* tpl-9 — Olive (тёмный с оливковым акцентом) */
body.tpl-9 {
    --bg: #14160f;
    --bg-2: #1d2016;
    --line: #2a2e1f;
    --text: #ece9dd;
    --muted: #9a9b86;
    --dim: #63654f;
    --gold: #a8b06a;
    --gold-soft: rgba(168, 176, 106, 0.16);
    --gold-hover: #b8c07a;
}

/* tpl-10 — Sand (тёплый бежевый, терракота) */
body.tpl-10 {
    --bg: #f4ece0;
    --bg-2: #fbf6ee;
    --line: #e3d4c0;
    --text: #3b2f24;
    --muted: #7d6a55;
    --dim: #b3a18b;
    --gold: #c2724a;
    --gold-soft: rgba(194, 114, 74, 0.12);
    --gold-hover: #a85a36;
}
body.tpl-10 .nav { background: rgba(244, 236, 224, 0.92); }

/* tpl-11 — Royal (глубокий синий + золото) */
body.tpl-11 {
    --bg: #0a0e1a;
    --bg-2: #121829;
    --line: #1e2740;
    --text: #e8ecf5;
    --muted: #8b95ad;
    --dim: #56607a;
    --gold: #c9a84a;
    --gold-soft: rgba(201, 168, 74, 0.16);
    --gold-hover: #d9b85a;
}

/* tpl-12 — Mono (чистый светлый, чёрный акцент) */
body.tpl-12 {
    --bg: #fafafa;
    --bg-2: #ffffff;
    --line: #e6e6e6;
    --text: #111111;
    --muted: #777777;
    --dim: #aaaaaa;
    --gold: #282828;
    --gold-soft: rgba(0, 0, 0, 0.08);
    --gold-hover: #000000;
}
body.tpl-12 .nav { background: rgba(250, 250, 250, 0.92); }
