:root {
  --color-bg: #f4f5f7;
  --color-surface: #ffffff;
  --color-text: #1a1d24;
  --color-muted: #5c6370;
  --color-border: #d8dce3;
  --color-primary: #0d3b2c;
  --color-primary-hover: #0a2f23;
  --color-accent: #b31b1b;
  --color-accent-soft: rgba(179, 27, 27, 0.08);
  --font: "PT Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --shadow-sm: 0 1px 2px rgba(26, 29, 36, 0.06);
  --shadow-md: 0 8px 24px rgba(26, 29, 36, 0.08);
  --radius: 6px;
  --container: 1120px;
  --pad-x: 1.25rem;
  --touch-min: 44px;
}

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

html {
  scroll-behavior: smooth;
  overflow-x: hidden;
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.55;
  color: var(--color-text);
  background: var(--color-bg);
  overflow-x: hidden;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  padding-bottom: env(safe-area-inset-bottom, 0px);
}

.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding-left: max(var(--pad-x), env(safe-area-inset-left, 0px));
  padding-right: max(var(--pad-x), env(safe-area-inset-right, 0px));
}

.narrow {
  max-width: 720px;
}

.site-header {
  background: var(--color-primary);
  color: #fff;
  box-shadow: var(--shadow-md);
  position: sticky;
  top: 0;
  z-index: 100;
  padding-top: env(safe-area-inset-top, 0px);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 4rem;
  gap: 0.75rem 1rem;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  color: inherit;
  text-decoration: none;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.logo-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  background: #fff;
  color: var(--color-primary);
  font-size: 0.85rem;
  font-weight: 700;
  border-radius: 4px;
}

.logo-mark.small {
  width: 2rem;
  height: 2rem;
  font-size: 0.7rem;
}

.logo-text {
  font-size: 1.125rem;
}

.nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 1.25rem;
}

.nav a {
  color: rgba(255, 255, 255, 0.92);
  text-decoration: none;
  font-size: 0.9375rem;
  -webkit-tap-highlight-color: rgba(255, 255, 255, 0.12);
}

.nav a:hover {
  text-decoration: underline;
}

.nav-cta {
  background: #fff;
  color: var(--color-primary) !important;
  padding: 0.45rem 1rem;
  border-radius: var(--radius);
  font-weight: 600;
  text-decoration: none !important;
  -webkit-tap-highlight-color: transparent;
}

.nav-cta:hover {
  background: #eef1f0;
}

.hero {
  background: linear-gradient(135deg, #0d3b2c 0%, #164a3a 45%, #1a5c47 100%);
  color: #fff;
  padding: 3rem 0 3.5rem;
}

.hero-grid {
  display: grid;
  gap: 2rem;
  align-items: start;
}

@media (min-width: 900px) {
  .hero-grid {
    grid-template-columns: 1fr 280px;
    align-items: center;
  }
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.75);
  margin: 0 0 0.75rem;
}

.hero h1 {
  margin: 0 0 1rem;
  font-size: clamp(1.75rem, 4vw, 2.35rem);
  line-height: 1.2;
  font-weight: 700;
  overflow-wrap: anywhere;
  hyphens: auto;
  -webkit-hyphens: auto;
}

.lead {
  margin: 0 0 1.5rem;
  font-size: 1.125rem;
  color: rgba(255, 255, 255, 0.9);
  max-width: 38rem;
}

.btn {
  display: inline-block;
  font-family: inherit;
  font-size: 1rem;
  font-weight: 600;
  text-align: center;
  text-decoration: none;
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius);
  border: none;
  cursor: pointer;
  transition: background 0.15s ease, transform 0.1s ease;
  touch-action: manipulation;
  -webkit-tap-highlight-color: rgba(0, 0, 0, 0.08);
}

.btn:active {
  transform: translateY(1px);
}

.btn-primary {
  background: var(--color-accent);
  color: #fff;
}

.btn-primary:hover {
  background: #951616;
}

.hero-stats {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: var(--radius);
  padding: 1.25rem 1.5rem;
}

.hero-stats ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.hero-stats li {
  padding: 0.6rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  font-size: 0.9375rem;
}

.hero-stats li:last-child {
  border-bottom: none;
}

.hero-stats strong {
  display: block;
  font-size: 1rem;
  margin-bottom: 0.15rem;
}

.section {
  padding: 3rem 0;
}

