/*
Theme Name: Gall LP — WordPress Developer
Theme URI: https://lp.gall-studio.com
Author: gall-studio
Author URI: https://gall-studio.com
Description: Тёмная тема-визитка для WordPress-разработчика: лендинг с услугами, процессом работы, стеком и страница портфолио с кейсами.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 7.1
Requires PHP: 8.0
License: GPL-2.0-or-later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: gall-lp
Tags: portfolio, one-column, custom-menu, featured-images, translation-ready
*/

/* =========================================================
   1. Tokens
   ========================================================= */
:root {
    --bg: #07090e;
    --bg-soft: #0b0f16;
    --surface: #0f141d;
    --card: #121926;
    --card-hover: #16202f;
    --line: rgba(255, 255, 255, 0.08);
    --line-strong: rgba(255, 255, 255, 0.16);
    --text: #e9eef7;
    --text-soft: #c3ccdb;
    --muted: #93a0b6;
    --accent: #8b5cf6;
    --accent-2: #22d3ee;
    --accent-soft: rgba(139, 92, 246, 0.14);
    --ok: #34d399;
    --radius: 18px;
    --radius-sm: 12px;
    --radius-lg: 26px;
    --container: 1160px;
    --gap: clamp(18px, 2.4vw, 28px);
    --section-y: clamp(64px, 8vw, 112px);
    --shadow: 0 24px 60px -30px rgba(0, 0, 0, 0.9);
    --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
    --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
}

/* =========================================================
   2. Base
   ========================================================= */
*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

[id] {
    scroll-margin-top: 96px;
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: var(--font);
    font-size: 17px;
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

body.admin-bar .site-header {
    top: 32px;
}

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

a {
    color: var(--text);
    text-decoration: none;
    transition: color 0.18s ease, border-color 0.18s ease, background-color 0.18s ease;
}

a:hover {
    color: var(--accent-2);
}

p {
    margin: 0 0 1em;
}

ul,
ol {
    margin: 0 0 1em;
    padding-left: 1.2em;
}

h1,
h2,
h3,
h4 {
    margin: 0 0 0.5em;
    line-height: 1.14;
    letter-spacing: -0.02em;
    font-weight: 700;
}

h1 {
    font-size: clamp(2.15rem, 4.6vw, 3.6rem);
}

h2 {
    font-size: clamp(1.75rem, 3.4vw, 2.7rem);
}

h3 {
    font-size: clamp(1.15rem, 1.7vw, 1.4rem);
}

code,
pre {
    font-family: var(--mono);
    font-size: 0.92em;
}

:focus-visible {
    outline: 2px solid var(--accent-2);
    outline-offset: 3px;
    border-radius: 4px;
}

.screen-reader-text {
    position: absolute !important;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.skip-link:focus {
    position: fixed;
    top: 12px;
    left: 12px;
    z-index: 1000;
    padding: 12px 18px;
    background: var(--accent);
    color: #fff;
    border-radius: 10px;
    clip: auto;
    width: auto;
    height: auto;
    margin: 0;
    overflow: visible;
}

/* =========================================================
   3. Layout
   ========================================================= */
.container {
    width: 100%;
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 clamp(18px, 4vw, 32px);
}

.section {
    padding: var(--section-y) 0;
    position: relative;
}

.section--soft {
    background: linear-gradient(180deg, var(--bg) 0%, var(--bg-soft) 45%, var(--bg) 100%);
}

.section__head {
    max-width: 720px;
    margin-bottom: clamp(32px, 4.6vw, 56px);
}

.section__head--center {
    margin-left: auto;
    margin-right: auto;
    text-align: center;
}

.section__head p {
    color: var(--muted);
    font-size: clamp(1rem, 1.25vw, 1.12rem);
    margin-bottom: 0;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 16px;
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--accent-2);
}

.eyebrow::before {
    content: "";
    width: 26px;
    height: 1px;
    background: linear-gradient(90deg, var(--accent), var(--accent-2));
}

.section__head--center .eyebrow::after {
    content: "";
    width: 26px;
    height: 1px;
    background: linear-gradient(90deg, var(--accent-2), var(--accent));
}

/* =========================================================
   4. Buttons & badges
   ========================================================= */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 14px 26px;
    border: 1px solid transparent;
    border-radius: 999px;
    font-size: 0.98rem;
    font-weight: 600;
    line-height: 1.2;
    cursor: pointer;
    transition: transform 0.18s ease, box-shadow 0.18s ease, background-color 0.18s ease, border-color 0.18s ease, color 0.18s ease;
}

