/*
Theme Name: Ionkin Aerospace
Theme URI: https://ip-ionkin.ru
Author: Ионкин С.В.
Author URI: https://ip-ionkin.ru
Description: Авиакосмическая тема-визитка для ИП Ионкин С.В. ИТ-интеграция и авионика.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.5
Requires PHP: 7.4
License: Private
Text Domain: ionkin
*/

/* ═══════════════════════════════════════
   ПЕРЕМЕННЫЕ
═══════════════════════════════════════ */
:root {
  --amber: #f5a623;
  --amber-dim: #c47d10;
  --amber-glow: rgba(245,166,35,0.15);
  --bg: #080c10;
  --bg2: #0d1218;
  --bg3: #111820;
  --grid: rgba(245,166,35,0.06);
  --line: rgba(245,166,35,0.2);
  --text: #c8d4e0;
  --text-dim: #6a7a8a;
  --text-bright: #e8f0f8;
  --mono: 'Share Tech Mono', monospace;
  --head: 'Rajdhani', sans-serif;
  --body: 'Exo 2', sans-serif;
}

/* ═══════════════════════════════════════
   RESET & BASE
═══════════════════════════════════════ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--body);
  font-weight: 300;
  overflow-x: hidden;
  cursor: crosshair;
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(var(--grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 60px 60px;
  pointer-events: none;
  z-index: 0;
}

body::after {
  content: '';
  position: fixed;
  inset: 0;
  background: repeating-linear-gradient(0deg, transparent, transparent 2px, rgba(0,0,0,0.03) 2px, rgba(0,0,0,0.03) 4px);
  pointer-events: none;
  z-index: 1;
}

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }

/* ═══════════════════════════════════════
   NAV
═══════════════════════════════════════ */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 4rem;
  height: 64px;
  background: rgba(8,12,16,0.92);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(12px);
}

.site-logo {
  font-family: var(--mono);
  font-size: 0.8rem;
  color: var(--amber);
  letter-spacing: 0.15em;
}

.site-logo span { color: var(--text-dim); }

.main-navigation ul {
  display: flex;
  gap: 2.5rem;
  list-style: none;
}

.main-navigation a {
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--text-dim);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  position: relative;
  transition: color 0.2s;
}

.main-navigation a::after {
  content: '';
  position: absolute;
  bottom: -4px; left: 0; right: 0;
  height: 1px;
  background: var(--amber);
  transform: scaleX(0);
  transition: transform 0.2s;
}

.main-navigation a:hover,
.main-navigation .current-menu-item a { color: var(--amber); }
.main-navigation a:hover::after,
.main-navigation .current-menu-item a::after { transform: scaleX(1); }

.nav-status {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--mono);
  font-size: 0.68rem;
  color: var(--text-dim);
}

.status-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: #4caf7d;
  animation: pulse-dot 2s ease-in-out infinite;
}

@keyframes pulse-dot {
  0%,100% { opacity: 1; box-shadow: 0 0 4px #4caf7d; }
  50% { opacity: 0.4; box-shadow: none; }
}

/* ═══════════════════════════════════════
   GENERAL LAYOUT
═══════════════════════════════════════ */
.site-main { position: relative; z-index: 2; }

.container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 4rem;
}

section, .page-section {
  position: relative;
  z-index: 2;
  padding: 7rem 4rem;
}

.section-header {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  margin-bottom: 4rem;
}

.section-num {
  font-family: var(--mono);
  font-size: 0.7rem;
  color: var(--amber);
  letter-spacing: 0.15em;
  white-space: nowrap;
}

.section-line {
  flex: 1;
  height: 1px;
  background: linear-gradient(to right, var(--line), transparent);
}

h1, h2, h3, h4 {
  font-family: var(--head);
  color: var(--text-bright);
  letter-spacing: 0.03em;
}

h2 { font-size: clamp(1.8rem, 3.5vw, 2.8rem); font-weight: 600; }
h3 { font-size: 1.5rem; font-weight: 600; }

.section-divider {
  position: relative;
  z-index: 2;
  height: 1px;
  background: linear-gradient(to right, transparent, var(--line), transparent);
  margin: 0 4rem;
}

