/*
Theme Name: Carflashes
Theme URI: https://carflashes.ru/
Author: OpenAI Codex
Author URI: https://openai.com/
Description: Custom WordPress theme for Carflashes and Toyota localization landing pages.
Version: 2.0.0
Requires at least: 5.9
Tested up to: 6.8
Requires PHP: 7.0
Text Domain: carflashes
*/

:root {
  --bg: #f3f5f7;
  --bg-soft: #eef1f4;
  --paper: #ffffff;
  --ink: #121519;
  --muted: #59626d;
  --line: rgba(18, 21, 25, 0.1);
  --brand: #ff6a3d;
  --brand-deep: #d84b20;
  --teal: #09a79c;
  --dark: #0d1014;
  --dark-soft: #181d24;
  --radius: 8px;
  --shadow: 0 20px 60px rgba(15, 23, 32, 0.08);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  margin-top: 0 !important;
}

body {
  margin: 0;
  min-width: 320px;
  background: var(--bg);
  color: var(--ink);
  font-family: "Segoe UI", Tahoma, Arial, sans-serif;
  line-height: 1.55;
}

body.menu-open {
  overflow: hidden;
}

img {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
  text-decoration: none;
}

a,
button,
input,
select,
textarea {
  transition: 0.2s ease;
}

button,
input,
select,
textarea {
  font: inherit;
}

.shell {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
}

.section {
  padding: 88px 0;
}

.section-soft {
  background: var(--paper);
}

.section-contrast {
  background: var(--dark);
  color: #f7fafc;
}

.section-head {
  display: grid;
  gap: 12px;
  margin-bottom: 32px;
}

.section-kicker,
.eyebrow,
.footer-kicker,
.hero-panel-kicker {
  margin: 0;
  color: var(--brand);
  font-size: 0.84rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.section-head h2,
.split-band h2,
.result-grid h2,
.lead-copy h2,
.footer-grid h2,
.page-hero h1 {
  margin: 0;
  font-size: clamp(2rem, 4vw, 3.5rem);
  line-height: 1;
}

.section-head p,
.hero-text,
.package-lead,
.result-copy p,
.lead-copy p,
.footer-text,
.page-main p,
.page-main li {
  margin: 0;
  color: var(--muted);
  font-size: 1.02rem;
}

.section-contrast .section-kicker,
.section-contrast .benefit-item {
  color: #f7fafc;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(243, 245, 247, 0.88);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid rgba(18, 21, 25, 0.08);
}

.header-inner {
  min-height: 78px;
  display: grid;
  grid-template-columns: auto 1fr auto auto;
  gap: 18px;
  align-items: center;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
}

.brand-image {
  display: block;
  width: 240px;
  max-width: 100%;
  height: auto;
}

.brand-mark {
  width: 44px;
  height: 44px;
  display: inline-grid;
  place-items: center;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--brand), #ff8752);
  color: #fff;
  font-weight: 800;
}

.brand-copy {
  display: grid;
  gap: 2px;
}

.brand-copy strong {
  font-size: 1rem;
  text-transform: uppercase;
}

.brand-copy small {
  color: var(--muted);
}

.site-nav {
  justify-self: center;
}

.site-nav .menu {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 18px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.site-nav a {
  color: var(--muted);
  font-weight: 700;
}

.site-nav a:hover,
.site-nav a:focus-visible {
  color: var(--ink);
}

.header-phone {
  white-space: nowrap;
  font-weight: 800;
}

.menu-toggle {
  display: none;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  background: transparent;
}

.menu-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  margin: 5px auto;
  background: var(--ink);
}

.hero {
  position: relative;
  overflow: hidden;
  padding: 42px 0 28px;
  background:
    radial-gradient(circle at 12% 10%, rgba(255, 106, 61, 0.24), transparent 24%),
    radial-gradient(circle at 86% 14%, rgba(9, 167, 156, 0.18), transparent 28%),
    linear-gradient(180deg, #11151a 0%, #0d1014 100%);
  color: #fff;
}

.hero-backdrop {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.03), transparent 30%),
    linear-gradient(90deg, rgba(255, 255, 255, 0.02), transparent 40%, rgba(255, 255, 255, 0.02));
  pointer-events: none;
}

.hero-grid {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(360px, 480px);
  gap: 28px;
  align-items: end;
  padding-top: 72px;
}

.hero-copy {
  display: grid;
  gap: 18px;
  padding-bottom: 16px;
}

.hero-copy h1 {
  margin: 0;
  max-width: 780px;
  font-size: clamp(2.7rem, 5.2vw, 5.3rem);
  line-height: 0.96;
}

.hero-text {
  max-width: 680px;
  color: rgba(255, 255, 255, 0.84);
}

.hero-actions,
.contact-pills,
.package-actions,
.lead-links,
.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.button,
.contact-pill,
.text-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 18px;
  border-radius: 8px;
  border: 1px solid transparent;
  font-weight: 800;
  cursor: pointer;
}

.button {
  min-width: 170px;
}