.section-alt {
  background: var(--color-surface);
  box-shadow: var(--shadow-sm);
}

.section h2 {
  margin: 0 0 1rem;
  font-size: 1.5rem;
  font-weight: 700;
}

.section p {
  margin: 0 0 1rem;
  color: var(--color-muted);
}

.section p:last-child {
  margin-bottom: 0;
}

.section-lead {
  margin: 0 0 0.25rem;
  max-width: 52rem;
  color: var(--color-muted);
  font-size: 1rem;
  line-height: 1.55;
}

.cards {
  display: grid;
  gap: 1.25rem;
  list-style: none;
  margin: 1.5rem 0 0;
  padding: 0;
}

@media (min-width: 700px) {
  .cards:not(.cards-industries) {
    grid-template-columns: repeat(3, 1fr);
  }
}

.cards-industries {
  margin-top: 1.25rem;
  grid-template-columns: 1fr;
}

@media (min-width: 560px) {
  .cards-industries {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 900px) {
  .cards-industries {
    grid-template-columns: repeat(3, 1fr);
  }
}

.card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 1.35rem 1.25rem;
  box-shadow: var(--shadow-sm);
}

.card h3 {
  margin: 0 0 0.5rem;
  font-size: 1.0625rem;
  color: var(--color-primary);
}

.card p {
  margin: 0;
  font-size: 0.9375rem;
}

.section-form {
  padding-bottom: 4rem;
}

.form-wrap {
  max-width: 720px;
}

.form-header {
  margin-bottom: 1.5rem;
}

.form-intro {
  margin: 0;
  color: var(--color-muted);
}

.supplier-form {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 1.75rem 1.5rem 2rem;
  box-shadow: var(--shadow-md);
}

@media (min-width: 600px) {
  .supplier-form {
    padding: 2rem 2rem 2.25rem;
  }
}

.form-row {
  margin-bottom: 1.1rem;
}

.form-row.two-cols {
  display: grid;
  gap: 1.1rem;
}

@media (min-width: 600px) {
  .form-row.two-cols {
    grid-template-columns: 1fr 1fr;
  }
}

.field label {
  display: block;
  font-weight: 600;
  font-size: 0.9375rem;
  margin-bottom: 0.35rem;
}

.field abbr {
  text-decoration: none;
  color: var(--color-accent);
}

.field input,
.field textarea {
  width: 100%;
  font-family: inherit;
  font-size: 1rem;
  padding: 0.6rem 0.75rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  background: #fff;
  color: var(--color-text);
}

.field input:focus,
.field textarea:focus {
  outline: 2px solid var(--color-primary);
  outline-offset: 1px;
  border-color: var(--color-primary);
}

.field textarea {
  resize: vertical;
  min-height: 100px;
}

.checkbox-field {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  margin: 1.25rem 0 0;
}

.checkbox-field input {
  width: auto;
  margin-top: 0.35rem;
}

.checkbox-field label {
  font-weight: 400;
  margin: 0;
}

.form-status {
  min-height: 1.5rem;
  margin: 1rem 0 0.75rem;
  font-size: 0.9375rem;
}

.form-status.error {
  color: var(--color-accent);
}

.form-status.success {
  color: var(--color-primary);
}

.btn-submit {
  width: 100%;
  padding: 0.85rem 1.5rem;
  margin-top: 0.25rem;
}

.btn-submit:disabled {
  opacity: 0.65;
  cursor: not-allowed;
}

.site-footer {
  background: #e8eaee;
  border-top: 1px solid var(--color-border);
  padding: 1.5rem 0 2rem;
  font-size: 0.875rem;
  color: var(--color-muted);
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem;
  justify-content: space-between;
}

.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 700;
  color: var(--color-text);
}

.footer-note {
  margin: 0;
  max-width: 36rem;
}

/* ——— Мобильные и узкие экраны (в т.ч. iPhone SE 320×568) ——— */