.btn svg {
    width: 18px;
    height: 18px;
}

.btn--primary {
    background: linear-gradient(120deg, var(--accent) 0%, #6d4bf0 45%, var(--accent-2) 130%);
    color: #fff;
    box-shadow: 0 16px 36px -18px rgba(139, 92, 246, 0.9);
}

.btn--primary:hover {
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 22px 44px -18px rgba(34, 211, 238, 0.55);
}

.btn--ghost {
    border-color: var(--line-strong);
    background: rgba(255, 255, 255, 0.02);
    color: var(--text);
}

.btn--ghost:hover {
    border-color: var(--accent-2);
    color: var(--text);
    transform: translateY(-2px);
}

.btn--block {
    width: 100%;
}

.badge {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    padding: 7px 14px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.03);
    color: var(--text-soft);
    font-size: 0.83rem;
    font-weight: 500;
}

.badge__dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--ok);
    box-shadow: 0 0 0 4px rgba(52, 211, 153, 0.16);
}

/* =========================================================
   5. Header
   ========================================================= */
.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(7, 9, 14, 0.72);
    backdrop-filter: blur(14px);
    border-bottom: 1px solid transparent;
    transition: border-color 0.2s ease, background-color 0.2s ease;
}

.site-header.is-scrolled {
    border-bottom-color: var(--line);
    background: rgba(7, 9, 14, 0.92);
}

.site-header__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    min-height: 74px;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    font-weight: 700;
    letter-spacing: -0.01em;
}

.brand__mark {
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    border-radius: 11px;
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
    color: #0a0d13;
    font-family: var(--mono);
    font-size: 0.95rem;
    font-weight: 700;
}

.brand__text {
    display: flex;
    flex-direction: column;
    line-height: 1.15;
}

.brand__name {
    font-size: 0.98rem;
}

.brand__role {
    font-size: 0.72rem;
    font-weight: 500;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--muted);
}

.nav {
    display: flex;
    align-items: center;
    gap: 8px;
}

