/* Ring's Precision Machine Shop — first-draft site styles */
:root {
  --ink: #111111;
  --navy: #111111;
  --navy-2: #1a1a1a;
  --slate: #444444;
  --steel: #6e6e6e;
  --line: #d6d6d6;
  --line-dark: #2a2a2a;
  --paper: #f5f5f5;
  --paper-2: #ececec;
  --white: #ffffff;
  --card: #ffffff;
  --accent: #E00000;
  --accent-dark: #B80000;
  --accent-soft: #f8e6e6;
  --header-h: 8.5rem;
  --font: "IBM Plex Sans", "Segoe UI", sans-serif;
  --font-cond: "IBM Plex Sans Condensed", "Arial Narrow", sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, monospace;
  --shadow: 0 12px 32px rgba(17, 17, 17, 0.08);
  --radius: 6px;
}

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

html {
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
  }
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--ink);
  background: var(--paper);
}

img, iframe {
  max-width: 100%;
  border: 0;
}

a {
  color: var(--accent-dark);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.15em;
}

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

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

.skip-link {
  position: absolute;
  left: 1rem;
  top: -4rem;
  z-index: 200;
  background: var(--accent);
  color: #fff;
  padding: 0.6rem 1rem;
  font-weight: 600;
}

.skip-link:focus {
  top: 1rem;
  color: #fff;
}

.wrap {
  width: min(1120px, calc(100% - 2.5rem));
  margin-inline: auto;
}

.wrap.narrow {
  width: min(720px, calc(100% - 2.5rem));
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: #fff;
  color: var(--ink);
  border-bottom: 3px solid var(--accent);
  box-shadow: 0 1px 0 rgba(17, 17, 17, 0.04);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
  min-height: var(--header-h);
  padding-top: 0.45rem;
  padding-bottom: 0.45rem;
}

.logo {
  display: flex;
  align-items: center;
  color: inherit;
  text-decoration: none;
  min-width: 0;
  flex-shrink: 0;
}

.logo:hover { color: inherit; }

.logo-img {
  display: block;
  width: auto;
  height: 7.35rem;
  max-width: min(240px, 56vw);
  object-fit: contain;
}

.site-nav {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.15rem 0.95rem;
}

.site-nav a {
  color: var(--ink);
  text-decoration: none;
  font-size: 0.92rem;
  font-weight: 500;
  padding: 0.25rem 0;
  border-bottom: 2px solid transparent;
}

.site-nav a:hover,
.site-nav a:focus-visible {
  color: var(--ink);
  border-bottom-color: var(--accent);
}

.site-nav .btn-nav {
  margin-left: 0.4rem;
  border-bottom: 0;
  color: #fff;
}

.site-nav .btn-nav:hover {
  color: #fff;
  border-bottom: 0;
}

.nav-toggle {
  display: none;
  width: 2.5rem;
  height: 2.5rem;
  padding: 0;
  border: 1px solid var(--line);
  background: transparent;
  cursor: pointer;
}

.nav-toggle-bar {
  display: block;
  width: 1.1rem;
  height: 2px;
  margin: 0.22rem auto;
  background: var(--ink);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.7rem 1.2rem;
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 600;
  line-height: 1.2;
  text-decoration: none;
  border: 1px solid transparent;
  border-radius: 2px;
  cursor: pointer;
}

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

.btn-accent:hover,
.btn-accent:focus-visible {
  background: var(--accent-dark);
  border-color: var(--accent-dark);
  color: #fff;
}

.btn-ghost {
  background: transparent;
  border-color: #8a8a8a;
  color: #fff;
}

.btn-ghost:hover,
.btn-ghost:focus-visible {
  border-color: #fff;
  color: #fff;
}

/* Hero */
.hero {
  position: relative;
  background: var(--navy);
  color: var(--white);
  overflow: hidden;
  min-height: min(82vh, 40rem);
  display: flex;
  align-items: flex-end;
  padding: 5.5rem 0 4.5rem;
}

.hero-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(224, 0, 0, 0.10) 1px, transparent 1px),
    linear-gradient(90deg, rgba(224, 0, 0, 0.10) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse at 20% 30%, #000 0%, transparent 70%);
  pointer-events: none;
}