/* ═══════════════════════════════════════
   BUTTONS
═══════════════════════════════════════ */
.btn {
  font-family: var(--mono);
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 0.85rem 2rem;
  border: 1px solid;
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  transition: all 0.25s;
  cursor: pointer;
  background: none;
}

.btn-primary {
  border-color: var(--amber);
  color: var(--amber);
  position: relative;
  overflow: hidden;
}

.btn-primary::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--amber);
  transform: translateX(-100%);
  transition: transform 0.3s ease;
  z-index: -1;
}

.btn-primary:hover { color: var(--bg); }
.btn-primary:hover::before { transform: translateX(0); }

.btn-secondary {
  border-color: var(--line);
  color: var(--text-dim);
}

.btn-secondary:hover {
  border-color: var(--amber);
  color: var(--amber);
}

/* ═══════════════════════════════════════
   HERO
═══════════════════════════════════════ */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: 0 4rem;
  overflow: hidden;
}

.hero-bg-circle {
  position: absolute;
  right: -10%;
  top: 50%;
  transform: translateY(-50%);
  width: 700px; height: 700px;
  border-radius: 50%;
  border: 1px solid var(--line);
  opacity: 0.4;
  pointer-events: none;
}

.hero-bg-circle::before {
  content: '';
  position: absolute;
  inset: 40px;
  border-radius: 50%;
  border: 1px solid var(--line);
}

.hero-bg-circle::after {
  content: '';
  position: absolute;
  inset: 120px;
  border-radius: 50%;
  border: 1px solid var(--amber);
  opacity: 0.3;
  animation: rotate-slow 30s linear infinite;
}

@keyframes rotate-slow { to { transform: rotate(360deg); } }

.hero-content { max-width: 680px; position: relative; z-index: 2; }

.hero-tag {
  font-family: var(--mono);
  font-size: 0.7rem;
  color: var(--amber);
  letter-spacing: 0.25em;
  text-transform: uppercase;
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  gap: 1rem;
}

.hero-tag::before {
  content: '';
  display: inline-block;
  width: 40px; height: 1px;
  background: var(--amber);
}

h1.hero-title {
  font-size: clamp(2.8rem, 6vw, 5rem);
  font-weight: 700;
  line-height: 1.05;
  margin-bottom: 0.3rem;
}

h1.hero-title .accent { color: var(--amber); }

.hero-subtitle {
  font-family: var(--head);
  font-size: clamp(1rem, 2vw, 1.4rem);
  font-weight: 300;
  color: var(--text-dim);
  letter-spacing: 0.15em;
  text-transform: uppercase;
  margin-bottom: 2rem;
}

.hero-desc {
  font-size: 1rem;
  line-height: 1.8;
  color: var(--text);
  max-width: 520px;
  margin-bottom: 3rem;
}

.hero-metrics {
  display: flex;
  gap: 3rem;
  margin-bottom: 3rem;
}

.metric-value {
  font-family: var(--head);
  font-size: 2.2rem;
  font-weight: 600;
  color: var(--amber);
  line-height: 1;
}

.metric-label {
  font-family: var(--mono);
  font-size: 0.65rem;
  color: var(--text-dim);
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.hero-actions { display: flex; gap: 1.2rem; flex-wrap: wrap; }

/* ═══════════════════════════════════════
   TICKER
═══════════════════════════════════════ */
.ticker {
  position: relative;
  z-index: 2;
  background: var(--bg2);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  overflow: hidden;
  height: 36px;
  display: flex;
  align-items: center;
}

.ticker-track {
  display: flex;
  gap: 4rem;
  animation: ticker-scroll 40s linear infinite;
  white-space: nowrap;
}

.ticker-item {
  font-family: var(--mono);
  font-size: 0.65rem;
  color: var(--text-dim);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  display: flex;
  align-items: center;
  gap: 1rem;
}

.ticker-item::before {
  content: '◆';
  color: var(--amber);
  font-size: 0.4rem;
}

@keyframes ticker-scroll {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

/* ═══════════════════════════════════════
   SERVICES
═══════════════════════════════════════ */
.services-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5px;
  background: var(--line);
  border: 1px solid var(--line);
}

.service-card {
  background: var(--bg2);
  padding: 3rem;
  position: relative;
  overflow: hidden;
  transition: background 0.3s;
}

.service-card:hover { background: var(--bg3); }

.service-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 3px; height: 0;
  background: var(--amber);
  transition: height 0.4s ease;
}