.nav ul {
    display: flex;
    align-items: center;
    gap: 4px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.nav a {
    display: block;
    padding: 9px 14px;
    border-radius: 999px;
    color: var(--text-soft);
    font-size: 0.94rem;
    font-weight: 500;
}

.nav a:hover,
.nav .current-menu-item > a {
    color: var(--text);
    background: rgba(255, 255, 255, 0.06);
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.header-actions .btn {
    padding: 11px 20px;
    font-size: 0.9rem;
}

.nav-toggle {
    display: none;
    width: 44px;
    height: 44px;
    padding: 0;
    border: 1px solid var(--line-strong);
    border-radius: 12px;
    background: transparent;
    color: var(--text);
    cursor: pointer;
}

.nav-toggle svg {
    width: 22px;
    height: 22px;
    margin: 0 auto;
}

.nav-toggle .icon-close {
    display: none;
}

.nav-toggle[aria-expanded="true"] .icon-close {
    display: block;
}

.nav-toggle[aria-expanded="true"] .icon-menu {
    display: none;
}

/* =========================================================
   6. Hero
   ========================================================= */
.hero {
    position: relative;
    padding: clamp(56px, 8vw, 110px) 0 clamp(56px, 7vw, 96px);
    overflow: hidden;
}

.hero::before {
    content: "";
    position: absolute;
    inset: -20% -10% auto -10%;
    height: 720px;
    background:
        radial-gradient(560px 360px at 18% 8%, rgba(139, 92, 246, 0.28), transparent 62%),
        radial-gradient(620px 400px at 82% 0%, rgba(34, 211, 238, 0.18), transparent 60%);
    pointer-events: none;
}

.hero::after {
    content: "";
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
    background-size: 64px 64px;
    mask-image: radial-gradient(ellipse at 50% 0%, #000 25%, transparent 72%);
    -webkit-mask-image: radial-gradient(ellipse at 50% 0%, #000 25%, transparent 72%);
    pointer-events: none;
}

.hero__inner {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
    gap: clamp(32px, 5vw, 64px);
    align-items: center;
}

.hero__title span {
    background: linear-gradient(100deg, var(--accent-2) 0%, #a78bfa 55%, var(--accent) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.hero__lead {
    max-width: 560px;
    margin: 22px 0 30px;
    color: var(--muted);
    font-size: clamp(1.02rem, 1.3vw, 1.18rem);
}

.hero__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    margin-bottom: 34px;
}

.hero__facts {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px 24px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.hero__facts li {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.hero__facts b {
    font-size: 1.42rem;
    letter-spacing: -0.02em;
}

.hero__facts span {
    font-size: 0.84rem;
    color: var(--muted);
}

/* Code card */
.code-card {
    position: relative;
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    background: linear-gradient(165deg, rgba(22, 30, 44, 0.95), rgba(10, 14, 21, 0.95));
    box-shadow: var(--shadow);
    overflow: hidden;
    transform: rotate(0.6deg);
}

.code-card__bar {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 13px 16px;
    border-bottom: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.02);
}

.code-card__dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #2a3446;
}

.code-card__dot:nth-child(1) { background: #f87171; }
.code-card__dot:nth-child(2) { background: #fbbf24; }
.code-card__dot:nth-child(3) { background: #34d399; }

.code-card__name {
    margin-left: 8px;
    font-family: var(--mono);
    font-size: 0.78rem;
    color: var(--muted);
}

.code-card pre {
    margin: 0;
    padding: 20px 20px 24px;
    overflow-x: auto;
    font-size: 0.83rem;
    line-height: 1.75;
    color: #cfd8e6;
}

.code-card .c-key { color: #c4b5fd; }
.code-card .c-fn { color: #67e8f9; }
.code-card .c-str { color: #86efac; }
.code-card .c-com { color: #64748b; }
.code-card .c-var { color: #fcd34d; }

/* =========================================================
   7. Services
   ========================================================= */
.grid {
    display: grid;
    gap: var(--gap);
}

.grid--services {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.grid--steps {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.card {
    position: relative;
    padding: clamp(22px, 2.4vw, 30px);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: linear-gradient(170deg, var(--card), rgba(10, 14, 21, 0.7));
    transition: transform 0.22s ease, border-color 0.22s ease, background-color 0.22s ease;
}

.card:hover {
    transform: translateY(-4px);
    border-color: rgba(139, 92, 246, 0.42);
    background: linear-gradient(170deg, var(--card-hover), rgba(10, 14, 21, 0.8));
}

.card__icon {
    display: grid;
    place-items: center;
    width: 46px;
    height: 46px;
    margin-bottom: 18px;
    border: 1px solid rgba(139, 92, 246, 0.32);
    border-radius: 13px;
    background: var(--accent-soft);
    color: #c4b5fd;
}

.card__icon svg {
    width: 22px;
    height: 22px;
}

.card h3 {
    margin-bottom: 10px;
}

.card p {
    margin: 0;
    color: var(--muted);
    font-size: 0.95rem;
}

.card__num {
    position: absolute;
    top: 18px;
    right: 20px;
    font-family: var(--mono);
    font-size: 0.78rem;
    color: rgba(255, 255, 255, 0.22);
}

/* =========================================================
   8. Process
   ========================================================= */
.step {
    position: relative;
    padding: 24px 22px 26px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: rgba(255, 255, 255, 0.02);
}

.step__num {
    display: inline-grid;
    place-items: center;
    width: 34px;
    height: 34px;
    margin-bottom: 16px;
    border-radius: 10px;
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.9), rgba(34, 211, 238, 0.9));
    color: #080b11;
    font-family: var(--mono);
    font-size: 0.86rem;
    font-weight: 700;
}

.step h3 {
    font-size: 1.05rem;
    margin-bottom: 8px;
}

.step p {
    margin: 0;
    color: var(--muted);
    font-size: 0.9rem;
}

/* =========================================================
   9. Stack
   ========================================================= */
.stack {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.stack li {
    padding: 9px 16px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.03);
    color: var(--text-soft);
    font-family: var(--mono);
    font-size: 0.84rem;
}

.stack li:hover {
    border-color: rgba(34, 211, 238, 0.45);
    color: #a5f3fc;
}

/* =========================================================
   10. Cases
   ========================================================= */
.grid--cases {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.case-card {
    display: flex;
    flex-direction: column;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--card);
    overflow: hidden;
    transition: transform 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
}

.case-card:hover {
    transform: translateY(-5px);
    border-color: rgba(34, 211, 238, 0.4);
    box-shadow: 0 26px 50px -34px rgba(34, 211, 238, 0.7);
}

.case-card__media {
    position: relative;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background:
        radial-gradient(420px 240px at 20% 10%, rgba(139, 92, 246, 0.35), transparent 60%),
        radial-gradient(420px 260px at 85% 90%, rgba(34, 211, 238, 0.28), transparent 62%),
        #0c111a;
}

.case-card__media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.case-card:hover .case-card__media img {
    transform: scale(1.04);
}

.case-card__placeholder {
    display: grid;
    place-items: center;
    height: 100%;
    color: rgba(255, 255, 255, 0.35);
    font-family: var(--mono);
    font-size: 0.8rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.case-card__body {
    display: flex;
    flex: 1;
    flex-direction: column;
    gap: 12px;
    padding: 22px 22px 24px;
}

.case-card__tags {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
}

.tag {
    padding: 4px 10px;
    border: 1px solid var(--line);
    border-radius: 999px;
    color: var(--muted);
    font-size: 0.73rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.case-card h3 {
    margin: 0;
    font-size: 1.16rem;
}

.case-card h3 a::after {
    content: "";
    position: absolute;
    inset: 0;
}

.case-card__body {
    position: relative;
}

.case-card p {
    margin: 0;
    color: var(--muted);
    font-size: 0.93rem;
}

.case-card__more {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    margin-top: auto;
    padding-top: 6px;
    color: var(--accent-2);
    font-size: 0.9rem;
    font-weight: 600;
}

.case-card__more svg {
    width: 16px;
    height: 16px;
    transition: transform 0.2s ease;
}

.case-card:hover .case-card__more svg {
    transform: translateX(4px);
}

/* Filters */
.filters {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
    margin-bottom: 34px;
}

.filter-btn {
    padding: 9px 18px;
    border: 1px solid var(--line-strong);
    border-radius: 999px;
    background: transparent;
    color: var(--text-soft);
    font-size: 0.9rem;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.18s ease;
}

.filter-btn:hover {
    border-color: var(--accent-2);
    color: var(--text);
}

.filter-btn.is-active {
    border-color: transparent;
    background: linear-gradient(120deg, var(--accent), #5b46e0);
    color: #fff;
}

.case-card[hidden] {
    display: none;
}

/* Single case */
.case-hero {
    padding: clamp(48px, 6vw, 84px) 0 clamp(28px, 4vw, 48px);
    position: relative;
    overflow: hidden;
}

.case-hero::before {
    content: "";
    position: absolute;
    inset: -30% 30% auto -10%;
    height: 520px;
    background: radial-gradient(480px 320px at 30% 10%, rgba(139, 92, 246, 0.26), transparent 62%);
    pointer-events: none;
}

.case-hero__inner {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
    gap: clamp(28px, 4vw, 56px);
    align-items: center;
}

.case-hero__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 26px;
    margin: 0;
    padding: 0;
    list-style: none;
    color: var(--muted);
    font-size: 0.9rem;
}

.case-hero__meta b {
    display: block;
    color: var(--text);
    font-size: 0.98rem;
}

.case-hero__media {
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    overflow: hidden;
    background: var(--card);
    box-shadow: var(--shadow);
}

.case-hero__media img {
    width: 100%;
    height: auto;
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 20px;
    color: var(--muted);
    font-size: 0.9rem;
}

.back-link:hover {
    color: var(--accent-2);
}

.back-link svg {
    width: 16px;
    height: 16px;
}

.details {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: var(--gap);
    margin-top: clamp(28px, 4vw, 44px);
}

.details .card h3 {
    font-size: 0.8rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--accent-2);
}

.details .card p,
.details .card ul {
    margin: 0;
    color: var(--text-soft);
    font-size: 0.96rem;
}

.case-content {
    max-width: 760px;
    color: var(--text-soft);
}

.case-content h2,
.case-content h3 {
    color: var(--text);
    margin-top: 1.6em;
}

.case-content a {
    color: var(--accent-2);
    border-bottom: 1px solid rgba(34, 211, 238, 0.4);
}

.case-content img {
    border-radius: var(--radius-sm);
    margin: 1.4em 0;
}

.case-content blockquote {
    margin: 1.6em 0;
    padding: 18px 22px;
    border-left: 3px solid var(--accent);
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    background: rgba(139, 92, 246, 0.08);
    color: var(--text);
}

/* =========================================================
   11. About
   ========================================================= */
.about {
    display: grid;
    grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr);
    gap: clamp(28px, 4.4vw, 64px);
    align-items: start;
}

.about__list {
    margin: 0;
    padding: 0;
    list-style: none;
    display: grid;
    gap: 14px;
}

.about__list li {
    position: relative;
    padding: 18px 20px 18px 54px;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    background: rgba(255, 255, 255, 0.02);
    color: var(--text-soft);
    font-size: 0.96rem;
}

.about__list svg {
    position: absolute;
    left: 18px;
    top: 20px;
    width: 20px;
    height: 20px;
    color: var(--ok);
}

/* =========================================================
   12. Contact
   ========================================================= */
.contact {
    display: grid;
    grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
    gap: clamp(28px, 4.4vw, 56px);
    align-items: start;
    padding: clamp(26px, 3.6vw, 44px);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    background:
        radial-gradient(620px 320px at 12% 0%, rgba(139, 92, 246, 0.2), transparent 62%),
        linear-gradient(160deg, rgba(18, 25, 38, 0.9), rgba(9, 12, 18, 0.95));
    box-shadow: var(--shadow);
}

.contact__links {
    display: grid;
    gap: 10px;
    margin-top: 22px;
}

.contact__link {
    display: flex;
    align-items: center;
    gap: 13px;
    padding: 13px 16px;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    background: rgba(255, 255, 255, 0.02);
    color: var(--text-soft);
    font-size: 0.95rem;
    word-break: break-word;
}

.contact__link:hover {
    border-color: rgba(34, 211, 238, 0.45);
    color: var(--text);
}

.contact__link svg {
    flex: 0 0 auto;
    width: 19px;
    height: 19px;
    color: var(--accent-2);
}

.form {
    display: grid;
    gap: 14px;
}

.field {
    display: grid;
    gap: 7px;
}

.field label {
    font-size: 0.84rem;
    font-weight: 600;
    color: var(--text-soft);
}

.field input,
.field textarea {
    width: 100%;
    padding: 13px 15px;
    border: 1px solid var(--line-strong);
    border-radius: var(--radius-sm);
    background: rgba(6, 9, 14, 0.7);
    color: var(--text);
    font-family: inherit;
    font-size: 0.96rem;
    transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.field textarea {
    min-height: 132px;
    resize: vertical;
}

.field input:focus,
.field textarea:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.18);
}

.field--hp {
    position: absolute !important;
    left: -9999px;
    opacity: 0;
    pointer-events: none;
}

.form__note {
    margin: 0;
    color: var(--muted);
    font-size: 0.8rem;
}

.form__alert {
    padding: 12px 15px;
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
}

.form__alert--ok {
    border: 1px solid rgba(52, 211, 153, 0.4);
    background: rgba(52, 211, 153, 0.1);
    color: #a7f3d0;
}

.form__alert--error {
    border: 1px solid rgba(248, 113, 113, 0.45);
    background: rgba(248, 113, 113, 0.1);
    color: #fecaca;
}

/* =========================================================
   13. Footer
   ========================================================= */
.site-footer {
    padding: 44px 0 34px;
    border-top: 1px solid var(--line);
    background: var(--bg-soft);
}

.site-footer__inner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
}

.site-footer__copy {
    margin: 0;
    color: var(--muted);
    font-size: 0.86rem;
}

.site-footer__links {
    display: flex;
    flex-wrap: wrap;
    gap: 18px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.site-footer__links a {
    color: var(--muted);
    font-size: 0.88rem;
}

.site-footer__links a:hover {
    color: var(--accent-2);
}

/* =========================================================
   14. Page / archive / 404
   ========================================================= */
.page-hero {
    padding: clamp(48px, 6vw, 80px) 0 clamp(20px, 3vw, 32px);
    border-bottom: 1px solid var(--line);
}

.page-hero h1 {
    margin-bottom: 10px;
}

.page-hero p {
    max-width: 680px;
    margin: 0;
    color: var(--muted);
}

.entry-content {
    max-width: 820px;
    color: var(--text-soft);
}

.entry-content h2,
.entry-content h3 {
    color: var(--text);
    margin-top: 1.5em;
}

.entry-content a {
    color: var(--accent-2);
    border-bottom: 1px solid rgba(34, 211, 238, 0.4);
}

.empty-state {
    padding: 40px;
    border: 1px dashed var(--line-strong);
    border-radius: var(--radius);
    color: var(--muted);
    text-align: center;
}

/* Pagination */
.pagination {
    margin-top: 40px;
}

.pagination .nav-links {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.pagination .page-numbers {
    display: inline-grid;
    place-items: center;
    min-width: 40px;
    height: 40px;
    padding: 0 12px;
    border: 1px solid var(--line-strong);
    border-radius: 10px;
    color: var(--text-soft);
    font-size: 0.9rem;
}

.pagination .page-numbers.current,
.pagination .page-numbers:hover {
    border-color: transparent;
    background: var(--accent);
    color: #fff;
}

/* =========================================================
   15. Reveal animation
   ========================================================= */
html.js .reveal {
    opacity: 0;
    transform: translateY(18px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

html.js .reveal.is-visible {
    opacity: 1;
    transform: none;
}

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

    .reveal {
        opacity: 1;
        transform: none;
        transition: none;
    }

    *,
    *::before,
    *::after {
        animation-duration: 0.001ms !important;
        transition-duration: 0.001ms !important;
    }
}

/* =========================================================
   16. Responsive
   ========================================================= */
@media (max-width: 1024px) {
    .hero__inner,
    .case-hero__inner,
    .about,
    .contact {
        grid-template-columns: minmax(0, 1fr);
    }

    .code-card {
        transform: none;
    }

    .grid--services,
    .grid--cases {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .grid--steps {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .details {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 860px) {
    body.admin-bar .site-header {
        top: 46px;
    }

    .nav-toggle {
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }

    .nav {
        position: fixed;
        inset: 74px 0 auto 0;
        display: none;
        flex-direction: column;
        align-items: stretch;
        gap: 6px;
        padding: 16px clamp(18px, 4vw, 32px) 24px;
        background: rgba(7, 9, 14, 0.98);
        border-bottom: 1px solid var(--line);
        backdrop-filter: blur(16px);
    }

    .nav.is-open {
        display: flex;
    }

    .nav ul {
        flex-direction: column;
        align-items: stretch;
        gap: 2px;
    }

    .nav a {
        padding: 13px 14px;
        border-radius: 10px;
        font-size: 1rem;
    }

    .header-actions .btn {
        display: none;
    }

    .hero__facts {
        gap: 16px 28px;
    }
}

@media (max-width: 640px) {
    body {
        font-size: 16px;
    }

    .grid--services,
    .grid--cases,
    .grid--steps,
    .details {
        grid-template-columns: minmax(0, 1fr);
    }

    .hero__actions .btn {
        flex: 1 1 100%;
    }

    .contact {
        padding: 22px 18px;
    }

    .site-footer__inner {
        flex-direction: column;
        align-items: flex-start;
    }
}
