/* ==========================================================================
   FixtureSprint — styles.css
   Plain CSS, no build step. Mobile-first with breakpoints at 768px and
   1024px. Design direction: light industrial-engineering aesthetic —
   near-white background, dark charcoal type, one restrained accent color.
   ========================================================================== */

:root {
  --color-bg: #fafafa;
  --color-surface: #ffffff;
  --color-surface-muted: #f2f3f5;
  --color-text: #1c1c1e;
  --color-text-muted: #55575c;
  --color-border: #e2e4e8;
  --color-accent: #c1561d;
  --color-accent-dark: #9c4315;
  --color-accent-contrast: #ffffff;
  --color-success: #1e7a3d;
  --color-error: #b3261e;

  --font-base: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;

  --max-width: 1180px;
  --radius: 6px;
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.06);
  --shadow-md: 0 6px 20px rgba(0, 0, 0, 0.08);

  --transition-fast: 150ms ease;
  --transition-base: 250ms ease;
}

/* --------------------------------------------------------------------
   Reset & base
   -------------------------------------------------------------------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
  font-family: var(--font-base);
  background-color: var(--color-bg);
  color: var(--color-text);
  line-height: 1.6;
  overflow-wrap: anywhere;
  -webkit-font-smoothing: antialiased;
}

img,
video {
  max-width: 100%;
  min-width: 0;
  height: auto;
  display: block;
}

h1, h2, h3, h4 {
  line-height: 1.2;
  font-weight: 700;
  color: var(--color-text);
  margin: 0 0 0.6em;
}

h1 { font-size: clamp(2rem, 4.5vw, 3.1rem); letter-spacing: -0.01em; }
h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); }
h3 { font-size: 1.15rem; }

p {
  margin: 0 0 1em;
  color: var(--color-text-muted);
}

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

a:hover {
  text-decoration: underline;
}

ul, ol {
  margin: 0;
  padding: 0;
}

/* Accessible focus states everywhere */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
summary:focus-visible {
  outline: 3px solid var(--color-accent);
  outline-offset: 2px;
  border-radius: 2px;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--color-accent);
  color: #fff;
  padding: 0.6em 1em;
  z-index: 1000;
}

.skip-link:focus {
  left: 0;
}

.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 clamp(1rem, 4vw, 1.25rem);
}

.section {
  width: 100%;
  padding: 4rem 0;
}

.section--muted {
  background-color: var(--color-surface-muted);
}

.section__eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--color-accent);
  margin: 0 0 0.5em;
}

.section__lede {
  max-width: 62ch;
  font-size: 1.05rem;
}

/* --------------------------------------------------------------------
   Buttons
   -------------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5em;
  padding: 0.85em 1.6em;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 0.98rem;
  border: 2px solid transparent;
  cursor: pointer;
  transition: background-color var(--transition-fast), color var(--transition-fast), border-color var(--transition-fast), transform var(--transition-fast);
  text-decoration: none;
  /* Long CTA copy ("Send Us Your Production Problem") must be able to
     wrap onto a second line on narrow screens instead of forcing an
     unbreakable width wider than the viewport. */
  white-space: normal;
  overflow-wrap: anywhere;
  max-width: 100%;
  min-width: 0;
  text-align: center;
}

.btn:hover {
  text-decoration: none;
  transform: translateY(-1px);
}

.btn--primary {
  background-color: var(--color-accent);
  color: var(--color-accent-contrast);
  border-color: var(--color-accent);
}

.btn--primary:hover {
  background-color: var(--color-accent-dark);
  border-color: var(--color-accent-dark);
}

.btn--secondary {
  background-color: transparent;
  color: var(--color-text);
  border-color: var(--color-border);
}

.btn--secondary:hover {
  border-color: var(--color-text);
}

.btn:disabled {
  cursor: not-allowed;
  opacity: 0.7;
  transform: none;
}

