/*
Theme Name: Staspirogov Pro
Theme URI: https://staspirogov.pro
Author: Stanislav Pirogov
Author URI: https://staspirogov.pro
Description: Hand-coded WordPress theme for personal brand & case portfolio
Version: 1.0.0
License: GPL v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: staspirogov-pro
Domain Path: /languages
*/

/* ============ DESIGN TOKENS (from variant1_final.html) ============ */
:root {
  --paper: #F7F7F4;
  --ink: #131511;
  --ink-soft: #4A4D47;
  --line: #DDDDD6;
  --card: #FFFFFF;
  --accent: #1B4FFF;
  --accent-ink: #FFFFFF;
  --accent-soft: #E9EEFF;
  --teal: #0FA47A;
  --amber: #B9860B;
}

/* ============ RESET & BASE ============ */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  background: var(--paper);
  color: var(--ink);
  font: 16px / 1.6 "Inter", system-ui, -apple-system, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ============ TYPOGRAPHY ============ */
.display {
  font-family: "Archivo", sans-serif;
  font-variation-settings: "wdth" 122, "wght" 800;
  line-height: 1.02;
  letter-spacing: -0.01em;
}

.mono {
  font-family: "IBM Plex Mono", monospace;
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.eyebrow {
  color: var(--accent);
  margin-bottom: 14px;
  display: block;
}

h1, h2, h3, h4, h5, h6 {
  font-family: "Archivo", sans-serif;
  line-height: 1.2;
}

h1 {
  font-size: clamp(32px, 5vw, 56px);
  font-weight: 800;
}

h2 {
  font-size: clamp(30px, 4.4vw, 52px);
  margin-bottom: 18px;
}

h3 {
  font-size: 20px;
  font-weight: 700;
}

p {
  line-height: 1.7;
  margin-bottom: 1rem;
}

a {
  color: inherit;
  text-decoration: none;
  transition: color 0.15s;
}

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

/* ============ LAYOUT ============ */
.wrap {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 24px;
}

section {
  padding: 88px 0;
  border-top: 1px solid var(--line);
}

section:first-of-type {
  border-top: none;
}

/* ============ BUTTONS ============ */
.btn {
  display: inline-block;
  background: var(--accent);
  color: var(--accent-ink);
  padding: 16px 30px;
  border-radius: 4px;
  text-decoration: none;
  font-weight: 600;
  font-size: 16px;
  border: 1px solid var(--accent);
  transition: transform 0.15s;
  cursor: pointer;
}

.btn:hover {
  transform: translateY(-2px);
}

.btn.ghost {
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--ink);
}

.btn.ghost:hover {
  background: var(--paper);
}

/* ============ HEADER ============ */
header {
  position: sticky;
  top: 0;
  background: color-mix(in srgb, var(--paper) 92%, transparent);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
  z-index: 50;
}

.nav {
  display: flex;
  align-items: center;
  gap: 28px;
  height: 66px;
}

.logo {
  font-family: "Archivo";
  font-variation-settings: "wdth" 125, "wght" 900;
  font-size: 19px;
  text-decoration: none;
  color: var(--ink);
  flex-shrink: 0;
}

.logo span {
  color: var(--accent);
}

.nav nav {
  display: flex;
  gap: 22px;
  margin-left: auto;
  flex: 1;
}

.nav nav a {
  text-decoration: none;
  font-size: 14.5px;
  font-weight: 500;
  color: var(--ink-soft);
  transition: color 0.15s;
}

.nav nav a:hover {
  color: var(--ink);
}

.nav .tel {
  font-family: "IBM Plex Mono";
  font-size: 13px;
  text-decoration: none;
  color: var(--ink);
  white-space: nowrap;
}

.nav .btn {
  padding: 10px 18px;
  font-size: 14px;
  flex-shrink: 0;
}

/* Hamburger button */
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 36px;
  height: 36px;
  padding: 6px;
  background: none;
  border: none;
  cursor: pointer;
  margin-left: auto;
}
.nav-toggle span {
  display: block;
  height: 2px;
  background: var(--ink);
  border-radius: 2px;
  transition: transform 0.2s, opacity 0.2s;
}
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Mobile nav drawer */
#mobile-nav {
  position: fixed;
  top: 66px;
  left: 0;
  right: 0;
  background: var(--paper);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 20px 16px 28px;
  z-index: 49;
  display: flex;
  flex-direction: column;
  gap: 4px;
  box-shadow: 0 8px 24px rgba(0,0,0,.08);
}
#mobile-nav[hidden] { display: none; }
#mobile-nav a {
  padding: 12px 0;
  font-size: 15px;
  font-weight: 500;
  color: var(--ink);
  text-decoration: none;
  border-bottom: 1px solid var(--line);
}
#mobile-nav a:last-child { border-bottom: none; }
#mobile-nav .tel-mobile {
  font-family: 'IBM Plex Mono';
  font-size: 14px;
  color: var(--ink-soft);
  margin-top: 8px;
}

/* ============ SWEEP CARD COMPONENT ============ */
.sweep-card {
  position: relative;
  overflow: hidden;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 26px;
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.6s cubic-bezier(0.2, 0.7, 0.2, 1),
              transform 0.6s cubic-bezier(0.2, 0.7, 0.2, 1),
              box-shadow 0.25s,
              border-color 0.25s;
}

.sweep-card.inview {
  opacity: 1;
  transform: translateY(0);
}

