/* ============================================================
   IRON VALLEY ENTERPRISES - SITE STYLES
   One stylesheet shared by every page. You should not need to
   touch this file to edit machines, phone numbers, or text.
   To change the accent color, edit --accent below (one line).
   ============================================================ */

:root {
  /* Color palette: rugged industrial */
  --iron: #23262b;        /* darkest - headers, footer */
  --gunmetal: #33383f;    /* dark panels */
  --charcoal: #4a5058;    /* secondary text */
  --steel: #b9bec5;       /* borders, subtle lines */
  --silver: #eceef0;      /* light background */
  --paper: #f7f8f9;       /* page background */
  --accent: #c05a20;      /* worn orange. For deep blue use #1f4e8c */
  --accent-dark: #9c4517; /* darker orange for hover. Blue: #173c6e */
}

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

html { scroll-behavior: smooth; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  color: var(--iron);
  background: var(--paper);
  line-height: 1.55;
  -webkit-text-size-adjust: 100%;
}

/* Headings use a bold condensed font loaded from Google Fonts */
h1, h2, h3, .btn, .brand {
  font-family: "Oswald", "Arial Narrow", Helvetica, Arial, sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  line-height: 1.15;
}

img { max-width: 100%; display: block; }

.wrap { max-width: 1060px; margin: 0 auto; padding: 0 20px; }