.hero-inner {
  position: relative;
  padding-bottom: 0.5rem;
}

.hero-logo {
  display: block;
  width: min(28rem, 92%);
  height: auto;
  margin: 0 0 1.75rem;
}

.hero-inner::before,
.hero-inner::after {
  content: "";
  position: absolute;
  width: 18px;
  height: 18px;
  border: 1.5px solid var(--accent);
  opacity: 0.85;
}

.hero-inner::before {
  top: -1.25rem;
  left: 0;
  border-right: 0;
  border-bottom: 0;
}

.hero-inner::after {
  top: -1.25rem;
  right: 0;
  border-left: 0;
  border-bottom: 0;
}

.eyebrow {
  margin: 0 0 0.85rem;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
}

.hero h1,
.section h2,
.quote-form h3 {
  font-family: var(--font-cond);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.08;
}

.hero h1 {
  margin: 0 0 1.1rem;
  max-width: 16ch;
  font-size: clamp(2.6rem, 7vw, 4.6rem);
}

.hero-lead {
  margin: 0 0 1.8rem;
  max-width: 38rem;
  font-size: 1.2rem;
  color: #d6d6d6;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 2.5rem;
}

.photo-note,
.photo-placeholder figcaption {
  margin: 0;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  line-height: 1.5;
  letter-spacing: 0.02em;
  color: #9a9a9a;
  max-width: 42rem;
}

/* Sections */
.section {
  padding: 5rem 0;
}

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

.section-dark {
  background: var(--navy-2);
  color: var(--white);
}

.section-dark .eyebrow {
  color: #FF5A5A;
}

.section-dark p {
  color: #f0f0f0;
}

.section-intro {
  max-width: 40rem;
  margin-bottom: 2.5rem;
}

.section h2 {
  margin: 0 0 0.75rem;
  font-size: clamp(2rem, 4vw, 2.8rem);
}

.section-intro p:last-child,
.split-copy p,
.narrow > p {
  color: var(--slate);
}

.split {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 3rem;
  align-items: center;
}

.split-copy p:first-of-type {
  margin-top: 0;
}

.stat-list {
  list-style: none;
  margin: 2rem 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  border-top: 1px solid var(--line);
  padding-top: 1.4rem;
}

.stat-label {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--steel);
  margin-bottom: 0.25rem;
}

.stat-value {
  font-weight: 600;
  line-height: 1.3;
}

.section-dark .stat-list {
  border-top-color: var(--line-dark);
}

/* Photo placeholders */
.photo-placeholder {
  margin: 0;
}

.photo-frame {
  display: grid;
  place-items: center;
  aspect-ratio: 4 / 3;
  background:
    linear-gradient(135deg, rgba(224, 0, 0, 0.08), transparent 40%),
    repeating-linear-gradient(
      -45deg,
      #e4e4e4,
      #e4e4e4 8px,
      #eeeeee 8px,
      #eeeeee 16px
    );
  border: 1px solid var(--line);
  color: var(--steel);
}

.photo-placeholder-dark .photo-frame {
  background:
    linear-gradient(135deg, rgba(224, 0, 0, 0.14), transparent 40%),
    repeating-linear-gradient(
      -45deg,
      #1a1a1a,
      #1a1a1a 8px,
      #242424 8px,
      #242424 16px
    );
  border-color: var(--line-dark);
  color: #8a8a8a;
}

.photo-placeholder figcaption {
  margin-top: 0.75rem;
}

.photo-placeholder-dark figcaption {
  color: #9a9a9a;
}


/* Real shop photos */
.shop-photo {
  margin: 0;
}

.shop-photo img,
.shop-photo video {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid var(--line);
  background: #111;
}

.shop-photo figcaption,
.about-photo figcaption {
  margin-top: 0.75rem;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  line-height: 1.5;
  letter-spacing: 0.02em;
  color: var(--steel);
}

.about-photo img {
  aspect-ratio: 4 / 5;
  object-fit: cover;
  object-position: center 28%;
}