/* --------------------------------------------------------------------
   Header / Navigation
   -------------------------------------------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 500;
  background-color: rgba(250, 250, 250, 0.92);
  backdrop-filter: saturate(180%) blur(8px);
  border-bottom: 1px solid var(--color-border);
}

.nav {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0.9rem clamp(1rem, 4vw, 1.25rem);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.nav__logo {
  min-width: 0;
  flex-shrink: 0;
  font-weight: 800;
  font-size: clamp(1rem, 4.5vw, 1.15rem);
  color: var(--color-text);
  letter-spacing: -0.01em;
  white-space: nowrap;
}

.nav__logo:hover {
  text-decoration: none;
  color: var(--color-accent);
}

.nav__toggle {
  display: flex;
  flex-direction: column;
  gap: 4px;
  background: none;
  border: none;
  padding: 0.5rem;
  cursor: pointer;
}

.nav__toggle-bar {
  width: 24px;
  height: 2px;
  background-color: var(--color-text);
  transition: transform var(--transition-fast), opacity var(--transition-fast);
}

.nav__menu {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background-color: var(--color-surface);
  border-bottom: 1px solid var(--color-border);
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding: 1.25rem;
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transition: max-height var(--transition-base), opacity var(--transition-base);
}

.nav__menu.is-open {
  max-height: 400px;
  opacity: 1;
}

.nav__links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
}

.nav__links a {
  color: var(--color-text);
  font-weight: 500;
}

.nav__links a:hover {
  color: var(--color-accent);
}

.nav__cta {
  align-self: flex-start;
}

/* --------------------------------------------------------------------
   Hero
   -------------------------------------------------------------------- */
.hero {
  width: 100%;
  padding: 3rem 0 3.5rem;
}

.hero__grid {
  display: grid;
  gap: 2.5rem;
  align-items: center;
  min-width: 0;
}

.hero__grid > * {
  min-width: 0;
}

.hero__subhead {
  font-size: 1.1rem;
  max-width: 46ch;
}

.hero__ctas {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin: 1.75rem 0;
  min-width: 0;
}

.hero__ctas > * {
  min-width: 0;
  max-width: 100%;
}

.credibility-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  margin-top: 1.5rem;
}

.credibility-list li {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  min-width: 0;
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--color-text);
}

.credibility-list__icon {
  color: var(--color-accent);
  font-weight: 800;
}

.hero__media {
  min-width: 0;
  border-radius: var(--radius);
  overflow: hidden;
  background-color: var(--color-surface-muted);
  border: 1px solid var(--color-border);
  box-shadow: var(--shadow-md);
}

.hero__image {
  width: 100%;
  min-width: 0;
  max-width: 100%;
  height: auto;
  /* No fixed aspect-ratio here on purpose: the box takes on the image's
     own intrinsic ratio (from its width/height attributes) so nothing
     is cropped. object-fit: contain is a safety net in case a future
     replacement image is given an explicit height that doesn't match. */
  object-fit: contain;
  background-color: var(--color-surface-muted);
}

/* --------------------------------------------------------------------
   Applications ticker
   A continuously scrolling strip of the tooling categories from the
   "Appropriate Applications" section, placed directly below the hero.
   Pure CSS: the item list is duplicated once in the markup and the
   track is translated by exactly -50% so the loop is seamless. The
   outer .ticker clips the (intentionally overflowing) track so it
   never affects the document's scrollable width.
   -------------------------------------------------------------------- */
.ticker {
  width: 100%;
  min-width: 0;
  overflow: hidden;
  background-color: var(--color-surface);
  border-top: 1px solid var(--color-border);
  border-bottom: 1px solid var(--color-border);
  padding: 0.85rem 0;
}

.ticker__track {
  display: flex;
  width: max-content;
  will-change: transform;
  animation: ticker-scroll 42s linear infinite;
}

.ticker:hover .ticker__track,
.ticker:focus-within .ticker__track {
  animation-play-state: paused;
}

