/* =============================================================
   RANKPRESS — main.css
   ============================================================= */

/* --- ЗМІННІ -------------------------------------------------- */
:root {
    --ink:     #0e0d0c;
    --paper:   #f5f2ed;
    --paper2:  #ede9e2;
    --paper3:  #ddd8d0;
    --rust:    #c0390e;
    --rust2:   #a02e0a;
    --gold:    #b8880e;
    --muted:   #7a756d;
    --muted2:  #aaa49a;

    --font-serif: 'DM Serif Display', Georgia, serif;
    --font-sans:  'DM Sans', system-ui, sans-serif;

    --radius-sm: 2px;
    --radius-md: 4px;
    --radius-lg: 8px;

    --nav-h: 64px;
    --max-w: 1100px;
    --pad:   40px;
}

/* --- СКИДАННЯ ------------------------------------------------ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
    background: var(--paper);
    color: var(--ink);
    font-family: var(--font-sans);
    font-size: 16px;
    line-height: 1.6;
    overflow-x: hidden;
}
img, video, svg { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
button { cursor: pointer; font-family: var(--font-sans); }
ul, ol { list-style: none; }

/* --- ТИПОГРАФІКА --------------------------------------------- */
h1, h2, h3, h4 { font-family: var(--font-serif); line-height: 1.05; letter-spacing: -0.02em; }
h1 { font-size: clamp(44px, 5.5vw, 78px); }
h2 { font-size: clamp(28px, 3.5vw, 48px); }
h3 { font-size: clamp(20px, 2vw, 26px); }
h4 { font-size: 16px; font-family: var(--font-sans); font-weight: 500; }
em { font-style: italic; color: var(--rust); }

.section-label {
    font-size: 11px;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--muted);
    margin-bottom: 14px;
}

/* --- КНОПКИ -------------------------------------------------- */
.btn-main {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 32px;
    background: var(--rust);
    color: var(--paper);
    font-size: 14px;
    font-weight: 500;
    letter-spacing: 0.02em;
    border: none;
    border-radius: var(--radius-sm);
    text-decoration: none;
    transition: background 0.2s, transform 0.15s;
}
.btn-main:hover { background: var(--rust2); transform: translateY(-2px); }

.btn-ghost {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: var(--ink);
    text-decoration: none;
    border-bottom: 1px solid var(--paper3);
    padding-bottom: 2px;
    background: none;
    border-top: none;
    border-left: none;
    border-right: none;
    transition: border-color 0.2s;
}
.btn-ghost:hover { border-color: var(--ink); }

/* --- НАВІГАЦІЯ ---------------------------------------------- */
.site-header {
    position: sticky;
    top: 0;
    z-index: 200;
    background: var(--paper);
    border-bottom: 1px solid var(--paper3);
}
.nav-inner {
    max-width: var(--max-w);
    margin: 0 auto;
    padding: 0 var(--pad);
    height: var(--nav-h);
    display: flex;
    align-items: center;
    gap: 40px;
}
.site-logo {
    font-family: var(--font-serif);
    font-size: 22px;
    text-decoration: none;
    color: var(--ink);
    flex-shrink: 0;
}
.site-logo sup { font-size: 10px; color: var(--rust); font-family: var(--font-sans); font-weight: 500; vertical-align: super; margin-left: 3px; }
.nav-menu {
    display: flex;
    gap: 28px;
    flex: 1;
}
.nav-menu a {
    font-size: 13px;
    color: var(--muted);
    text-decoration: none;
    letter-spacing: 0.03em;
    transition: color 0.2s;
}
.nav-menu a:hover,
.nav-menu .current-menu-item a { color: var(--ink); }

