/* Rocky Mountain Appliances — shared site styles */

:root {
  --ink: #0f1419;
  --muted: #4a5568;
  --surface: #f7f8fa;
  --white: #ffffff;
  --accent: #1e4d6b;
  --accent-hover: #163a52;
  --border: #e2e6eb;
  --radius: 12px;
  --shadow: 0 12px 40px rgba(15, 20, 25, 0.08);
  --max: 1120px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "DM Sans", system-ui, sans-serif;
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--ink);
  background: var(--surface);
}

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

a {
  color: var(--accent);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

a:hover {
  color: var(--accent-hover);
}

/* Title-style capitalization (major words, book-cover feel) */
.logo,
.nav-main a,
.skip-link,
h1,
h2,
h3,
.btn,
.hero-copy .lede,
.section-header p,
.card-body p,
.card-body a,
.stat span,
.checkout-cta p,
.footer-brand,
.site-footer .footer-inner > div:first-child > p:not(.footer-brand) {
  text-transform: capitalize;
}

a[href^="mailto:"] {
  text-transform: none;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  padding: 0.75rem 1rem;
  background: var(--accent);
  color: var(--white);
  z-index: 100;
}

.skip-link:focus {
  left: 1rem;
  top: 1rem;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 1rem 1.5rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.logo {
  font-family: "Fraunces", Georgia, serif;
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--ink);
  text-decoration: none;
  letter-spacing: -0.02em;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.logo:hover {
  color: var(--accent);
}

.logo-mark {
  width: 28px;
  height: auto;
  flex-shrink: 0;
}

.nav-main {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.25rem 1.25rem;
}

.nav-main a {
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--ink);
  text-decoration: none;
}

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

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.5rem 1rem;
  font-family: inherit;
  font-size: 0.875rem;
  font-weight: 600;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.2s, color 0.2s;
}

.btn-ghost {
  background: transparent;
  color: var(--ink);
}

.btn-ghost:hover {
  background: var(--surface);
  color: var(--accent);
}

.btn-primary {
  background: var(--accent);
  color: var(--white);
}

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

.hero {
  max-width: var(--max);
  margin: 0 auto;
  padding: 3rem 1.5rem 4rem;
  display: grid;
  grid-template-columns: 1fr;
  gap: 2.5rem;
  align-items: center;
}

@media (min-width: 900px) {
  .hero {
    grid-template-columns: 1fr 1fr;
    padding-top: 4rem;
    padding-bottom: 5rem;
  }
}

.hero-copy h1 {
  font-family: "Fraunces", Georgia, serif;
  font-size: clamp(2rem, 4vw, 2.75rem);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin: 0 0 1rem;
  color: var(--ink);
}

.hero-copy .lede {
  font-size: 1.125rem;
  color: var(--muted);
  margin: 0 0 1.75rem;
  max-width: 36ch;
}

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
}

.hero-cta .btn-primary {
  padding: 0.75rem 1.35rem;
  font-size: 1rem;
}

.hero-media {
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  aspect-ratio: 4 / 3;
  background: var(--border);
}

.hero-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Sections */
.section {
  max-width: var(--max);
  margin: 0 auto;
  padding: 3rem 1.5rem;
}

.section-header {
  margin-bottom: 2rem;
}

.section-header h2 {
  font-family: "Fraunces", Georgia, serif;
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 600;
  margin: 0 0 0.5rem;
  color: var(--ink);
}

.section-header p {
  margin: 0;
  color: var(--muted);
  max-width: 50ch;
}

.card-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}

