/* Western Construction Calculator -- shared site styles
   Palette/type/layout matched to the Western Concrete Accessories site
   (darkgrey-alpaca-930306.hostingersite.com). */

:root {
  --charcoal: #2a2a2a;
  --gray: #6b6b6b;
  --gray-light: #eeeded;
  --gold: #d99a1f;
  --gold-dark: #b57e14;
  --footer-bg: #1c1c1c;
  --white: #ffffff;
  --line: #e2e2e2;
  --max-width: 1080px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Segoe UI", Arial, Helvetica, sans-serif;
  color: var(--charcoal);
  background: var(--white);
  line-height: 1.6;
}

a {
  color: inherit;
}

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

.wrap {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 20px;
}

/* Header */

.site-header {
  background: var(--charcoal);
  color: var(--white);
  position: sticky;
  top: 0;
  z-index: 20;
}

.site-header .header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 0;
  gap: 16px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--white);
  text-decoration: none;
}

.brand img {
  width: 40px;
  height: 40px;
  border-radius: 50%;
}

.brand-text {
  display: flex;
  flex-direction: column;
}

.brand-name {
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: 0.3px;
}

.brand-tag {
  font-size: 0.7rem;
  color: var(--gold);
  text-transform: uppercase;
  letter-spacing: 1px;
}

nav.main-nav {
  background: #1f1f1f;
}

nav.main-nav ul,
.site-nav {
  list-style: none;
  display: flex;
  gap: 4px;
  margin: 0;
  padding: 0;
  flex-wrap: wrap;
}

nav.main-nav a,
.site-nav a {
  display: block;
  padding: 12px 20px;
  text-decoration: none;
  color: var(--white);
  font-weight: 600;
  font-size: 0.95rem;
  border-bottom: 3px solid transparent;
}

nav.main-nav a:hover,
nav.main-nav a[aria-current="page"],
.site-nav a:hover,
.site-nav a[aria-current="page"] {
  color: var(--gold);
  border-bottom-color: var(--gold);
}

/* Hero */

.hero {
  background: var(--gray-light);
  border-bottom: 1px solid #e0dfdf;
}

.hero .wrap {
  padding: 48px 20px;
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 40px;
  align-items: center;
}

.hero-text {
  text-align: left;
}

.hero img.hero-icon {
  width: 56px;
  height: 56px;
  margin: 0 0 18px;
  border-radius: 50%;
}

.hero h1 {
  font-size: clamp(1.7rem, 3.4vw, 2.2rem);
  margin: 0 0 12px;
  color: var(--charcoal);
}

.hero p.tagline {
  font-size: 1.05rem;
  color: #444;
  max-width: 560px;
  margin: 0 0 20px;
}

.hero-image img {
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
  width: 100%;
  height: auto;
}

@media (max-width: 800px) {
  .hero .wrap {
    grid-template-columns: 1fr;
  }

  .hero-image {
    order: -1;
  }

  .hero-text {
    text-align: center;
  }

  .hero img.hero-icon {
    margin: 0 auto 18px;
  }
}

/* Buttons */

.btn {
  display: inline-block;
  padding: 12px 24px;
  border-radius: 4px;
  font-weight: 700;
  text-decoration: none;
  font-size: 1rem;
  transition: background 0.15s ease, color 0.15s ease;
}

.btn-primary {
  background: var(--gold);
  color: var(--charcoal);
}

.btn-primary:hover {
  background: var(--gold-dark);
  color: var(--white);
}

.btn-ghost {
  background: transparent;
  color: var(--charcoal);
  border: 2px solid var(--line);
}

.btn-ghost:hover {
  border-color: var(--gold);
  color: var(--gold-dark);
}

.btn[aria-disabled="true"] {
  background: var(--gray-light);
  color: var(--gray);
  border: 2px dashed var(--line);
  cursor: default;
}

.cta-note {
  margin-top: 12px;
  font-size: 0.9rem;
  color: var(--gray);
}

/* Sections */

section {
  padding: 48px 0;
}

section h2 {
  font-size: 1.6rem;
  margin: 0 0 8px;
  text-align: center;
  color: var(--charcoal);
}

section > .wrap > p.section-sub {
  text-align: center;
  color: var(--gray);
  max-width: 640px;
  margin: 0 auto 36px;
}

.alt-bg {
  background: var(--gray-light);
}

/* Feature grid */

.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
}

.feature-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 22px;
}

.feature-card h3 {
  margin: 0 0 8px;
  font-size: 1.1rem;
  color: var(--charcoal);
}

.feature-card p {
  margin: 0;
  color: var(--gray);
  font-size: 0.95rem;
}

/* Screenshot gallery */

.screens {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 18px;
}

.screen {
  margin: 0;
}

.screen img {
  width: 100%;
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
  cursor: zoom-in;
  transition: box-shadow 0.15s;
}

.screen img:hover {
  box-shadow: 0 8px 24px rgba(217, 154, 31, 0.35);
}

.screen figcaption {
  margin-top: 10px;
  text-align: center;
  font-size: 0.9rem;
  color: var(--gray);
}

/* Manual */

.category-nav {
  position: sticky;
  top: 77px;
  z-index: 5;
  background: var(--white);
  border-bottom: 1px solid var(--line);
  padding: 12px 0;
}

.category-nav .wrap {
  display: flex;
  gap: 8px;
  overflow-x: auto;
}

.category-chip {
  flex: 0 0 auto;
  padding: 6px 14px;
  border-radius: 999px;
  background: var(--gray-light);
  border: 1px solid var(--line);
  color: var(--charcoal);
  text-decoration: none;
  font-size: 0.85rem;
  white-space: nowrap;
}

.category-chip:hover {
  border-color: var(--gold);
  color: var(--gold-dark);
}

