/* Craftsmen Machinery Co. — site stylesheet */

:root {
  --navy: #1b2a5e;
  --navy-dark: #12203f;
  --steel: #5a6b8c;
  --accent: #c8a24b;
  --bg: #f5f6f8;
  --text: #23272e;
  --muted: #5f6672;
  --rule: #d9dde4;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: "Segoe UI", system-ui, -apple-system, Arial, sans-serif;
  font-size: 17px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
}

img { max-width: 100%; height: auto; }

a { color: var(--navy); }
a:hover { color: var(--navy-dark); }

.wrap {
  max-width: 960px;
  margin: 0 auto;
  padding: 0 1.25rem;
}

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

.site-header {
  background: var(--navy);
  color: #fff;
  border-bottom: 4px solid var(--accent);
}

.site-header .wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.25rem 2rem;
  padding-top: 1.1rem;
  padding-bottom: 1.1rem;
}

.brand { line-height: 1.25; }

.brand a {
  color: #fff;
  text-decoration: none;
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.brand .tagline {
  display: block;
  font-size: 0.85rem;
  color: #c3cbe0;
  font-weight: 400;
}

.brand-phone {
  color: #fff;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
}

.site-nav {
  background: var(--navy-dark);
}

.site-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
}

.site-nav a {
  display: block;
  padding: 0.65rem 1.1rem;
  color: #dbe2f2;
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 600;
}

.site-nav a:hover,
.site-nav a[aria-current="page"] {
  background: var(--navy);
  color: #fff;
}

/* ---------- Hero (home page) ---------- */

.hero {
  background: linear-gradient(160deg, var(--navy) 0%, var(--navy-dark) 100%);
  color: #fff;
  padding: 3rem 0;
  text-align: center;
}

.hero h1 {
  margin: 0 0 0.75rem;
  font-size: 2.1rem;
  line-height: 1.25;
}

.hero p {
  max-width: 620px;
  margin: 0 auto 1.5rem;
  color: #c3cbe0;
  font-size: 1.1rem;
}

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

.btn {
  display: inline-block;
  padding: 0.7rem 1.5rem;
  background: var(--accent);
  color: var(--navy-dark);
  font-weight: 700;
  text-decoration: none;
  border: none;
  border-radius: 4px;
  font-size: 1rem;
  cursor: pointer;
}

.btn:hover { background: #d9b563; color: var(--navy-dark); }

.btn-outline {
  background: transparent;
  color: #fff;
  border: 2px solid #fff;
}

.btn-outline:hover { background: rgba(255, 255, 255, 0.12); color: #fff; }

/* ---------- Main content ---------- */

main { padding: 2.5rem 0 3rem; }

main h1 { font-size: 1.9rem; color: var(--navy-dark); margin-top: 0; }
main h2 { font-size: 1.4rem; color: var(--navy-dark); margin-top: 2rem; }
main h3 { font-size: 1.15rem; color: var(--navy-dark); }

.lead { font-size: 1.1rem; color: var(--muted); }

/* ---------- Cards ---------- */

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
  margin: 2rem 0;
}

.card {
  background: #fff;
  border: 1px solid var(--rule);
  border-radius: 6px;
  padding: 1.5rem;
  text-align: center;
  display: flex;
  flex-direction: column;
}

.card img {
  max-height: 190px;
  width: auto;
  margin: 0 auto 1rem;
  object-fit: contain;
}

.card h3 { margin: 0 0 0.5rem; }
.card p { flex: 1; margin: 0 0 1rem; font-size: 0.95rem; color: var(--muted); }
.card .btn { align-self: center; }

/* ---------- Product layout ---------- */

.product-layout {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 2.5rem;
  align-items: start;
  margin: 1.5rem 0;
}

.product-photo {
  background: #fff;
  border: 1px solid var(--rule);
  border-radius: 6px;
  padding: 1.25rem;
  text-align: center;
}

.product-photo img { max-height: 420px; width: auto; }

.product-photo img + img { margin-top: 1.25rem; }

.photo-caption {
  font-size: 0.85rem;
  color: var(--muted);
  margin: 0.4rem 0 0;
}

.photo-row {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  margin: 1.5rem 0;
}

.photo-row figure {
  flex: 1 1 280px;
  margin: 0;
  background: #fff;
  border: 1px solid var(--rule);
  border-radius: 6px;
  padding: 1rem;
  text-align: center;
}

.photo-row figcaption {
  font-size: 0.85rem;
  color: var(--muted);
  margin-top: 0.5rem;
}

@media (max-width: 720px) {
  .product-layout { grid-template-columns: 1fr; }
}

.feature-list { padding-left: 1.25rem; }
.feature-list li { margin-bottom: 0.4rem; }

/* ---------- Tables ---------- */

table {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
  margin: 1rem 0 1.5rem;
  font-size: 0.95rem;
}

th, td {
  border: 1px solid var(--rule);
  padding: 0.55rem 0.8rem;
  text-align: left;
}

th { background: var(--navy); color: #fff; font-weight: 600; }

tbody tr:nth-child(even) { background: #f2f4f8; }

/* ---------- Callouts / downloads ---------- */

.callout {
  background: #fff;
  border: 1px solid var(--rule);
  border-left: 4px solid var(--accent);
  border-radius: 4px;
  padding: 1rem 1.25rem;
  margin: 1.5rem 0;
}

.downloads { list-style: none; padding: 0; }
.downloads li { margin-bottom: 0.5rem; }
.downloads a { font-weight: 600; }
.downloads a::before { content: "\1F4C4  "; }

/* ---------- Industry strip (home) ---------- */

.industries {
  background: #fff;
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  padding: 2.5rem 0;
}

.industry-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.5rem;
  margin-top: 1.5rem;
}

.industry-grid h3 { margin: 0 0 0.4rem; font-size: 1.05rem; }
.industry-grid p { margin: 0; font-size: 0.95rem; color: var(--muted); }

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

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

@media (max-width: 720px) {
  .contact-layout { grid-template-columns: 1fr; }
}

form label {
  display: block;
  font-weight: 600;
  margin: 1rem 0 0.25rem;
  font-size: 0.95rem;
}

input, select, textarea {
  width: 100%;
  padding: 0.6rem 0.7rem;
  border: 1px solid #b8bfca;
  border-radius: 4px;
  font: inherit;
  font-size: 0.95rem;
  background: #fff;
}

textarea { min-height: 130px; resize: vertical; }

form .btn { margin-top: 1.25rem; }

.contact-card {
  background: #fff;
  border: 1px solid var(--rule);
  border-radius: 6px;
  padding: 1.5rem;
}

.contact-card p { margin: 0.4rem 0; }

/* ---------- Footer ---------- */

.site-footer {
  background: var(--navy-dark);
  color: #aeb7cc;
  padding: 2rem 0;
  font-size: 0.9rem;
}

.site-footer a { color: #dbe2f2; }

.site-footer .wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
  justify-content: space-between;
}

.site-footer h4 {
  color: #fff;
  margin: 0 0 0.5rem;
  font-size: 0.95rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.site-footer p { margin: 0.2rem 0; }

.footer-bottom {
  margin-top: 1.5rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.15);
  text-align: center;
  font-size: 0.8rem;
  color: #7c86a0;
}

/* ---------- Print ---------- */

@media print {
  .site-header, .site-nav, .site-footer, .hero .btn, form { display: none; }
  body { background: #fff; }
}
