/* ============================================================
   Barico Design LLC — site stylesheet
   Aesthetic: engineering drawing / drafting sheet.
   Paper white, ink black, one oxide-red accent. No radii.
   ============================================================ */

:root {
  --paper: #F4F2ED;
  --paper-deep: #ECE9E1;
  --ink: #17181A;
  --ink-soft: #3C3E41;
  --steel: #5A5E63;
  --oxide: #B5301C;
  --hairline: rgba(23, 24, 26, 0.18);
  --hairline-strong: rgba(23, 24, 26, 0.55);
  --grid-line: rgba(23, 24, 26, 0.045);
  --dark-hairline: rgba(244, 242, 237, 0.22);
  --dark-grid: rgba(244, 242, 237, 0.035);

  --font-display: "Barlow Semi Condensed", "Arial Narrow", sans-serif;
  --font-body: "Barlow", "Helvetica Neue", sans-serif;
  --font-mono: "IBM Plex Mono", "Courier New", monospace;

  --wrap: 1120px;
}

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

@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

section[id] { scroll-margin-top: 72px; }

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

body {
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--ink);
  background-color: var(--paper);
  /* Drafting-sheet grid */
  background-image:
    linear-gradient(var(--grid-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
  background-size: 32px 32px;
  -webkit-font-smoothing: antialiased;
}

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

a { color: inherit; }

::selection { background: var(--oxide); color: var(--paper); }

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

h1, h2 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.08;
  letter-spacing: -0.01em;
  text-wrap: balance;
}

h1 { font-size: clamp(2.6rem, 6vw, 4.4rem); }
h2 { font-size: clamp(1.9rem, 3.6vw, 2.75rem); margin-bottom: 1.25rem; }

h3 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.3rem;
  line-height: 1.25;
  margin-bottom: 0.4rem;
}

.zone-label {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--oxide);
  margin-bottom: 1.1rem;
}

/* ------------------------------------------------------------
   Header
   ------------------------------------------------------------ */

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: var(--paper);
  border-bottom: 1px solid var(--hairline-strong);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  height: 64px;
}

.wordmark {
  display: flex;
  align-items: baseline;
  gap: 0.45rem;
  text-decoration: none;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.25rem;
  letter-spacing: 0.01em;
  white-space: nowrap;
}

.wordmark-suffix {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  color: var(--steel);
  border: 1px solid var(--hairline-strong);
  padding: 0.1rem 0.3rem;
  transform: translateY(-1px);
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 1.6rem;
  margin-left: auto;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.06em;
}

.site-nav a {
  text-decoration: none;
  color: var(--ink-soft);
  padding: 0.3rem 0;
  border-bottom: 1px solid transparent;
  white-space: nowrap;
  transition: color 0.15s ease, border-color 0.15s ease;
}

.site-nav a:hover { color: var(--oxide); border-bottom-color: var(--oxide); }

