/* ================================================================
   ROOFER — Design base (Industrial / Construction-yard)
   Common atoms, utilities and primitives shared across all screens.
   Section-specific styles live in assets/css/sections/<name>.css.
   ================================================================ */

/* Override base body to use the new UI font + paper background. */
body {
  font-family: var(--font-ui);
  background: var(--paper);
  color: var(--ink);
  font-feature-settings: 'ss01', 'cv11';
  font-size: 16px;
  line-height: 1.5;
}

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

/* --- Type system --- */

.h-display {
  font-family: var(--font-display);
  font-weight: 900;
  letter-spacing: 0;
  line-height: 1.1;
  text-transform: uppercase;
}

.h1 { font-size: clamp(48px, 7vw, 104px); }
.h2 { font-size: clamp(36px, 4.6vw, 68px); }
.h3 { font-size: clamp(24px, 2.4vw, 36px); }

.eyebrow {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-weight: 500;
}

.mono {
  font-family: var(--font-mono);
  letter-spacing: 0.02em;
}

/* --- Layout --- */

.wrap {
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 32px;
}

.section {
  padding: 96px 0;
  position: relative;
}

.section--dark {
  background: var(--ink-2);
  color: var(--paper);
}

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

/* --- Industrial decorations --- */

.rule {
  height: 1px;
  background: var(--ink);
  border: 0;
}

.rule--dashed {
  background: none;
  border-top: 1.5px dashed var(--ink);
}

.caution-tape {
  background: repeating-linear-gradient(
    -45deg,
    var(--mark) 0 22px,
    var(--ink) 22px 44px
  );
  height: 22px;
}

.caution-tape--thin {
  height: 12px;
  background: repeating-linear-gradient(
    -45deg,
    var(--mark) 0 14px,
    var(--ink) 14px 28px
  );
}

/* Stamp / seal */
.stamp {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  border: 2px solid var(--orange);
  color: var(--orange);
  border-radius: 999px;
  padding: 14px 22px;
  text-align: center;
  font-family: var(--font-display);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  transform: rotate(-6deg);
  box-shadow: inset 0 0 0 4px rgba(237,116,35,0.05);
  background: rgba(255,255,255,0.5);
}

.stamp--ink { border-color: var(--ink); color: var(--ink); }

/* Buttons — note: legacy .btn-primary/.btn-outline live in base.css; new
   .btn--orange/.btn--ghost/.btn--ghost-light/.btn--sm live here. */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 18px 28px;
  font-family: var(--font-ui);
  font-weight: 700;
  font-size: 16px;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  border-radius: var(--radius);
  border: 2px solid var(--ink);
  background: var(--ink);
  color: var(--paper);
  cursor: pointer;
  transition: transform .12s ease, background .15s ease, color .15s ease;
  white-space: nowrap;
}
.btn:hover { transform: translate(-2px,-2px); box-shadow: 4px 4px 0 var(--ink); }
.btn--orange { background: var(--orange); border-color: var(--orange); color: var(--paper); }
.btn--orange:hover { box-shadow: 4px 4px 0 var(--ink); }
.btn--ghost { background: transparent; color: var(--ink); }
.btn--ghost:hover { box-shadow: 4px 4px 0 var(--ink); }
.btn--ghost-light {
  background: transparent;
  color: var(--paper);
  border-color: var(--paper);
}
.btn--ghost-light:hover {
  box-shadow: 4px 4px 0 var(--paper);
  background: var(--orange);
  color: var(--paper);
  border-color: var(--orange);
}
.btn--sm { padding: 12px 18px; font-size: 13px; }

.btn .arrow {
  display: inline-block;
  font-size: 18px;
  line-height: 1;
}

/* Pill / chip */
.chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border: 1.5px solid var(--ink);
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  background: var(--paper);
}
.chip--dark { background: var(--ink-2); color: var(--paper); border-color: var(--paper); }
.chip--mark { background: var(--mark); color: var(--ink); border-color: var(--ink); }

/* Marquee */
.marquee {
  overflow: hidden;
  background: var(--orange);
  color: var(--ink);
  margin-top: -6px;
  position: relative;
  z-index: 3;
  border-top: 2px solid var(--ink);
  border-bottom: 2px solid var(--ink);
}
.marquee--dark { background: var(--ink); color: var(--orange); margin-top: 0; border-top: 2px solid var(--orange); border-bottom: 2px solid var(--orange); }
.marquee__track {
  display: flex;
  gap: 48px;
  padding: 14px 0;
  animation: marquee 40s linear infinite;
  white-space: nowrap;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 22px;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}
