/* ============================================================
   ПарПро — main.css
   ============================================================ */

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

:root {
  --bg:         #080604;
  --text:       #EDE8DE;
  --text-dim:   rgba(237, 232, 222, 0.52);
  --text-muted: rgba(237, 232, 222, 0.28);
  --pearl:      #C8BAA4;
  --pearl-dim:  rgba(200, 186, 164, 0.35);
  --serif:      'Cormorant Garamond', Georgia, serif;
  --sans:       'Inter', system-ui, sans-serif;
}

html, body {
  width: 100%; height: 100%;
  font-family: var(--sans);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
}

/* ============================================================
   HERO
   ============================================================ */
.hero {
  width: 100vw; height: 100vh;
  position: relative;
  display: flex; flex-direction: column;
}

/* Background */
.hero-bg {
  position: absolute; inset: 0;
  background-color: #1A100A;
  background-image: url('https://images.unsplash.com/photo-1581579746682-f0e103087388?auto=format&fit=crop&w=1920&q=80');
  background-size: cover; background-position: center;
}
.hero-bg::before {
  content: '';
  position: absolute; inset: 0;
  background: radial-gradient(
    ellipse 100% 85% at 50% 48%,
    rgba(4, 2, 1, 0.62) 0%,
    rgba(4, 2, 1, 0.84) 50%,
    rgba(4, 2, 1, 0.97) 100%
  );
}
.hero-bg::after {
  content: '';
  position: absolute; bottom: 0; left: 0; right: 0; height: 45%;
  background: linear-gradient(to top, rgba(4,2,1,1) 0%, transparent 100%);
}

/* ============================================================
   NAV
   ============================================================ */
nav {
  position: relative; z-index: 20;
  display: flex; align-items: center;
  justify-content: space-between;
  padding: 30px 60px;
}
.logo {
  font-family: var(--sans);
  font-size: 15px; font-weight: 500;
  letter-spacing: 0.22em; text-transform: uppercase;
  color: var(--text); text-decoration: none;
  display: flex; align-items: center;
}
.logo-img {
  max-width: 120px;
  height: auto;
  display: block;
}
.logo-text em { font-style: normal; color: var(--pearl); }

.nav-btn {
  font-size: 11px; font-weight: 400;
  letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--pearl);
  display: flex; align-items: center; gap: 10px;
  transition: color .2s;
  white-space: nowrap;
  background: none; border: none; cursor: pointer;
  font-family: var(--sans);
}
.nav-btn::after {
  content: '';
  display: block; width: 28px; height: 1px;
  background: var(--pearl-dim);
  transition: width .25s;
}
.nav-btn:hover { color: var(--text); }
.nav-btn:hover::after { width: 44px; }

/* ============================================================
   HERO CENTER
   ============================================================ */
.hero-center {
  position: relative; z-index: 10;
  flex: 1;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  text-align: center;
  padding: 0 60px 80px;
  margin-top: -40px;
}

.hero-label {
  font-size: 9px; font-weight: 400;
  letter-spacing: 0.32em; text-transform: uppercase;
  color: var(--pearl);
  margin-bottom: 36px;
}

/* Mixed typography */
.hero-title { margin-bottom: 24px; }

.title-sans {
  display: block;
  font-family: var(--sans);
  font-size: clamp(22px, 3.2vw, 50px);
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text);
  margin-bottom: 6px;
}
.title-serif {
  display: block;
  font-family: var(--serif);
  font-size: clamp(64px, 8.8vw, 132px);
  font-weight: 200;
  font-style: italic;
  letter-spacing: -0.02em;
  color: var(--text);
  line-height: 0.90;
}

.hero-sub {
  font-size: 13px; font-weight: 300;
  line-height: 1.85; color: var(--text-dim);
  max-width: 420px; margin: 0 auto 44px;
  text-shadow: 0 1px 16px rgba(0,0,0,0.9), 0 0 40px rgba(0,0,0,0.6);
}

/* CTA */
.hero-ctas { display: flex; gap: 10px; align-items: center; }