.sweep-card:hover {
  box-shadow: 0 16px 36px rgba(19, 21, 17, 0.08);
  border-color: color-mix(in srgb, var(--bar, var(--accent)) 45%, var(--line));
}

.sweep-card::after {
  content: "";
  position: absolute;
  top: 0;
  left: -60%;
  width: 36%;
  height: 100%;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, 0.9) 45%, rgba(255, 255, 255, 0.15) 55%, transparent);
  mix-blend-mode: soft-light;
  transform: skewX(-14deg);
  transition: left 0.9s cubic-bezier(0.2, 0.7, 0.2, 1);
  pointer-events: none;
}

.sweep-card:hover::after,
.sweep-card.autosweep.inview::after {
  left: 130%;
}

.sweep-card.autosweep::after {
  transition: left 1.3s cubic-bezier(0.2, 0.7, 0.2, 1) 0.25s;
}

.sweep-card .sc-num {
  font-family: "IBM Plex Mono";
  font-size: 11px;
  letter-spacing: 0.18em;
  color: var(--bar, var(--accent));
  margin-bottom: 12px;
}

.sweep-card h3 {
  font-family: "Archivo";
  font-variation-settings: "wdth" 116, "wght" 750;
  font-size: 19px;
  margin-bottom: 10px;
}

.sweep-card p {
  font-size: 14px;
  color: var(--ink-soft);
  margin-bottom: 0;
}

/* Stagger animation for grid children */
.stagger .sweep-card:nth-child(1) { transition-delay: 0s; }
.stagger .sweep-card:nth-child(2) { transition-delay: 0.09s; }
.stagger .sweep-card:nth-child(3) { transition-delay: 0.18s; }
.stagger .sweep-card:nth-child(4) { transition-delay: 0.27s; }
.stagger .sweep-card:nth-child(5) { transition-delay: 0.36s; }
.stagger .sweep-card:nth-child(6) { transition-delay: 0.45s; }

@media (prefers-reduced-motion: reduce) {
  .sweep-card {
    opacity: 1;
    transform: none;
    transition: none;
  }
  .sweep-card::after {
    display: none;
  }
}

/* ============ IMAGE CARD (thematic backgrounds) ============ */
.img-card {
  position: relative;
  color: #fff;
  background-image: linear-gradient(180deg, rgba(8, 9, 7, 0.58) 0%, rgba(8, 9, 7, 0.62) 45%, rgba(8, 9, 7, 0.92) 100%), var(--bg);
  background-size: cover;
  background-position: center;
  isolation: isolate;
  border-radius: 10px;
  overflow: hidden;
}

.img-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(8, 9, 7, 0.25) 0%, rgba(8, 9, 7, 0.45) 50%, rgba(8, 9, 7, 0.9) 100%);
  z-index: -1;
}

.card-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 0.45s ease;
  z-index: -2;
  pointer-events: none;
}

.img-card:hover .card-video,
.img-card:focus-within .card-video {
  opacity: 1;
}

.img-card * {
  color: #fff !important;
}

.img-card .sc-num {
  opacity: 0.9;
}

.img-card p,
.img-card .desc {
  color: rgba(255, 255, 255, 0.92) !important;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.5);
}

.img-card span,
.img-card .metric-label,
.img-card .mono {
  color: rgba(255, 255, 255, 0.85) !important;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
}

.img-card h3,
.img-card .big,
.img-card b {
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.6);
}

/* ============ FOOTER ============ */
footer {
  background: var(--ink);
  color: var(--paper);
  padding: 80px 0 40px;
  margin-top: 120px;
  border-top: 1px solid var(--line);
}

footer a {
  color: rgba(247, 247, 244, 0.8);
  transition: color 0.15s;
}

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

footer h4 {
  color: var(--paper);
  font-size: 14px;
  margin-bottom: 16px;
}

footer ul {
  list-style: none;
}

footer li {
  margin-bottom: 8px;
  font-size: 14px;
}

footer .footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 40px;
  margin-bottom: 60px;
}

footer .footer-bottom {
  border-top: 1px solid rgba(247, 247, 244, 0.1);
  padding-top: 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
  color: rgba(247, 247, 244, 0.6);
}

/* ============ RESPONSIVE ============ */
@media (max-width: 768px) {
  section {
    padding: 60px 0;
  }

  h2 {
    font-size: clamp(24px, 5vw, 40px);
  }

  .wrap {
    padding: 0 16px;
  }

  .nav {
    gap: 12px;
  }

  .nav nav {
    display: none;
  }

  .nav .tel {
    display: none;
  }

  .nav-toggle {
    display: flex;
  }

  .nav-cta {
    display: none;
  }

  footer .footer-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 32px;
  }

  footer .footer-bottom {
    flex-direction: column;
    text-align: center;
    gap: 16px;
  }
}

/* ============ LAYOUT GRIDS ============ */

/* 2-column equal (contact, case situation+approach) */
.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: flex-start;
}

/* 2-column hero (wider left, narrower right) */
.grid-hero {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 60px;
  align-items: center;
}

@media (max-width: 768px) {
  .grid-2,
  .grid-hero {
    grid-template-columns: 1fr;
    gap: 40px;
  }
}

/* ============ RESPONSIVE GRIDS ============ */
.case-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

@media (max-width: 900px) {
  .case-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

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

/* ============ UTILITY ============ */
.lead {
  color: var(--ink-soft);
  max-width: 640px;
  font-size: 18px;
  line-height: 1.6;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}