.work-pair,
.work-top {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
  gap: 1.5rem 1.75rem;
  align-items: start;
}

.work-ba-stack {
  display: grid;
  gap: 1.5rem;
}

.work-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem 1.75rem;
  margin-top: 1.75rem;
}

.work-video-shot {
  justify-self: start;
  width: min(100%, 24rem);
}

.work-video {
  width: 100%;
  height: auto;
  display: block;
  background: #111;
}

.section-dark .shop-photo figcaption {
  color: #9a9a9a;
}


/* Cards / services */
.card-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.15rem;
}

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-top: 3px solid var(--navy);
  padding: 1.35rem 1.25rem 1.2rem;
  box-shadow: var(--shadow);
}

.card:hover {
  border-top-color: var(--accent);
}

.card h3 {
  margin: 0 0 0.7rem;
  font-family: var(--font-cond);
  font-size: 1.25rem;
  letter-spacing: 0.01em;
}

.card ul {
  margin: 0;
  padding: 0 0 0 1.05rem;
  color: var(--slate);
  font-size: 0.95rem;
}

.card li + li {
  margin-top: 0.3rem;
}

/* Materials */
.material-groups {
  display: grid;
  gap: 1.75rem;
}

.material-group h3 {
  margin: 0 0 0.7rem;
  font-family: var(--font-cond);
  font-size: 1.15rem;
}

.pill-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.pill-list li {
  background: var(--white);
  border: 1px solid var(--line);
  padding: 0.4rem 0.8rem;
  font-size: 0.92rem;
  font-weight: 500;
}

/* Industries */
.industry-grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.85rem;
}

.industry-grid li {
  background: var(--card);
  border: 1px solid var(--line);
  padding: 1.15rem 1rem;
  font-family: var(--font-cond);
  font-weight: 600;
  font-size: 1.15rem;
  letter-spacing: 0.01em;
}

/* Production */
.prod-grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem 1.5rem;
}

.prod-grid li {
  border-top: 2px solid var(--accent);
  padding-top: 1rem;
}

.prod-num {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  color: var(--accent);
}

.prod-grid h3 {
  margin: 0.35rem 0 0.4rem;
  font-family: var(--font-cond);
  font-size: 1.2rem;
}

.prod-grid p {
  margin: 0;
  color: var(--slate);
  font-size: 0.98rem;
}

.prod-grid li:nth-child(4),
.prod-grid li:nth-child(5) {
  grid-column: span 1;
}

/* Careers */
.job-placeholder {
  margin-top: 1.5rem;
  padding: 1.25rem 1.35rem;
  background: var(--accent-soft);
  border-left: 3px solid var(--accent);
}

.job-placeholder p:first-child { margin-top: 0; }
.job-placeholder p:last-child { margin-bottom: 0; }

.ph {
  display: inline-block;
  width: fit-content;
  max-width: 100%;
  font-family: var(--font-mono);
  font-size: 0.92em;
  font-weight: 600;
  letter-spacing: 0.04em;
  background: #fff3;
  border: 1px dashed var(--accent);
  padding: 0.05rem 0.4rem;
  color: var(--accent-dark);
}

.section-dark .ph,
.contact-list .ph {
  background: rgba(224, 0, 0, 0.08);
}

/* Contact */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2.5rem;
  align-items: start;
}

address {
  font-style: normal;
  margin: 0 0 1.5rem;
  line-height: 1.6;
}

address strong {
  font-family: var(--font-cond);
  font-size: 1.15rem;
}

.contact-list {
  margin: 0 0 1.5rem;
  padding: 0;
}

.contact-list div {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.75rem;
  margin: 0 0 0.55rem;
  align-items: baseline;
}

.contact-list dt {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--steel);
}

.contact-list dd {
  margin: 0;
}

.map-wrap {
  aspect-ratio: 16 / 10;
  border: 1px solid var(--line);
  background: var(--paper-2);
  overflow: hidden;
}

.map-wrap iframe {
  width: 100%;
  height: 100%;
  display: block;
}

.quote-form {
  background: var(--card);
  border: 1px solid var(--line);
  padding: 1.5rem 1.4rem 1.6rem;
  box-shadow: var(--shadow);
}