.cta-solid {
  display: inline-block;
  font-size: 11px; font-weight: 400;
  letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--bg); background: var(--text);
  text-decoration: none; padding: 14px 40px;
  border-radius: 1px; transition: background .25s;
  white-space: nowrap;
  border: none; cursor: pointer;
  font-family: var(--sans);
}
.cta-solid:hover { background: var(--pearl); }

/* ============================================================
   BOTTOM STRIP
   ============================================================ */
.hero-bottom { position: relative; z-index: 10; }

.projects-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  border-top: 1px solid rgba(237,232,222,0.08);
}
.proj-item {
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 5px; padding: 14px 10px;
  text-decoration: none;
  border-right: 1px solid rgba(237,232,222,0.08);
  transition: background .2s;
}
.proj-item:last-child { border-right: none; }
.proj-item:hover { background: rgba(237,232,222,0.04); }
.proj-num {
  font-size: 9px; letter-spacing: 0.1em;
  color: var(--pearl); font-weight: 300;
}
.proj-name {
  font-size: 10px; font-weight: 400;
  letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--text-dim); transition: color .2s;
  text-align: center;
}
.proj-item:hover .proj-name { color: var(--text); }

.stats-strip {
  display: flex; align-items: center;
  justify-content: center; gap: 56px;
  padding: 18px 60px;
  border-top: 1px solid rgba(237,232,222,0.06);
}
.stat-group {
  display: flex; align-items: baseline; gap: 9px;
  white-space: nowrap;
}
.stat-num {
  font-family: var(--serif);
  font-size: 24px; font-weight: 200; font-style: italic;
  color: var(--text);
}
.stat-label {
  font-size: 9px; letter-spacing: 0.15em;
  text-transform: uppercase; color: var(--text-muted);
  white-space: nowrap;
}
.strip-sep {
  width: 1px; height: 18px;
  background: rgba(237,232,222,0.10);
  flex-shrink: 0;
}

/* ============================================================
   MODAL
   ============================================================ */
.modal-overlay {
  position: fixed; inset: 0; z-index: 200;
  background: rgba(4, 2, 1, 0.80);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex; align-items: center; justify-content: center;
  padding: 24px;
  opacity: 0; pointer-events: none;
  transition: opacity .3s ease;
}
.modal-overlay.active {
  opacity: 1; pointer-events: all;
}
.modal {
  background: #110D09;
  border: 1px solid rgba(200, 186, 164, 0.13);
  padding: 52px 48px 44px;
  max-width: 540px; width: 100%;
  position: relative;
  transform: translateY(20px);
  transition: transform .35s ease;
}
.modal-overlay.active .modal {
  transform: translateY(0);
}

.modal-close {
  position: absolute; top: 20px; right: 24px;
  background: none; border: none; cursor: pointer;
  font-size: 16px; line-height: 1;
  color: var(--text-muted);
  font-family: var(--sans);
  transition: color .2s;
  padding: 4px;
}
.modal-close:hover { color: var(--text); }

.modal-eyebrow {
  font-size: 9px; letter-spacing: 0.32em;
  text-transform: uppercase; color: var(--pearl);
  margin-bottom: 14px;
}
.modal-title {
  font-family: var(--serif);
  font-size: 30px; font-weight: 200; font-style: italic;
  color: var(--text); line-height: 1.18;
  margin-bottom: 38px;
}

/* Form */
.form-row { display: flex; gap: 20px; }
.form-field {
  display: flex; flex-direction: column;
  flex: 1; margin-bottom: 22px;
}
.form-field.full { flex: none; width: 100%; }

.form-label {
  font-size: 9px; letter-spacing: 0.22em;
  text-transform: uppercase; color: var(--text-muted);
  margin-bottom: 10px;
}
.form-label span { opacity: 0.55; }

