/* Local fonts (SIL Open Font License — Google Fonts) */
@font-face {
    font-family: "Courier Prime";
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url("fonts/courier-prime-400.ttf") format("truetype");
}

@font-face {
    font-family: "Courier Prime";
    font-style: normal;
    font-weight: 700;
    font-display: swap;
    src: url("fonts/courier-prime-700.ttf") format("truetype");
}

@font-face {
    font-family: "Special Elite";
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url("fonts/special-elite-400.ttf") format("truetype");
}

@font-face {
    font-family: "Ultra";
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url("fonts/ultra-400.ttf") format("truetype");
}

/* THE TACTILE EDITORIAL — local styles (no Tailwind) */

:root {
    --paper-color: #f2ede4;
    --ink-black: #2b2621;
    --accent-red: #8c3b24;
    --accent-blue: #5a6b7a;
    --accent-warm: #b5a48b;
    --border-soft: rgba(0, 0, 0, 0.15);
}

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

html {
    scroll-behavior: smooth;
}

#advantages,
#products,
#about,
#testimonials {
    scroll-margin-top: 5rem;
}

body {
    margin: 0;
    font-family: "Courier Prime", monospace;
    background-color: var(--paper-color);
    color: var(--ink-black);
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
    background-blend-mode: overlay;
    overflow-x: hidden;
}

::selection {
    background-color: var(--accent-red);
    color: #fff;
}

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

button {
    font: inherit;
    cursor: pointer;
    background: none;
    border: none;
}

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

/* Typography helpers */
.zine-heading {
    font-family: "Ultra", serif;
    text-transform: uppercase;
    letter-spacing: 0.02em;
}

.typewriter {
    font-family: "Special Elite", system-ui, sans-serif;
}

/* Components from original */
.surface-card {
    background: #fdfaf5;
    border: 1px solid var(--border-soft);
    position: relative;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease;
}

.surface-card:hover {
    transform: translateY(-4px);
}

.surface-card::after {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    box-shadow: inset 0 0 10px rgba(0, 0, 0, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.5);
}

.frayed-edge {
    mask-image: url("data:image/svg+xml,%3Csvg width='100' height='2' viewBox='0 0 100 2' preserveAspectRatio='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M0 1 Q 1 0, 2 1 T 4 1 T 6 1 T 8 1 T 10 1 T 12 1 T 14 1 T 16 1 T 18 1 T 20 1 T 22 1 T 24 1 T 26 1 T 28 1 T 30 1 T 32 1 T 34 1 T 36 1 T 38 1 T 40 1 T 42 1 T 44 1 T 46 1 T 48 1 T 50 1 T 52 1 T 54 1 T 56 1 T 58 1 T 60 1 T 62 1 T 64 1 T 66 1 T 68 1 T 70 1 T 72 1 T 74 1 T 76 1 T 78 1 T 80 1 T 82 1 T 84 1 T 86 1 T 88 1 T 90 1 T 92 1 T 94 1 T 96 1 T 98 1 T 100 1 V 2 H 0 Z' fill='black'/%3E%3C/svg%3E");
    mask-size: 100% 4px;
    mask-repeat: repeat-x;
    mask-position: bottom;
}

.frame-bevel {
    border: 8px solid white;
    box-shadow:
        inset 1px 1px 3px rgba(0, 0, 0, 0.2),
        2px 2px 5px rgba(0, 0, 0, 0.1);
    outline: 1px solid #ddd;
}

.stamped-refined {
    border: 1px solid var(--accent-red);
    padding: 5px 14px;
    color: var(--accent-red);
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    display: inline-block;
    opacity: 0.8;
    transition:
        background-color 0.2s,
        color 0.2s,
        opacity 0.2s;
}

.stamped-refined:hover {
    background-color: var(--accent-red);
    color: #fff;
    opacity: 1;
}

a.stamped-refined {
    text-decoration: none;
    color: var(--accent-red);
}

