/*
Theme Name: Trinkelių meistrai
Theme URI: https://trinkeliumeistrai.lt/
Description: Lietuviška tema gerbūvio darbų ir trinkelių klojimo svetainei.
Version: 2.0.3
Requires at least: 6.5
Requires PHP: 8.0
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: trinkeliumeistrai
*/

@font-face {
    font-family: Manrope;
    font-style: normal;
    font-display: swap;
    font-weight: 200 800;
    src: url(assets/manrope-latin-ext-wght-normal.woff2) format('woff2');
    unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF;
}

@font-face {
    font-family: Manrope;
    font-style: normal;
    font-display: swap;
    font-weight: 200 800;
    src: url(assets/manrope-latin-wght-normal.woff2) format('woff2');
    unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;
}

:root {
    --ink: #1e211e;
    --muted: #55564e;
    --dark: #181b18;
    --dark-green: #232a22;
    --paper: #f6f4ee;
    --white: #fffdf8;
    --line: #dcd8ce;
    --gold: #eac483;
    --gold-hover: #f8d8a3;
    --bronze: #77501d;
    --width: 1250px;
    --radius-small: 8px;
    --radius-card: 12px;
    --radius-section: 16px;
    color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 16px/1.65 Manrope, system-ui, sans-serif; }
button, input, textarea { font: inherit; }
button { cursor: pointer; }
button, .button, input[type="button"], input[type="submit"], input[type="reset"],
.wp-block-button .wp-block-button__link { border-radius: var(--radius-small); }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-underline-offset: .2em; }
a:focus-visible, button:focus-visible, summary:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
    outline: 2px solid #a85d13;
    outline-offset: 4px;
}
h1, h2, h3 { margin: 0 0 .55em; line-height: 1.04; font-weight: 800; letter-spacing: -.063em; overflow-wrap: anywhere; }
h2 { font-size: clamp(2rem, 4.05vw, 3.55rem); }
p { margin: 0 0 1em; }
.wrap { width: min(var(--width), calc(100% - 96px)); margin-inline: auto; }
.skip-link, .screen-reader-text { position: absolute; width: 1px; height: 1px; clip-path: inset(50%); overflow: hidden; white-space: nowrap; }
.skip-link:focus, .screen-reader-text:focus { z-index: 5; top: 12px; left: 12px; width: auto; height: auto; padding: 12px; clip-path: none; background: var(--white); color: var(--ink); }

