/* Jupiter Hardware & Supply — site styles
   Palette: barn red, galvanized steel, aged mustard, warm canvas paper.
   Type: Big Shoulders (display/stencil) + Public Sans (body). */

:root {
  --canvas: #f2ece0;
  --canvas-alt: #e8e0cd;
  --ink: #2a2420;
  --ink-soft: #5c564d;
  --barn: #a52f22;
  --barn-dark: #7e2419;
  --steel: #44565f;
  --steel-dark: #2f3d44;
  --mustard: #d99a2b;
  --line: #d6cab0;
  --white: #fffcf5;
  --radius: 3px;
  --max: 1180px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
html, body { margin: 0; padding: 0; max-width: 100%; overflow-x: hidden; }

body {
  background: var(--canvas);
  color: var(--ink);
  font-family: "Public Sans", -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

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

a { color: inherit; }

h1, h2, h3, h4 {
  font-family: "Big Shoulders Display", sans-serif;
  font-weight: 800;
  line-height: 0.98;
  margin: 0 0 0.5em;
  letter-spacing: 0.2px;
  color: var(--ink);
}

h1 { font-size: clamp(2.6rem, 6vw, 4.6rem); font-weight: 900; }
h2 { font-size: clamp(1.9rem, 3.4vw, 2.6rem); }
h3 { font-size: 1.3rem; font-weight: 700; }
h4 { font-size: 1.05rem; font-weight: 700; text-transform: none; }

p { margin: 0 0 1em; max-width: 62ch; }
p:last-child { margin-bottom: 0; }

.container {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 1.5rem;
}

.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

a:focus-visible,
button:focus-visible,
summary:focus-visible {
  outline: 3px solid var(--mustard);
  outline-offset: 2px;
}

/* ---------- Pegboard texture ---------- */
.pegboard {
  background-image: radial-gradient(circle, rgba(42, 36, 32, 0.14) 1.4px, transparent 1.6px);
  background-size: 24px 24px;
  background-position: 4px 4px;
}

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--canvas);
  border-bottom: 2px solid var(--ink);
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-top: 0.85rem;
  padding-bottom: 0.85rem;
  flex-wrap: nowrap;
  min-width: 0;
}

.wordmark { flex-shrink: 0; }

.wordmark {
  display: flex;
  flex-direction: column;
  line-height: 0.85;
  text-decoration: none;
  color: var(--ink);
}

.wordmark .top {
  font-family: "Big Shoulders Stencil", sans-serif;
  font-size: 1.9rem;
  font-weight: 700;
  letter-spacing: 1px;
  color: var(--barn);
}

.wordmark .bottom {
  font-family: "Big Shoulders Display", sans-serif;
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 2.5px;
  color: var(--ink);
  margin-top: 2px;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 1.6rem;
}

.main-nav ul {
  list-style: none;
  display: flex;
  gap: 1.5rem;
  margin: 0;
  padding: 0;
}

.main-nav a {
  text-decoration: none;
  font-weight: 600;
  font-size: 0.97rem;
  color: var(--ink);
  border-bottom: 2px solid transparent;
  padding-bottom: 2px;
}

.main-nav a:hover { border-color: var(--mustard); }

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-shrink: 0;
}

.nav-toggle {
  display: none;
  background: none;
  border: 2px solid var(--ink);
  border-radius: var(--radius);
  padding: 0.4rem 0.6rem;
  cursor: pointer;
}
.nav-toggle svg { display: block; width: 22px; height: 22px; }

/* ---------- Tag buttons (signature CTA shape) ---------- */
.tag-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.85rem 1.5rem 0.85rem 2.5rem;
  font-weight: 700;
  font-size: 0.97rem;
  text-decoration: none;
  white-space: nowrap;
  background: var(--barn);
  color: var(--white);
  clip-path: polygon(16% 0%, 100% 0%, 100% 100%, 16% 100%, 0% 50%);
  transition: background-color 0.15s ease, color 0.15s ease;
}
.tag-btn:not(.outline)::before {
  content: "";
  position: absolute;
  left: 21px;
  top: 50%;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  transform: translateY(-50%);
  background: var(--canvas);
  box-shadow: inset 0 0 0 1.5px rgba(0, 0, 0, 0.3);
}
.tag-btn:hover { background: var(--barn-dark); }

/* Outline variant: box-shadow doesn't follow the clip-path notch, so the
   "ring" is built from two stacked clip-path fills instead — an outer
   steel pentagon with a slightly inset canvas-colored pentagon on top. */