.catalog-caption {
    background: #fff;
    padding: 1rem;
    border-left: 3px solid var(--accent-warm);
    font-size: 0.85rem;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

/* Layout utilities */
.container {
    width: 100%;
    max-width: 80rem;
    margin-left: auto;
    margin-right: auto;
    padding-left: 1.5rem;
    padding-right: 1.5rem;
}

.container--narrow {
    max-width: 72rem;
}

/* Header */
.site-header {
    position: relative;
    z-index: 50;
    padding: 2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    border-bottom: 1px solid var(--border-soft);
    background: rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(8px);
}

@media (min-width: 768px) {
    .site-header {
        flex-direction: row;
    }
}

.site-brand {
    max-width: 100%;
    font-size: clamp(1.1rem, 2.5vw + 0.4rem, 2rem);
    color: var(--ink-black);
    letter-spacing: -0.05em;
    text-align: center;
    overflow-wrap: anywhere;
    word-break: break-word;
}

@media (min-width: 768px) {
    .site-brand {
        font-size: clamp(1.25rem, 1.6vw + 0.65rem, 2.15rem);
    }
}

.site-brand__accent {
    color: var(--accent-red);
}

.site-nav {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 2rem;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.2em;
    text-transform: uppercase;
}

.site-nav__link {
    border-bottom: 1px solid transparent;
    transition: color 0.2s, border-color 0.2s;
}

.site-nav__link:hover {
    color: var(--accent-red);
    border-bottom-color: var(--accent-red);
}

/* Hero — 80% высоты окна (первый экран) */
.hero {
    position: relative;
    height: 80vh;
    height: 80dvh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    overflow: hidden;
}

.hero__bg {
    position: absolute;
    inset: 0;
    z-index: 0;
}

.hero__img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: grayscale(1) sepia(0.2) contrast(1.1);
    opacity: 0.6;
}

.hero__panel {
    position: relative;
    z-index: 10;
    text-align: center;
    max-width: 56rem;
    background: rgba(255, 255, 255, 0.8);
    padding: 3rem;
    border: 1px solid var(--border-soft);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

@media (min-width: 768px) {
    .hero__panel {
        padding: 5rem;
    }
}

.hero__panel > * + * {
    margin-top: 1.5rem;
}

.hero__panel .hero__dots {
    margin-top: 2rem;
}

.hero__title {
    max-width: 100%;
    font-size: clamp(1.35rem, 3.8vw + 0.35rem, 2.65rem);
    line-height: 1.12;
    color: var(--ink-black);
    overflow-wrap: anywhere;
    word-break: break-word;
    hyphens: auto;
}

@media (min-width: 768px) {
    .hero__title {
        font-size: clamp(1.65rem, 2.8vw + 0.85rem, 3.1rem);
    }
}

.hero__title-accent {
    color: var(--accent-red);
}

.hero__rule {
    width: 6rem;
    height: 1px;
    background: #000;
    margin: 0 auto;
}

.hero__tagline {
    font-size: 1.125rem;
    letter-spacing: -0.025em;
    color: #374151;
    font-style: italic;
}

@media (min-width: 768px) {
    .hero__tagline {
        font-size: 1.25rem;
    }
}

.hero__dots {
    display: flex;
    justify-content: center;
    gap: 0.75rem;
}

.hero__dot {
    width: 0.5rem;
    height: 0.5rem;
    border-radius: 9999px;
}

.hero__dot--gold {
    background: var(--accent-warm);
}

.hero__dot--blue {
    background: var(--accent-blue);
}

.hero__dot--red {
    background: var(--accent-red);
}

/* Pros / advantages */
.pros-section {
    padding: 6rem 1.5rem;
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    max-width: 80rem;
    margin: 0 auto;
}

@media (min-width: 768px) {
    .pros-section {
        grid-template-columns: repeat(3, 1fr);
    }
}

.pros-card {
    padding: 2.5rem;
}

.pros-card__title {
    font-size: 1.25rem;
    margin: 0;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid #f3f4f6;
}

.pros-card__text {
    margin-top: 1.5rem;
    font-size: 0.875rem;
    line-height: 1.625;
    color: #4b5563;
}

/* Product categories — чередование широкой / компактной сетки */
.product-category {
    padding: 6rem 0;
    border-top: 1px solid var(--border-soft);
    border-bottom: 1px solid var(--border-soft);
}

.product-category--layout-wide {
    background: #ebe6dd;
}

.product-category--layout-compact {
    background: #fff;
}

.product-category__head {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    margin-bottom: 5rem;
    text-align: center;
}

@media (min-width: 768px) {
    .product-category__head--layout-wide {
        flex-direction: row;
        text-align: left;
        align-items: center;
    }
}

.product-category__head--layout-compact {
    margin-bottom: 6rem;
}

@media (min-width: 768px) {
    .product-category__head--layout-compact {
        flex-direction: row-reverse;
        align-items: center;
    }
}

.product-category__title {
    font-size: 3rem;
    color: var(--ink-black);
    margin: 0;
}

.product-category__subtitle {
    margin-top: 0.5rem;
    color: #6b7280;
    letter-spacing: 0.05em;
}

.product-category__intro {
    text-align: center;
    padding-right: 0;
    border-right: none;
}

@media (min-width: 768px) {
    .product-category__intro {
        text-align: right;
        padding-right: 2rem;
        border-right: 4px solid var(--accent-red);
    }
}

.product-category__intro .product-category__title {
    font-size: 3rem;
}

.product-category__intro p {
    margin-top: 0.5rem;
    color: #9ca3af;
}

.product-categories-cta {
    margin-top: 5rem;
    display: flex;
    justify-content: center;
}

.catalog-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    align-items: start;
}