@media (max-width: 639px) {
  :root {
    --pad-x: 0.875rem;
  }

  body {
    font-size: 1rem;
    line-height: 1.52;
  }

  .header-inner {
    flex-wrap: wrap;
    align-items: center;
    min-height: unset;
    padding-top: 0.35rem;
    padding-bottom: 0.35rem;
    row-gap: 0.5rem;
  }

  .logo {
    flex: 1 1 auto;
    min-width: 0;
    gap: 0.5rem;
  }

  .logo-text {
    font-size: clamp(0.9375rem, 4.2vw, 1.125rem);
    line-height: 1.2;
    max-width: min(11rem, calc(100vw - 5.5rem));
  }

  .nav {
    flex: 1 1 100%;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.35rem 0.5rem;
    padding-bottom: 0.25rem;
  }

  .nav a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: var(--touch-min);
    padding: 0.4rem 0.65rem;
    box-sizing: border-box;
  }

  .nav-cta {
    min-height: var(--touch-min);
    padding: 0.5rem 1rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .hero {
    padding: 1.75rem 0 2rem;
  }

  .hero-grid {
    gap: 1.35rem;
  }

  .eyebrow {
    font-size: 0.6875rem;
    letter-spacing: 0.09em;
  }

  .hero h1 {
    font-size: clamp(1.28rem, 6.2vw + 0.35rem, 2.1rem);
    line-height: 1.22;
    margin-bottom: 0.75rem;
  }

  .lead {
    font-size: 0.9375rem;
    line-height: 1.5;
    margin-bottom: 1.15rem;
  }

  .hero .btn-primary {
    display: flex;
    width: 100%;
    max-width: 100%;
    min-height: 48px;
    padding: 0.8rem 1rem;
    justify-content: center;
    align-items: center;
    box-sizing: border-box;
  }

  .hero-stats {
    padding: 1rem 1rem;
  }

  .hero-stats li {
    font-size: 0.875rem;
    padding: 0.5rem 0;
  }

  .hero-stats strong {
    font-size: 0.9375rem;
  }

  .section {
    padding: 2rem 0;
  }

  .section h2 {
    font-size: 1.2rem;
    line-height: 1.28;
    overflow-wrap: anywhere;
  }

  .section p,
  .section-lead,
  .form-intro {
    font-size: 0.9375rem;
  }

  .cards {
    gap: 0.875rem;
    margin-top: 1.1rem;
  }

  .card {
    padding: 1.1rem 0.95rem;
  }

  .card h3 {
    font-size: 1rem;
  }

  .section-form {
    padding-bottom: max(2.5rem, env(safe-area-inset-bottom, 0px));
  }

  .form-header {
    margin-bottom: 1.1rem;
  }

  .supplier-form {
    padding: 1.2rem 0.9rem 1.45rem;
  }

  /* 16px — iOS не увеличивает страницу при фокусе в поле */
  .field input,
  .field textarea {
    font-size: 16px;
    padding: 0.65rem 0.7rem;
    min-height: var(--touch-min);
  }

  .field textarea {
    min-height: 7rem;
  }

  .field label {
    font-size: 0.875rem;
    line-height: 1.35;
  }

  .checkbox-field {
    align-items: center;
    gap: 0.65rem;
    margin-top: 1rem;
  }

  .checkbox-field input {
    width: 1.25rem;
    height: 1.25rem;
    min-width: 1.25rem;
    min-height: 1.25rem;
    margin: 0;
    flex-shrink: 0;
    align-self: center;
  }

  .checkbox-field label {
    flex: 1;
    min-height: var(--touch-min);
    display: flex;
    align-items: center;
    padding: 0.5rem 0;
    line-height: 1.45;
  }

  .btn-submit {
    min-height: 48px;
    padding: 0.85rem 1rem;
    font-size: 1rem;
  }

  .site-footer {
    padding: 1.15rem 0 max(1.5rem, env(safe-area-inset-bottom, 0px));
  }

  .footer-inner {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.65rem;
  }

  .footer-note {
    font-size: 0.8125rem;
    line-height: 1.45;
  }
}

/* iPhone SE и прочие ширины ~320px */
@media (max-width: 374px) {
  :root {
    --pad-x: 0.75rem;
  }

  .logo-mark {
    width: 2.25rem;
    height: 2.25rem;
    font-size: 0.8rem;
  }

  .logo-text {
    max-width: min(10rem, calc(100vw - 4.75rem));
  }

  .nav {
    flex-direction: column;
    align-items: stretch;
    gap: 0.25rem;
  }

  .nav a,
  .nav-cta {
    width: 100%;
    max-width: 100%;
  }

  .hero h1 {
    font-size: 1.26rem;
  }

  .supplier-form {
    padding-left: 0.75rem;
    padding-right: 0.75rem;
  }
}