.nav-cta {
    display: inline-block;
    padding: 9px 20px;
    background: var(--ink);
    color: var(--paper);
    font-size: 13px;
    font-weight: 500;
    border: none;
    border-radius: var(--radius-sm);
    text-decoration: none;
    white-space: nowrap;
    transition: background 0.2s, transform 0.15s;
}
.nav-cta:hover { background: #2a2826; transform: translateY(-1px); }

.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    padding: 4px;
    margin-left: auto;
}
.nav-toggle span {
    display: block;
    width: 24px;
    height: 1.5px;
    background: var(--ink);
    transition: transform 0.3s, opacity 0.3s;
}
.nav-toggle.is-open span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.nav-toggle.is-open span:nth-child(2) { opacity: 0; }
.nav-toggle.is-open span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

/* --- HERO ---------------------------------------------------- */
.hero {
    display: grid;
    grid-template-columns: 1fr 1fr;
    min-height: calc(100vh - var(--nav-h));
}
.hero-left {
    padding: 80px var(--pad) 60px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    border-right: 1px solid var(--paper3);
}
.hero-eyebrow {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 11px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--rust);
    font-weight: 500;
    margin-bottom: 36px;
}
.eyebrow-line { width: 32px; height: 1px; background: var(--rust); flex-shrink: 0; }

.hero-title { margin-bottom: 28px; color: var(--ink); }
.hero-title em { color: var(--rust); font-style: italic; }

.hero-desc {
    font-size: 16px;
    color: var(--muted);
    line-height: 1.8;
    max-width: 420px;
    margin-bottom: 48px;
    font-weight: 300;
}
.hero-btns { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; }

.hero-right {
    background: var(--paper2);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: var(--pad);
    gap: 24px;
    overflow: hidden;
}
.hero-photo img {
    width: 100%;
    height: 300px;
    object-fit: cover;
    object-position: top center;
    border-radius: var(--radius-md);
}
.hero-photo--placeholder {
    flex: 1;
    min-height: 240px;
    border: 1px dashed var(--paper3);
    border-radius: var(--radius-md);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    color: var(--muted2);
    text-align: center;
}
.photo-placeholder-icon svg { width: 48px; height: 48px; color: var(--muted2); }
.hero-photo--placeholder p { font-size: 13px; }
.hero-photo--placeholder small { font-size: 11px; color: var(--paper3); }

@keyframes fadeIn   { to { opacity: 1; } }
@keyframes popDot   { from { transform: scale(0); } to { transform: scale(1); } }

.hero-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1px;
    background: var(--paper3);
    border: 1px solid var(--paper3);
}
.hstat { background: var(--paper2); padding: 18px 16px; }
.hstat-num {
    font-family: var(--font-serif);
    font-size: 30px;
    color: var(--ink);
    line-height: 1;
    margin-bottom: 4px;
}
.hstat-num .counter { color: var(--rust); }
.hstat-label { font-size: 11px; color: var(--muted); letter-spacing: 0.05em; text-transform: uppercase; }

/* --- TICKER -------------------------------------------------- */
.ticker-wrap {
    overflow: hidden;
    white-space: nowrap;
    border-top: 1px solid var(--paper3);
    border-bottom: 1px solid var(--paper3);
    padding: 11px 0;
}
.ticker-track { display: inline-flex; align-items: center; animation: ticker 24s linear infinite; }
.ticker-track:hover { animation-play-state: paused; }
@keyframes ticker { from { transform: translateX(0); } to { transform: translateX(-50%); } }
.ticker-item { font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); padding: 0 28px; }
.ticker-dot  { width: 4px; height: 4px; border-radius: 50%; background: var(--rust); flex-shrink: 0; }

/* --- ПОСЛУГИ ------------------------------------------------- */
.services { padding: 90px 0; }
.services-inner { max-width: var(--max-w); margin: 0 auto; padding: 0 var(--pad); }
.services-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 56px;
    padding-bottom: 28px;
    border-bottom: 1px solid var(--paper3);
}
.services-count {
    font-family: var(--font-serif);
    font-size: 72px;
    color: var(--paper3);
    line-height: 1;
    letter-spacing: -0.04em;
    user-select: none;
}
.svc-item {
    display: grid;
    grid-template-columns: 52px 1fr auto 24px;
    align-items: center;
    gap: 24px;
    padding: 26px 0;
    border-bottom: 1px solid var(--paper3);
    cursor: pointer;
    transition: background 0.15s;
    text-decoration: none;
    color: inherit;
}
.svc-item:hover .svc-name  { color: var(--rust); }
.svc-item:hover .svc-arr   { transform: translateX(4px) rotate(-45deg); color: var(--rust); }