.service-card:hover::before { height: 100%; }

.service-icon-img {
  width: 48px; height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  margin-bottom: 1.5rem;
}

.service-icon-img svg {
  width: 24px; height: 24px;
  stroke: var(--amber);
  fill: none;
  stroke-width: 1.5;
}

.service-cat {
  font-family: var(--mono);
  font-size: 0.7rem;
  color: var(--amber);
  letter-spacing: 0.15em;
  margin-bottom: 1rem;
}

.service-desc {
  font-size: 0.92rem;
  line-height: 1.8;
  color: var(--text);
  margin-bottom: 2rem;
}

.service-tags { display: flex; flex-wrap: wrap; gap: 0.5rem; }

.tag {
  font-family: var(--mono);
  font-size: 0.62rem;
  color: var(--text-dim);
  border: 1px solid rgba(100,120,140,0.3);
  padding: 0.25rem 0.6rem;
  letter-spacing: 0.08em;
  transition: all 0.2s;
}

.tag:hover { border-color: var(--amber); color: var(--amber); }

/* ═══════════════════════════════════════
   PORTFOLIO
═══════════════════════════════════════ */
.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--line);
}

.portfolio-item {
  position: relative;
  aspect-ratio: 4/3;
  background: var(--bg2);
  overflow: hidden;
  cursor: pointer;
}

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

.portfolio-item:hover img { transform: scale(1.05); }

.portfolio-overlay {
  position: absolute;
  inset: 0;
  background: rgba(8,12,16,0.88);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 1.5rem;
  opacity: 0;
  transition: opacity 0.3s;
}

.portfolio-item:hover .portfolio-overlay { opacity: 1; }

.portfolio-title {
  font-family: var(--head);
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-bright);
  margin-bottom: 0.3rem;
}

.portfolio-cat {
  font-family: var(--mono);
  font-size: 0.65rem;
  color: var(--amber);
  letter-spacing: 0.1em;
}

.portfolio-no-img {
  width: 100%; height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.8rem;
  background: linear-gradient(135deg, var(--bg2) 0%, var(--bg3) 100%);
}

/* ═══════════════════════════════════════
   BLOG
═══════════════════════════════════════ */
.blog-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}

.blog-card {
  background: var(--bg2);
  border: 1px solid var(--line);
  padding: 2rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  transition: border-color 0.3s;
}

.blog-card:hover { border-color: var(--amber); }

.blog-meta { display: flex; align-items: center; gap: 1rem; }

.blog-date {
  font-family: var(--mono);
  font-size: 0.65rem;
  color: var(--text-dim);
  letter-spacing: 0.1em;
}

.blog-cat-badge {
  font-family: var(--mono);
  font-size: 0.6rem;
  letter-spacing: 0.1em;
  padding: 0.2rem 0.5rem;
  border: 1px solid var(--amber);
  color: var(--amber);
}

.blog-title {
  font-family: var(--head);
  font-size: 1.1rem;
  font-weight: 500;
  color: var(--text-bright);
  line-height: 1.4;
}

.blog-excerpt {
  font-size: 0.88rem;
  line-height: 1.7;
  color: var(--text-dim);
  flex: 1;
}

.blog-read-more {
  font-family: var(--mono);
  font-size: 0.65rem;
  color: var(--amber);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: auto;
}

.blog-card.featured {
  grid-column: 1 / -1;
  flex-direction: row;
  gap: 2.5rem;
}

.blog-card.featured .blog-thumb {
  width: 280px;
  min-width: 280px;
  background: var(--bg3);
  border: 1px solid var(--line);
  overflow: hidden;
  flex-shrink: 0;
}

.blog-card.featured .blog-thumb img {
  width: 100%; height: 100%;
  object-fit: cover;
}

.blog-body { display: flex; flex-direction: column; gap: 1rem; }

/* ═══════════════════════════════════════
   SINGLE POST / PROJECT
═══════════════════════════════════════ */
.single-wrap {
  padding-top: 120px;
  max-width: 820px;
  margin: 0 auto;
  padding-left: 4rem;
  padding-right: 4rem;
  padding-bottom: 7rem;
  position: relative;
  z-index: 2;
}