.manual-search {
  max-width: 480px;
  margin: 30px auto 10px;
}

.manual-search input {
  width: 100%;
  padding: 12px 16px;
  border-radius: 4px;
  border: 1px solid var(--line);
  font-size: 1rem;
  background: var(--white);
  color: var(--charcoal);
  font-family: inherit;
}

.manual-search input:focus {
  outline: 2px solid var(--gold);
  border-color: var(--gold);
}

.manual-search-count {
  text-align: center;
  color: var(--gray);
  font-size: 0.85rem;
  margin: 8px 0 30px;
}

.manual-category h2 {
  text-align: left;
  border-bottom: 2px solid var(--gold);
  padding-bottom: 10px;
  margin: 50px 0 20px;
  scroll-margin-top: 155px;
}

.manual-section {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 22px 26px;
  margin-bottom: 20px;
  background: var(--white);
  scroll-margin-top: 155px;
}

.manual-section h3 {
  margin-top: 0;
  color: var(--charcoal);
}

.manual-section .label {
  font-weight: 700;
  color: var(--charcoal);
}

.manual-section ol,
.manual-section ul {
  margin: 8px 0;
  padding-left: 22px;
  color: var(--gray);
}

.manual-section .see-also {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px dashed var(--line);
  font-size: 0.9rem;
  color: var(--gray);
}

.manual-section .see-also a {
  margin-right: 12px;
  color: var(--gold-dark);
  text-decoration: underline;
}

.manual-diagram {
  width: 100%;
  max-width: 400px;
  margin: 6px auto 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--gray-light);
  display: block;
}

.diagram-outline {
  fill: none;
  stroke: var(--charcoal);
  stroke-width: 2;
  stroke-linejoin: round;
}

.diagram-fill {
  fill: var(--gold);
  fill-opacity: 0.2;
  stroke: none;
}

.diagram-dim {
  stroke: var(--gray);
  stroke-width: 1;
}

.diagram-tick {
  fill: var(--gray);
  stroke: none;
}

.diagram-label {
  fill: var(--gray);
  font-size: 12px;
  font-family: "Segoe UI", Arial, Helvetica, sans-serif;
}

.diagram-label-strong {
  fill: var(--charcoal);
  font-size: 12px;
  font-family: "Segoe UI", Arial, Helvetica, sans-serif;
}

.manual-section.is-hidden,
.manual-category.is-hidden {
  display: none;
}

/* FAQ */

.faq-item {
  border-bottom: 1px solid var(--line);
  padding: 18px 0;
}

.faq-item:last-child {
  border-bottom: none;
}

.faq-item h3 {
  margin: 0 0 8px;
  font-size: 1.05rem;
  color: var(--charcoal);
}

.faq-item p {
  margin: 0;
  color: var(--gray);
}

/* Prose (privacy policy etc.) */

.prose {
  max-width: 760px;
  margin: 0 auto;
}

.prose h2 {
  text-align: left;
  margin-top: 34px;
}

.prose p,
.prose li {
  color: var(--gray);
}

.prose a {
  color: var(--gold-dark);
  text-decoration: underline;
}

.prose .updated {
  color: var(--gray);
  font-size: 0.9rem;
}

/* Contact-style callout (support page email CTA) */

.contact-card {
  background: var(--gray-light);
  border-radius: 8px;
  padding: 28px;
  text-align: center;
}

.contact-card .big-link {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--gold-dark);
  text-decoration: none;
  display: inline-block;
  margin: 6px 0;
}

.contact-card .big-link:hover {
  color: var(--charcoal);
}

/* Footer */

.site-footer {
  background: var(--footer-bg);
  color: #cfcfcf;
  padding: 32px 0 20px;
  margin-top: 20px;
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 20px;
  align-items: center;
}

.site-footer nav,
.footer-nav {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin: 0;
  padding: 0;
}

.site-footer a {
  text-decoration: none;
  color: #cfcfcf;
  font-size: 0.9rem;
}

.site-footer a:hover {
  color: var(--gold);
}

.footer-bottom {
  text-align: center;
  color: #777;
  font-size: 0.8rem;
  margin-top: 20px;
  border-top: 1px solid #333;
  padding-top: 16px;
}

/* Lightbox */

.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(20, 20, 20, 0.92);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 60px 20px;
}

.lightbox[hidden] {
  display: none;
}

.lightbox-figure {
  margin: 0;
  max-width: 90vw;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.lightbox-image {
  max-width: 90vw;
  max-height: 78vh;
  border-radius: 8px;
  border: 2px solid rgba(255, 255, 255, 0.15);
  display: block;
}

.lightbox-caption {
  color: #f0f0f0;
  margin-top: 16px;
  font-size: 0.95rem;
  text-align: center;
}

.lightbox-close,
.lightbox-prev,
.lightbox-next {
  position: fixed;
  background: rgba(255, 255, 255, 0.1);
  border: none;
  color: #fff;
  cursor: pointer;
  border-radius: 50%;
}

.lightbox-close:hover,
.lightbox-prev:hover,
.lightbox-next:hover {
  background: var(--gold);
  color: var(--charcoal);
}

.lightbox-close {
  top: 16px;
  right: 16px;
  width: 44px;
  height: 44px;
  font-size: 1.8rem;
  line-height: 1;
}

.lightbox-prev,
.lightbox-next {
  top: 50%;
  transform: translateY(-50%);
  width: 48px;
  height: 48px;
  font-size: 1.3rem;
}

.lightbox-prev {
  left: 16px;
}

.lightbox-next {
  right: 16px;
}

@media (max-width: 600px) {
  .lightbox-prev,
  .lightbox-next {
    width: 40px;
    height: 40px;
    font-size: 1.1rem;
  }
}