/* ---------- Header ---------- */
.site-header {
  background: var(--iron);
  color: #fff;
  position: sticky;
  top: 0;
  z-index: 50;
}
.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 64px;
  padding-top: 8px;
  padding-bottom: 8px;
}
.brand {
  color: #fff;
  text-decoration: none;
  font-weight: 700;
  font-size: 1.15rem;
}
.brand span { color: var(--accent); }
.nav {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.nav a.navlink {
  color: var(--steel);
  text-decoration: none;
  font-size: 0.95rem;
  padding: 8px 10px;
}
.nav a.navlink:hover { color: #fff; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  text-decoration: none;
  text-align: center;
  font-weight: 600;
  font-size: 1.05rem;
  padding: 14px 26px;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  min-height: 48px; /* easy to tap on a phone */
}
.btn-accent { background: var(--accent); color: #fff; }
.btn-accent:hover { background: var(--accent-dark); }
.btn-dark { background: var(--gunmetal); color: #fff; }
.btn-dark:hover { background: var(--iron); }
.btn-outline {
  background: transparent;
  color: #fff;
  border: 2px solid #fff;
}
.btn-outline:hover { background: rgba(255,255,255,0.12); }
.btn-small { font-size: 0.95rem; padding: 10px 18px; min-height: 44px; }
.btn-block { display: block; width: 100%; }

/* ---------- Hero ---------- */
.hero {
  background: linear-gradient(180deg, var(--iron) 0%, var(--gunmetal) 100%);
  color: #fff;
  padding: 72px 0 80px;
  text-align: center;
}
.hero h1 {
  font-size: clamp(2.2rem, 7vw, 3.8rem);
  font-weight: 700;
  max-width: 18ch;
  margin: 0 auto 14px;
}
.hero p.sub {
  color: var(--steel);
  font-size: 1.1rem;
  max-width: 46ch;
  margin: 0 auto 32px;
}
.hero .cta-row {
  display: flex;
  gap: 14px;
  justify-content: center;
  flex-wrap: wrap;
}
.hero .cta-row .btn { min-width: 220px; }

/* ---------- Sections ---------- */
.section { padding: 56px 0; }
.section-alt { background: var(--silver); }
.section h2 {
  font-size: clamp(1.5rem, 4vw, 2.1rem);
  font-weight: 700;
  margin-bottom: 12px;
}
.section .lead {
  color: var(--charcoal);
  font-size: 1.08rem;
  max-width: 62ch;
}

/* ---------- Category grid (landing page) ---------- */
.cat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 14px;
  margin-top: 28px;
}
.cat-card {
  background: #fff;
  border: 1px solid var(--steel);
  border-radius: 6px;
  padding: 22px 14px;
  text-align: center;
  text-decoration: none;
  color: var(--iron);
}
.cat-card:hover { border-color: var(--accent); }
.cat-card .cat-icon {
  width: 56px;
  height: 56px;
  margin: 0 auto 12px;
  border-radius: 6px;
  background: repeating-linear-gradient(
    45deg, var(--silver), var(--silver) 6px, #e0e3e6 6px, #e0e3e6 12px);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--charcoal);
  font-size: 1.6rem;
}
.cat-card h3 { font-size: 1rem; font-weight: 600; }

/* ---------- Machine cards (inventory page) ---------- */
.machine-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 20px;
  margin-top: 28px;
}
.machine-card {
  background: #fff;
  border: 1px solid var(--steel);
  border-radius: 6px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.machine-card .card-body {
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
}
.machine-card h3 { font-size: 1.15rem; font-weight: 600; }
.machine-card .meta { color: var(--charcoal); font-size: 0.95rem; }
.machine-card .price {
  font-family: "Oswald", "Arial Narrow", Helvetica, Arial, sans-serif;
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--accent);
  margin-top: 4px;
}
.machine-card .btn { margin-top: 12px; }

/* Photo placeholder boxes. When you have a real photo, the <img>
   replaces this styling automatically - see README. */
.photo-box {
  aspect-ratio: 4 / 3;
  width: 100%;
  background: repeating-linear-gradient(
    45deg, var(--silver), var(--silver) 10px, #e0e3e6 10px, #e0e3e6 20px);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--charcoal);
  font-family: ui-monospace, "Courier New", monospace;
  font-size: 0.8rem;
  text-align: center;
  padding: 10px;
}
.photo-box img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ---------- Machine detail modal ---------- */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(20, 22, 25, 0.75);
  display: none;
  align-items: flex-start;
  justify-content: center;
  padding: 20px;
  overflow-y: auto;
  z-index: 100;
}
.modal-backdrop.open { display: flex; }
.modal {
  background: #fff;
  border-radius: 8px;
  max-width: 640px;
  width: 100%;
  margin: 20px 0 40px;
  overflow: hidden;
  position: relative;
}
.modal .modal-close {
  position: absolute;
  top: 10px;
  right: 10px;
  background: var(--iron);
  color: #fff;
  border: none;
  border-radius: 4px;
  width: 44px;
  height: 44px;
  font-size: 1.3rem;
  cursor: pointer;
}
.modal .modal-body { padding: 22px; }
.modal h2 { font-size: 1.6rem; margin-bottom: 4px; }
.modal .meta { color: var(--charcoal); margin-bottom: 14px; }
.modal .desc { margin-bottom: 18px; }
.modal .specs {
  list-style: none;
  border-top: 1px solid var(--silver);
  margin-bottom: 22px;
}
.modal .specs li {
  padding: 9px 0;
  border-bottom: 1px solid var(--silver);
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 0.97rem;
}
.modal .specs li b { color: var(--charcoal); font-weight: 600; }
.modal .modal-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
@media (max-width: 480px) {
  .modal .modal-actions { grid-template-columns: 1fr; }
}

/* ---------- Quote form ---------- */
.form-card {
  background: #fff;
  border: 1px solid var(--steel);
  border-radius: 8px;
  padding: 26px 22px;
  max-width: 560px;
  margin-top: 24px;
}
.form-card label {
  display: block;
  font-weight: 600;
  margin: 16px 0 6px;
  font-size: 0.97rem;
}
.form-card label:first-of-type { margin-top: 0; }
.form-card input,
.form-card textarea {
  width: 100%;
  padding: 13px 12px;
  font-size: 1rem;
  font-family: inherit;
  border: 1px solid var(--steel);
  border-radius: 4px;
  background: var(--paper);
}
.form-card input:focus,
.form-card textarea:focus {
  outline: 2px solid var(--accent);
  border-color: var(--accent);
}
.form-card .btn { margin-top: 22px; }
.thanks {
  display: none;
  background: #eaf5ec;
  border: 1px solid #9fcaa8;
  border-radius: 8px;
  padding: 26px 22px;
  max-width: 560px;
  margin-top: 24px;
  font-size: 1.05rem;
}

/* ---------- Footer ---------- */
.site-footer {
  background: var(--iron);
  color: var(--steel);
  padding: 40px 0;
  margin-top: 56px;
  font-size: 0.97rem;
}
.site-footer .wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  justify-content: space-between;
  align-items: flex-start;
}
.site-footer a { color: #fff; text-decoration: none; }
.site-footer a:hover { color: var(--accent); }
.site-footer .foot-brand {
  font-family: "Oswald", "Arial Narrow", Helvetica, Arial, sans-serif;
  text-transform: uppercase;
  font-weight: 700;
  color: #fff;
  font-size: 1.1rem;
  margin-bottom: 6px;
}
.site-footer ul { list-style: none; }
.site-footer li { margin-bottom: 6px; }

/* ---------- Small screens ---------- */
@media (max-width: 560px) {
  .hero { padding: 52px 0 60px; }
  .hero .cta-row .btn { width: 100%; }
  .site-header .wrap { flex-direction: column; align-items: flex-start; }
}