.form-input,
.form-textarea {
  background: transparent;
  border: none;
  border-bottom: 1px solid rgba(200, 186, 164, 0.20);
  padding: 9px 0;
  font-family: var(--sans); font-size: 14px; font-weight: 300;
  color: var(--text);
  outline: none;
  transition: border-color .2s;
  width: 100%;
}
.form-input::placeholder,
.form-textarea::placeholder {
  color: rgba(237, 232, 222, 0.22);
}
.form-input:focus,
.form-textarea:focus {
  border-bottom-color: var(--pearl);
}
.form-input.has-error,
.form-textarea.has-error {
  border-bottom-color: #9B4444;
}
.form-textarea {
  resize: none; height: 72px;
  line-height: 1.65;
}

.form-submit {
  width: 100%; margin-top: 10px;
  font-family: var(--sans);
  font-size: 11px; font-weight: 400;
  letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--bg); background: var(--text);
  border: none; padding: 15px 40px;
  border-radius: 1px; cursor: pointer;
  transition: background .25s, opacity .2s;
}
.form-submit:hover:not(:disabled) { background: var(--pearl); }
.form-submit:disabled { opacity: 0.6; cursor: not-allowed; }

/* ============================================================
   TOAST
   ============================================================ */
#toast {
  position: fixed;
  bottom: 36px; left: 50%;
  transform: translateX(-50%) translateY(12px);
  background: var(--text);
  color: var(--bg);
  font-family: var(--sans);
  font-size: 12px; font-weight: 400;
  letter-spacing: 0.04em;
  padding: 14px 28px;
  border-radius: 1px;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity .3s, transform .3s;
  z-index: 300;
}
#toast.toast--show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}
#toast.toast--error {
  background: #8B3A3A;
  color: var(--text);
}

/* ============================================================
   MOBILE — до 768px
   ============================================================ */
@media (max-width: 768px) {

  html, body { overflow: hidden; }

  .hero {
    height: 100svh;
    min-height: 100svh;
  }

  nav { padding: 20px 24px; }
  .logo { font-size: 14px; }
  .logo-img { max-width: 100px; }
  .nav-btn { font-size: 10px; letter-spacing: 0.1em; }
  .nav-btn::after { display: none; }

  .hero-center {
    padding: 0 24px 20px;
    margin-top: -20px;
  }
  .hero-label { font-size: 8px; letter-spacing: 0.24em; margin-bottom: 22px; }

  .title-sans { font-size: clamp(18px, 5.5vw, 30px); letter-spacing: 0.08em; margin-bottom: 4px; }
  .title-serif { font-size: clamp(52px, 14vw, 88px); line-height: 0.92; }

  .hero-sub { font-size: 12px; line-height: 1.75; max-width: 100%; margin-bottom: 28px; }

  .hero-ctas { justify-content: center; }
  .cta-solid { padding: 13px 32px; font-size: 10px; }

  /* Projects: 2 ряда × 3 */
  .projects-grid { grid-template-columns: repeat(3, 1fr); }
  .proj-item:nth-child(3),
  .proj-item:nth-child(6) { border-right: none; }
  .proj-item:nth-child(-n+3) { border-bottom: 1px solid rgba(237,232,222,0.08); }
  .proj-item { padding: 12px 6px; gap: 4px; }
  .proj-num { font-size: 8px; }
  .proj-name { font-size: 9px; letter-spacing: 0.06em; }

  /* Stats */
  .stats-strip { gap: 16px; padding: 14px 20px; justify-content: center; }
  .stat-num { font-size: 18px; }
  .stat-label { font-size: 8px; letter-spacing: 0.1em; }
  .strip-sep { height: 14px; }

  /* Modal */
  .modal { padding: 40px 24px 32px; }
  .modal-title { font-size: 24px; margin-bottom: 28px; }
  .form-row { flex-direction: column; gap: 0; }

  /* Toast */
  #toast { white-space: normal; text-align: center; max-width: calc(100vw - 48px); }
}

/* ============================================================
   SMALL MOBILE — до 380px
   ============================================================ */
@media (max-width: 380px) {
  .title-serif { font-size: 46px; }
  .stats-strip { gap: 10px; padding: 12px 16px; }
  .stat-num { font-size: 16px; }
  .stat-label { font-size: 7px; letter-spacing: 0.06em; }
}