.ticker__group {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.ticker__item {
  display: inline-block;
  padding: 0 1.1rem;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  white-space: nowrap;
}

.ticker__divider {
  color: var(--color-accent);
  font-size: 0.6rem;
}

@keyframes ticker-scroll {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(-50%);
  }
}

@media (prefers-reduced-motion: reduce) {
  .ticker__track {
    animation: none;
  }
}

/* --------------------------------------------------------------------
   Case study
   -------------------------------------------------------------------- */
.case-study__body {
  display: grid;
  gap: 2rem;
  margin: 2rem 0;
  min-width: 0;
}

.case-study__body > * {
  min-width: 0;
}

.case-study__images {
  display: grid;
  /* Mobile-first: one column on narrow phones, two on tablet (768px,
     matching the rest of the site's tablet breakpoint), three in a
     single row once there's room on desktop (1024px). */
  grid-template-columns: 1fr;
  gap: 0.75rem;
  min-width: 0;
}

.case-study__images img {
  width: 100%;
  min-width: 0;
  max-width: 100%;
  aspect-ratio: 4 / 3;
  /* contain, not cover: equal card sizes without cropping any part of
     the fixture or product out of frame. */
  object-fit: contain;
  border-radius: var(--radius);
  border: 1px solid var(--color-border);
  background-color: var(--color-surface-muted);
}

.check-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.check-list li {
  padding-left: 1.6rem;
  position: relative;
}

.check-list li::before {
  content: "\2713";
  position: absolute;
  left: 0;
  color: var(--color-accent);
  font-weight: 800;
}

.metrics {
  display: grid;
  /* Mobile-first: one column by default so long placeholder values
     (e.g. "[TIME_REDUCTION]") always have room to wrap instead of
     forcing the grid track — and the page — wider than the viewport. */
  grid-template-columns: 1fr;
  gap: 1rem;
  margin: 2.5rem 0;
  min-width: 0;
}

.metric-card {
  min-width: 0;
  max-width: 100%;
  background-color: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 1.4rem 1.2rem;
  text-align: center;
  overflow-wrap: anywhere;
}

.metric-card__label {
  display: block;
  font-size: 0.82rem;
  color: var(--color-text-muted);
  margin-bottom: 0.4rem;
}

.metric-card__value {
  display: block;
  font-size: clamp(1.15rem, 5vw, 1.5rem);
  font-weight: 800;
  color: var(--color-accent);
  overflow-wrap: anywhere;
  word-break: break-word;
}

/* --------------------------------------------------------------------
   Card grids (Why choose us)
   -------------------------------------------------------------------- */
.card-grid {
  display: grid;
  gap: 1.25rem;
  margin-top: 2rem;
  min-width: 0;
}

.card-grid > * {
  min-width: 0;
}

.card-grid--4 {
  grid-template-columns: repeat(2, 1fr);
}

.feature-card {
  min-width: 0;
  max-width: 100%;
  overflow-wrap: anywhere;
  background-color: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 1.6rem 1.4rem;
  transition: border-color var(--transition-fast), transform var(--transition-fast);
}

.feature-card:hover {
  border-color: var(--color-accent);
  transform: translateY(-2px);
}

.feature-card h3 {
  margin-bottom: 0.5em;
}

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

/* --------------------------------------------------------------------
   Applications chip grid
   -------------------------------------------------------------------- */
.chip-grid {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.85rem;
  margin-top: 2rem;
  min-width: 0;
}

.chip-grid li {
  min-width: 0;
  max-width: 100%;
  overflow-wrap: anywhere;
  background-color: var(--color-surface);
  border: 1px solid var(--color-border);
  border-left: 3px solid var(--color-accent);
  border-radius: var(--radius);
  padding: 0.9rem 1.1rem;
  font-weight: 600;
  font-size: 0.95rem;
}

