/* ==========================================================================
   CNRD | Machinery Component Specialist
   ========================================================================== */

:root {
  --navy: #324893;
  --navy-dark: #232f5f;
  --navy-deep: #1a2444;
  --navy-tint: #eef1f9;
  --ink: #14181f;
  --body: #4a5160;
  --line: #dfe3ec;
  --bg: #ffffff;
  --bg-alt: #f5f6fa;
  --white: #ffffff;

  --wrap: 1160px;
  --radius: 4px;

  --font-display: "Barlow Condensed", "Arial Narrow", system-ui, sans-serif;
  --font-body: "Zalando Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 92px;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--body);
  font-family: var(--font-body);
  font-optical-sizing: auto;
  font-variation-settings: "wdth" 100;
  font-size: 16px;
  line-height: 1.65;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

img, svg { max-width: 100%; }

a { color: var(--navy); text-decoration: none; }

h1, h2, h3 {
  font-family: var(--font-display);
  color: var(--ink);
  line-height: 1.02;
  letter-spacing: -0.005em;
  text-transform: uppercase;
  margin: 0;
}

p { margin: 0; }

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: 24px;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--navy);
  color: var(--white);
  padding: 12px 18px;
  z-index: 200;
}
.skip-link:focus { left: 12px; top: 12px; }

:focus-visible {
  outline: 2px solid var(--navy);
  outline-offset: 3px;
}

/* ==========================================================================
   HEADER
   ========================================================================== */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 24px;
  min-height: 76px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-right: auto;
  min-width: 0;
}

.brand-mark {
  width: 116px;
  height: auto;
  fill: var(--navy);
  flex-shrink: 0;
  display: block;
}

.primary-nav {
  display: flex;
  align-items: center;
  gap: 30px;
}

.primary-nav a {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink);
  padding: 6px 0;
  border-bottom: 2px solid transparent;
  transition: color .18s ease, border-color .18s ease;
}

.primary-nav a:hover {
  color: var(--navy);
  border-bottom-color: var(--navy);
}

.primary-nav .nav-cta {
  background: var(--navy);
  color: var(--white);
  padding: 11px 22px;
  border-bottom: none;
  border-radius: var(--radius);
  transition: background .18s ease;
}
.primary-nav .nav-cta:hover { background: var(--navy-dark); color: var(--white); }

.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--white);
  cursor: pointer;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
}

.nav-toggle-bar {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--ink);
  transition: transform .2s ease, opacity .2s ease;
}

.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ==========================================================================
   BUTTONS
   ========================================================================== */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  padding: 15px 30px;
  border-radius: var(--radius);
  border: 2px solid transparent;
  transition: background .18s ease, color .18s ease, border-color .18s ease, transform .18s ease;
}
.btn:hover { transform: translateY(-2px); }

.btn-primary { background: var(--navy); color: var(--white); }
.btn-primary:hover { background: var(--navy-dark); color: var(--white); }

.btn-ghost { border-color: var(--line); color: var(--ink); background: var(--white); }
.btn-ghost:hover { border-color: var(--navy); color: var(--navy); }

.btn-light { background: var(--white); color: var(--navy); }
.btn-light:hover { background: var(--navy-tint); color: var(--navy-dark); }

/* ==========================================================================
   HERO
   ========================================================================== */

.hero {
  position: relative;
  overflow: hidden;
  background: linear-gradient(160deg, #f7f8fc 0%, #eceffa 55%, #e3e8f7 100%);
  border-bottom: 1px solid var(--line);
}

/* diagonal band echoing the logo's slant */
.hero::after {
  content: "";
  position: absolute;
  top: -10%;
  right: -20%;
  width: 40%;
  height: 130%;
  background: var(--navy);
  transform: skewX(-14deg);
  z-index: 0;
}

.hero-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(to right, rgba(50, 72, 147, 0.07) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(50, 72, 147, 0.07) 1px, transparent 1px);
  background-size: 56px 56px;
  z-index: 0;
}

.hero-inner {
  position: relative;
  z-index: 1;
  padding-block: 104px 88px;
  max-width: min(var(--wrap), 100%);
}

.eyebrow {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--navy);
  margin-bottom: 20px;
}

.hero h1 {
  font-size: clamp(2.9rem, 7.6vw, 5.6rem);
  font-weight: 700;
  max-width: 13ch;
  margin-bottom: 26px;
}

.accent-rule {
  color: var(--navy);
  position: relative;
}

.hero-lede {
  font-size: clamp(1rem, 1.6vw, 1.16rem);
  max-width: 46ch;
  color: #3f4657;
  margin-bottom: 36px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

/* ==========================================================================
   SECTION SHELL
   ========================================================================== */

.section { padding-block: 96px; }
.section-alt { background: var(--bg-alt); border-block: 1px solid var(--line); }

.section-label {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--navy);
  margin-bottom: 16px;
}

