/*
Theme Name: AntidronKupol
Theme URI: https://antidronkupol.ru/
Author: Metagalaxy Group
Description: Native Gutenberg block theme for PROCURATOR / AntidronKupol.
Version: 1.6.0
Requires at least: 6.6
Requires PHP: 8.0
Text Domain: antidronkupol
License: GPL-2.0-or-later
*/

/* Tokens (keep in sync with theme.json palette) */
:root {
	--ak-navy: #031426;
	--ak-navy-2: #0b2440;
	--ak-red: #e90f32;
	--ak-bg: #f5f7f9;
	--ak-line: #dce3e8;
	--ak-muted: #64748b;
	--ak-ink: #0f172a;
	--ak-radius: 16px;
	--ak-radius-sm: 8px;
}

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body { text-rendering: optimizeLegibility; }
a { text-underline-offset: .18em; }

/* Sections */
.ak-section { padding-top: clamp(3rem, 7vw, 6rem); padding-bottom: clamp(3rem, 7vw, 6rem); }
.ak-section-tight { padding-top: 2.25rem; padding-bottom: 2.25rem; }
.ak-soft { background: var(--ak-bg); }
.ak-dark { background: var(--ak-navy); color: #fff; }
.ak-hero { background: linear-gradient(135deg, var(--ak-navy) 0%, var(--ak-navy-2) 100%); color: #fff; overflow: hidden; }
.ak-hero .wp-block-heading,
.ak-dark .wp-block-heading { color: #fff; }
.ak-hero p,
.ak-dark p { color: rgba(255, 255, 255, .82); }
.ak-hero .wp-block-image img { min-height: 460px; width: 100%; object-fit: cover; }
.ak-kicker { color: var(--ak-red); text-transform: uppercase; font-size: .8rem; font-weight: 800; letter-spacing: .08em; margin-bottom: .45rem; }

/* Buttons: outline style must stay readable on light and dark sections */
.wp-block-button.is-style-outline .wp-block-button__link { color: var(--ak-navy); background: transparent; border: 2px solid var(--ak-navy); }
.wp-block-button.is-style-outline .wp-block-button__link:hover { background: var(--ak-navy); color: #fff; }
.ak-dark .wp-block-button.is-style-outline .wp-block-button__link,
.ak-hero .wp-block-button.is-style-outline .wp-block-button__link { color: #fff; border-color: #fff; }
.ak-dark .wp-block-button.is-style-outline .wp-block-button__link:hover,
.ak-hero .wp-block-button.is-style-outline .wp-block-button__link:hover { background: #fff; color: var(--ak-navy); }
.wp-block-button__link { text-decoration: none; }

/* Links inside dark sections */
.ak-dark a:not(.wp-block-button__link),
.ak-hero a:not(.wp-block-button__link) { color: #fff; text-decoration: underline; }
.ak-dark, .ak-hero { --wp--preset--color--navy: #031426; }

/* Cards */
.ak-card,
.ak-card-dark { height: 100%; border-radius: var(--ak-radius); padding: 1.25rem; }
.ak-card { border: 1px solid var(--ak-line); background: #fff; }
.ak-card-dark { border: 1px solid rgba(255, 255, 255, .16); background: rgba(255, 255, 255, .05); }
.ak-card .wp-block-image,
.ak-card-dark .wp-block-image { margin-bottom: 1rem; }
.ak-card img { border-radius: 11px; width: 100%; aspect-ratio: 16 / 10; object-fit: cover; }
.ak-price { color: var(--ak-red); font-weight: 800; font-size: clamp(1.5rem, 3vw, 2.25rem); }

/* Tables */
.ak-spec-table table { border-collapse: collapse; width: 100%; }
.ak-spec-table td,
.ak-spec-table th { border-color: var(--ak-line); padding: .8rem; }
.ak-spec-table th { background: #eef2f5; }

/* Breadcrumbs */
.ak-crumbs-wrap { padding-top: .9rem; }
.ak-crumbs { font-size: .85rem; color: var(--ak-muted); margin: 0; }
.ak-crumbs a { color: var(--ak-muted); text-decoration: none; }
.ak-crumbs a:hover { color: var(--ak-red); }
.ak-crumbs-sep { margin: 0 .3rem; }

/* Header / footer */
.ak-nav-note { font-size: .75rem; color: var(--ak-muted); }
.ak-footer { background: var(--ak-navy); color: #fff; }
.ak-footer a { color: #fff; }

/* Details (FAQ) */
.wp-block-details { border-top: 1px solid var(--ak-line); padding: 1rem 0; }
.wp-block-details:last-child { border-bottom: 1px solid var(--ak-line); }
.wp-block-details summary { font-weight: 700; cursor: pointer; }

/* Request form (shortcode from the companion plugin) */
.ak-form-wrap { border: 1px solid var(--ak-line); border-radius: var(--ak-radius); padding: clamp(1rem, 3vw, 2rem); background: #fff; }
.ak-form { display: grid; gap: 1rem; }
.ak-form-grid { display: grid; gap: 1rem; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.ak-form label { display: grid; gap: .4rem; font-weight: 700; font-size: .9rem; }
.ak-form input,
.ak-form select,
.ak-form textarea { box-sizing: border-box; width: 100%; min-height: 46px; padding: .72rem .8rem; border: 1px solid #cbd5e1; border-radius: var(--ak-radius-sm); background: #fff; color: var(--ak-ink); font: inherit; }
.ak-form textarea { min-height: 120px; resize: vertical; }
.ak-form-consent { display: flex; gap: .6rem; align-items: flex-start; font-weight: 400; }
.ak-form-consent input { width: auto; min-height: auto; margin-top: .25rem; }
.ak-form-hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.ak-form button { border: 0; border-radius: var(--ak-radius-sm); background: var(--ak-red); color: #fff; font-weight: 800; padding: .85rem 1.15rem; cursor: pointer; }
.ak-form button:hover { background: #c90c2b; }
.ak-form-status { padding: .8rem 1rem; border-radius: var(--ak-radius-sm); background: #ecfdf5; color: #065f46; margin-bottom: 1rem; }
.ak-form-status--error { background: #fef2f2; color: #991b1b; }

/* Readability: no captions below 14 px, comfortable line length */
.has-small-font-size { font-size: max(.875rem, 14px) !important; }
.ak-card p,
.ak-card li { font-size: .95rem; line-height: 1.55; }
.wp-block-post-content > * { max-width: 100%; }

/* SEO text blocks (end of page) */
.ak-seo { border-top: 1px solid var(--ak-line); }
.ak-seo > * { max-width: 760px; }
.ak-seo h2 { font-size: clamp(1.35rem, 2.2vw, 1.7rem); }
.ak-seo h3 { font-size: 1.1rem; margin-top: 1.4rem; }
.ak-seo p, .ak-seo li { font-size: 1rem; line-height: 1.6; }

/* Keyboard focus */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
summary:focus-visible { outline: 3px solid var(--ak-red); outline-offset: 2px; }
.ak-form input:focus-visible,
.ak-form select:focus-visible,
.ak-form textarea:focus-visible { border-color: var(--ak-red); outline-offset: 0; }

@media (max-width: 781px) {
	.ak-hero .wp-block-image img { min-height: 260px; }
	.ak-form-grid { grid-template-columns: 1fr; }
}
