/*
Theme Name: DGStudio
Theme URI: https://web.cityriga.lv/
Author: DGStudio
Description: Light, multilingual WordPress theme for the DGStudio website.
Version: 1.0.0
Requires at least: 6.4
Requires PHP: 8.1
Text Domain: dgstudio
*/

:root {
    --red: #c60012;
    --red-dark: #9f0011;
    --ink: #172334;
    --muted: #475569;
    --paper: #fafbfd;
    --line: #e1e7ef;
    --blush: #fff0f1;
    --shadow: 0 12px 35px #16233a0d;
    --radius: 20px;
}
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-padding-top: 110px; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 16px/1.55 system-ui, -apple-system, "Segoe UI", sans-serif; }
a { color: var(--red-dark); text-underline-offset: .2em; }
a:hover { color: var(--red); }
:focus-visible { outline: 3px solid #135ca1; outline-offset: 4px; }
img { display: block; max-width: 100%; height: auto; }
button, input, textarea { font: inherit; }
button { cursor: pointer; }
h1, h2, h3, p { margin: 0 0 .7em; }
h1, h2, h3 { line-height: 1.12; letter-spacing: -.035em; }
h1 { font-size: clamp(2.4rem, 5.3vw, 4.7rem); overflow-wrap: anywhere; }
h2 { font-size: clamp(1.65rem, 3vw, 2.65rem); }
h3 { font-size: 1.16rem; }
em { color: var(--red); font-style: normal; }
.wrap { width: min(1320px, calc(100% - 64px)); margin-inline: auto; }
.skip { position: absolute; z-index: 40; left: 16px; top: 10px; transform: translateY(-200%); background: #fff; padding: 10px 14px; }
.skip:focus { transform: none; }
.site-header { position: relative; z-index: 10; background: #fffffff5; border-bottom: 1px solid var(--line); }
.head { min-height: 80px; display: flex; gap: clamp(12px, 2vw, 30px); align-items: center; justify-content: space-between; }
.brand, .footer-brand { text-decoration: none; color: #111923; }
.brand { display: flex; align-items: center; gap: 9px; flex: 0 0 auto; }
.brand strong, .footer-brand { font-size: clamp(1.5rem, 2.45vw, 2.15rem); font-weight: 850; line-height: 1; letter-spacing: -.075em; }
.brand small { display: block; font-size: .68rem; color: var(--ink); margin-top: 3px; white-space: nowrap; }
.brand-mark { display: grid; place-items: center; color: var(--red); }
.brand-mark svg { width: 33px; height: 33px; stroke-width: 2.4; }
.brand img { width: auto; max-width: 185px; max-height: 55px; object-fit: contain; }
.main-navigation { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: clamp(10px, 1.65vw, 25px); }
.main-navigation a { text-decoration: none; color: var(--ink); font-size: .9rem; font-weight: 700; padding-block: 8px; white-space: nowrap; }
.main-navigation a:hover, .main-navigation a[aria-current], .main-navigation a.section-active { color: var(--red); text-decoration: underline; text-underline-offset: 8px; text-decoration-thickness: 2px; }
.languages { display: flex; flex: 0 0 auto; gap: 2px; border: 1px solid var(--line); border-radius: 999px; padding: 4px; background: #fff; }
.languages a { padding: 5px 7px; border-radius: 999px; color: var(--ink); text-decoration: none; font-weight: 800; font-size: .72rem; }
.languages a[aria-current], .languages a:hover { background: var(--blush); color: var(--red-dark); }
.button { display: inline-flex; justify-content: center; align-items: center; gap: 9px; width: fit-content; min-height: 46px; padding: 10px 20px; border: 1px solid var(--red); border-radius: 999px; background: var(--red); color: #fff; font-weight: 750; font-size: .92rem; line-height: 1.35; text-decoration: none; }
.button:hover { color: #fff; background: var(--red-dark); border-color: var(--red-dark); }
.button.secondary { color: var(--red-dark); background: #fff; }
.button.secondary:hover { background: var(--blush); }
.button svg { width: 17px; height: 17px; flex: none; }
.head-cta { flex: 0 0 auto; }
.menu-toggle { display: none; border: 1px solid var(--line); background: #fff; color: var(--ink); padding: 7px 11px; border-radius: 10px; }
.hero { background: linear-gradient(110deg, #fff 32%, #edf5fc 70%, #fff7f2); border-bottom: 1px solid #eef1f6; }
.hero-grid { display: grid; grid-template-columns: 1fr 1fr; align-items: stretch; }
.hero-copy { position: relative; z-index: 1; padding-block: clamp(35px, 5vw, 72px) clamp(53px, 6vw, 87px); padding-right: 24px; }
.hero h1 { margin: 14px 0 15px; font-weight: 850; line-height: .99; letter-spacing: -.065em; font-size: clamp(2.65rem, 4.75vw, 4.6rem); }
.hero-copy > p { color: var(--muted); font-size: clamp(1rem, 1.45vw, 1.23rem); max-width: 37ch; }
.hero-art { width: 100%; height: 100%; max-height: 620px; object-fit: cover; object-position: 53% center; mask-image: linear-gradient(to right, transparent, #000 13%); }
.eyebrow { display: inline-flex; align-items: center; gap: 9px; background: #fff; border: 1px solid #f2c8cd; border-radius: 999px; padding: 6px 13px; color: var(--ink); font-weight: 750; font-size: .82rem; }
.eyebrow::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: var(--red); flex: none; }
.hero-services { display: flex; gap: 14px; flex-wrap: wrap; margin-block: 18px 22px; }
.hero-services a { display: flex; align-items: center; gap: 7px; font-size: .82rem; color: var(--ink); font-weight: 750; text-decoration: none; }
.hero-services a:hover { color: var(--red); }
.hero-services a > span:last-child { max-width: 14ch; }
.tile { display: inline-grid; place-items: center; flex: none; width: 43px; height: 43px; border-radius: 12px; background: var(--blush); color: var(--red); }
.tile svg { width: 24px; height: 24px; }
.actions { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; }
.benefits { position: relative; z-index: 2; display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); margin-top: -28px; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); background: #fff; }
.benefits > div { display: flex; align-items: center; gap: 11px; padding: 17px; }
.benefits > div + div { border-left: 1px solid var(--line); }
.benefits p { margin: 0; font-size: .92rem; line-height: 1.25; }
.benefits small { display: block; margin-top: 4px; color: var(--muted); }
.section { padding-block: clamp(39px, 6vw, 80px); }
.section-title { max-width: 56ch; margin: 0 auto 28px; text-align: center; }
.section-title h2 { margin-bottom: 8px; }
.section-title h2::after, .page-title h1::after { content: ''; display: block; width: 45px; height: 3px; margin: 12px auto; border-radius: 4px; background: var(--red); }
.section-title p, .prose p, .project p, .service p, .articles p, .contact-card p { color: var(--muted); }
.services-grid, .projects-grid, .articles { display: grid; gap: 16px; }
.services-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.projects-grid, .articles { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.service, .project, .articles article, .contact-card, .contact-form { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.service img { width: 100%; aspect-ratio: 2.8; object-fit: cover; }
.service-body { position: relative; padding: 0 15px 15px; }
.service-body .tile { margin-block: -10px 12px; box-shadow: 0 0 0 4px #fff; }
.service-body p { font-size: .94rem; }
.service-body p:last-child, .project-body p:last-child { margin-bottom: 0; }
.center { text-align: center; margin-top: 25px; }
.featured { padding-top: 0; }
.project > a { display: flex; flex-direction: column; height: 100%; text-decoration: none; color: var(--ink); }
.project > a:hover .text-link { text-decoration: underline; }
.project > a:focus-visible { outline-offset: -4px; }
.project-art { --art: #fce3e5; position: relative; display: grid; place-content: center; justify-items: center; gap: 1px; min-height: 156px; aspect-ratio: 2.35; overflow: hidden; background: radial-gradient(ellipse at 80% 15%, var(--art), transparent 68%), linear-gradient(145deg, #f6f9fc, #fff 70%); }
.project-art.tone-culture { --art: #d5eafa; }
.project-art.tone-other { --art: #f5e4ce; }
.project-art strong { color: var(--red-dark); font-size: clamp(2.2rem, 5vw, 3.9rem); font-weight: 850; letter-spacing: -.08em; line-height: 1; }
.mini-window { position: absolute; left: 18px; top: 16px; display: flex; gap: 4px; }
.mini-window i { width: 6px; height: 6px; border-radius: 50%; background: #b5c0d0; }
.mini-window i:first-child { background: var(--red); }
.mini-name { font-size: .75rem; color: var(--muted); font-weight: 750; padding-inline: 8px; text-align: center; }
.project img { width: 100%; aspect-ratio: 2.35; object-fit: contain; background: #f4f7fa; }
.project-body { flex: 1; display: flex; align-items: flex-start; flex-direction: column; padding: 18px; }
.project-body h3 { margin: 9px 0 6px; }
.project-body p { font-size: .94rem; }
.project-body .text-link { margin-top: auto; }
.pill { padding: 4px 9px; border-radius: 999px; background: var(--blush); color: var(--red-dark); font-size: .74rem; font-weight: 750; }
.text-link { color: var(--red-dark); font-weight: 750; }
.callout { background: linear-gradient(90deg, #e3eff8a3, #fff1f3 75%), url("assets/riga.webp") center left / auto 100% no-repeat, #f1f5fa; padding: 30px 0; border-block: 1px solid var(--line); }
.callout-inner { display: flex; align-items: center; flex-wrap: wrap; gap: 15px; background: #fffffff2; border: 1px solid #fff; border-radius: var(--radius); padding: 20px 24px; box-shadow: var(--shadow); }
.callout h2 { flex: 1 1 200px; margin: 0; font-size: clamp(1.35rem, 2.7vw, 2rem); }
.site-footer { background: #fff; padding-block: 32px 16px; }
.footer-grid { display: grid; grid-template-columns: 1.45fr repeat(3, 1fr); gap: 20px; padding-bottom: 22px; }
.footer-grid p, .footer-links { color: var(--muted); font-size: .93rem; }
.footer-links { display: flex; flex-direction: column; gap: 5px; }
.footer-links a { color: var(--ink); text-decoration: none; overflow-wrap: anywhere; }
.footer-links a:hover { text-decoration: underline; }
.copyright { border-top: 1px solid var(--line); padding-top: 13px; color: var(--muted); font-size: .81rem; }
.internal { min-height: 54vh; }
.page-title h1 { margin: 9px 0 20px; }
.page-title h1::after { margin-left: 0; }
.page-title h2 a { color: var(--ink); }
.prose { max-width: 72ch; overflow-wrap: anywhere; }
.prose p { margin-bottom: 16px; }
.prose h2 { margin-top: 27px; font-size: 1.5rem; }
.internal .services-grid, .internal .projects-grid, .internal .articles, .contact-grid { margin-top: 22px; }
.project-detail, .contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(16px, 4vw, 58px); align-items: start; }
.project-detail h1 { margin: 10px 0 15px; }
.project-detail .project-art, .project-detail img { border: 1px solid var(--line); border-radius: var(--radius); }
.project-detail .project-art { min-height: 235px; }
.filters { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 24px; }
.filters button { background: #fff; border: 1px solid var(--line); border-radius: 999px; padding: 7px 15px; color: var(--ink); font-size: .9rem; font-weight: 700; }
.filters button[aria-pressed="true"] { background: var(--red); border-color: var(--red); color: #fff; }
.articles article, .contact-card, .contact-form { padding: clamp(17px, 2.5vw, 30px); }
.articles h2, .contact-card h2 { font-size: 1.3rem; margin-top: 13px; }
.contact-form { display: grid; gap: 14px; }
.contact-form label { display: grid; gap: 5px; font-weight: 700; }
.contact-form input, .contact-form textarea { background: var(--paper); border: 1px solid #b7c1ce; border-radius: 9px; padding: 9px 11px; color: var(--ink); width: 100%; }
.contact-form textarea { resize: vertical; }
.form-status { padding: 10px 12px; margin: 0; border-radius: 9px; background: #e8f8ec; }
.form-status.error { background: var(--blush); color: var(--red-dark); }
@media (max-width: 1160px) {
    .head-cta { display: none; }
    .hero h1 { font-size: clamp(2.5rem, 5vw, 3.7rem); }
    .services-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 850px) {
    .head { flex-wrap: wrap; min-height: 66px; padding-block: 12px; gap: 10px; }
    .brand { margin-right: auto; }
    .menu-toggle { display: inline-block; }
    .main-navigation { order: 4; width: 100%; justify-content: flex-start; gap: 4px 14px; }
    .main-navigation.enhanced:not(.is-open) { display: none; }
    .hero-grid { grid-template-columns: 1fr; }
    .hero-copy { padding: 34px 0 16px; }
    .hero-art { mask-image: none; width: 100%; max-height: 440px; height: auto; border-radius: var(--radius); margin-bottom: 19px; object-fit: contain; }
    .benefits { margin-top: 14px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .benefits > div:nth-child(3) { border-left: 0; }
    .benefits > div:nth-child(n+3) { border-top: 1px solid var(--line); }
}
@media (max-width: 620px) {
    .wrap { width: calc(100% - 32px); }
    .head { gap: 7px; }
    .brand-mark svg { width: 24px; height: 24px; }
    .brand { gap: 5px; }
    .brand small { font-size: .54rem; }
    .brand img { max-width: 115px; }
    .menu-toggle { padding-inline: 6px; font-size: .75rem; }
    .languages { padding: 2px; }
    .languages a { padding: 5px; }
    .services-grid, .projects-grid, .articles, .project-detail, .contact-grid { grid-template-columns: 1fr; }
    .service img { aspect-ratio: 3; }
    .benefits > div { padding: 10px; gap: 7px; align-items: start; }
    .benefits .tile { width: 31px; height: 31px; }
    .benefits .tile svg { width: 19px; height: 19px; }
    .benefits p { font-size: .82rem; }
    .footer-grid { grid-template-columns: 1fr 1fr; }
    .project-detail > div:first-child { order: 2; }
}
@media (max-width: 350px) {
    .head .languages { order: 3; }
    .head .brand { width: 100%; }
    .hero h1 { font-size: 2.25rem; }
}