.applications__note {
  margin-top: 2rem;
  padding: 1.1rem 1.3rem;
  background-color: var(--color-surface-muted);
  border-radius: var(--radius);
  font-size: 0.92rem;
  max-width: 70ch;
}

/* --------------------------------------------------------------------
   How it works — steps
   -------------------------------------------------------------------- */
.steps {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
  margin-top: 2rem;
  counter-reset: step;
  min-width: 0;
}

.steps__item {
  min-width: 0;
  max-width: 100%;
  overflow-wrap: anywhere;
  background-color: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 1.6rem 1.4rem;
}

.steps__number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.2rem;
  height: 2.2rem;
  border-radius: 50%;
  background-color: var(--color-accent);
  color: #fff;
  font-weight: 800;
  margin-bottom: 0.9rem;
}

.steps__item h3 {
  margin-bottom: 0.4em;
}

.steps__item p {
  margin: 0;
  font-size: 0.95rem;
}

/* --------------------------------------------------------------------
   Offer section
   -------------------------------------------------------------------- */
.offer {
  display: grid;
  gap: 2rem;
  margin-top: 2rem;
  min-width: 0;
}

.offer > * {
  min-width: 0;
}

.offer__list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.offer__list li {
  min-width: 0;
  overflow-wrap: anywhere;
  padding-left: 1.6rem;
  position: relative;
  font-weight: 500;
}

.offer__list li::before {
  content: "\2713";
  position: absolute;
  left: 0;
  color: var(--color-accent);
  font-weight: 800;
}

.offer__panel {
  background-color: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 1.75rem;
  align-self: start;
}

.offer__pricing-note {
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--color-text);
}

.offer__cta {
  display: flex;
  width: 100%;
  margin: 1rem 0 1.4rem;
}

.offer__guarantee {
  font-size: 0.88rem;
  margin: 0;
  border-top: 1px solid var(--color-border);
  padding-top: 1rem;
}

/* --------------------------------------------------------------------
   Contact form
   -------------------------------------------------------------------- */
.notice {
  padding: 1rem 1.2rem;
  border-radius: var(--radius);
  font-size: 0.92rem;
  margin-bottom: 1.5rem;
}

.notice--warning {
  background-color: #fff4e5;
  border: 1px solid #e8c68a;
  color: #6b4a12;
}

.form {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
  margin-top: 2rem;
  width: 100%;
  min-width: 0;
  background-color: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: clamp(1.1rem, 5vw, 1.75rem);
  position: relative;
}

.form > * {
  min-width: 0;
}

.form__row {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  min-width: 0;
}

.form__row--full {
  grid-column: 1 / -1;
}

.form label {
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--color-text);
}

.required {
  color: var(--color-error);
}

.form input,
.form textarea {
  font: inherit;
  padding: 0.7em 0.85em;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  background-color: var(--color-surface);
  color: var(--color-text);
  transition: border-color var(--transition-fast);
  width: 100%;
  max-width: 100%;
  min-width: 0;
  overflow-wrap: anywhere;
}

.form input:focus,
.form textarea:focus {
  border-color: var(--color-accent);
}

.form input.is-invalid,
.form textarea.is-invalid {
  border-color: var(--color-error);
}

.form textarea {
  resize: vertical;
}

.form__error {
  font-size: 0.82rem;
  color: var(--color-error);
  min-height: 1.1em;
}

/* Visually hidden without a large negative offset — a `left: -9999px`
   honeypot sitting outside its containing block is a classic cause of
   phantom horizontal scroll on mobile browsers, so this keeps the box
   in place and just clips it to nothing instead. */
.form__honeypot {
  position: absolute;
  top: 0;
  left: 0;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  border: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
}

.form__checkbox-label {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  font-weight: 400;
  font-size: 0.9rem;
  color: var(--color-text-muted);
  cursor: pointer;
}

.form__checkbox-label input {
  width: auto;
  margin-top: 0.2rem;
}

.form__submit-row {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  min-width: 0;
}