.button:hover,
.button:focus-visible,
.contact-pill:hover,
.contact-pill:focus-visible {
  transform: translateY(-1px);
}

.button-primary {
  background: linear-gradient(135deg, var(--brand), #ff8357);
  color: #fff;
  box-shadow: 0 16px 36px rgba(255, 106, 61, 0.26);
}

.button-secondary {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.16);
}

.contact-pill {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.12);
}

.contact-pill-phone {
  background: #fff;
  color: var(--ink);
}

.contact-pill-whatsapp {
  background: rgba(37, 211, 102, 0.18);
}

.contact-pill-telegram {
  background: rgba(43, 161, 226, 0.18);
}

.contact-pill-max {
  background: rgba(255, 255, 255, 0.1);
}

.contact-pill-route {
  background: rgba(255, 255, 255, 0.14);
}

.contact-pill-copy {
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.contact-pill-copy:hover,
.contact-pill-copy:focus-visible {
  border-color: rgba(255, 255, 255, 0.26);
}

.hero-visual {
  position: relative;
}

.hero-frame {
  position: relative;
  min-height: 560px;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.02));
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.28);
}

.hero-frame img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.72;
}

.hero-frame::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(8, 10, 14, 0.2), rgba(8, 10, 14, 0.5)),
    linear-gradient(135deg, rgba(9, 167, 156, 0.1), rgba(255, 106, 61, 0.12));
}

.hero-overlay {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: end;
  min-height: 560px;
  padding: 24px;
}

.hero-panel {
  width: min(100%, 360px);
  padding: 22px;
  border-radius: 8px;
  background: rgba(13, 16, 20, 0.74);
  border: 1px solid rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(10px);
}

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

.hero-panel-list li {
  position: relative;
  padding-left: 18px;
  color: rgba(255, 255, 255, 0.86);
}

.hero-panel-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.58em;
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--brand);
}

.metric-grid {
  position: relative;
  margin-top: 24px;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.metric-card {
  padding: 20px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.metric-card strong {
  display: block;
  margin-bottom: 6px;
  font-size: 1.3rem;
  line-height: 1.05;
}

.metric-card span {
  color: rgba(255, 255, 255, 0.78);
}

.package-grid,
.process-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}

.package-card,
.pain-card,
.process-step,
.lead-form,
.faq-item,
.metric-card,
.contact-card {
  box-shadow: var(--shadow);
}

.package-card,
.pain-card,
.process-step,
.lead-form,
.faq-item,
.contact-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.post-card {
  padding: 24px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: var(--paper);
  box-shadow: var(--shadow);
}

.post-card + .post-card {
  margin-top: 16px;
}

.post-card h2 {
  margin: 0 0 10px;
  font-size: 1.5rem;
}

.package-card {
  overflow: hidden;
  padding: 0;
}

.package-topline {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.package-model,
.package-card h3,
.process-index {
  font-weight: 800;
}

.service-badge {
  color: var(--teal);
  font-size: 0.84rem;
  text-transform: uppercase;
}

.package-lead {
  margin-top: 12px;
}

.package-image {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  background: #dde3e8;
}

.package-body {
  display: grid;
  gap: 0;
  padding: 24px 24px 26px;
}

.package-actions,
.lead-links,
.footer-links,
.contact-pills {
  margin-top: 18px;
}

.package-list,
.result-list {
  margin: 18px 0 0;
  padding-left: 18px;
}

.package-list li,
.result-list li {
  margin-top: 10px;
  color: var(--muted);
}

.text-link {
  min-height: auto;
  padding: 0;
  color: var(--brand);
  border: 0;
  background: transparent;
}

.text-link:hover,
.text-link:focus-visible {
  color: var(--brand-deep);
}

.pain-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.pain-card {
  padding: 22px;
  color: var(--muted);
}

.split-band,
.result-grid,
.lead-grid,
.footer-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.94fr) minmax(0, 1.06fr);
  gap: 28px;
  align-items: start;
}

.benefit-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.benefit-item {
  padding: 18px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  color: rgba(255, 255, 255, 0.82);
}

.process-step {
  padding: 24px;
}

.process-index {
  display: inline-grid;
  place-items: center;
  width: 40px;
  height: 40px;
  margin-bottom: 14px;
  border-radius: 999px;
  background: rgba(255, 106, 61, 0.12);
  color: var(--brand);
}

.process-step p,
.benefit-item,
.faq-item p,
.footer-contacts p,
.contact-card p,
.page-main li,
.page-main p {
  color: var(--muted);
}

.result-copy {
  display: grid;
  gap: 18px;
}

.faq-list {
  display: grid;
  gap: 12px;
}

.faq-item {
  padding: 18px 22px;
}