.tag-btn.outline {
  background: var(--steel);
  color: var(--ink);
}
.tag-btn.outline::before {
  content: "";
  position: absolute;
  inset: 2px;
  background: var(--canvas);
  clip-path: polygon(16% 0%, 100% 0%, 100% 100%, 16% 100%, 0% 50%);
}
.tag-btn.outline::after {
  content: "";
  position: absolute;
  left: 21px;
  top: 50%;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  transform: translateY(-50%);
  background: var(--canvas);
  box-shadow: inset 0 0 0 1.5px var(--steel);
}
.tag-btn.outline > span, .tag-btn.outline > svg {
  /* Positioned pseudo-elements (the inset fill) paint above plain inline
     text by default — promote the real label/icon so it stays on top. */
  position: relative;
}
.tag-btn.outline:hover { color: var(--white); }
.tag-btn.outline:hover::before { background: var(--steel); }
.tag-btn.outline:hover::after { background: var(--steel); }

.tag-btn.small {
  padding: 0.6rem 1.1rem 0.6rem 1.9rem;
  font-size: 0.85rem;
}
.tag-btn.small.outline::after { left: 15px; width: 5px; height: 5px; }
.tag-btn.small:not(.outline)::before { left: 15px; width: 5px; height: 5px; }

.call-icon, .shop-icon { display: none; width: 16px; height: 16px; }

/* ---------- Hero ---------- */
.hero {
  border-bottom: 1px solid var(--line);
  padding: 4.5rem 0 3.5rem;
}

.hero .container {
  display: grid;
  grid-template-columns: 1.3fr 0.9fr;
  gap: 3rem;
  align-items: center;
}

.hero-copy p.lede {
  font-size: 1.2rem;
  color: var(--ink-soft);
  max-width: 48ch;
}

.hero-cta {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  margin: 1.8rem 0 1.6rem;
}

.hero-badges {
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
}

.badge {
  font-size: 0.82rem;
  font-weight: 700;
  padding: 0.35rem 0.8rem;
  border: 1.5px solid var(--ink);
  border-radius: var(--radius);
  background: var(--white);
}

.hero-photo {
  border: 6px solid var(--white);
  outline: 2px solid var(--ink);
  box-shadow: 8px 8px 0 var(--steel);
  max-width: 340px;
  justify-self: end;
}
.hero-photo img { width: 100%; }
.hero-photo figcaption {
  font-size: 0.82rem;
  color: var(--ink-soft);
  padding: 0.5rem 0.65rem 0.1rem;
  font-style: italic;
}

/* ---------- Info bar ---------- */
.info-bar {
  background: var(--steel-dark);
  color: var(--white);
}
.info-bar .container {
  display: flex;
  flex-wrap: wrap;
  gap: 1.2rem 2.5rem;
  padding-top: 1.1rem;
  padding-bottom: 1.1rem;
  font-size: 0.95rem;
  font-weight: 600;
}
.info-bar a { color: var(--white); text-decoration: none; }
.info-bar a:hover { text-decoration: underline; }
.info-bar .item { display: flex; align-items: center; gap: 0.5rem; }
.info-bar svg { width: 18px; height: 18px; flex-shrink: 0; opacity: 0.9; }
.info-bar .open-now { color: var(--mustard); }

/* ---------- Sections ---------- */
section { padding: 4.5rem 0; border-bottom: 1px solid var(--line); }
section:last-of-type { border-bottom: none; }
.section-head { max-width: 62ch; margin-bottom: 2.4rem; }
.section-head .kicker {
  font-family: "Big Shoulders Stencil", sans-serif;
  color: var(--barn);
  font-size: 1.05rem;
  letter-spacing: 1px;
  display: block;
  margin-bottom: 0.3rem;
}
.section-head p { color: var(--ink-soft); font-size: 1.07rem; }

.alt { background: var(--canvas-alt); }

/* ---------- Category tags grid ---------- */
.tag-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 1rem;
}

.cat-tag {
  position: relative;
  background: var(--white);
  border: 1.5px solid var(--ink);
  border-radius: var(--radius);
  padding: 1.1rem 1.2rem 1.1rem 1.6rem;
  clip-path: polygon(0 0, calc(100% - 14px) 0, 100% 14px, 100% 100%, 0 100%);
}
.cat-tag h4 { margin-bottom: 0.3rem; font-size: 1.05rem; }
.cat-tag p { font-size: 0.92rem; color: var(--ink-soft); margin: 0; }

/* ---------- Delivery ---------- */
.delivery-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: start;
}
.delivery-list { list-style: none; margin: 0; padding: 0; }
.delivery-list li {
  padding: 0.7rem 0;
  border-bottom: 1px dashed var(--line);
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.6rem;
}
.delivery-list li:first-child { padding-top: 0; }
.delivery-list svg { width: 16px; height: 16px; color: var(--barn); flex-shrink: 0; }

/* ---------- Hours table ---------- */
.hours-table { width: 100%; border-collapse: collapse; max-width: 480px; }
.hours-table td { padding: 0.55rem 0.3rem; border-bottom: 1px dashed var(--line); font-size: 0.98rem; }
.hours-table td:first-child { font-weight: 700; }
.hours-table td:last-child { text-align: right; color: var(--ink-soft); }
.hours-table tr.today td { color: var(--barn); font-weight: 800; }
.hours-table tr.today td:last-child { color: var(--barn); }
.hours-note { margin-top: 1rem; font-size: 0.9rem; color: var(--ink-soft); }