.svc-num  { font-size: 12px; color: var(--muted2); letter-spacing: 0.1em; font-weight: 500; }
.svc-name { font-family: var(--font-serif); font-size: 20px; letter-spacing: -0.01em; transition: color 0.2s; margin-bottom: 4px; }
.svc-desc { font-size: 12px; color: var(--muted); font-weight: 300; }
.svc-price { text-align: right; }
.svc-price-cur  { font-family: var(--font-serif); font-size: 18px; color: var(--ink); white-space: nowrap; }
.svc-price-old  { font-size: 11px; color: var(--muted2); text-decoration: line-through; margin-top: 2px; }
.svc-badge {
    display: inline-block;
    font-size: 10px;
    font-weight: 500;
    letter-spacing: 0.06em;
    background: var(--rust);
    color: var(--paper);
    padding: 2px 7px;
    border-radius: var(--radius-sm);
    margin-top: 4px;
}
.svc-badge--gray { background: var(--muted); }
.svc-arr { font-size: 18px; color: var(--muted2); transition: transform 0.25s, color 0.2s; }
.services-note { margin-top: 24px; font-size: 13px; color: var(--muted); line-height: 1.7; font-style: italic; padding-left: 52px; }

/* --- ПРО ПІДХІД --------------------------------------------- */
.about {
    background: var(--ink);
    color: var(--paper);
    display: grid;
    grid-template-columns: 1fr 1fr;
}
.about-left {
    padding: 80px var(--pad);
    border-right: 1px solid rgba(255,255,255,0.07);
    display: flex;
    flex-direction: column;
    justify-content: center;
}
.about-tag  { color: var(--gold); }
.about-title { color: var(--paper); margin: 0 0 20px; }
.about-text  { font-size: 15px; color: rgba(245,242,237,0.5); line-height: 1.85; font-weight: 300; margin-bottom: 28px; }
.about-sign  { font-family: var(--font-serif); font-style: italic; font-size: 22px; color: var(--paper); }
.about-sign-role { font-size: 11px; color: rgba(245,242,237,0.35); letter-spacing: 0.06em; text-transform: uppercase; margin-top: 6px; }

.about-right {
    padding: 80px var(--pad);
    display: flex;
    flex-direction: column;
    gap: 24px;
}
.about-photo { width: 100%; height: 220px; object-fit: cover; border-radius: var(--radius-md); }
.about-photo-placeholder {
    width: 100%;
    height: 220px;
    border: 1px dashed rgba(255,255,255,0.1);
    border-radius: var(--radius-md);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    color: rgba(255,255,255,0.2);
    font-size: 13px;
    text-align: center;
}
.about-photo-placeholder small { font-size: 11px; color: rgba(255,255,255,0.1); }

.proc-item {
    display: flex;
    gap: 18px;
    padding: 18px 0;
    border-bottom: 1px solid rgba(255,255,255,0.06);
}
.proc-item:last-child { border: none; }
.proc-num  { font-family: var(--font-serif); font-size: 22px; color: rgba(245,242,237,0.15); min-width: 32px; line-height: 1; }
.proc-title { font-size: 14px; font-weight: 500; color: var(--paper); margin-bottom: 4px; }
.proc-desc  { font-size: 13px; color: rgba(245,242,237,0.4); line-height: 1.6; font-weight: 300; }