@media (min-width: 640px) {
    .catalog-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (min-width: 1024px) {
    .catalog-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}

.catalog-tile {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.catalog-tile--offset-lg {
    margin-top: 0;
}

@media (min-width: 1024px) {
    .catalog-tile--offset-12 {
        margin-top: 3rem;
    }

    .catalog-tile--offset-8 {
        margin-top: 2rem;
    }
}

.catalog-tile__frame {
    position: relative;
    aspect-ratio: 1 / 1;
    background: #fff;
    margin-bottom: 1rem;
    overflow: hidden;
}

/* Кадр задаёт высоту — иначе img { height: auto } ломает компактную сетку */
.catalog-tile__img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    max-width: none;
    object-fit: contain;
    filter: none;
    transition: transform 0.5s ease;
}

.catalog-tile:hover .catalog-tile__img {
    transform: scale(1.05);
}

.filter-sepia-2 {
    filter: grayscale(1) sepia(0.2);
}

.filter-sepia-3 {
    filter: grayscale(1) sepia(0.3);
}

.filter-sepia-4 {
    filter: grayscale(1) sepia(0.4);
}

.filter-sepia-5 {
    filter: grayscale(1) sepia(0.5);
}

.catalog-caption__title {
    font-weight: 700;
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: -0.05em;
}

.catalog-caption__link {
    display: inline-block;
    margin-top: 0.5rem;
    font-size: 0.75rem;
    color: var(--accent-red);
    font-weight: 700;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    text-decoration: underline transparent;
    transition: text-decoration-color 0.2s;
    background: none;
    border: none;
    padding: 0;
    font-family: inherit;
    cursor: pointer;
}

a.catalog-caption__link {
    color: var(--accent-red);
}

.catalog-caption__link:hover {
    text-decoration: underline;
}

.catalog-grid-alt {
    display: grid;
    grid-template-columns: 1fr;
    gap: 4rem;
    align-items: start;
}

@media (min-width: 768px) {
    .catalog-grid-alt {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 4rem;
    }
}

.catalog-tile-alt {
    text-align: center;
    min-width: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.catalog-tile-alt > * + * {
    margin-top: 0;
}

.catalog-tile-alt__frame {
    position: relative;
    width: 100%;
    aspect-ratio: 1 / 1;
    background: #fff;
    margin-bottom: 1.5rem;
    overflow: hidden;
}

.catalog-tile-alt__img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    max-width: none;
    object-fit: contain;
    filter: none;
    transition: transform 0.5s ease;
}

.catalog-tile-alt:hover .catalog-tile-alt__img {
    transform: scale(1.05);
}

.catalog-tile-alt__body > * + * {
    margin-top: 0.5rem;
}

.catalog-tile-alt__body p {
    font-weight: 700;
    font-size: 1.125rem;
    letter-spacing: -0.05em;
}

.price-link {
    display: inline-block;
    font-size: 0.75rem;
    border: 1px solid #000;
    padding: 0.6rem 1.65rem;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    text-decoration: none;
    color: inherit;
    background: transparent;
    font-family: inherit;
    cursor: pointer;
    transition:
        background-color 0.2s,
        color 0.2s;
}

.price-link:hover {
    background: #000;
    color: #fff;
}

.btn-collection {
    font-size: 1.125rem;
    padding: 1.25rem 4rem;
    border: 1px solid #000;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
    transition:
        background-color 0.2s,
        color 0.2s;
}

.btn-collection:hover {
    background: #000;
    color: #fff;
}

a.btn-collection {
    display: inline-block;
    text-decoration: none;
    color: inherit;
}

/* Curator / Editorial dark */
.section-editorial {
    position: relative;
    padding: 8rem 0;
    background: #1a1714;
    color: #fff;
}

.editorial-grid {
    position: relative;
    z-index: 10;
    display: grid;
    grid-template-columns: 1fr;
    gap: 5rem;
    align-items: center;
}

@media (min-width: 1024px) {
    .editorial-grid {
        grid-template-columns: repeat(12, 1fr);
        gap: 5rem;
    }

    .editorial-grid__aside {
        grid-column: span 5;
    }

    .editorial-grid__main {
        grid-column: span 7;
    }
}

.editorial-card {
    padding: 1rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

.editorial-card__img {
    width: 100%;
    filter: grayscale(1) sepia(0.2) contrast(1.2);
}

.editorial-card__footer {
    margin-top: 2rem;
    text-align: center;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 1.5rem;
}

.editorial-card__footer h2 {
    font-size: 1.5rem;
    color: var(--accent-warm);
}

.editorial-card__footer p {
    margin-top: 0.5rem;
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.3em;
    color: rgba(255, 255, 255, 0.4);
}

.editorial-grid__main > * + * {
    margin-top: 2.5rem;
}

/* Заголовок About — компактнее при длинных подстановках */
.editorial-grid__main .about-heading {
    max-width: 100%;
    margin: 0;
    font-size: clamp(1.2rem, 2.4vw + 0.45rem, 2.15rem);
    line-height: 1.15;
    overflow-wrap: anywhere;
    word-break: break-word;
    hyphens: auto;
}

@media (min-width: 768px) {
    .editorial-grid__main .about-heading {
        font-size: clamp(1.35rem, 1.8vw + 0.85rem, 2.5rem);
    }
}

.editorial-grid__rule {
    width: 5rem;
    height: 0.25rem;
    background: var(--accent-red);
}

.editorial-grid__text {
    font-size: 1rem;
    line-height: 1.625;
    color: #9ca3af;
}

/* Testimonials */
.section-testimonials {
    padding: 8rem 0;
    background: var(--paper-color);
}

.section-testimonials__title {
    font-size: 2.25rem;
    text-align: center;
    margin: 0 auto 6rem;
    color: var(--ink-black);
    opacity: 0.8;
}

.testimonials-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 3rem;
}

@media (min-width: 768px) {
    .testimonials-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.testimonial {
    padding: 2.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.testimonial--lift {
    margin-top: 0;
}

@media (min-width: 768px) {
    .testimonial--lift {
        transform: translateY(-2rem);
    }
}

.testimonial__avatar {
    width: 5rem;
    height: 5rem;
    border-radius: 9999px;
    overflow: hidden;
    margin-bottom: 1.5rem;
    border: 1px solid var(--border-soft);
    filter: grayscale(1) contrast(1.1);
}

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

.testimonial__quote {
    font-size: 0.75rem;
    text-align: center;
    font-style: italic;
    color: #6b7280;
    line-height: 1.625;
    margin-bottom: 1.5rem;
}

.testimonial__author {
    margin: 0;
    font-size: 10px;
    letter-spacing: 0.2em;
    color: var(--accent-warm);
}

/* Footer */
.site-footer {
    background: #12100e;
    color: #fff;
    padding: 6rem 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.site-footer__inner {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: space-between;
    gap: 3rem;
}

@media (min-width: 768px) {
    .site-footer__inner {
        flex-direction: row;
    }
}

.site-footer__contact-wrap > * + * {
    margin-top: 2rem;
}

.site-footer__brand {
    max-width: 100%;
    font-size: clamp(1.1rem, 2.5vw + 0.4rem, 1.85rem);
    color: var(--accent-red);
    border-left: 2px solid var(--accent-red);
    padding-left: 1rem;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.site-footer__contact > * + * {
    margin-top: 0.75rem;
}

.site-footer__contact {
    font-size: 0.75rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    opacity: 0.6;
}

.site-footer__contact-label {
    color: var(--accent-blue);
}

.site-footer__nav {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem 4rem;
    font-size: 10px;
    letter-spacing: 0.2em;
    text-transform: uppercase;
}

@media (min-width: 640px) {
    .site-footer__nav {
        grid-template-columns: repeat(2, auto);
    }
}

.site-footer__nav a {
    transition: color 0.2s;
}

.site-footer__nav a:hover {
    color: var(--accent-red);
}

.site-footer__legal {
    margin-top: 6rem;
    padding-top: 3rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    font-size: 9px;
    text-transform: uppercase;
    letter-spacing: 0.3em;
    opacity: 0.3;
}

.site-footer__legal > * + * {
    margin-top: 1rem;
}
