/* ===== Competitive Crankshafts — red / white / blue theme ===== */
:root {
  --blue: #2f47a4;        /* brand blue (from logo) */
  --blue-dark: #1f2f73;
  --red: #ed1b23;         /* brand red (from logo) */
  --red-dark: #c1141b;
  --navy: #11183a;        /* headings / text */
  --text: #1f2533;
  --muted: #5c6677;
  --bg: #ffffff;
  --bg-alt: #f4f6fb;      /* light blue-gray */
  --surface: #ffffff;
  --border: #dde3ef;
  --radius: 12px;
  --maxw: 1120px;
  --shadow: 0 8px 28px rgba(17,24,58,.10);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Inter', system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; height: auto; display: block; }

/* Buttons */
.btn {
  display: inline-block;
  background: var(--red);
  color: #fff;
  font-weight: 700;
  padding: 12px 22px;
  border-radius: var(--radius);
  border: none;
  cursor: pointer;
  transition: transform .15s ease, background .15s ease, box-shadow .15s ease;
  font-size: 1rem;
}
.btn:hover { background: var(--red-dark); transform: translateY(-2px); box-shadow: var(--shadow); }
.btn-sm { padding: 8px 16px; font-size: .9rem; }
.btn-lg { padding: 14px 28px; font-size: 1.05rem; }
.btn-blue { background: var(--blue); }
.btn-blue:hover { background: var(--blue-dark); }
.btn-ghost { background: transparent; border: 2px solid var(--blue); color: var(--blue); font-weight: 700; }
.btn-ghost:hover { background: var(--blue); color: #fff; }

/* Utility top bar */
.topbar { background: var(--red); color: #fff; font-size: .88rem; }
.topbar .container { display: flex; align-items: center; justify-content: center; gap: 28px; height: 38px; flex-wrap: wrap; }
.topbar a { color: #fff; font-weight: 600; }
.topbar a:hover { text-decoration: underline; }
.topbar .sep { opacity: .55; }
@media (max-width: 620px) { .topbar .container { gap: 14px; font-size: .78rem; } .topbar .sep { display: none; } }

/* Announcement strip */
.announce { background: var(--navy); color: #fff; text-align: center; font-size: .92rem; padding: 10px 16px; }
.announce strong { color: #ffd9db; }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255,255,255,.95);
  backdrop-filter: blur(10px);
  border-bottom: 3px solid var(--red);
}
.nav { display: flex; align-items: center; justify-content: space-between; height: 78px; }
.brand img { height: 52px; width: auto; }
.nav-links { display: flex; align-items: center; gap: 26px; }
.nav-links a { color: var(--navy); font-weight: 600; transition: color .15s; }
.nav-links a:hover { color: var(--red); }
.nav-links a.btn { color: #fff; }
.nav-toggle { display: none; background: none; border: 0; cursor: pointer; flex-direction: column; gap: 5px; }
.nav-toggle span { width: 26px; height: 3px; background: var(--navy); display: block; border-radius: 2px; }

/* Hero */
.hero {
  position: relative;
  background: linear-gradient(180deg, var(--bg) 0%, var(--bg-alt) 100%);
  border-bottom: 1px solid var(--border);
  overflow: hidden;
}
.hero-grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: 48px; align-items: center; padding: 80px 0 76px; }
.hero-flag { display: inline-block; font-weight: 700; color: var(--red); letter-spacing: .14em; font-size: .8rem; text-transform: uppercase; margin-bottom: 14px; }
.hero h1 { font-size: clamp(2.1rem, 4.6vw, 3.4rem); font-weight: 800; letter-spacing: -.025em; line-height: 1.08; color: var(--navy); }
.hero h1 .accent { color: var(--red); }
.hero-sub { color: var(--muted); font-size: 1.15rem; max-width: 560px; margin: 20px 0 0; }
.hero-cta { display: flex; gap: 14px; margin-top: 30px; flex-wrap: wrap; }
.hero-meta { color: var(--muted); margin-top: 20px; font-size: .92rem; }
.hero-photo { border-radius: 16px; box-shadow: var(--shadow); border: 1px solid var(--border); width: 100%; }

/* top accent stripe */
.stripe { height: 6px; background: linear-gradient(90deg, var(--red) 0 33%, #fff 33% 66%, var(--blue) 66% 100%); }

/* Sections */
.section { padding: 80px 0; }
.section-alt { background: var(--bg-alt); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.section-title { font-size: clamp(1.7rem, 3.5vw, 2.3rem); font-weight: 800; letter-spacing: -.02em; text-align: center; color: var(--navy); }
.section-title.left { text-align: left; }
.section-lead { color: var(--muted); text-align: center; max-width: 660px; margin: 14px auto 48px; font-size: 1.08rem; }

/* Grid + cards */
.grid { display: grid; gap: 24px; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 30px;
  box-shadow: var(--shadow);
  transition: transform .15s ease, border-color .15s ease;
}
.card:hover { transform: translateY(-4px); border-color: var(--blue); }
.card-icon {
  width: 48px; height: 48px; border-radius: 10px;
  display: grid; place-items: center;
  background: rgba(47,71,164,.10); color: var(--blue);
  font-size: 1.4rem; font-weight: 800; margin-bottom: 16px;
}
.card h3 { font-size: 1.2rem; margin-bottom: 8px; color: var(--navy); }
.card p { color: var(--muted); }
.card .brands { margin-top: 12px; font-size: .85rem; color: var(--blue); font-weight: 600; }

/* Category cards (Crank Works style: photo on top, body below, price + button) */
.cat-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.cat-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  overflow: hidden; box-shadow: var(--shadow); display: flex; flex-direction: column;
  transition: transform .15s ease, border-color .15s ease;
}
.cat-card:hover { transform: translateY(-4px); border-color: var(--red); }
.cat-card .photo { aspect-ratio: 4/3; width: 100%; object-fit: cover; border-bottom: 3px solid var(--blue); }
.cat-card .body { padding: 22px 24px 26px; display: flex; flex-direction: column; flex: 1; }
.cat-card h3 { font-size: 1.25rem; color: var(--navy); margin-bottom: 6px; }
.cat-card p { color: var(--muted); font-size: .95rem; margin-bottom: 12px; }
.cat-card .brands { font-size: .82rem; color: var(--blue); font-weight: 600; margin-bottom: 16px; }
.cat-card .from { font-size: .85rem; color: var(--muted); margin-top: auto; }
.cat-card .from b { color: var(--red); font-size: 1.35rem; font-weight: 800; display: block; line-height: 1.1; }
.cat-card .btn { margin-top: 14px; text-align: center; }

/* Brands serviced row */
.brand-row { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; }
.brand-chip {
  background: #fff; border: 1px solid var(--border); border-radius: 999px;
  padding: 9px 20px; font-weight: 700; color: var(--navy); box-shadow: var(--shadow);
  font-size: .95rem;
}
.brand-chip:nth-child(odd) { border-bottom: 3px solid var(--red); }
.brand-chip:nth-child(even) { border-bottom: 3px solid var(--blue); }

/* Work order callout */
.workorder { background: var(--blue); color: #fff; }
.workorder .container { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 32px 24px; flex-wrap: wrap; }
.workorder h3 { font-size: 1.5rem; margin-bottom: 4px; }
.workorder p { color: #d7ddf3; max-width: 560px; }
.workorder .btn { background: #fff; color: var(--blue); }
.workorder .btn:hover { background: #f0f2ff; }

/* Social */
.social { display: flex; gap: 14px; }
.social a { color: #fff; border: 1px solid rgba(255,255,255,.4); border-radius: 8px; padding: 6px 12px; font-weight: 600; font-size: .85rem; }
.social a:hover { background: var(--red); border-color: var(--red); }

/* Gallery */
.gallery { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.gallery img { border-radius: 10px; border: 1px solid var(--border); aspect-ratio: 1/1; object-fit: cover; width: 100%; box-shadow: var(--shadow); }
.gallery img.wide { grid-column: span 2; aspect-ratio: 2/1; }

/* About */
.about-inner { display: grid; grid-template-columns: 1.4fr 1fr; gap: 56px; align-items: center; }
.about-text p { color: var(--muted); margin-bottom: 16px; }
.checklist { list-style: none; margin-top: 8px; }
.checklist li { padding-left: 30px; position: relative; margin-bottom: 10px; color: var(--text); }
.checklist li::before { content: "✓"; position: absolute; left: 0; color: var(--red); font-weight: 800; }
.about-stats { display: grid; gap: 18px; }
.stat { background: var(--surface); border: 1px solid var(--border); border-top: 4px solid var(--blue); border-radius: var(--radius); padding: 22px; text-align: center; box-shadow: var(--shadow); }
.stat:nth-child(2) { border-top-color: var(--red); }
.stat-num { display: block; font-size: 1.7rem; font-weight: 800; color: var(--navy); }
.stat-label { color: var(--muted); font-size: .95rem; }

/* Pricing teaser / table */
.price-cta { text-align: center; }
.table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); }
table.price { width: 100%; border-collapse: collapse; background: #fff; }
table.price caption { text-align: left; font-weight: 800; color: #fff; background: var(--blue); padding: 14px 18px; font-size: 1.1rem; }
table.price th, table.price td { padding: 11px 18px; text-align: left; border-bottom: 1px solid var(--border); }
table.price th { background: var(--bg-alt); color: var(--navy); font-size: .82rem; text-transform: uppercase; letter-spacing: .04em; }
table.price td.price-col { text-align: right; font-weight: 700; color: var(--blue); white-space: nowrap; }
table.price tr:last-child td { border-bottom: none; }
table.price tbody tr:hover { background: #fbfcff; }
.price-note { color: var(--muted); font-size: .9rem; margin-top: 14px; }

/* Contact */
.contact-grid { display: grid; grid-template-columns: 1.3fr 1fr; gap: 48px; }
.field { margin-bottom: 18px; display: flex; flex-direction: column; gap: 6px; }
.field label { font-weight: 600; font-size: .95rem; color: var(--navy); }
.field input, .field textarea {
  background: #fff; border: 1px solid var(--border); border-radius: 10px;
  padding: 12px 14px; color: var(--text); font: inherit; resize: vertical;
}
.field input:focus, .field textarea:focus { outline: 2px solid var(--blue); border-color: transparent; }
.form-note { margin-top: 12px; color: var(--muted); font-size: .9rem; min-height: 1.2em; }

/* Mail-in print form — tighter, tidier */
#ship-form { background: var(--bg-alt); border: 1px solid var(--border); border-radius: var(--radius); padding: 22px 24px; }
#ship-form .field { margin-bottom: 12px; gap: 4px; }
#ship-form label { font-size: .78rem; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .03em; }
#ship-form input, #ship-form textarea { padding: 8px 11px; font-size: .95rem; border-radius: 8px; line-height: 1.35; }
#ship-form textarea { min-height: unset; }
#ship-form .btn { margin-top: 6px; }
#ship-form .form-note { margin-top: 10px; font-size: .85rem; }
.contact-details { background: var(--bg-alt); border: 1px solid var(--border); border-radius: var(--radius); padding: 30px; }
.contact-details h3 { margin-bottom: 14px; color: var(--navy); }
.contact-details p { color: var(--text); margin-bottom: 12px; }
.contact-details a { color: var(--blue); font-weight: 600; }

/* Footer */
.site-footer { border-top: 4px solid var(--blue); padding: 30px 0; background: var(--navy); color: #c8cfe4; }
.footer-inner { display: flex; justify-content: space-between; align-items: center; gap: 16px; font-size: .9rem; flex-wrap: wrap; }
.footer-inner a { color: #fff; }
.footer-inner a:hover { color: var(--red); }

/* Page header (pricing) */
.page-hero { background: var(--bg-alt); border-bottom: 1px solid var(--border); padding: 60px 0; text-align: center; }
.page-hero h1 { color: var(--navy); font-size: clamp(2rem,4vw,2.8rem); font-weight: 800; }
.page-hero p { color: var(--muted); margin-top: 12px; }

/* Print header (only shows when printing the form) */
.print-head { display: none; }

/* Print: show only the mail-in form, clean for handwriting */
@media print {
  body * { visibility: hidden; }
  #contact, #contact * { visibility: visible; }
  #contact { position: absolute; left: 0; top: 0; width: 100%; padding: 0; }
  #contact .container { max-width: 100%; padding: 0 12px; }
  .no-print, .no-print * { display: none !important; visibility: hidden !important; }
  .section-title, .section-lead { text-align: left !important; color: #000 !important; }
  .contact-grid { display: block !important; }
  .print-head { display: flex !important; align-items: center; gap: 16px; margin-bottom: 22px; padding-bottom: 14px; border-bottom: 2px solid #000; color: #000; }
  .print-head img { height: 58px; width: auto; }
  .field { margin-bottom: 18px; }
  .field label { color: #000 !important; font-weight: 700; }
  .field input, .field textarea { border: 1px solid #000 !important; background: #fff !important; min-height: 30px; }
  @page { margin: 1.5cm; }
}

/* Nav dropdown */
.has-dropdown { position: relative; }
.has-dropdown > a::after { content: " ▾"; font-size: .7em; color: var(--muted); }
.dropdown-menu {
  position: absolute; top: 100%; left: 0; min-width: 230px;
  background: #fff; border: 1px solid var(--border); border-top: 3px solid var(--red);
  border-radius: 0 0 10px 10px; box-shadow: var(--shadow);
  padding: 8px; display: none; flex-direction: column; gap: 2px; z-index: 60;
}
.dropdown-menu a { padding: 9px 12px; border-radius: 8px; color: var(--navy); font-weight: 600; font-size: .95rem; }
.dropdown-menu a:hover { background: var(--bg-alt); color: var(--red); }
.has-dropdown:hover .dropdown-menu, .has-dropdown:focus-within .dropdown-menu { display: flex; }
.nav-links a.active { color: var(--red); }

/* Breadcrumb */
.breadcrumb { background: var(--bg-alt); border-bottom: 1px solid var(--border); }
.breadcrumb ol { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; padding: 12px 0; font-size: .88rem; color: var(--muted); }
.breadcrumb a { color: var(--blue); font-weight: 600; }
.breadcrumb li::after { content: "›"; margin-left: 8px; color: var(--muted); }
.breadcrumb li:last-child::after { content: ""; }

/* Service page hero */
.svc-hero { background: linear-gradient(180deg, var(--bg) 0%, var(--bg-alt) 100%); border-bottom: 1px solid var(--border); }
.svc-hero .container { display: grid; grid-template-columns: 1.1fr .9fr; gap: 44px; align-items: center; padding: 56px 0; }
.svc-hero h1 { font-size: clamp(1.9rem, 4vw, 2.8rem); font-weight: 800; color: var(--navy); letter-spacing: -.02em; line-height: 1.1; }
.svc-hero h1 .accent { color: var(--red); }
.svc-hero p { color: var(--muted); font-size: 1.1rem; margin: 16px 0 0; }
.svc-hero .from { margin-top: 18px; font-size: .95rem; color: var(--text); }
.svc-hero .from b { color: var(--red); font-size: 1.5rem; }
.svc-hero img { border-radius: 14px; box-shadow: var(--shadow); border: 1px solid var(--border); }

/* Prose blocks */
.prose { max-width: 760px; }
.prose p { color: var(--text); margin-bottom: 16px; }
.prose h2 { color: var(--navy); font-size: 1.6rem; margin: 36px 0 12px; }
.prose h3 { color: var(--navy); font-size: 1.2rem; margin: 24px 0 8px; }
.prose ul { margin: 0 0 16px 22px; color: var(--text); }
.prose li { margin-bottom: 7px; }
.prose a { color: var(--blue); font-weight: 600; }

/* Model list */
.model-list { display: flex; flex-wrap: wrap; gap: 10px; margin: 8px 0 24px; }
.model-list span {
  background: #fff; border: 1px solid var(--border); border-bottom: 3px solid var(--blue);
  border-radius: 8px; padding: 8px 14px; font-weight: 600; font-size: .9rem; color: var(--navy);
}

/* FAQ accordion (no-JS via <details>) */
.faq-list { max-width: 820px; margin: 0 auto; }
.faq-item { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); margin-bottom: 12px; box-shadow: var(--shadow); overflow: hidden; }
.faq-item summary { cursor: pointer; padding: 18px 22px; font-weight: 700; color: var(--navy); list-style: none; display: flex; justify-content: space-between; gap: 16px; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: "+"; color: var(--red); font-size: 1.4rem; line-height: 1; }
.faq-item[open] summary::after { content: "−"; }
.faq-item .answer { padding: 0 22px 20px; color: var(--text); }
.faq-item .answer a { color: var(--blue); font-weight: 600; }

/* Map */
.map-embed { border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.map-embed iframe { display: block; width: 100%; height: 320px; border: 0; }

/* Local block */
.local-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: center; }
.local-grid h2 { text-align: left; }

/* Footer columns */
.footer-cols { display: grid; grid-template-columns: 2fr 1fr 1fr 1.4fr; gap: 32px; padding: 44px 0 28px; }
.footer-cols h4 { color: #fff; font-size: .95rem; margin-bottom: 14px; text-transform: uppercase; letter-spacing: .05em; }
.footer-cols a, .footer-cols p { color: #c8cfe4; font-size: .92rem; display: block; margin-bottom: 9px; }
.footer-cols a:hover { color: #fff; }
.footer-brand img { height: 44px; background: #fff; padding: 8px 12px; border-radius: 8px; margin-bottom: 14px; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.15); padding: 18px 0; display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; font-size: .85rem; color: #9aa6c4; }

/* Responsive */
@media (max-width: 900px) {
  .grid-3, .cat-grid { grid-template-columns: 1fr; }
  .workorder .container { flex-direction: column; align-items: flex-start; }
  .svc-hero .container, .local-grid { grid-template-columns: 1fr; gap: 28px; }
  .footer-cols { grid-template-columns: 1fr 1fr; gap: 24px; }
  .has-dropdown .dropdown-menu { position: static; display: flex; box-shadow: none; border: 0; border-top: 0; padding: 6px 0 6px 14px; min-width: 0; }
  .has-dropdown > a::after { content: ""; }
  .about-inner, .contact-grid, .hero-grid { grid-template-columns: 1fr; gap: 32px; }
  .hero-grid { padding: 50px 0; }
  .gallery { grid-template-columns: repeat(2, 1fr); }
  .gallery img.wide { grid-column: span 2; }
  .nav-links { display: none; }
  .nav-toggle { display: flex; }
  .nav-links.open {
    display: flex; flex-direction: column; align-items: flex-start; gap: 16px;
    position: absolute; top: 78px; left: 0; right: 0;
    background: #fff; border-bottom: 3px solid var(--red); padding: 20px 24px;
  }
}