.marquee__track > span {
  display: inline-flex;
  align-items: center;
  gap: 48px;
  flex-shrink: 0;
}
.marquee__track > span::after {
  content: '★';
  color: var(--orange);
  font-size: 18px;
}
@keyframes marquee {
  0% { transform: translate3d(0,0,0); }
  100% { transform: translate3d(-50%,0,0); }
}

/* Numeric figure */
.figure {
  font-family: var(--font-display);
  letter-spacing: -0.04em;
  line-height: 0.9;
}

/* Card baseline (new) */
.card {
  background: var(--paper);
  border: 1.5px solid var(--ink);
  border-radius: var(--radius-lg);
  position: relative;
}

/* Bolt corner accents */
.bolt-corners::before,
.bolt-corners::after,
.bolt-corners > .bolt-tl,
.bolt-corners > .bolt-tr {
  content: '';
  position: absolute;
  width: 8px; height: 8px;
  background: var(--ink);
  border-radius: 50%;
  box-shadow: 0 0 0 2px var(--paper);
}
.bolt-corners::before { top: 8px; left: 8px; }
.bolt-corners::after  { bottom: 8px; right: 8px; }
.bolt-corners > .bolt-tr { top: 8px; right: 8px; }
.bolt-corners > .bolt-tl { bottom: 8px; left: 8px; }

/* Blueprint grid background */
.bg-grid {
  background-image:
    linear-gradient(var(--line-soft) 1px, transparent 1px),
    linear-gradient(90deg, var(--line-soft) 1px, transparent 1px);
  background-size: 32px 32px;
}

/* Roof texture (corrugated metal feel) */
.bg-corrugated {
  background-image: repeating-linear-gradient(
    90deg,
    rgba(0,0,0,0.05) 0 1px,
    transparent 1px 14px,
    rgba(0,0,0,0.025) 14px 15px,
    transparent 15px 28px
  );
}

/* Image placeholder (striped) */
.imgph {
  background:
    repeating-linear-gradient(135deg,
      rgba(14,14,14,0.05) 0 8px,
      rgba(14,14,14,0.10) 8px 16px),
    var(--paper-2);
  border: 1.5px solid var(--ink);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: rgba(14,14,14,0.55);
  border-radius: var(--radius);
  position: relative;
  overflow: hidden;
}
.imgph::after {
  content: '';
  position: absolute;
  inset: 6px;
  border: 1px dashed rgba(14,14,14,0.25);
  border-radius: 2px;
  pointer-events: none;
}