.section-head { max-width: 720px; margin-bottom: 56px; }

.section-head h2,
.materials-head h2,
.about-head h2 {
  font-size: clamp(2.1rem, 4.4vw, 3.2rem);
  font-weight: 700;
}

.section-lede {
  margin-top: 20px;
  font-size: 1.05rem;
  max-width: 58ch;
}

/* ==========================================================================
   ABOUT
   ========================================================================== */

.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 56px;
  align-items: start;
}

.about-head h2 { max-width: 20ch; }

.about-body {
  display: grid;
  gap: 20px;
  font-size: 1.05rem;
  padding-left: 40px;
  border-left: 3px solid var(--navy);
}

/* ==========================================================================
   SERVICE CARDS
   ========================================================================== */

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 24px;
}

.card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 34px 30px 32px;
  position: relative;
  overflow: hidden;
  transition: border-color .2s ease, transform .2s ease, box-shadow .2s ease;
}

.card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 0;
  height: 3px;
  background: var(--navy);
  transition: width .28s ease;
}

.card:hover {
  border-color: #c9d0e4;
  transform: translateY(-4px);
  box-shadow: 0 14px 34px -18px rgba(26, 36, 68, 0.34);
}
.card:hover::before { width: 100%; }

.card-icon {
  width: 50px;
  height: 50px;
  display: grid;
  place-items: center;
  background: var(--navy-tint);
  border-radius: var(--radius);
  color: var(--navy);
  margin-bottom: 22px;
}
.card-icon svg { width: 27px; height: 27px; }

.card h3 {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 12px;
}

.card p { font-size: 0.96rem; }

/* ==========================================================================
   SECTORS
   ========================================================================== */

.sectors {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 0;
  border-top: 1px solid var(--line);
  margin-left: -24px;
}

.sector {
  padding: 30px 24px;
  border-bottom: 1px solid var(--line);
  border-right: 1px solid var(--line);
  transition: background .2s ease;
}
.sector:last-child { border-right: none; }
.sector:hover { background: var(--bg-alt); }

.sector-num {
  display: block;
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--navy);
  margin-bottom: 14px;
}

.sector h3 {
  font-size: 1.55rem;
  font-weight: 700;
}

/* ==========================================================================
   MATERIALS (dark)
   ========================================================================== */

.section-dark {
  background: var(--navy-deep);
  color: rgba(255, 255, 255, 0.76);
  position: relative;
  overflow: hidden;
}

.section-dark::before {
  content: "";
  position: absolute;
  top: 0;
  left: -12%;
  width: 46%;
  height: 100%;
  background: rgba(255, 255, 255, 0.028);
  transform: skewX(-14deg);
}

.section-dark .section-label { color: #93a6e0; }
.section-dark h2, .section-dark h3 { color: var(--white); }

.materials-grid {
  position: relative;
  display: grid;
  grid-template-columns: 0.85fr 1fr;
  gap: 64px;
  align-items: start;
}

.materials-head h2 { max-width: 18ch; margin-bottom: 32px; }

.materials-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0;
}

.materials-list li {
  display: flex;
  align-items: center;
  gap: 22px;
  padding: 24px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.13);
}
.materials-list li:last-child { border-bottom: 1px solid rgba(255, 255, 255, 0.13); }

.mat-icon {
  width: 46px;
  height: 46px;
  flex-shrink: 0;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: var(--radius);
  color: #a9b8e8;
}
.mat-icon svg { width: 25px; height: 25px; }

.materials-list h3 {
  font-size: 1.45rem;
  font-weight: 700;
}

/* ==========================================================================
   CONTACT
   ========================================================================== */

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: start;
}

.contact-aside { display: grid; gap: 40px; }

.contact-head { margin-bottom: 0; }
.contact-head h2 { max-width: 16ch; }

.contact-cards {
  display: grid;
  gap: 20px;
}

.contact-card {
  display: grid;
  grid-template-columns: auto 1fr;
  column-gap: 22px;
  align-items: center;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 26px 28px;
  transition: border-color .2s ease, transform .2s ease, box-shadow .2s ease;
}

.contact-card:hover {
  border-color: var(--navy);
  transform: translateY(-3px);
  box-shadow: 0 14px 34px -18px rgba(26, 36, 68, 0.3);
}

.contact-icon {
  width: 48px;
  height: 48px;
  grid-row: 1 / span 2;
  display: grid;
  place-items: center;
  background: var(--navy);
  color: var(--white);
  border-radius: var(--radius);
}
.contact-icon svg { width: 24px; height: 24px; }