.nav-cta {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  text-decoration: none;
  color: var(--paper);
  background: var(--ink);
  padding: 0.45rem 0.9rem;
  border: 1px solid var(--ink);
  white-space: nowrap;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.nav-cta:hover {
  background: var(--oxide);
  border-color: var(--oxide);
  color: var(--paper);
}

/* ------------------------------------------------------------
   Buttons
   ------------------------------------------------------------ */

.btn {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-decoration: none;
  padding: 0.85rem 1.6rem;
  border: 1px solid var(--ink);
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.btn-solid { background: var(--ink); color: var(--paper); }
.btn-solid:hover { background: var(--oxide); border-color: var(--oxide); }

.btn-line { background: transparent; color: var(--ink); }
.btn-line:hover { border-color: var(--oxide); color: var(--oxide); }

/* ------------------------------------------------------------
   Hero
   ------------------------------------------------------------ */

.hero {
  position: relative;
  border-bottom: 1px solid var(--hairline-strong);
  overflow: hidden;
}

.hero-inner {
  padding-top: clamp(4.5rem, 10vw, 8rem);
  padding-bottom: clamp(4.5rem, 10vw, 8rem);
  max-width: 880px;
  margin-left: auto;
  margin-right: auto;
}

.hero h1 { margin-bottom: 1.5rem; }

.hero-sub {
  font-size: 1.125rem;
  color: var(--ink-soft);
  max-width: 46rem;
  margin-bottom: 2.4rem;
}

.hero-actions { display: flex; gap: 0.9rem; flex-wrap: wrap; }

/* Registration marks — the crosshairs printed at sheet corners */
.hero-marks .mark {
  position: absolute;
  width: 22px;
  height: 22px;
}

.hero-marks .mark::before,
.hero-marks .mark::after {
  content: "";
  position: absolute;
  background: var(--hairline-strong);
}

.hero-marks .mark::before {
  left: 50%; top: 0; bottom: 0; width: 1px;
}

.hero-marks .mark::after {
  top: 50%; left: 0; right: 0; height: 1px;
}

.mark-tl { top: 20px; left: 20px; }
.mark-tr { top: 20px; right: 20px; }
.mark-bl { bottom: 20px; left: 20px; }
.mark-br { bottom: 20px; right: 20px; }

/* Staggered load reveal */
@media (prefers-reduced-motion: no-preference) {
  .reveal {
    opacity: 0;
    transform: translateY(14px);
    animation: reveal 0.6s cubic-bezier(0.2, 0.6, 0.2, 1) forwards;
  }
  .reveal:nth-child(1) { animation-delay: 0.05s; }
  .reveal:nth-child(2) { animation-delay: 0.15s; }
  .reveal:nth-child(3) { animation-delay: 0.25s; }
  .reveal:nth-child(4) { animation-delay: 0.35s; }

  @keyframes reveal {
    to { opacity: 1; transform: none; }
  }
}

/* ------------------------------------------------------------
   Sections
   ------------------------------------------------------------ */

.section {
  padding: clamp(4rem, 8vw, 6.5rem) 0;
}

.section-rule { border-top: 1px solid var(--hairline-strong); }

.section-dark {
  background-color: var(--ink);
  background-image:
    linear-gradient(var(--dark-grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--dark-grid) 1px, transparent 1px);
  background-size: 32px 32px;
  color: var(--paper);
}

.section-dark .zone-label { color: #E06046; }

/* ------------------------------------------------------------
   Services index (parts-list styling)
   ------------------------------------------------------------ */

.service-index {
  list-style: none;
  margin-top: 2.5rem;
  border-top: 1px solid var(--hairline-strong);
}

.service-row {
  display: grid;
  grid-template-columns: 88px 1fr;
  gap: 1.5rem;
  padding: 1.6rem 0.5rem 1.6rem 0;
  border-bottom: 1px solid var(--hairline);
  transition: background 0.15s ease;
}

.service-row:hover { background: rgba(23, 24, 26, 0.03); }

.service-no {
  font-family: var(--font-mono);
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--steel);
  padding-top: 0.35rem;
  padding-left: 0.5rem;
  transition: color 0.15s ease;
}

.service-row:hover .service-no { color: var(--oxide); }

.service-body p { color: var(--ink-soft); max-width: 40rem; }

/* ------------------------------------------------------------
   Approach
   ------------------------------------------------------------ */

.approach-cols {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  margin-top: 2.5rem;
}

.approach-col {
  border-top: 1px solid var(--dark-hairline);
  padding-top: 1.4rem;
}

.approach-col p { color: rgba(244, 242, 237, 0.78); }

/* ------------------------------------------------------------
   Capabilities
   ------------------------------------------------------------ */

/* Stacked spec-sheet rows: heading column, spec column, hairline rules */
.cap-grid {
  display: grid;
  grid-template-columns: 1fr;
  margin-top: 2.5rem;
}

.cap-block {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 0.6rem 2.5rem;
  border-top: 1px solid var(--hairline-strong);
  padding: 1.4rem 0 1.2rem;
}

.cap-block h3 { margin-bottom: 0; padding-top: 0.35rem; }

.spec-list {
  list-style: none;
}

.cap-block .spec-list { margin-top: 0; }

.spec-list li {
  position: relative;
  padding: 0.45rem 0 0.45rem 1.3rem;
  color: var(--ink-soft);
  font-size: 0.98rem;
  line-height: 1.5;
  border-top: 1px solid var(--hairline);
}

/* Machined-square bullet */
.spec-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.95em;
  width: 7px;
  height: 7px;
  border: 1px solid var(--oxide);
}

/* ------------------------------------------------------------
   Process
   ------------------------------------------------------------ */

.process-steps {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2rem;
  margin-top: 2.5rem;
}

.process-steps li {
  border-top: 1px solid var(--hairline-strong);
  padding-top: 1.2rem;
}

.step-no {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--paper);
  background: var(--oxide);
  width: 1.7rem;
  height: 1.7rem;
  line-height: 1.7rem;
  text-align: center;
  margin-bottom: 0.9rem;
}

.process-steps p { color: var(--ink-soft); font-size: 0.98rem; }

/* ------------------------------------------------------------
   Contact
   ------------------------------------------------------------ */

.contact-inner {
  display: grid;
  grid-template-columns: minmax(260px, 5fr) 7fr;
  gap: 4rem;
  align-items: start;
}

.contact-copy p:not(.zone-label) { color: rgba(244, 242, 237, 0.78); max-width: 30rem; }

