/* Space Stones — оформлення сайту-прайсу.
   Уся палітра зібрана в :root. Щоб перефарбувати сайт, достатньо змінити ці значення. */

:root {
    --ink: #0b0b0b;
    --ink-soft: #1c1c1c;
    --paper: #faf9f7;
    --paper-card: #ffffff;
    --line: #e3ded6;
    --text: #232323;
    --text-muted: #6b6660;
    --accent: #a8804a;
    --accent-dark: #8a6738;
    --accent-soft: #f3ece1;

    --radius: 4px;
    --shadow: 0 1px 2px rgba(20, 16, 10, .06), 0 8px 24px rgba(20, 16, 10, .06);
    --wrap: 1180px;
    --serif: Georgia, 'Times New Roman', serif;
    --sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

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

body {
    margin: 0;
    font-family: var(--sans);
    font-size: 16px;
    line-height: 1.65;
    color: var(--text);
    background: var(--paper);
    -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent-dark); }

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

/* Видно лише читалкам екрана */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* ---------- Шапка ---------- */

.site-header {
    background: #000;
    color: #fff;
    border-bottom: 1px solid #000;
}

.site-header__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: 14px 20px;
    max-width: var(--wrap);
    margin: 0 auto;
}

.site-header__logo img { width: 190px; }

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

.site-nav a {
    color: rgba(255, 255, 255, .82);
    text-decoration: none;
    font-size: 15px;
    letter-spacing: .02em;
    padding: 6px 0;
    border-bottom: 1px solid transparent;
    transition: color .15s, border-color .15s;
}

.site-nav a:hover,
.site-nav a[aria-current='page'] {
    color: #fff;
    border-bottom-color: var(--accent);
}

.header-phones {
    display: flex;
    flex-direction: column;
    gap: 2px;
    text-align: right;
}

.header-phones a {
    color: #fff;
    text-decoration: none;
    font-size: 15px;
    font-weight: 600;
    white-space: nowrap;
}

.header-phones a:hover { color: var(--accent); }
.header-phones span { color: rgba(255, 255, 255, .55); font-weight: 400; font-size: 13px; }

.nav-toggle {
    display: none;
    background: none;
    border: 1px solid rgba(255, 255, 255, .3);
    color: #fff;
    border-radius: var(--radius);
    padding: 8px 12px;
    font-size: 15px;
    cursor: pointer;
}

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

.hero {
    /* Фото карʼєру під щільним затемненням: даємо відчуття виробництва,
       але не заважаємо читати заголовок */
    background:
        linear-gradient(180deg, rgba(0, 0, 0, .88) 0%, rgba(10, 10, 10, .94) 100%),
        url('../img/quarry.jpg') center 60% / cover no-repeat;
    color: #fff;
    padding: 54px 0 60px;
    text-align: center;
}

.hero h1 {
    font-family: var(--serif);
    font-weight: 400;
    font-size: clamp(28px, 4vw, 44px);
    letter-spacing: .04em;
    margin: 0 0 14px;
}

.hero p {
    margin: 0 auto;
    max-width: 640px;
    color: rgba(255, 255, 255, .7);
    font-size: 17px;
}

.hero__usage {
    margin-top: 22px;
    color: rgba(255, 255, 255, .55);
    font-size: 14.5px;
    letter-spacing: .02em;
}

/* ---------- Секції ---------- */

.section { padding: 56px 0; }
.section--tight { padding: 36px 0; }
.section--paper { background: var(--paper-card); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }

.section__title {
    font-family: var(--serif);
    font-weight: 400;
    font-size: clamp(23px, 3vw, 31px);
    margin: 0 0 8px;
    letter-spacing: .02em;
}

.section__lead {
    color: var(--text-muted);
    margin: 0 0 28px;
    max-width: 680px;
}

/* ---------- Таблиця прайсу ---------- */

.price-block {
    background: var(--paper-card);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
}

.price-table-scroll { overflow-x: auto; }