.faq-item summary {
  cursor: pointer;
  list-style: none;
  font-weight: 800;
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-item p {
  margin: 14px 0 0;
}

.lead-section {
  background: linear-gradient(180deg, #f4f6f8 0%, #eef2f5 100%);
}

.lead-copy {
  display: grid;
  gap: 18px;
}

.contact-card {
  padding: 18px;
}

.contact-card p {
  margin: 0;
}

.contact-card p + p {
  margin-top: 10px;
}

.lead-form {
  padding: 24px;
  display: grid;
  gap: 14px;
}

.lead-form label {
  display: grid;
  gap: 8px;
}

.lead-form span {
  font-weight: 700;
}

.lead-form input,
.lead-form select,
.lead-form textarea {
  width: 100%;
  min-height: 48px;
  padding: 12px 14px;
  border: 1px solid rgba(18, 21, 25, 0.12);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
}

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

.form-agreement {
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
}

.form-notice {
  padding: 14px 16px;
  border-radius: 8px;
  font-weight: 700;
}

.form-notice-success {
  background: rgba(9, 167, 156, 0.12);
  color: #06776f;
}

.form-notice-error {
  background: rgba(255, 106, 61, 0.14);
  color: var(--brand-deep);
}

.site-footer {
  padding: 72px 0 24px;
  background: #0d1014;
  color: #f7fafc;
}

.footer-text {
  color: rgba(247, 250, 252, 0.76);
}

.footer-logo {
  display: block;
  width: 240px;
  max-width: 100%;
  height: auto;
  margin-bottom: 16px;
}

.footer-contacts {
  display: grid;
  gap: 10px;
  justify-items: start;
}

.footer-contacts a {
  font-weight: 800;
}

.footer-bottom {
  margin-top: 30px;
  padding-top: 18px;
  border-top: 1px solid rgba(247, 250, 252, 0.12);
  color: rgba(247, 250, 252, 0.58);
}

.page-hero {
  padding: 120px 0 24px;
}

.page-main {
  padding-bottom: 72px;
}

.page-main .prose {
  max-width: 760px;
}

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

  .hero-frame,
  .hero-overlay {
    min-height: 460px;
  }

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

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

@media (max-width: 960px) {
  .header-inner {
    grid-template-columns: auto 1fr auto;
  }

  .menu-toggle {
    display: inline-block;
    justify-self: end;
  }

  .site-nav {
    position: absolute;
    top: 78px;
    left: 0;
    right: 0;
    display: none;
    padding: 18px 16px 20px;
    background: rgba(243, 245, 247, 0.98);
    border-bottom: 1px solid rgba(18, 21, 25, 0.08);
  }

  .site-nav.is-open {
    display: block;
  }

  .site-nav .menu {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }

  .header-phone {
    display: none;
  }

  .package-grid,
  .process-grid,
  .split-band,
  .result-grid,
  .lead-grid,
  .footer-grid,
  .benefit-list {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .section {
    padding: 72px 0;
  }

  .shell {
    width: min(100% - 20px, 1180px);
  }

  .hero {
    padding-top: 24px;
  }

  .brand-image,
  .footer-logo {
    width: 210px;
  }

  .hero-grid {
    padding-top: 56px;
  }

  .hero-copy h1 {
    font-size: clamp(2.2rem, 10vw, 3.3rem);
  }

  .hero-frame,
  .hero-overlay {
    min-height: 380px;
  }

  .metric-grid,
  .pain-grid {
    grid-template-columns: 1fr;
  }

  .package-card,
  .pain-card,
  .process-step,
  .lead-form,
  .faq-item,
  .contact-card {
    padding: 20px;
  }
}

/* ── Model Cards ─────────────────────────────── */
.model-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}

.model-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 24px;
  display: grid;
  gap: 8px;
  align-content: start;
}

.model-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 2px;
}

.model-badge {
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.model-price-from {
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--brand);
}

.model-title {
  margin: 0;
  font-size: 1.6rem;
  line-height: 1;
}

.model-years {
  margin: 0;
  font-size: 0.86rem;
  color: var(--muted);
  font-weight: 700;
}

.model-desc {
  margin: 0;
  font-size: 0.92rem;
  color: var(--muted);
  line-height: 1.55;
}

.model-tiers {
  display: grid;
  gap: 5px;
  padding: 12px 0 4px;
  border-top: 1px solid var(--line);
  margin-top: 4px;
}

.model-tier {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-size: 0.87rem;
}

.model-tier-years { color: var(--muted); }

.model-tier-price {
  font-weight: 800;
  color: var(--ink);
}

.model-cta {
  font-size: 0.9rem;
  font-weight: 800;
  margin-top: 2px;
}

@media (max-width: 960px) {
  .model-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

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

/* ── Form consent checkbox ─────────────────── */
.form-consent {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  cursor: pointer;
  margin-bottom: 4px;
}
.form-consent input[type="checkbox"] {
  flex-shrink: 0;
  width: 18px;
  height: 18px;
  margin-top: 2px;
  accent-color: var(--brand, #FF6A3D);
  cursor: pointer;
}
.form-consent span {
  font-size: 0.88rem;
  line-height: 1.5;
  color: var(--muted, #666);
}
.form-consent a { color: var(--brand, #FF6A3D); text-decoration: underline; }
.form-consent a:hover { text-decoration: none; }