.site-header { position: relative; z-index: 2; background: var(--dark); color: var(--white); border-bottom: 1px solid #ffffff20; }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 27px; min-height: 80px; }
.brand { display: inline-flex; align-items: center; gap: 12px; flex: 0 0 auto; color: var(--white); text-decoration: none; font-size: 21px; line-height: 1; font-weight: 800; letter-spacing: -.06em; }
.brand-secondary, .footer-brand span { color: var(--gold); }
.brand small { display: block; margin-top: 7px; font-size: 8px; letter-spacing: .21em; color: #e1ded3; }
.brand-icon { width: 32px; height: 32px; display: grid; gap: 3px; grid-template-columns: 1fr 1fr; rotate: -10deg; }
.brand-icon i { border: 1px solid var(--gold); border-radius: 2px; }
.brand-icon i:nth-child(2), .brand-icon i:nth-child(3) { background: var(--gold); }
.custom-logo { max-width: 190px; max-height: 54px; object-fit: contain; }
.site-nav { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: clamp(12px, 1.8vw, 29px); }
.site-nav a { color: #e2e2da; padding-block: 10px; font-size: 13px; font-weight: 750; text-decoration: none; white-space: nowrap; }
.site-nav a:hover, .site-nav a[aria-current] { color: var(--gold); }
.menu-toggle { padding: 9px 12px; border: 1px solid #ffffff56; background: transparent; color: var(--white); min-height: 44px; }
.menu-toggle span { margin-left: 5px; }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 18px; min-height: 51px; padding: 11px 20px; border: 1px solid var(--gold); background: var(--gold); color: #201911; text-decoration: none; font-size: 14px; font-weight: 800; line-height: 1.35; }
.button:hover { background: var(--gold-hover); border-color: var(--gold-hover); }
.button span { font-size: 17px; }
.header-cta .button { min-height: 42px; padding: 8px 14px; gap: 10px; white-space: nowrap; }
.button-outline { border-color: #fff8; color: var(--white); background: #1b1b1970; }
.button-outline:hover { border-color: var(--white); color: #161815; background: var(--white); }

.eyebrow { display: flex; align-items: center; gap: 10px; color: var(--bronze); text-transform: uppercase; font-size: 12px; font-weight: 800; letter-spacing: .16em; margin: 0 0 20px; }
.eyebrow span { display: inline-block; width: 26px; height: 2px; flex: 0 0 auto; background: currentColor; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; }

.service-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; }
.service-card { display: flex; min-width: 0; flex-direction: column; text-decoration: none; padding: 23px 17px 17px; border: 1px solid var(--line); background: var(--white); }
.service-card:hover { border-color: var(--bronze); }
.service-icon { display: grid; place-items: center; width: 44px; height: 44px; border-radius: var(--radius-small); background: #efe6d4; color: #62431b; font: 27px/1 system-ui, sans-serif; margin-bottom: 20px; }
.service-card .service-title { font-size: clamp(1.2rem, 1.7vw, 1.6rem); letter-spacing: -.045em; }
.service-card p { color: var(--muted); font-size: 14px; }
.card-link { display: inline-flex; align-items: baseline; gap: 6px; color: var(--bronze); font-size: 14px; font-weight: 800; }
.service-card .card-link { margin-top: auto; }


.page-heading { background: var(--dark-green); color: var(--white); padding-block: clamp(36px, 6vw, 76px); border-bottom: 3px solid #a1814c; }
.page-heading h1 { margin: 0; font-size: clamp(2.65rem, 6.5vw, 5.35rem); }
.page-heading p { margin: 16px 0 0; color: #dfddce; }
.breadcrumbs { margin-bottom: 20px; color: #ead4ac; font-size: 13px; }
.breadcrumbs ol { display: flex; flex-wrap: wrap; list-style: none; margin: 0; padding: 0; gap: 8px; }
.breadcrumbs li + li::before { content: '›'; margin-right: 8px; }
.page-content { min-height: 270px; padding-block: clamp(35px, 6vw, 80px); }
.page-content.prose { max-width: 850px; }
.prose h2 { font-size: clamp(1.6rem, 3.2vw, 2.5rem); margin-top: 1.2em; }
.prose h3 { font-size: 1.4rem; margin-top: 1.1em; }
.prose p, .prose li { color: #353831; }
.prose .button { margin-top: 14px; }
.article-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.article-card { display: flex; flex-direction: column; background: var(--white); border: 1px solid var(--line); }
.article-card-content { padding: 24px; }
.article-card h2 { font-size: 1.5rem; line-height: 1.18; letter-spacing: -.045em; }
.article-card h2 a { text-decoration: none; }
.article-card h2 a:hover { text-decoration: underline; }
.article-card p, .empty-gallery { color: var(--muted); }
ul.page-numbers { display: flex; flex-wrap: wrap; gap: 12px; padding: 0; list-style: none; margin: 22px 0; }
.page-numbers .current { font-weight: 800; }
.faq details { border: 1px solid var(--line); border-radius: var(--radius-card); padding: 0 14px; }
.faq details + details { margin-top: 8px; }
.faq summary { cursor: pointer; font-size: 1.13rem; font-weight: 800; padding: 15px 0; }
.faq details p { padding-left: 18px; }
.faq + .button { margin-top: 24px; }
.wp-block-gallery { margin: 0; }
.wp-block-gallery figcaption { overflow-wrap: anywhere; }

.contact-layout { display: grid; grid-template-columns: minmax(0, .72fr) minmax(0, 1.5fr); grid-template-areas: "details form"; gap: 25px; align-items: start; }
.contact-aside, .form-panel { padding: clamp(20px, 3.3vw, 40px); }
.contact-aside { grid-area: details; background: var(--dark-green); color: var(--white); }
.contact-aside h2, .form-panel h2 { font-size: clamp(1.7rem, 4vw, 2.7rem); }
.contact-aside a { color: var(--gold); overflow-wrap: anywhere; }
.form-panel { grid-area: form; background: var(--white); border: 1px solid var(--line); scroll-margin-top: 22px; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 15px; }
.form-grid .full { grid-column: 1 / -1; }
.form-grid label, .form-grid legend { font-size: 14px; font-weight: 800; }
.form-grid input:not([type=checkbox]), .form-grid textarea { display: block; width: 100%; min-height: 44px; padding: 9px 11px; margin-top: 5px; color: var(--ink); border: 1px solid #99938a; border-radius: var(--radius-small); background: #fffefa; font-weight: 550; }
.form-grid textarea { resize: vertical; }
.form-grid fieldset { min-width: 0; margin: 0; border: 1px solid var(--line); padding: 12px; }
.form-note { color: var(--muted); font-size: 13px; margin: 14px 0; }
.honeypot { position: absolute; width: 1px; height: 1px; clip-path: inset(50%); overflow: hidden; }
.form-status { padding: 12px; border-left: 4px solid #3f6b3a; background: #e8f0e4; }
.form-status.error { border-color: #9b3d2c; background: #fce9e2; }

.site-footer { background: var(--dark); color: #f3f0e5; padding: 43px 0 25px; }
.footer-inner { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 22px; }
.footer-brand { font-size: 23px; font-weight: 800; text-decoration: none; letter-spacing: -.055em; }
.footer-inner p { color: #cccbbf; margin: 5px 0 0; font-size: 14px; }
.footer-links, .footer-contacts { display: flex; flex-direction: column; align-items: start; gap: 4px; font-size: 14px; }
.footer-contacts a { overflow-wrap: anywhere; }
.footer-inner .copyright { grid-column: 1 / -1; padding-top: 19px; border-top: 1px solid #ffffff24; font-size: 12px; }

.mobile-actions { display: none; }

@media (max-width: 1120px) {
    .wrap { width: calc(100% - 64px); }
}
@media (max-width: 1000px) {
    .header-inner { flex-wrap: wrap; min-height: 68px; padding-block: 10px; gap: 10px; }
    .header-cta { display: none; }
    .site-nav { display: grid; flex: 0 0 100%; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 12px; padding-top: 4px; }
    .site-nav a { display: flex; align-items: center; min-height: 48px; padding: 8px 12px; border-top: 1px solid #ffffff26; font-size: 15px; white-space: normal; }
    .service-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .form-grid input:not([type=checkbox]), .form-grid textarea { font-size: 16px; min-height: 48px; }
}
@media (max-width: 700px) {
    html { scroll-padding-bottom: calc(78px + env(safe-area-inset-bottom, 0px)); }
    .wrap { width: calc(100% - 36px); }
    .header-inner { min-height: 64px; }
    .menu-toggle { font-size: 14px; margin-left: auto; }
    .hero-actions { gap: 9px; }
    .contact-layout { grid-template-columns: minmax(0, 1fr); gap: 22px; }
    .contact-layout { grid-template-areas: "form" "details"; }
    .service-grid, .article-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .form-panel button[type=submit] { width: 100%; }
    .page-heading { padding-block: 30px 34px; }
    .page-heading h1 { font-size: clamp(2.1rem, 8vw, 3.35rem); }
    .page-content { padding-block: 27px 40px; }
    .site-footer { padding-bottom: calc(94px + env(safe-area-inset-bottom, 0px)); }
    .footer-inner { grid-template-columns: 1fr 1.5fr; gap: 16px; }
    .footer-inner > div:first-child { grid-column: 1 / -1; }
    .footer-links a, .footer-contacts a { display: inline-flex; align-items: center; min-height: 44px; }
    .mobile-actions {
        position: fixed;
        z-index: 3;
        left: 0;
        right: 0;
        bottom: 0;
        display: flex;
        gap: 10px;
        padding: 8px max(14px, env(safe-area-inset-right, 0px)) calc(8px + env(safe-area-inset-bottom, 0px)) max(14px, env(safe-area-inset-left, 0px));
        background: var(--dark);
        border-top: 1px solid #ffffff30;
    }
    .mobile-actions > .button { flex: 1; min-height: 48px; }
    .mobile-actions .button-call { background: transparent; border-color: #ffffff60; color: var(--white); }
    .mobile-actions .button-call:hover { background: #ffffff18; }
    body:has(.form-grid input:focus, .form-grid select:focus, .form-grid textarea:focus) .mobile-actions { display: none; }
}
@media (max-width: 450px) {
    .wrap { width: calc(100% - 32px); }
    .brand { font-size: clamp(17px, 5.1vw, 21px); gap: 8px; }
    .brand-icon { width: 27px; height: 27px; }
    .custom-logo { max-width: min(190px, 57vw); }
    .hero-actions > .button { flex: 1 1 120px; }
    .form-grid, .service-grid, .article-grid { grid-template-columns: minmax(0, 1fr); }
    .service-card { display: grid; grid-template-columns: 40px minmax(0, 1fr); column-gap: 13px; padding: 15px; }
    .service-icon { grid-row: 1 / span 3; width: 40px; height: 40px; margin: 0; }
    .service-card .service-title { font-size: 1.24rem; margin-bottom: 5px; }
    .service-card p, .service-card .card-link { grid-column: 2; }
    .service-card p { margin-bottom: 6px; }
    .contact-aside, .form-panel { padding: 16px; }
    .button { padding-inline: 12px; gap: 7px; }
}

/* Homepage */
.hero { position: relative; display: grid; align-items: center; min-height: clamp(520px, 46vw, 666px); isolation: isolate; overflow: hidden; background: #232621; color: var(--white); }
.hero-image, .hero::after { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -1; }
.hero-image { object-fit: cover; object-position: center 58%; }
.hero::after { content: ''; background: linear-gradient(90deg, #131a15f0 0%, #131a15c9 26%, #131a1578 54%, #131a1520 100%), linear-gradient(0deg, #131a156a, transparent 48%); }
.hero-content { padding-block: 67px; }
.hero .eyebrow { color: var(--gold); }
.hero h1 { max-width: 15ch; font-size: clamp(3.2rem, 6.4vw, 6.1rem); line-height: .99; margin-bottom: .3em; }
.hero h1 em { color: var(--gold); font-style: normal; }
.hero-lede { font-size: clamp(1rem, 1.4vw, 1.25rem); max-width: 550px; color: #f2efe5; margin-bottom: 26px; }
.hero-area { margin: 16px 0 0; color: #f8deb1; font-weight: 750; }
.hero-summary { background: var(--dark); }
.hero-notes { display: flex; flex-wrap: wrap; gap: 10px clamp(18px, 4vw, 58px); padding-block: 15px; }
.hero-notes span { display: flex; align-items: baseline; gap: 9px; color: #ebe5d6; font-size: .91rem; font-weight: 750; }
.hero-notes span::before { content: '▪'; color: var(--gold); }

.home-section { padding-block: clamp(44px, 7vw, 96px); }
.home-heading { display: grid; grid-template-columns: 1.3fr 1fr; align-items: end; gap: 18px 40px; margin-bottom: 27px; }
.home-heading h2, .home-heading p { margin: 0; }
.home-heading p { color: var(--muted); max-width: 45ch; }
.home-heading > .card-link { justify-self: end; }
.primary-service {
    padding: clamp(24px, 4vw, 45px);
    background: var(--dark-green);
    color: var(--white);
}
.primary-service :is(h2, h3) { font-size: clamp(1.7rem, 3.9vw, 3rem); max-width: 19ch; }
.primary-service p { color: #ddd8cb; max-width: 53ch; }
.service-links { display: flex; flex-wrap: wrap; gap: 6px 22px; }
.service-links a { display: inline-flex; align-items: center; gap: 7px; min-height: 44px; color: var(--gold); font-weight: 750; }
.additional-heading { margin-block: 28px 15px; font-size: 1.34rem; }
.service-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.primary-service ~ .service-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.service-detail { border-top: 1px solid var(--line); margin-top: 35px; padding-top: 30px; }
.service-detail p { max-width: 72ch; }

.home-about { background: #e9e3d5; }
.about-layout, .faq-layout { display: grid; grid-template-columns: .9fr 1.1fr; gap: clamp(28px, 6vw, 90px); align-items: start; }
.about-layout p:not(.eyebrow) { max-width: 53ch; }
.about-details { margin: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.about-details > div { padding: 15px; border: 1px solid #a376436f; border-radius: var(--radius-card); }
.about-details dt { font-size: 1.05rem; font-weight: 800; }
.about-details dd { color: var(--muted); margin: 6px 0 0; font-size: .92rem; }
.gallery-promo { background: var(--dark); color: var(--white); overflow: hidden; }
.gallery-promo .eyebrow { color: var(--gold); }
.gallery-promo .button { margin: 4px 6px 4px 0; }
.gallery-promo p:not(.eyebrow) { color: #ddd8cb; max-width: 55ch; }

.estimate-steps { counter-reset: estimate; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); list-style: none; margin: 26px 0 23px; padding: 0; gap: 14px; }
.estimate-steps li { counter-increment: estimate; border: 1px solid #9a75496f; border-radius: var(--radius-card); padding: 16px 12px 0; }
.estimate-steps li::before { content: counter(estimate, decimal-leading-zero); display: block; color: var(--bronze); font-weight: 800; font-size: .93rem; margin-bottom: 9px; }
.estimate-steps h3 { letter-spacing: -.035em; font-size: 1.18rem; }
.estimate-steps p { color: var(--muted); font-size: .92rem; }
.home-faq { background: #fffaf1; }
.home-articles { background: #ebe6db; }
.article-card h3 { font-size: 1.35rem; line-height: 1.2; letter-spacing: -.04em; }
.article-card :is(h2, h3) a { text-decoration: none; }
.article-card :is(h2, h3) a:hover { text-decoration: underline; }
.home-contact { background: var(--dark); color: var(--white); }
.home-contact > .wrap > .eyebrow { color: var(--gold); }
.home-contact .form-panel { color: var(--ink); }

.form-panel h3, .contact-aside h3 { font-size: clamp(1.5rem, 3vw, 2.2rem); line-height: 1.12; }
.form-grid select { width: 100%; min-height: 48px; margin-top: 5px; border: 1px solid #99938a; border-radius: var(--radius-small); background: #fffefa; color: var(--ink); font: 550 16px/1.4 Manrope, system-ui, sans-serif; padding: 7px; }
.optional-fields summary { cursor: pointer; color: var(--bronze); font-weight: 800; }
.optional-fields .form-grid { margin-top: 12px; }
.contact-aside { scroll-margin-top: 20px; }
.contact-methods { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin: 24px 0 18px; }
.contact-methods a { display: grid; align-content: center; min-height: 52px; padding: 8px 10px; border: 1px solid #ffffff40; border-radius: var(--radius-small); text-decoration: none; line-height: 1.35; }
.contact-methods a:first-child, .contact-methods a:last-child { grid-column: 1 / -1; }
.contact-methods a:hover { border-color: var(--gold); }
.contact-methods a span { font-size: .83rem; color: #e5e0d7; }
.contact-aside .card-link { color: var(--gold); }

.project-list { display: grid; gap: 32px; }
.project { padding: clamp(16px, 3.4vw, 40px); border: 1px solid var(--line); background: var(--white); }
.project h2 { font-size: clamp(1.6rem, 3.6vw, 2.65rem); }
.project h3 { font-size: 1.16rem; letter-spacing: -.035em; }
.project figure { margin: 0; }
.project .wp-block-columns { margin: 22px 0 0; }
.project img { width: 100%; }

@media (max-width: 1000px) {
    .primary-service ~ .service-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
    .hero { min-height: 485px; }
    .hero-image { object-position: 62% 50%; }
    .hero::after { background: linear-gradient(90deg, #131a15ed, #131a1584), linear-gradient(0deg, #131a157f, transparent 44%); }
    .hero h1 { font-size: clamp(2.45rem, 8.4vw, 4.1rem); line-height: 1.03; }
    .hero-content { padding-block: 46px; }
    .hero-notes { gap: 7px 15px; padding-block: 12px; }
    .hero-notes span { font-size: .8rem; }

    .home-heading, .about-layout, .faq-layout { grid-template-columns: 1fr; }
    .home-heading > .card-link { justify-self: start; }
    .estimate-steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 450px) {
    .primary-service ~ .service-grid, .service-grid { grid-template-columns: minmax(0, 1fr); }
}

/* Corners for panels, content blocks and image frames. */
.service-card, .article-card, .primary-service, .project, .contact-aside,
.form-panel, .form-grid fieldset, .optional-fields, .wp-block-image img,
.wp-block-gallery img, .wp-block-cover, .page-content .wp-block-group.has-background,
.page-content .wp-block-table {
    border-radius: var(--radius-card);
}
.form-status, .skip-link:focus { border-radius: var(--radius-small); }
.page-heading, .site-header, .hero-summary {
    border-radius: 0 0 var(--radius-section) var(--radius-section);
}
.home-about, .gallery-promo, .home-faq, .home-articles, .home-contact {
    border-radius: var(--radius-section);
}
.site-footer, .mobile-actions { border-radius: var(--radius-section) var(--radius-section) 0 0; }