.price-table {
    width: 100%;
    border-collapse: collapse;
    font-variant-numeric: tabular-nums;
}

.price-table th,
.price-table td {
    padding: 15px 18px;
    text-align: right;
    border-bottom: 1px solid var(--line);
    white-space: nowrap;
}

.price-table th:first-child,
.price-table td:first-child {
    text-align: left;
    white-space: normal;
}

.price-table thead th {
    background: var(--ink);
    color: #fff;
    font-weight: 500;
    font-size: 13.5px;
    letter-spacing: .04em;
    text-transform: uppercase;
    position: sticky;
    top: 0;
    z-index: 2;
}

.price-table tbody tr:nth-child(even) { background: #fbfaf8; }
.price-table tbody tr:hover { background: var(--accent-soft); }
.price-table tbody tr:last-child td { border-bottom: none; }

.price-table__name { font-weight: 600; font-size: 16.5px; }
.price-table__color { display: block; color: var(--text-muted); font-size: 13px; font-weight: 400; margin-top: 2px; }
.price-table__value { font-size: 17px; font-weight: 600; }
.price-table__value--empty { color: var(--text-muted); font-size: 14px; font-weight: 400; font-style: italic; }

.price-notes {
    padding: 16px 18px;
    background: var(--accent-soft);
    border-top: 1px solid var(--line);
    font-size: 14.5px;
}

.price-notes strong { color: var(--accent-dark); }
.price-notes p { margin: 0; }
.price-notes p + p { margin-top: 6px; color: var(--text-muted); font-size: 13.5px; }

/* ---------- Кнопки ---------- */

.actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 22px;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    padding: 13px 22px;
    border-radius: var(--radius);
    border: 1px solid transparent;
    font-size: 15px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: background .15s, color .15s, border-color .15s;
    font-family: inherit;
}