/* --- КЕЙСИ -------------------------------------------------- */
.cases-section { padding: 90px 0; }
.cases-inner   { max-width: var(--max-w); margin: 0 auto; padding: 0 var(--pad); }
.cases-inner h2 { margin: 0 0 48px; }
.cases-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}
.case-card {
    background: var(--paper2);
    border: 1px solid var(--paper3);
    border-radius: var(--radius-md);
    overflow: hidden;
    transition: transform 0.2s, box-shadow 0.2s;
}
.case-card:hover { transform: translateY(-4px); }
.case-img img { width: 100%; height: 200px; object-fit: cover; }
.case-body { padding: 24px; }
.case-title { font-family: var(--font-serif); font-size: 20px; margin-bottom: 10px; }
.case-title a { text-decoration: none; transition: color 0.2s; }
.case-title a:hover { color: var(--rust); }
.case-excerpt { font-size: 14px; color: var(--muted); line-height: 1.65; margin-bottom: 16px; font-weight: 300; }
.case-link { font-size: 13px; color: var(--rust); text-decoration: none; border-bottom: 1px solid transparent; transition: border-color 0.2s; }
.case-link:hover { border-color: var(--rust); }

/* --- ФОРМА ЗВ'ЯЗКУ ------------------------------------------ */
.contact-section {
    background: var(--rust);
    color: var(--paper);
}
.contact-inner {
    max-width: var(--max-w);
    margin: 0 auto;
    padding: 80px var(--pad);
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 80px;
    align-items: start;
}
.contact-title { color: var(--paper); margin-bottom: 16px; }
.contact-title em { color: rgba(245,242,237,0.65); }
.contact-sub { font-size: 15px; color: rgba(245,242,237,0.6); margin-bottom: 32px; font-weight: 300; }
.contact-details { display: flex; flex-direction: column; gap: 10px; }
.contact-link {
    font-size: 15px;
    color: rgba(245,242,237,0.8);
    text-decoration: none;
    transition: color 0.2s;
}
.contact-link:hover { color: var(--paper); }

/* Форма */
.contact-form { display: flex; flex-direction: column; gap: 16px; }
.form-group { display: flex; flex-direction: column; gap: 6px; }
.form-group label { font-size: 12px; color: rgba(245,242,237,0.6); letter-spacing: 0.04em; text-transform: uppercase; }
.contact-form input,
.contact-form select,
.contact-form textarea {
    width: 100%;
    padding: 12px 16px;
    background: rgba(245,242,237,0.1);
    border: 1px solid rgba(245,242,237,0.2);
    border-radius: var(--radius-sm);
    color: var(--paper);
    font-family: var(--font-sans);
    font-size: 15px;
    transition: border-color 0.2s, background 0.2s;
    -webkit-appearance: none;
}
.contact-form input:focus,
.contact-form select:focus,
.contact-form textarea:focus {
    outline: none;
    border-color: rgba(245,242,237,0.5);
    background: rgba(245,242,237,0.15);
}
.contact-form input::placeholder,
.contact-form textarea::placeholder { color: rgba(245,242,237,0.3); }
.contact-form select option { background: var(--rust2); color: var(--paper); }
.contact-form textarea { resize: vertical; min-height: 120px; }
.contact-form .btn-main {
    background: var(--paper);
    color: var(--rust);
    justify-content: center;
    width: 100%;
    padding: 16px;
    font-size: 15px;
    border-radius: var(--radius-sm);
}
.contact-form .btn-main:hover { background: var(--paper2); }