@media (min-width: 640px) {
  .card-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.card {
  background: var(--white);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(15, 20, 25, 0.04);
  transition: box-shadow 0.2s, transform 0.2s;
}

.card:hover {
  box-shadow: var(--shadow);
  transform: translateY(-2px);
}

.card-image {
  aspect-ratio: 4 / 3;
  background: var(--surface);
}

.card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.card-body {
  padding: 1.25rem 1.35rem 1.5rem;
}

.card-body h3 {
  font-size: 1.0625rem;
  font-weight: 600;
  margin: 0 0 0.35rem;
}

.card-body p {
  font-size: 0.9375rem;
  color: var(--muted);
  margin: 0 0 1rem;
}

.card-body a {
  font-size: 0.875rem;
  font-weight: 600;
  text-decoration: none;
}

.about-band {
  background: linear-gradient(135deg, #1e4d6b 0%, #2a6a8f 100%);
  color: var(--white);
}

.about-band .section-header h2,
.about-band .section-header p {
  color: rgba(255, 255, 255, 0.95);
}

.about-band .section-header p {
  opacity: 0.9;
}

.about-band .section-header {
  margin-bottom: 0;
}

.about-inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 3rem 1.5rem;
  display: grid;
  gap: 2rem;
  align-items: center;
}

@media (min-width: 768px) {
  .about-inner {
    grid-template-columns: 1fr 1fr;
  }
}

.about-inner .about-stats {
  grid-column: 1 / -1;
}

.about-text p {
  margin: 0 0 1rem;
  opacity: 0.92;
  line-height: 1.7;
}

.about-text a {
  color: #fff;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 4px;
}

.about-text a:hover {
  opacity: 0.85;
}

.about-stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.25rem;
}

.stat {
  background: rgba(255, 255, 255, 0.12);
  border-radius: var(--radius);
  padding: 1.25rem;
  text-align: center;
}

.stat strong {
  display: block;
  font-family: "Fraunces", Georgia, serif;
  font-size: 1.75rem;
  margin-bottom: 0.25rem;
}

.stat span {
  font-size: 0.8125rem;
  opacity: 0.9;
}

.checkout-cta {
  text-align: center;
  padding: 3.5rem 1.5rem;
  background: var(--white);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.checkout-cta h2 {
  font-family: "Fraunces", Georgia, serif;
  font-size: clamp(1.5rem, 3vw, 1.85rem);
  margin: 0 0 0.75rem;
}

.checkout-cta p {
  color: var(--muted);
  margin: 0 auto 1.5rem;
  max-width: 42ch;
}

.site-footer {
  background: var(--ink);
  color: rgba(255, 255, 255, 0.85);
  padding: 3rem 1.5rem 2rem;
}

.footer-inner {
  max-width: var(--max);
  margin: 0 auto;
  display: grid;
  gap: 2rem;
}

@media (min-width: 640px) {
  .footer-inner {
    grid-template-columns: 1fr 1fr;
  }
}

.footer-brand {
  font-family: "Fraunces", Georgia, serif;
  font-weight: 700;
  font-size: 1.125rem;
  color: var(--white);
  margin: 0 0 0.75rem;
}

.footer-inner p {
  margin: 0 0 0.5rem;
  font-size: 0.9375rem;
  line-height: 1.6;
}

.footer-inner a {
  color: #a8c5d9;
  text-decoration: none;
}

.footer-inner a:hover {
  color: var(--white);
  text-decoration: underline;
}

.footer-bottom {
  grid-column: 1 / -1;
  padding-top: 2rem;
  margin-top: 0.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  font-size: 0.8125rem;
  color: rgba(255, 255, 255, 0.55);
}

.nav-main a[aria-current="page"] {
  color: var(--accent);
}

.cart-link {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--ink);
  text-decoration: none;
  text-transform: capitalize;
}

.cart-link:hover {
  color: var(--accent);
}

.cart-badge {
  min-width: 1.25rem;
  height: 1.25rem;
  padding: 0 0.35rem;
  border-radius: 999px;
  background: var(--accent);
  color: var(--white);
  font-size: 0.75rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

.cart-badge[data-empty="true"] {
  display: none;
}

.checkout-cta-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
  justify-content: center;
}

.page-main {
  max-width: var(--max);
  margin: 0 auto;
  padding: 2.5rem 1.5rem 4rem;
}