/* ---------- Why shop ---------- */
.why-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2.4rem 3rem;
}
.why-item { border-left: 3px solid var(--barn); padding-left: 1.2rem; }
.why-item p { color: var(--ink-soft); }

.why-wrap {
  display: grid;
  grid-template-columns: 1fr 1.6fr;
  gap: 3rem;
  align-items: center;
}
.staff-photo {
  border: 6px solid var(--canvas-alt);
  outline: 2px solid var(--ink);
}
.staff-photo figcaption {
  font-size: 0.82rem;
  color: var(--ink-soft);
  padding-top: 0.5rem;
  font-style: italic;
}

/* ---------- Gallery ---------- */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.4rem;
}
.gallery-item {
  background: var(--white);
  border: 1px solid var(--line);
}
.gallery-item img { width: 100%; height: 190px; object-fit: cover; }
.gallery-item figcaption {
  padding: 0.7rem 0.85rem;
  font-size: 0.86rem;
  color: var(--ink-soft);
}

/* ---------- FAQ ---------- */
.faq-list { max-width: 760px; }
.faq-item {
  border-bottom: 1px solid var(--line);
}
.faq-item summary {
  cursor: pointer;
  list-style: none;
  padding: 1.2rem 2rem 1.2rem 0;
  font-family: "Big Shoulders Display", sans-serif;
  font-weight: 700;
  font-size: 1.15rem;
  position: relative;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: "+";
  position: absolute;
  right: 0;
  top: 1.15rem;
  font-family: "Public Sans", sans-serif;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--barn);
}
.faq-item[open] summary::after { content: "–"; }
.faq-item p { padding-bottom: 1.3rem; color: var(--ink-soft); }

/* ---------- Contact ---------- */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: start;
}
.contact-details dt {
  font-weight: 700;
  font-family: "Big Shoulders Display", sans-serif;
  font-size: 1rem;
  margin-top: 1.2rem;
}
.contact-details dt:first-child { margin-top: 0; }
.contact-details dd { margin: 0.2rem 0 0; color: var(--ink-soft); }
.map-frame {
  border: 1px solid var(--line);
  width: 100%;
  aspect-ratio: 4 / 3;
  overflow: hidden;
}
.map-frame iframe { width: 100%; height: 100%; border: 0; }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--ink);
  color: var(--canvas);
  padding: 3rem 0 1.5rem;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 2.5rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid rgba(255,255,255,0.15);
}
.site-footer h4 { color: var(--white); font-size: 0.95rem; letter-spacing: 1px; margin-bottom: 0.8rem; }
.site-footer .wordmark .bottom { color: var(--canvas); }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin-bottom: 0.55rem; }
.site-footer a { text-decoration: none; color: rgba(255,255,255,0.78); }
.site-footer a:hover { color: var(--mustard); }
.footer-bottom {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem;
  padding-top: 1.3rem;
  font-size: 0.85rem;
  color: rgba(255,255,255,0.55);
}

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .hero .container { grid-template-columns: 1fr; }
  .hero-photo { justify-self: start; max-width: 280px; }
  .delivery-grid, .why-grid, .why-wrap, .contact-grid, .footer-grid { grid-template-columns: 1fr; }
  .gallery-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 760px) {
  .main-nav { position: static; }
  .main-nav ul {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    gap: 0;
    background: var(--canvas);
    border-bottom: 2px solid var(--ink);
    padding: 0.5rem 1.5rem 1rem;
  }
  .main-nav.open ul { display: flex; }
  .main-nav ul li { padding: 0.6rem 0; border-bottom: 1px dashed var(--line); }
  .main-nav ul li:last-child { border-bottom: none; }
  .nav-toggle { display: inline-flex; }
  .header-actions { gap: 0.5rem; }
  .header-actions .tag-btn.small {
    padding: 0.6rem 0.9rem 0.6rem 1.5rem;
  }
  .header-actions .tag-btn.small .call-number,
  .header-actions .tag-btn.small .label-full { display: none; }
  .header-actions .tag-btn.small .call-icon,
  .header-actions .tag-btn.small .shop-icon { display: inline-block; }
  /* Icon-only buttons are too small for the hang-tag hole detail to read
     as intentional — it risks looking like a notification dot instead. */
  .header-actions .tag-btn.small:not(.outline)::before,
  .header-actions .tag-btn.small.outline::after { display: none; }
}

@media (max-width: 480px) {
  .site-header .container { gap: 0.5rem; }
  .wordmark .top { font-size: 1.4rem; }
  .wordmark .bottom { font-size: 0.72rem; letter-spacing: 1.5px; }
  .header-actions .tag-btn.small {
    padding: 0.6rem 0.75rem;
  }
  .nav-toggle { padding: 0.35rem 0.5rem; }
}

@media (max-width: 600px) {
  .gallery-grid { grid-template-columns: 1fr 1fr; }
  section { padding: 3rem 0; }
}

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