.btn--primary { background: var(--ink); color: #fff; }
.btn--primary:hover { background: var(--accent-dark); }

.btn--outline { background: transparent; color: var(--ink); border-color: #cdc6bb; }
.btn--outline:hover { border-color: var(--ink); background: #fff; }

.btn--accent { background: var(--accent); color: #fff; }
.btn--accent:hover { background: var(--accent-dark); }

.btn[disabled] { opacity: .6; cursor: default; }

/* ---------- Родовища ---------- */

.deposits {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(258px, 1fr));
    gap: 22px;
}

.deposit-card {
    background: var(--paper-card);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.deposit-card__photo {
    aspect-ratio: 4 / 3;
    background: #e8e3da url('../img/stone-placeholder.svg') center / cover no-repeat;
}

.deposit-card__photo img { width: 100%; height: 100%; object-fit: cover; }

.deposit-card__body { padding: 16px 18px 20px; }
.deposit-card__title { font-family: var(--serif); font-size: 20px; margin: 0 0 4px; font-weight: 400; }
.deposit-card__color { color: var(--accent-dark); font-size: 13.5px; margin: 0 0 10px; }
.deposit-card__text { color: var(--text-muted); font-size: 14.5px; margin: 0; }

/* ---------- Форма ---------- */

.form-card {
    background: var(--paper-card);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 26px;
    box-shadow: var(--shadow);
    max-width: 620px;
}

.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }

.field { margin-bottom: 14px; }
.field label { display: block; font-size: 14px; font-weight: 600; margin-bottom: 6px; }
.field .hint { font-weight: 400; color: var(--text-muted); }

.field input,
.field textarea {
    width: 100%;
    padding: 11px 13px;
    border: 1px solid #d5cec4;
    border-radius: var(--radius);
    font-size: 15px;
    font-family: inherit;
    background: #fff;
    color: var(--text);
}

.field input:focus,
.field textarea:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(168, 128, 74, .15);
}

.field--hp { position: absolute; left: -9999px; opacity: 0; height: 0; overflow: hidden; }

.form-message { margin-top: 14px; padding: 13px 15px; border-radius: var(--radius); font-size: 14.5px; }
.form-message--ok { background: #eaf5ec; border: 1px solid #bcdcc4; color: #23612f; }
.form-message--error { background: #fdeded; border: 1px solid #f3c2c2; color: #8c2020; }

.consent { font-size: 13px; color: var(--text-muted); margin-top: 10px; }

/* ---------- Контент ---------- */

.prose { max-width: 780px; }
.prose h2 { font-family: var(--serif); font-weight: 400; font-size: 26px; margin: 34px 0 10px; }
.prose h3 { font-size: 19px; margin: 26px 0 8px; }
.prose p { margin: 0 0 14px; }
.prose ul { padding-left: 20px; margin: 0 0 14px; }
.prose li { margin-bottom: 6px; }

.contacts-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 26px; }
.contact-item { margin-bottom: 16px; }
.contact-item__label { font-size: 13px; text-transform: uppercase; letter-spacing: .05em; color: var(--text-muted); margin-bottom: 3px; }
.contact-item__value { font-size: 18px; font-weight: 600; }
.contact-item__value a { color: var(--text); text-decoration: none; }
.contact-item__value a:hover { color: var(--accent-dark); }

/* ---------- Футер ---------- */

.site-footer {
    background: var(--ink);
    color: rgba(255, 255, 255, .68);
    padding: 44px 0 26px;
    margin-top: 10px;
    font-size: 14.5px;
}

.site-footer a { color: rgba(255, 255, 255, .82); text-decoration: none; }
.site-footer a:hover { color: var(--accent); }

.footer-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(215px, 1fr)); gap: 28px; }
.footer-title { color: #fff; font-size: 14px; text-transform: uppercase; letter-spacing: .05em; margin: 0 0 12px; }
.footer-list { list-style: none; margin: 0; padding: 0; }
.footer-list li { margin-bottom: 7px; }

.footer-bottom {
    margin-top: 32px;
    padding-top: 18px;
    border-top: 1px solid rgba(255, 255, 255, .12);
    display: flex;
    justify-content: space-between;
    gap: 14px;
    flex-wrap: wrap;
    font-size: 13px;
    color: rgba(255, 255, 255, .45);
}

/* ---------- Мобільні ---------- */

@media (max-width: 860px) {
    .site-header__inner { flex-wrap: wrap; gap: 12px; }
    .site-header__logo img { width: 155px; }
    .nav-toggle { display: block; order: 3; }
    .site-nav {
        order: 4;
        flex-basis: 100%;
        flex-direction: column;
        gap: 0;
        display: none;
        border-top: 1px solid rgba(255, 255, 255, .12);
        padding-top: 8px;
    }
    .site-nav.is-open { display: flex; }
    .site-nav a { padding: 10px 0; border-bottom: 1px solid rgba(255, 255, 255, .07); }
    .header-phones { text-align: left; }
}

@media (max-width: 700px) {
    /* Таблиця перетворюється на картки: кожен рядок — окреме родовище */
    .price-table thead { display: none; }
    .price-table, .price-table tbody, .price-table tr, .price-table td { display: block; width: 100%; }

    .price-table tr {
        border-bottom: 1px solid var(--line);
        padding: 6px 0 10px;
    }

    .price-table tbody tr:nth-child(even) { background: transparent; }

    .price-table td {
        display: flex;
        justify-content: space-between;
        align-items: baseline;
        gap: 16px;
        text-align: right;
        border-bottom: none;
        padding: 7px 16px;
        white-space: normal;
    }

    .price-table td:first-child {
        background: var(--ink);
        color: #fff;
        padding: 12px 16px;
        margin-bottom: 4px;
    }

    .price-table td:first-child .price-table__color { color: rgba(255, 255, 255, .6); }

    .price-table td::before {
        content: attr(data-label);
        color: var(--text-muted);
        font-size: 13.5px;
        text-align: left;
        flex: 1;
    }

    .price-table td:first-child::before { content: none; }

    .actions .btn { flex: 1 1 100%; justify-content: center; }
    .form-row { grid-template-columns: 1fr; }
    .section { padding: 40px 0; }
}