.page-hero {
  margin-bottom: 2.5rem;
  max-width: 52ch;
}

.page-hero h1 {
  font-family: "Fraunces", Georgia, serif;
  font-size: clamp(1.85rem, 4vw, 2.35rem);
  font-weight: 700;
  margin: 0 0 0.75rem;
  letter-spacing: -0.02em;
}

.page-lede {
  margin: 0;
  color: var(--muted);
  font-size: 1.0625rem;
}

.page-section {
  margin-bottom: 2.5rem;
}

.page-section h2 {
  font-family: "Fraunces", Georgia, serif;
  font-size: 1.35rem;
  margin: 0 0 1rem;
}

.prose p {
  margin: 0 0 1rem;
  color: var(--muted);
}

.prose p:last-child {
  margin-bottom: 0;
}

.muted-band {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.75rem 1.5rem;
}

.value-list {
  margin: 0;
  padding-left: 1.25rem;
  color: var(--muted);
}

.value-list li {
  margin-bottom: 0.75rem;
}

.value-list li:last-child {
  margin-bottom: 0;
}

.inventory-toolbar {
  margin-bottom: 2rem;
}

.inventory-section .section-header {
  margin-bottom: 1.5rem;
}

.product-grid {
  grid-template-columns: 1fr;
}

@media (min-width: 640px) {
  .product-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.product-card .add-to-cart {
  width: 100%;
  margin-top: 0.25rem;
}

.product-price {
  font-family: "Fraunces", Georgia, serif;
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--ink);
  margin: 0 0 0.5rem;
}

.checkout-layout {
  display: grid;
  gap: 1.5rem;
  align-items: start;
}

@media (min-width: 960px) {
  .checkout-layout {
    grid-template-columns: 1.15fr 0.85fr;
  }
}

.checkout-card {
  padding: 1.5rem;
}

.checkout-card h2 {
  font-family: "Fraunces", Georgia, serif;
  font-size: 1.25rem;
  margin: 0 0 1.25rem;
}