.contact-label {
  display: block;
  align-self: end;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--body);
  margin-bottom: 4px;
}

.contact-value {
  display: block;
  align-self: start;
  font-family: var(--font-display);
  font-size: 1.7rem;
  font-weight: 700;
  color: var(--ink);
  line-height: 1.1;
  word-break: break-word;
}

/* ---------- contact form ---------- */

.contact-form {
  display: grid;
  gap: 20px;
  background: var(--bg-alt);
  border: 1px solid var(--line);
  border-top: 3px solid var(--navy);
  border-radius: var(--radius);
  padding: 36px 32px;
}

.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.field { display: grid; gap: 6px; min-width: 0; }

.field label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink);
}

.field input,
.field textarea {
  width: 100%;
  font: inherit;
  font-size: 15px;
  color: var(--ink);
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 12px 14px;
  transition: border-color .18s ease, box-shadow .18s ease;
}

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

.field input:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--navy);
  box-shadow: 0 0 0 3px rgba(50, 72, 147, 0.15);
}

.field input[aria-invalid="true"],
.field textarea[aria-invalid="true"] { border-color: #b3261e; }

.field-hint { font-size: 12.5px; }

.field-error {
  font-size: 12.5px;
  font-weight: 600;
  color: #b3261e;
}
.field-error:empty { display: none; }

.hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.contact-form .btn { justify-self: start; cursor: pointer; font-family: inherit; }
.contact-form .btn:disabled { opacity: 0.6; cursor: wait; transform: none; }

.form-status { font-size: 14px; font-weight: 600; }
.form-status:empty { display: none; }
.form-status.is-success { color: #1e7a3c; }
.form-status.is-error { color: #b3261e; }

/* ==========================================================================
   FOOTER
   ========================================================================== */

.site-footer {
  background: var(--ink);
  color: rgba(255, 255, 255, 0.6);
  padding-top: 56px;
}

.footer-inner {
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr;
  gap: 40px;
  padding-bottom: 44px;
}

.footer-brand .brand-mark {
  width: 128px;
  fill: var(--white);
  margin-bottom: 16px;
}

.footer-brand p {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.footer-nav, .footer-contact {
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-content: start;
}

.footer-nav a, .footer-contact a {
  color: rgba(255, 255, 255, 0.72);
  font-size: 14px;
  transition: color .18s ease;
  width: fit-content;
}
.footer-nav a:hover, .footer-contact a:hover { color: var(--white); }

.footer-contact a {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 600;
}

.footer-legal {
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  padding-block: 22px 28px;
}
.footer-legal p { font-size: 12.5px; }

/* ==========================================================================
   RESPONSIVE
   ========================================================================== */

@media (max-width: 980px) {
  .about-grid,
  .materials-grid,
  .contact-grid { grid-template-columns: 1fr; gap: 36px; }

  .about-body { padding-left: 26px; }

  .footer-inner { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }

  .sectors { margin-left: 0; }

  .sector {
    padding-left: 0;
    border-right: none;
  }
}

@media (max-width: 860px) {
  html { scroll-padding-top: 80px; }

  .nav-toggle { display: flex; }

  .primary-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: var(--white);
    border-bottom: 1px solid var(--line);
    box-shadow: 0 18px 30px -22px rgba(20, 24, 31, 0.4);
    padding: 8px 24px 20px;
    display: none;
  }
  .primary-nav.is-open { display: flex; }

  .primary-nav a {
    padding: 15px 0;
    border-bottom: 1px solid var(--line);
    font-size: 14px;
  }
  .primary-nav a:hover { border-bottom-color: var(--line); }

  .primary-nav .nav-cta {
    margin-top: 16px;
    text-align: center;
    justify-content: center;
    border-bottom: none;
  }

  .hero::after {
    top: auto;
    bottom: -34%;
    right: -30%;
    width: 90%;
    height: 46%;
    opacity: 0.08;
  }

  .hero-inner { padding-block: 68px 72px; }
  .hero h1 { max-width: 100%; }

  .section { padding-block: 68px; }
  .section-head { margin-bottom: 40px; }
}

@media (max-width: 560px) {
  .wrap { padding-inline: 20px; }

  .cards { grid-template-columns: 1fr; }
  .card { padding: 28px 24px; }

  .btn { width: 100%; }
  .hero-actions { flex-direction: column; align-items: stretch; }
  .materials-head .btn { width: 100%; }

  .footer-inner { grid-template-columns: 1fr; gap: 32px; }

  .field-row { grid-template-columns: 1fr; }
  .contact-form { padding: 28px 20px; }
  .contact-form .btn { justify-self: stretch; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }
  .btn:hover, .card:hover, .contact-card:hover { transform: none; }
}
