/*
Theme Name: Щрих
Description: Българска тема за галерия с карикатури и подготовка на заявка.
Version: 1.2.0
Requires at least: 6.4
Requires PHP: 7.4
Text Domain: shtrih
*/

:root {
    color-scheme: light;
    --paper: #fffcf4;
    --ink: #271f38;
    --muted: #625a70;
    --violet: #5b38cf;
    --violet-dark: #4424ae;
    --lavender: #eee8ff;
    --line: #ded4ea;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: system-ui, -apple-system, "Segoe UI", sans-serif; line-height: 1.6; }
img { max-width: 100%; }
a { color: inherit; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid var(--violet); outline-offset: 4px; }
.wrap { width: min(1190px, calc(100% - 88px)); margin-inline: auto; }
.skip-link { position: fixed; top: 10px; left: 10px; z-index: 99999; padding: 10px 18px; background: white; transform: translateY(-180%); }
.skip-link:focus { transform: translateY(0); }
section[id] { scroll-margin-top: 24px; }

.site-header { border-bottom: 1px solid #eae3db; }
.header-inner, .footer-inner { min-height: 76px; display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.wordmark { display: inline-flex; align-items: center; gap: 7px; color: var(--ink); font-size: 30px; line-height: 1; font-weight: 850; letter-spacing: -.075em; text-decoration: none; white-space: nowrap; }
.logo-mark { display: inline-grid; place-items: center; width: 31px; height: 31px; margin-right: 1px; border-radius: 50%; color: white; background: var(--violet); font-size: 21px; letter-spacing: 0; }
.logo-period { margin-left: -6px; color: var(--violet); }
.site-nav { display: flex; align-items: center; gap: clamp(16px, 3vw, 36px); }
.site-nav a, .back-top { font-size: .91rem; font-weight: 680; text-decoration: none; }
.site-nav a:hover, .back-top:hover { color: var(--violet); }
.site-nav .nav-cta { padding: 8px 14px; border: 1px solid var(--line); border-radius: 8px; }
.nav-cta span { padding-left: 4px; }

.hero { display: grid; grid-template-columns: minmax(0, .92fr) minmax(0, 1.08fr); align-items: center; gap: clamp(32px, 6vw, 74px); padding-block: clamp(56px, 8vw, 106px); }
.eyebrow { display: flex; align-items: center; gap: 8px; margin: 0 0 14px; color: var(--violet-dark); font-size: .75rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.eyebrow span { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
h1, h2, h3, p { margin-top: 0; }
h1, h2, h3 { line-height: 1.07; }
h1 { margin-bottom: 21px; font-size: clamp(2.85rem, 5.05vw, 5rem); font-weight: 850; letter-spacing: -.083em; }
h1 em { color: var(--violet); font-style: normal; }
h2 { margin-bottom: 0; font-size: clamp(2rem, 4vw, 3.55rem); font-weight: 825; letter-spacing: -.07em; }
h3 { margin-bottom: 10px; font-size: 1.28rem; letter-spacing: -.036em; }
.lede { max-width: 39ch; margin-bottom: 25px; color: var(--muted); font-size: clamp(1.02rem, 1.5vw, 1.22rem); }
.hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 19px; }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 12px; min-height: 48px; padding: 11px 17px; border: 1px solid transparent; border-radius: 9px; font-size: .93rem; font-weight: 730; text-align: center; text-decoration: none; }
.button-main { background: var(--violet); color: white; }
.button-main:hover { background: var(--violet-dark); }
.text-link { display: inline-block; padding: 2px 0; border: 0; background: none; color: var(--violet-dark); font-size: .92rem; font-weight: 730; text-decoration: underline; text-underline-offset: .27em; }
.text-link:hover { color: var(--ink); }

.hero-art { position: relative; margin: 0 5px 0 0; padding: 10px 10px 0; border: 1px solid #e9d8bd; border-radius: 14px; background: #fffef9; box-shadow: 8px 8px 0 #f4ddb1; transform: rotate(1.7deg); }
.hero-art .art { border-radius: 7px; }
.hero-art figcaption { padding: 7px 3px 8px; color: var(--muted); font-size: .75rem; font-weight: 630; }
.hero-spark { position: absolute; z-index: 1; top: -25px; right: -15px; color: var(--violet); font-size: clamp(34px, 6vw, 58px); line-height: 1; transform: rotate(12deg); text-shadow: 3px 3px var(--paper); }
.art { display: block; width: 100%; aspect-ratio: 3 / 2; background-image: url("assets/caricatures-v2.png"); background-repeat: no-repeat; background-size: 200% 200%; }
.art-couple { background-color: #ec9c31; background-position: left top; }
.art-wedding { background-color: #e68887; background-position: right top; }
.art-portrait { background-color: #7ab7d7; background-position: left bottom; }
.art-pet { background-image: url("assets/caricatures.png"); background-color: #8fc0a4; background-position: right bottom; }

.gallery-section { padding-block: clamp(52px, 7vw, 82px); background: var(--lavender); }
.section-top { display: flex; justify-content: space-between; align-items: end; gap: 20px; margin-bottom: 28px; }
.section-top h2 { max-width: 18ch; }
.filters { display: flex; gap: 6px; flex-wrap: wrap; }
.filter { padding: 6px 12px; border: 1px solid #cfc0e7; border-radius: 99px; background: transparent; color: var(--ink); font-size: .82rem; font-weight: 670; }
.filter:hover { border-color: var(--violet); }
.filter[aria-pressed="true"] { border-color: var(--violet); background: var(--violet); color: white; }
.gallery-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 15px; }
.card-button { width: 100%; padding: 7px; border: 1px solid #dbcce9; border-radius: 13px; background: #fffdfa; color: var(--ink); text-align: left; }
.card-button:hover { border-color: var(--violet); }
.card-button .art { border-radius: 8px; }
.card-caption { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 10px 8px 6px; line-height: 1.3; }
.card-category { display: block; margin-bottom: 3px; color: var(--muted); font-size: .72rem; }
.card-caption strong { font-size: clamp(.88rem, 1.5vw, 1.13rem); }
.card-arrow { color: var(--violet); font-size: 1.12rem; }

.process { padding-block: clamp(56px, 8vw, 98px); }
.steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; padding: 0; margin: 29px 0 0; list-style: none; }
.steps li { padding-top: 15px; border-top: 1px solid var(--line); }
.step-number { display: block; margin-bottom: 12px; color: var(--violet); font-size: .76rem; font-weight: 800; }
.steps p { margin: 0; color: var(--muted); }

.request-section { padding-block: clamp(53px, 7vw, 84px); background: #f7e7c7; }
.request-inner { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: clamp(24px, 5vw, 65px); align-items: start; }
.request-inner h2 { margin-bottom: 13px; }
.request-inner p { max-width: 38ch; color: var(--muted); }
.style-options { min-width: 0; margin: 20px 0 0; padding: 0; border: 0; }
.style-options legend { margin-bottom: 7px; padding: 0; font-size: .88rem; font-weight: 720; }
.style-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
.style-choice { display: flex; flex-direction: column; min-width: 0; padding: 5px; border: 1px solid #e8cfa3; border-radius: 10px; background: var(--paper); cursor: pointer; }
.style-choice:hover { border-color: var(--violet); }
.style-choice:has(input:checked) { border-color: var(--violet); box-shadow: inset 0 0 0 1px var(--violet); }
.style-example { display: block; aspect-ratio: 1; border-radius: 5px; background-color: #f3bb91; background-repeat: no-repeat; }
.style-example--realistic { background-image: url("assets/style-realistic-v2.png"); background-position: center; background-size: cover; }
.style-example--animated { background-image: url("assets/style-examples.png"); background-position: right 12%; background-size: 200% auto; }
.style-choice-text { display: flex; align-items: flex-start; gap: 7px; padding: 7px 3px 4px; font-size: .84rem; line-height: 1.35; }
.style-choice-text input { flex: 0 0 auto; margin: 2px 0 0; accent-color: var(--violet); }
.style-choice-text small { display: block; margin-top: 2px; color: var(--muted); font-size: .75rem; }
.request-form { padding: clamp(17px, 3vw, 29px); border: 1px solid #ecd7ad; border-radius: 14px; background: var(--paper); }
.request-form label { display: block; margin-bottom: 13px; font-size: .88rem; font-weight: 720; }
.optional { color: var(--muted); font-size: .75rem; font-weight: 500; }
.request-form :is(input, select, textarea) { display: block; width: 100%; min-width: 0; margin-top: 5px; padding: 7px 9px; border: 1px solid var(--line); border-radius: 6px; background: white; color: var(--ink); font-size: .9rem; font-weight: 450; }
.request-form .photo-label { margin-bottom: 0; }
.request-form input[type="file"]::file-selector-button { margin-right: 9px; padding: 6px 8px; border: 0; border-radius: 4px; background: var(--lavender); color: var(--violet-dark); font: inherit; font-weight: 700; cursor: pointer; }
.request-form .field-help { margin: 4px 0 14px; max-width: none; font-size: .77rem; }
.request-form textarea { resize: vertical; }
.request-delivery { min-width: 0; margin: 20px 0 0; padding: 8px 0 0; border: 0; border-top: 1px solid #e8cfa3; }
.request-delivery legend { padding: 0 8px 0 0; font-size: .96rem; font-weight: 780; }
.delivery-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 12px; }
.delivery-field--address { grid-column: 1 / -1; }
.request-form button:disabled { opacity: .7; cursor: wait; }
.request-form .form-status { margin: 10px 0 0; max-width: none; font-size: .85rem; }
.form-status:empty { display: none; }
.form-status[data-state="error"] { color: #962126; }
.form-status[data-state="sent"] { color: #205e43; }

.site-footer { padding-block: 10px; }
.footer-inner { flex-wrap: wrap; }
.footer-inner p { margin: 0; color: var(--muted); font-size: .87rem; }
.gallery-dialog { width: min(760px, calc(100% - 28px)); max-height: calc(100% - 32px); padding: 11px; border: 1px solid var(--line); border-radius: 15px; background: var(--paper); color: var(--ink); }
.gallery-dialog::backdrop { background: #251b36b8; }
.gallery-dialog .art { border-radius: 8px; }
.gallery-dialog h2 { padding: 12px 3px 5px; font-size: 1.4rem; }
.dialog-close { position: absolute; top: 18px; right: 18px; width: 40px; height: 40px; border: 1px solid var(--line); border-radius: 50%; background: var(--paper); color: var(--ink); font-size: 1.6rem; line-height: 1; }
.page-content { min-height: 55vh; padding-block: 55px; }

@media (max-width: 850px) {
    .wrap { width: calc(100% - 48px); }
    .hero { gap: 26px; }
    .section-top { display: block; }
    .section-top h2 { margin-bottom: 16px; }
}

@media (max-width: 640px) {
    .wrap { width: calc(100% - 34px); }
    .header-inner { min-height: 67px; gap: 10px; }
    .wordmark { font-size: 25px; }
    .logo-mark { width: 27px; height: 27px; font-size: 17px; }
    .site-nav { gap: 11px; }
    .site-nav a { font-size: .74rem; }
    .site-nav .nav-cta { padding: 6px 7px; }
    .site-nav .nav-cta span { display: none; }
    .hero { grid-template-columns: 1fr; gap: 31px; }
    .hero-art { margin-inline: 5px 8px; }
    .hero-spark { right: -9px; top: -16px; }
    .gallery-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
    .card-caption { padding-inline: 4px; }
    .steps, .request-inner { grid-template-columns: 1fr; }
    .request-inner { gap: 18px; }
    .steps { gap: 15px; }
    .footer-inner { gap: 9px 16px; }
}

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

@media (max-width: 350px) {
    .gallery-grid { grid-template-columns: 1fr; }
    .site-nav { gap: 7px; }
    h1 { font-size: 2.45rem; }
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
}