.single-meta {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 2rem;
}

.single-title {
  font-family: var(--head);
  font-size: clamp(1.8rem, 4vw, 3rem);
  font-weight: 700;
  color: var(--text-bright);
  line-height: 1.15;
  margin-bottom: 2.5rem;
}

.single-thumb {
  width: 100%;
  aspect-ratio: 16/9;
  overflow: hidden;
  border: 1px solid var(--line);
  margin-bottom: 3rem;
}

.single-thumb img {
  width: 100%; height: 100%;
  object-fit: cover;
}

.entry-content {
  font-size: 1rem;
  line-height: 1.9;
  color: var(--text);
}

.entry-content p { margin-bottom: 1.4rem; }
.entry-content h2 {
  font-size: 1.5rem;
  margin: 2.5rem 0 1rem;
  color: var(--text-bright);
}

.entry-content h3 {
  font-size: 1.2rem;
  margin: 2rem 0 0.8rem;
  color: var(--amber);
}

.entry-content ul, .entry-content ol {
  margin: 1rem 0 1.4rem 1.5rem;
}

.entry-content li { margin-bottom: 0.4rem; }

.entry-content img {
  width: 100%;
  border: 1px solid var(--line);
  margin: 2rem 0;
}

.entry-content a {
  color: var(--amber);
  border-bottom: 1px solid var(--amber-glow);
  transition: border-color 0.2s;
}

.entry-content a:hover { border-color: var(--amber); }

.entry-content blockquote {
  border-left: 3px solid var(--amber);
  padding: 1rem 1.5rem;
  margin: 2rem 0;
  background: var(--bg2);
  font-style: italic;
  color: var(--text-dim);
}

/* Video embed */
.wp-block-embed, .entry-content iframe {
  width: 100%;
  aspect-ratio: 16/9;
  border: 1px solid var(--line);
  margin: 2rem 0;
}

.entry-content iframe { height: auto; }

/* Gallery */
.wp-block-gallery {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 4px;
  margin: 2rem 0;
}

.wp-block-gallery img {
  margin: 0;
  aspect-ratio: 4/3;
  object-fit: cover;
}

/* ═══════════════════════════════════════
   ABOUT
═══════════════════════════════════════ */
.about-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5rem;
  align-items: start;
}

.about-text p {
  font-size: 0.95rem;
  line-height: 1.9;
  color: var(--text);
  margin-bottom: 1.2rem;
}

.about-specs {
  border: 1px solid var(--line);
}

.spec-row {
  display: flex;
  border-bottom: 1px solid var(--line);
}

.spec-row:last-child { border-bottom: none; }

.spec-key {
  font-family: var(--mono);
  font-size: 0.68rem;
  color: var(--text-dim);
  letter-spacing: 0.08em;
  padding: 0.9rem 1.2rem;
  width: 160px;
  min-width: 160px;
  border-right: 1px solid var(--line);
  display: flex;
  align-items: center;
}

.spec-val {
  font-size: 0.88rem;
  color: var(--text-bright);
  padding: 0.9rem 1.2rem;
  display: flex;
  align-items: center;
  font-weight: 300;
}

/* ═══════════════════════════════════════
   CONTACT
═══════════════════════════════════════ */
.contact-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: start;
}

.contact-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.2rem;
  border: 1px solid transparent;
  transition: border-color 0.2s;
}

.contact-item:hover { border-color: var(--line); }