.form-result {
    font-size: 14px;
    padding: 10px 0;
    min-height: 24px;
}
.form-result.success { color: rgba(245,242,237,0.9); }
.form-result.error   { color: #ffcccc; }

/* --- ФУТЕР -------------------------------------------------- */
.site-footer {
    border-top: 1px solid var(--paper3);
    padding: 28px var(--pad);
}
.footer-inner {
    max-width: var(--max-w);
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 32px;
    flex-wrap: wrap;
}
.footer-logo a {
    font-family: var(--font-serif);
    font-size: 18px;
    color: var(--ink);
    text-decoration: none;
}
.footer-logo sup { font-size: 9px; color: var(--rust); font-family: var(--font-sans); font-weight: 500; vertical-align: super; }
.footer-menu { display: flex; gap: 24px; }
.footer-menu a { font-size: 13px; color: var(--muted); text-decoration: none; transition: color 0.2s; }
.footer-menu a:hover { color: var(--ink); }
.footer-contacts { display: flex; gap: 20px; flex-wrap: wrap; margin-left: auto; }
.footer-contacts a { font-size: 13px; color: var(--muted); text-decoration: none; transition: color 0.2s; }
.footer-contacts a:hover { color: var(--ink); }
.footer-copy { font-size: 12px; color: var(--muted2); width: 100%; padding-top: 16px; border-top: 1px solid var(--paper3); margin-top: 8px; }

/* --- ХЛІБНІ КРИХТИ ------------------------------------------ */
.breadcrumbs { margin: 16px 0; }
.breadcrumbs ol { display: flex; flex-wrap: wrap; gap: 4px 8px; list-style: none; }
.breadcrumbs li { font-size: 13px; color: var(--muted); }
.breadcrumbs li:not(:last-child)::after { content: '→'; margin-left: 8px; opacity: 0.4; }
.breadcrumbs a { color: var(--muted); text-decoration: none; }
.breadcrumbs a:hover { color: var(--ink); }

/* --- ПАГІНАЦІЯ ---------------------------------------------- */
.pagination ul { display: flex; justify-content: center; gap: 8px; flex-wrap: wrap; padding: 40px 0; }
.pagination li a,
.pagination li span {
    display: flex; align-items: center; justify-content: center;
    width: 40px; height: 40px;
    font-size: 14px; border: 1px solid var(--paper3);
    text-decoration: none; color: var(--ink); border-radius: var(--radius-sm);
    transition: background 0.2s;
}
.pagination li .current,
.pagination li a:hover { background: var(--ink); color: var(--paper); border-color: var(--ink); }

/* --- АДАПТИВ ------------------------------------------------- */
@media (max-width: 1024px) {
    :root { --pad: 28px; }
    .hero { grid-template-columns: 1fr; min-height: auto; }
    .hero-left { padding: 60px var(--pad) 40px; border-right: none; border-bottom: 1px solid var(--paper3); }
    .hero-right { padding: var(--pad); }
    .about { grid-template-columns: 1fr; }
    .about-left  { border-right: none; border-bottom: 1px solid rgba(255,255,255,0.07); }
    .cases-grid { grid-template-columns: repeat(2, 1fr); }
    .contact-inner { grid-template-columns: 1fr; gap: 40px; }
}

@media (max-width: 768px) {
    :root { --pad: 20px; }
    .nav-menu { display: none; }
    .nav-menu.is-open {
        display: flex;
        flex-direction: column;
        position: absolute;
        top: var(--nav-h);
        left: 0; right: 0;
        background: var(--paper);
        border-bottom: 1px solid var(--paper3);
        padding: 20px;
        gap: 16px;
        z-index: 100;
    }
    .nav-toggle { display: flex; }
    .nav-cta    { display: none; }
    .nav-inner  { flex-wrap: wrap; gap: 0; }

    h1 { font-size: clamp(36px, 8vw, 54px); }
    h2 { font-size: clamp(26px, 5vw, 36px); }

    .svc-item { grid-template-columns: 40px 1fr 24px; }
    .svc-price { display: none; }

    .cases-grid   { grid-template-columns: 1fr; }
    .services-count { font-size: 48px; }
    .footer-inner { flex-direction: column; align-items: flex-start; gap: 20px; }
    .footer-contacts { margin-left: 0; }
}

@media (max-width: 480px) {
    .hero-btns { flex-direction: column; align-items: flex-start; }
    .hero-stats { grid-template-columns: 1fr 1fr; }
}

/* --- АНІМАЦІЯ: з'явлення при скролі ------------------------- */
.fade-up {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}
.fade-up.is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* --- ДОСТУПНІСТЬ -------------------------------------------- */
:focus-visible {
    outline: 2px solid var(--rust);
    outline-offset: 2px;
}
.sr-only {
    position: absolute;
    width: 1px; height: 1px;
    overflow: hidden;
    clip: rect(0,0,0,0);
    white-space: nowrap;
}

/* --- МЕДІА: зменшений рух ----------------------------------- */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }
    html { scroll-behavior: auto; }
}