.cart-lines {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.cart-empty {
  text-align: center;
  padding: 1rem 0 0.5rem;
}

.cart-empty p {
  color: var(--muted);
  margin: 0 0 1rem;
}

.cart-line {
  display: grid;
  gap: 0.75rem 1rem;
  grid-template-columns: 80px 1fr;
  grid-template-areas:
    "media info"
    "media qty"
    "total remove";
  align-items: center;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid var(--border);
}

.cart-line:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

@media (min-width: 720px) {
  .cart-line {
    grid-template-columns: 88px 1fr auto auto auto;
    grid-template-areas:
      "media info qty total remove";
  }
}

.cart-line-media {
  grid-area: media;
  border-radius: 8px;
  overflow: hidden;
  background: var(--surface);
  aspect-ratio: 4 / 3;
  align-self: start;
}

.cart-line-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.cart-line-info {
  grid-area: info;
  min-width: 0;
}

.cart-line-name {
  font-weight: 600;
  color: var(--ink);
  text-decoration: none;
}

.cart-line-name:hover {
  color: var(--accent);
}

.cart-line-meta {
  font-size: 0.875rem;
  color: var(--muted);
  margin-top: 0.25rem;
}

.cart-line-qty {
  grid-area: qty;
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

@media (min-width: 720px) {
  .cart-line-qty {
    justify-self: center;
  }
}

.qty-btn {
  min-width: 2.25rem;
  padding: 0.35rem 0.5rem;
  font-size: 1.125rem;
  line-height: 1;
}

.qty-input {
  width: 3rem;
  padding: 0.4rem 0.35rem;
  font: inherit;
  text-align: center;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--white);
}

.cart-line-total {
  grid-area: total;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.cart-remove {
  grid-area: remove;
  font-size: 0.875rem;
  justify-self: end;
}

.summary-rows {
  margin: 0;
}

.summary-row {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.5rem 0;
  font-size: 0.9375rem;
}

.summary-row dt {
  margin: 0;
  color: var(--muted);
  font-weight: 500;
}

.summary-row dd {
  margin: 0;
  font-variant-numeric: tabular-nums;
}

.summary-total {
  border-top: 1px solid var(--border);
  margin-top: 0.5rem;
  padding-top: 1rem;
  font-weight: 600;
  font-size: 1.0625rem;
}

.summary-total dt {
  color: var(--ink);
}

.checkout-side {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.checkout-form h2 {
  margin-bottom: 1rem;
}

.form-fieldset {
  border: none;
  margin: 0 0 1.25rem;
  padding: 0;
}

.form-fieldset legend {
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.radio-label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
  font-size: 0.9375rem;
  cursor: pointer;
}

.form-label {
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
  margin-bottom: 1rem;
}

.form-input {
  display: block;
  width: 100%;
  margin-top: 0.35rem;
  padding: 0.55rem 0.65rem;
  font: inherit;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--white);
}

.form-textarea {
  resize: vertical;
  min-height: 5rem;
}

.btn-block {
  width: 100%;
  margin-top: 0.5rem;
  padding: 0.65rem 1rem;
}

.form-hint {
  margin: 1rem 0 0;
  font-size: 0.8125rem;
  color: var(--muted);
}

.form-success {
  margin: 0 0 1rem;
  padding: 0.75rem 1rem;
  border-radius: 8px;
  background: rgba(30, 77, 107, 0.08);
  color: var(--accent);
  font-size: 0.9375rem;
}

.contact-grid {
  display: grid;
  gap: 1.5rem;
  margin-bottom: 2.5rem;
}

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

.contact-card {
  padding: 1.5rem;
}

.contact-card h2 {
  font-family: "Fraunces", Georgia, serif;
  font-size: 1.2rem;
  margin: 0 0 1rem;
}

.contact-address {
  font-style: normal;
}

.contact-address p {
  margin: 0 0 0.5rem;
  font-size: 1.0625rem;
}

.contact-address p:last-child {
  margin-bottom: 0;
}

.contact-card-hint {
  margin-top: 1rem;
}

.contact-hours-lead {
  margin: 0 0 0.75rem;
}

.contact-hours-note {
  margin: 0;
}

.contact-mailto-wrap {
  margin-top: 1rem;
}


.about-figure {
  margin: 0 0 2.5rem;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  background: var(--white);
  border: 1px solid var(--border);
}

.about-figure img {
  width: 100%;
  aspect-ratio: 16 / 7;
  object-fit: cover;
  display: block;
}

.about-figure figcaption {
  padding: 0.6rem 1rem;
  font-size: 0.875rem;
  color: var(--muted);
  line-height: 1.5;
  border-top: 1px solid var(--border);
}

.about-figure-pair {
  display: grid;
  gap: 1.5rem;
  margin-bottom: 2.5rem;
}

@media (min-width: 720px) {
  .about-figure-pair {
    grid-template-columns: 1fr 1fr;
  }
}

.about-figure-pair .about-figure {
  margin-bottom: 0;
}

.about-figure-pair .about-figure img {
  aspect-ratio: 4 / 3;
}

.product-specs {
  margin: 0.5rem 0 0.75rem;
  padding: 0.6rem 0.75rem;
  background: var(--surface);
  border-radius: 6px;
  font-size: 0.8125rem;
}

.spec-row {
  display: flex;
  gap: 0.4rem;
  margin-bottom: 0.2rem;
  line-height: 1.5;
}

.spec-row:last-child {
  margin-bottom: 0;
}

.spec-row dt {
  font-weight: 600;
  color: var(--ink);
  flex-shrink: 0;
}

.spec-row dt::after {
  content: ":";
}

.spec-row dd {
  margin: 0;
  color: var(--muted);
}

:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
  border-radius: 3px;
}

.page-lede {
  color: #3d4b58;
}

.form-hint {
  color: #3d4b58;
}