.btn__spinner {
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255, 255, 255, 0.4);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 700ms linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.form__status {
  grid-column: 1 / -1;
  font-weight: 600;
  font-size: 0.95rem;
  min-height: 1.4em;
  overflow-wrap: anywhere;
}

.form__status.is-success {
  color: var(--color-success);
}

.form__status.is-error {
  color: var(--color-error);
}

.contact-fallback {
  margin-top: 1.5rem;
  font-size: 0.92rem;
  overflow-wrap: anywhere;
}

/* --------------------------------------------------------------------
   FAQ
   -------------------------------------------------------------------- */
.faq-list {
  margin-top: 2rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.faq-item {
  background-color: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 0.4rem 1.3rem;
}

.faq-item summary {
  cursor: pointer;
  font-weight: 600;
  padding: 1rem 0;
  list-style: none;
  position: relative;
  padding-right: 1.6rem;
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-item summary::after {
  content: "+";
  position: absolute;
  right: 0;
  top: 1rem;
  font-size: 1.2rem;
  color: var(--color-accent);
  transition: transform var(--transition-fast);
}

.faq-item[open] summary::after {
  transform: rotate(45deg);
}

.faq-item p {
  padding-bottom: 1.1rem;
  margin: 0;
  font-size: 0.95rem;
}

/* --------------------------------------------------------------------
   Footer
   -------------------------------------------------------------------- */
.site-footer {
  background-color: var(--color-text);
  color: #d5d6d8;
  padding: 2.5rem 0;
}

.footer__grid {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  justify-content: space-between;
  min-width: 0;
}

.footer__grid > * {
  min-width: 0;
}

.footer__brand {
  font-weight: 800;
  color: #fff;
  margin: 0 0 0.3rem;
  font-size: 1.05rem;
}

.footer__email {
  margin: 0;
  overflow-wrap: anywhere;
}

.footer__email a {
  color: #d5d6d8;
}

.footer__disclaimer {
  font-size: 0.82rem;
  color: #a7a9ac;
  max-width: 52ch;
  margin: 0;
  overflow-wrap: anywhere;
}

/* --------------------------------------------------------------------
   Breakpoints
   -------------------------------------------------------------------- */
@media (min-width: 480px) {
  /* Two equal columns once there's enough room; below this the metric
     cards stack to a single column so nothing is forced narrower than
     its content can safely wrap to. */
  .metrics {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 768px) {
  .nav__toggle {
    display: none;
  }

  .nav__menu {
    position: static;
    flex-direction: row;
    align-items: center;
    max-height: none;
    opacity: 1;
    overflow: visible;
    padding: 0;
    border-bottom: none;
    background-color: transparent;
    gap: 2rem;
  }

  .nav__links {
    flex-direction: row;
    gap: 1.75rem;
  }

  .nav__cta {
    align-self: center;
  }

  .hero__grid {
    grid-template-columns: 1.1fr 1fr;
  }

  .case-study__body {
    grid-template-columns: 1.1fr 0.9fr;
    align-items: start;
  }

  .case-study__images {
    grid-template-columns: repeat(2, 1fr);
  }

  .offer {
    grid-template-columns: 1.3fr 1fr;
    align-items: start;
  }

  .form {
    grid-template-columns: 1fr 1fr;
    padding: 2.25rem;
  }

  .footer__grid {
    flex-direction: row;
    align-items: flex-end;
  }
}

@media (min-width: 1024px) {
  .section {
    padding: 5.5rem 0;
  }

  .hero {
    padding: 4.5rem 0 5rem;
  }

  .case-study__images {
    grid-template-columns: repeat(3, 1fr);
  }

  .card-grid--4 {
    grid-template-columns: repeat(4, 1fr);
  }

  .chip-grid {
    grid-template-columns: repeat(4, 1fr);
  }

  .steps {
    grid-template-columns: repeat(4, 1fr);
  }
}

/* --------------------------------------------------------------------
   Reduced motion
   -------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}