.quote-form {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.2rem 1.4rem;
}

.field { display: flex; flex-direction: column; gap: 0.35rem; }
.field-full { grid-column: 1 / -1; }

.field label {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(244, 242, 237, 0.65);
}

.req { color: #E06046; margin-left: 0.2rem; }

.field input,
.field select,
.field textarea {
  font-family: var(--font-body);
  font-size: 1rem;
  color: var(--paper);
  background: rgba(244, 242, 237, 0.06);
  border: 1px solid var(--dark-hairline);
  border-radius: 0;
  padding: 0.7rem 0.8rem;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.field select {
  appearance: none;
  /* Hairline chevron in the paper color, matching the drafting aesthetic */
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%23F4F2ED' stroke-width='1.5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.85rem center;
  padding-right: 2.4rem;
}

.field select option { color: var(--ink); background: var(--paper); }

/* Honeypot field: removed from view and from the tab order, present for bots */
.hp-field {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

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

.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: 2px solid rgba(244, 242, 237, 0.85);
  outline-offset: 1px;
  border-color: var(--paper);
  background: rgba(244, 242, 237, 0.1);
}

.form-foot {
  display: flex;
  align-items: center;
  gap: 1.4rem;
  flex-wrap: wrap;
  margin-top: 0.4rem;
}

.btn-submit { border-color: var(--paper); background: var(--paper); color: var(--ink); }
.btn-submit:hover { background: var(--oxide); border-color: var(--oxide); color: var(--paper); }
.btn-submit[disabled] { opacity: 0.55; cursor: wait; }

.form-status {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  letter-spacing: 0.04em;
}

.form-status.ok { color: rgba(244, 242, 237, 0.9); }
.form-status.err { color: #E06046; }

/* ------------------------------------------------------------
   Footer — engineering title block
   ------------------------------------------------------------ */

.site-footer {
  border-top: 1px solid var(--hairline-strong);
  padding: 3rem 0 2.5rem;
}

.title-block {
  display: grid;
  grid-template-columns: 2fr 3fr 1.5fr 1.5fr;
  border: 1px solid var(--hairline-strong);
  background: rgba(244, 242, 237, 0.7);
}

.tb-cell {
  padding: 0.85rem 1rem;
  border-left: 1px solid var(--hairline-strong);
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.tb-cell:first-child { border-left: none; }

.tb-label {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--steel);
}

.tb-value {
  font-size: 0.92rem;
  line-height: 1.4;
}

.tb-company .tb-value { font-family: var(--font-display); font-weight: 600; }

.tb-value a { color: var(--oxide); text-decoration: none; }
.tb-value a:hover { text-decoration: underline; }

.footer-legal {
  margin-top: 1.2rem;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  color: var(--steel);
}

.footer-legal a {
  color: var(--steel);
  text-decoration: none;
}

.footer-legal a:hover { text-decoration: underline; }

/* ------------------------------------------------------------
   Responsive
   ------------------------------------------------------------ */

@media (max-width: 900px) {
  .process-steps { grid-template-columns: 1fr 1fr; }
  .contact-inner { grid-template-columns: 1fr; gap: 2.5rem; }
  .title-block { grid-template-columns: 1fr 1fr; }
  .tb-cell { border-top: 1px solid var(--hairline-strong); }
  .tb-cell:nth-child(-n+2) { border-top: none; }
  .tb-cell:nth-child(odd) { border-left: none; }
}

/* Two-row header: wordmark + CTA on the first row, section links below */
@media (max-width: 800px) {
  .header-inner {
    flex-wrap: wrap;
    height: auto;
    padding-top: 0.7rem;
    padding-bottom: 0.55rem;
    row-gap: 0.45rem;
  }
  .wordmark { order: 1; }
  .nav-cta { order: 2; margin-left: auto; }
  .site-nav {
    order: 3;
    width: 100%;
    margin-left: 0;
    gap: 1.2rem;
    overflow-x: auto;
  }
}

@media (max-width: 640px) {
  .approach-cols { grid-template-columns: 1fr; gap: 2rem; }
  .cap-block { grid-template-columns: 1fr; gap: 0.4rem; }
  .process-steps { grid-template-columns: 1fr; }
  .quote-form { grid-template-columns: 1fr; }
  .service-row { grid-template-columns: 56px 1fr; gap: 1rem; }
  .hero-marks { display: none; }
}

/* Very small phones: keep the first header row inside 320px */
@media (max-width: 400px) {
  .wordmark { font-size: 1.1rem; }
  .nav-cta { font-size: 0.72rem; padding: 0.4rem 0.65rem; }
  .header-inner { gap: 12px; }
}