.quote-form h3 {
  margin: 0 0 0.4rem;
  font-size: 1.5rem;
}

.form-preview-note {
  margin: 0 0 1.1rem;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--steel);
}

.quote-form label {
  display: block;
  margin-bottom: 0.9rem;
  font-size: 0.88rem;
  font-weight: 600;
}

.quote-form input,
.quote-form textarea {
  display: block;
  width: 100%;
  margin-top: 0.35rem;
  padding: 0.65rem 0.7rem;
  font-family: inherit;
  font-size: 1rem;
  font-weight: 400;
  color: var(--ink);
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 2px;
}

.quote-form input:focus,
.quote-form textarea:focus {
  outline: 2px solid var(--accent);
  outline-offset: 0;
  border-color: var(--accent);
}

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

.quote-form .btn {
  width: 100%;
  margin-top: 0.3rem;
}

/* Footer */
.site-footer {
  background: var(--ink);
  color: #c8c8c8;
  padding: 2rem 0;
  font-size: 0.92rem;
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 1.5rem;
}

.footer-name {
  margin: 0 0 0.25rem;
  color: #fff;
  font-family: var(--font-cond);
  font-weight: 700;
  font-size: 1.05rem;
}

.site-footer p {
  margin: 0;
}

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

.footer-contact,
.footer-social {
  margin-top: 0.45rem;
}

.site-footer a {
  color: #fff;
  text-decoration: none;
  border-bottom: 1px solid transparent;
}

.site-footer a:hover,
.site-footer a:focus-visible {
  color: #fff;
  border-bottom-color: var(--accent);
}

/* Desktop: fill the last row when a grid has a leftover pair */
@media (min-width: 961px) {
  .card-grid {
    grid-template-columns: repeat(6, 1fr);
  }

  .card-grid .card {
    grid-column: span 2;
  }

  .card-grid .card:nth-child(10),
  .card-grid .card:nth-child(11) {
    grid-column: span 3;
  }

  .prod-grid {
    grid-template-columns: repeat(6, 1fr);
  }

  .prod-grid li:nth-child(-n+3) {
    grid-column: span 2;
  }

  .prod-grid li:nth-child(n+4) {
    grid-column: span 3;
  }
}

/* Responsive */
@media (max-width: 960px) {
  .card-grid,
  .industry-grid,
  .prod-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .card-grid .card,
  .prod-grid li {
    grid-column: auto;
  }

  .split,
  .contact-grid,
  .work-pair,
  .work-top {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .work-video-shot {
    width: 100%;
    justify-self: stretch;
  }

  .work-video {
    max-height: 70vh;
    width: auto;
    max-width: 100%;
    margin-inline: auto;
  }

  .stat-list {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 800px) {
  .nav-toggle {
    display: block;
  }

  .site-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 0.5rem 1.25rem 1.1rem;
    background: #fff;
    border-bottom: 3px solid var(--accent);
    box-shadow: 0 10px 24px rgba(17, 17, 17, 0.08);
  }

  .site-nav.is-open {
    display: flex;
  }

  .site-nav a {
    padding: 0.7rem 0;
    border-bottom: 1px solid var(--line);
  }

  .site-nav .btn-nav {
    margin: 0.8rem 0 0.2rem;
    border-bottom: 0;
  }
}

@media (max-width: 560px) {
  .logo-img {
    height: 5.35rem;
    max-width: min(180px, 62vw);
  }

  .hero-logo {
    width: min(18.5rem, 92%);
    margin-bottom: 1.25rem;
  }

  .wrap,
  .wrap.narrow {
    width: calc(100% - 1.5rem);
  }

  .hero {
    min-height: auto;
    padding: 3.25rem 0 2.75rem;
  }

  .section {
    padding: 3.25rem 0;
  }

  .work-grid {
    grid-template-columns: 1fr;
  }

  .card-grid,
  .industry-grid,
  .prod-grid {
    grid-template-columns: 1fr;
  }

  .hero-actions {
    flex-direction: column;
    align-items: stretch;
  }

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