.contact-icon {
  width: 36px; height: 36px;
  border: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.contact-icon svg {
  width: 16px; height: 16px;
  stroke: var(--amber);
  fill: none;
  stroke-width: 1.5;
}

.contact-label {
  font-family: var(--mono);
  font-size: 0.62rem;
  color: var(--text-dim);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  display: block;
  margin-bottom: 0.2rem;
}

.contact-value { font-size: 0.95rem; color: var(--text-bright); }

/* WP Comment Form */
.comment-form label {
  font-family: var(--mono);
  font-size: 0.62rem;
  color: var(--text-dim);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  display: block;
  margin-bottom: 0.4rem;
}

.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form textarea {
  background: var(--bg2);
  border: 1px solid var(--line);
  color: var(--text-bright);
  font-family: var(--body);
  font-size: 0.92rem;
  font-weight: 300;
  padding: 0.8rem 1rem;
  outline: none;
  transition: border-color 0.2s;
  width: 100%;
  resize: none;
  margin-bottom: 1rem;
}

.comment-form input:focus,
.comment-form textarea:focus { border-color: var(--amber); }

.comment-form input[type="submit"] {
  font-family: var(--mono);
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 0.85rem 2rem;
  border: 1px solid var(--amber);
  color: var(--amber);
  background: none;
  cursor: pointer;
  transition: all 0.25s;
}

.comment-form input[type="submit"]:hover {
  background: var(--amber);
  color: var(--bg);
}

/* CF7 */
.wpcf7-form input,
.wpcf7-form textarea {
  background: var(--bg2);
  border: 1px solid var(--line);
  color: var(--text-bright);
  font-family: var(--body);
  font-size: 0.92rem;
  padding: 0.8rem 1rem;
  outline: none;
  width: 100%;
  margin-bottom: 1rem;
  transition: border-color 0.2s;
}

.wpcf7-form input:focus,
.wpcf7-form textarea:focus { border-color: var(--amber); }

.wpcf7-form input[type="submit"] {
  font-family: var(--mono);
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 0.85rem 2rem;
  border: 1px solid var(--amber);
  color: var(--amber);
  background: none;
  cursor: pointer;
  width: auto;
  transition: all 0.25s;
}

.wpcf7-form input[type="submit"]:hover {
  background: var(--amber);
  color: var(--bg);
}

/* ═══════════════════════════════════════
   FOOTER
═══════════════════════════════════════ */
.site-footer {
  position: relative;
  z-index: 2;
  border-top: 1px solid var(--line);
  padding: 2rem 4rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.footer-copy,
.footer-entities {
  font-family: var(--mono);
  font-size: 0.65rem;
  color: var(--text-dim);
  letter-spacing: 0.1em;
}

/* HUD decoration */
.hud-corner {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  z-index: 50;
  width: 80px; height: 80px;
  opacity: 0.25;
  pointer-events: none;
}

.hud-corner svg {
  width: 100%; height: 100%;
  stroke: var(--amber);
  fill: none;
  stroke-width: 1;
}

/* ═══════════════════════════════════════
   ANIMATIONS
═══════════════════════════════════════ */
.fade-in {
  opacity: 0;
  transform: translateY(24px);
  animation: fade-up 0.8s ease forwards;
}

@keyframes fade-up { to { opacity: 1; transform: translateY(0); } }
.delay-1 { animation-delay: 0.1s; }
.delay-2 { animation-delay: 0.25s; }
.delay-3 { animation-delay: 0.4s; }
.delay-4 { animation-delay: 0.55s; }
.delay-5 { animation-delay: 0.7s; }

/* ═══════════════════════════════════════
   RESPONSIVE
═══════════════════════════════════════ */
@media (max-width: 900px) {
  .site-header { padding: 0 2rem; }
  .nav-status { display: none; }
  .hero, section, .page-section { padding-left: 2rem; padding-right: 2rem; }
  .section-divider { margin: 0 2rem; }
  .site-footer { padding: 2rem; flex-direction: column; gap: 0.5rem; text-align: center; }
  .services-grid { grid-template-columns: 1fr; }
  .portfolio-grid { grid-template-columns: 1fr 1fr; }
  .blog-grid { grid-template-columns: 1fr; }
  .blog-card.featured { flex-direction: column; }
  .blog-card.featured .blog-thumb { width: 100%; min-width: unset; height: 200px; }
  .about-layout { grid-template-columns: 1fr; gap: 3rem; }
  .contact-layout { grid-template-columns: 1fr; gap: 2rem; }
  .hero-bg-circle { display: none; }
  .main-navigation ul { gap: 1.5rem; }
  .single-wrap { padding-left: 2rem; padding-right: 2rem; }
}

@media (max-width: 600px) {
  .portfolio-grid { grid-template-columns: 1fr; }
  .main-navigation { display: none; }
  .wp-block-gallery { grid-template-columns: 1fr; }
}