/* Ticket stub clip */
.ticket {
  --notch: 12px;
  -webkit-mask:
    radial-gradient(circle at 0 50%, transparent var(--notch), #000 calc(var(--notch) + 0.5px)) left/100% 100% no-repeat,
    radial-gradient(circle at 100% 50%, transparent var(--notch), #000 calc(var(--notch) + 0.5px)) right/100% 100% no-repeat;
}

/* Form input */
.input {
  width: 100%;
  padding: 16px 18px;
  font-family: var(--font-ui);
  font-size: 15px;
  background: var(--paper);
  border: 1.5px solid var(--ink);
  border-radius: var(--radius);
  outline: none;
  transition: box-shadow .15s ease;
}
.input:focus { box-shadow: 4px 4px 0 var(--ink); }

label.field,
.cf-form-label {
  display: block;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 8px;
  color: rgba(14,14,14,0.7);
}
.cf-required-star { color: var(--orange); }

/* Contact form (cf_contact_form_shortcode) — общий каркас */
.cf-form-shell { display: block; }
.cf-public-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.cf-form-field { display: block; }
.cf-form-message {
  background: var(--ink);
  color: var(--paper);
  border: none;
  border-radius: var(--radius);
  padding: 14px 16px;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.5;
  display: flex;
  align-items: flex-start;
  gap: 12px;
}
.cf-form-message::before {
  content: 'OK';
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  font-weight: 700;
  text-transform: uppercase;
  background: var(--good);
  color: var(--paper);
  padding: 3px 7px;
  border-radius: 3px;
  flex-shrink: 0;
  line-height: 1.4;
  margin-top: 1px;
}
.cf-form-message.cf-form-error::before {
  content: 'ERR';
  background: var(--orange-deep);
}

/* Полупрозрачный плейсхолдер у inputs */
.input::placeholder, textarea.input::placeholder { color: rgba(14,14,14,0.45); }

/* Размещение полей: по умолчанию первое поле полное, остальные парами */
.cf-public-form .cf-form-field + .cf-form-field { margin-top: 0; }
.cf-form-pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
@media (max-width: 720px) {
  .cf-form-pair { grid-template-columns: 1fr; }
}

/* RAL swatch */
.swatch {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 11px;
}
.swatch__dot {
  width: 14px; height: 14px;
  background: #4d5358;
  border: 1.5px solid var(--ink);
  border-radius: 2px;
}

/* Utilities */
.row { display: flex; gap: 16px; align-items: center; }
.row-wrap { display: flex; flex-wrap: wrap; gap: 16px; align-items: center; }
.col { display: flex; flex-direction: column; gap: 16px; }
.center { display: flex; align-items: center; justify-content: center; }
.between { justify-content: space-between; }
.gap-4 { gap: 4px; } .gap-8 { gap: 8px; } .gap-12 { gap: 12px; }
.gap-16 { gap: 16px; } .gap-24 { gap: 24px; } .gap-32 { gap: 32px; }
.mt-8 { margin-top: 8px; } .mt-16 { margin-top: 16px; } .mt-24 { margin-top: 24px; }
.mt-32 { margin-top: 32px; } .mt-48 { margin-top: 48px; } .mt-64 { margin-top: 64px; }

/* Section number tag */
.sec-num {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}
.sec-num__num {
  font-family: var(--font-display);
  background: var(--ink);
  color: var(--paper);
  padding: 4px 10px;
  border-radius: 2px;
  font-size: 13px;
}

/* Generic responsive grids */
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }

@media (max-width: 1024px) {
  .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 720px) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .section { padding: 64px 0; }
  .wrap { padding: 0 20px; }
}

/* Horizontal scroll carousel */
.hscroll {
  display: flex;
  gap: 24px;
  overflow-x: auto;
  padding-bottom: 12px;
  scroll-snap-type: x mandatory;
}
.hscroll > * { scroll-snap-align: start; flex: 0 0 auto; }
.hscroll::-webkit-scrollbar { height: 6px; }
.hscroll::-webkit-scrollbar-thumb { background: var(--ink); }

.ornament {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  opacity: 0.55;
}

.card-dashed {
  border: 1.5px dashed var(--ink);
  background: transparent;
  border-radius: var(--radius);
}

.bg-graphite { background: #45494E; color: var(--paper); }

.cross {
  width: 14px;
  height: 14px;
  background:
    linear-gradient(currentColor, currentColor) center/100% 2px no-repeat,
    linear-gradient(currentColor, currentColor) center/2px 100% no-repeat;
}

/* Visibility utilities */
@media (max-width: 900px) { .hide-tablet { display: none !important; } }
@media (max-width: 480px) { .hide-mobile { display: none !important; } }

/* ================================================================
   Responsive base
   ================================================================ */

@media (max-width: 1024px) {
  .wrap { padding: 0 24px; }
  .section { padding: 64px 0; }
  .grid-2, .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr) !important; }
  .h1 { font-size: clamp(36px, 6vw, 72px); }
  .h2 { font-size: clamp(28px, 4vw, 48px); }
}

@media (max-width: 768px) {
  .wrap { padding: 0 16px; }
  .section { padding: 48px 0; }
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr !important; }

  .btn { padding: 12px 18px; font-size: 12px; }
  .btn--sm { padding: 8px 12px; font-size: 11px; }

  .chip { padding: 6px 10px; font-size: 10px; }

  .marquee__track { font-size: 16px; padding: 10px 0; }
}

@media (max-width: 480px) {
  .wrap { padding: 0 12px; }
  .section { padding: 32px 0; }

  .h1 { font-size: 28px; }
  .h2 { font-size: 24px; }
  .h3 { font-size: 18px; }

  .sec-num { flex-wrap: wrap; gap: 8px; }
  .sec-num__num { padding: 4px 8px; font-size: 10px; }
}
