:root {
  --bg-paper: #FAF9F6;
  --bg-card: #FFFFFF;
  --ink: #111111;
  --muted: #555555;
  --line-subtle: #D8D6D0;
  --font-display: "Special Elite", "Courier New", Courier, monospace;
  --font-mono: "IBM Plex Mono", "Courier New", Courier, monospace;
  --font-sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --max-width: 1160px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
  border-radius: 0 !important;
}

html {
  scroll-behavior: smooth;
  background-color: var(--bg-paper);
  color: var(--ink);
  font-size: 16px;
}

body {
  margin: 0;
  background-color: var(--bg-paper);
  color: var(--ink);
  font-family: var(--font-sans);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

img,
video {
  display: block;
  max-width: 100%;
  height: auto;
}

a {
  color: var(--ink);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
  text-underline-offset: 4px;
}

.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

/* Top Apiary Metadata Strip */
.top-strip {
  background-color: var(--ink);
  color: var(--bg-paper);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 8px 16px;
  text-align: center;
}

/* Clinical Navigation */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background-color: var(--bg-paper);
  border-bottom: 2px solid var(--ink);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 15px 0;
  flex-wrap: wrap;
}

.brand-wordmark {
  font-family: var(--font-display);
  font-size: 1.4rem;
  letter-spacing: 0.02em;
  line-height: 1.1;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 22px;
  flex-wrap: wrap;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.nav-cta {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border: 1.5px solid var(--ink);
  padding: 6px 14px;
  background-color: var(--ink);
  color: var(--bg-paper);
  white-space: nowrap;
  transition: background-color 0.15s ease, color 0.15s ease;
}

.nav-cta:hover {
  background-color: var(--bg-card);
  color: var(--ink);
  text-decoration: none;
}

/* Typography helpers */
.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.74rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 10px 0;
}

.display-title {
  font-family: var(--font-display);
  font-weight: 400;
  color: var(--ink);
  margin: 0;
  line-height: 1.05;
}

.rule-heavy {
  border: 0;
  border-top: 2px solid var(--ink);
  margin: 16px 0;
}

/* Buttons */
.btn-group {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 24px;
}

.btn {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 13px 22px;
  border: 1.5px solid var(--ink);
  cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease;
  text-decoration: none;
  text-align: center;
  max-width: 100%;
}

.btn-primary {
  background-color: var(--ink);
  color: var(--bg-paper);
}

.btn-primary:hover {
  background-color: var(--bg-card);
  color: var(--ink);
  text-decoration: none;
}

.btn-secondary {
  background-color: var(--bg-card);
  color: var(--ink);
}

.btn-secondary:hover {
  background-color: var(--ink);
  color: var(--bg-paper);
  text-decoration: none;
}

/* Hero Section */
.hero {
  position: relative;
  overflow: hidden;
  padding: 56px 0 64px 0;
  border-bottom: 2px solid var(--ink);
  background-color: var(--bg-paper);
}

.banner-bg-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 2;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 36px;
  align-items: start;
}

.hero-grid > *,
.product-grid > *,
.order-wrapper > *,
.form-row-split > *,
.gallery-grid > *,
.brood-grid-landscape > *,
.brood-grid-portrait > * {
  min-width: 0;
}

.hero-card {
  background-color: var(--bg-card);
  border: 1.5px solid var(--ink);
  padding: 32px;
}

.hero-card h1 {
  font-size: clamp(2.3rem, 4.4vw, 3.4rem);
}

.hero-sub {
  font-size: 0.98rem;
  color: var(--ink);
  margin: 16px 0 22px 0;
  max-width: 52ch;
}

.schematic-box {
  border: 1px solid var(--ink);
  background-color: var(--bg-paper);
  padding: 16px;
}

.schematic-box svg {
  width: 100%;
  height: auto;
  display: block;
}

.schematic-caption {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--muted);
  margin: 10px 0 0 0;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
}

.hero-right-stack {
  display: grid;
  gap: 16px;
}

/* Specimen Figure */
.specimen-frame {
  margin: 0;
  background-color: var(--bg-card);
  border: 1.5px solid var(--ink);
  padding: 12px;
}

.specimen-frame img,
.specimen-frame video {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border: 1px solid var(--line-subtle);
}

.specimen-frame.portrait img,
.specimen-frame.portrait video {
  aspect-ratio: 3 / 4;
}

.specimen-frame.wide img {
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.specimen-frame.label-frame img {
  aspect-ratio: 3 / 4;
  object-fit: contain;
  background-color: #FFFFFF;
}

.specimen-caption {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
  padding-top: 10px;
  display: flex;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

/* Product Sections */
.section {
  padding: 64px 0;
  border-bottom: 2px solid var(--ink);
}

.product-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 12px;
}

.product-header h2 {
  font-size: clamp(2rem, 3.6vw, 2.9rem);
}

.product-price-tag {
  font-family: var(--font-mono);
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.03em;
}

/* 3-Column Label Attribute Bar */
.attr-bar {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border: 1.5px solid var(--ink);
  background-color: var(--bg-card);
  margin: 20px 0 32px 0;
}

.attr-cell {
  font-family: var(--font-mono);
  font-size: 0.84rem;
  text-align: center;
  padding: 12px 10px;
  border-right: 1.5px solid var(--ink);
}

.attr-cell:last-child {
  border-right: 0;
}

.product-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 36px;
  align-items: start;
}

.media-stack {
  display: grid;
  gap: 16px;
}

.media-pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.media-pair.square-pair .specimen-frame img {
  aspect-ratio: 1 / 1;
  object-fit: cover;
}

.spec-panel {
  background-color: var(--bg-card);
  border: 1.5px solid var(--ink);
  padding: 28px;
}

.spec-panel p.lead {
  margin: 0 0 20px 0;
  font-size: 0.96rem;
}

.spec-table {
  width: 100%;
  border-collapse: collapse;
  border: 1px solid var(--ink);
  font-family: var(--font-mono);
  font-size: 0.8rem;
}

.spec-table th,
.spec-table td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--ink);
  text-align: left;
  vertical-align: top;
}

.spec-table tr:last-child th,
.spec-table tr:last-child td {
  border-bottom: 0;
}

.spec-table th {
  width: 34%;
  font-weight: 600;
  background-color: var(--bg-paper);
  border-right: 1px solid var(--ink);
}

/* Brood Pattern Documentation (Section 02) */
.brood-showcase {
  margin-top: 36px;
  padding-top: 28px;
  border-top: 1.5px solid var(--ink);
}

.brood-showcase-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 8px 24px;
  margin-bottom: 20px;
}

.brood-showcase-header .eyebrow {
  margin: 0;
}

.brood-showcase-note {
  margin: 0;
  font-size: 0.9rem;
  color: var(--muted);
}

.brood-grid-landscape {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  margin-bottom: 20px;
}

.brood-grid-portrait {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

/* Full-Bleed Apiary Motion Interlude */
.motion-banner {
  position: relative;
  overflow: hidden;
  min-height: 400px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 56px 24px;
  border-bottom: 2px solid var(--ink);
  background-color: #1A1A1A;
}

.banner-veil {
  position: absolute;
  inset: 0;
  background: rgba(17, 17, 17, 0.34);
  pointer-events: none;
}

.motion-placard {
  position: relative;
  z-index: 2;
  background-color: rgba(250, 249, 246, 0.94);
  border: 1.5px solid var(--ink);
  padding: 28px 34px;
  max-width: 640px;
  width: 100%;
  text-align: center;
}

.motion-placard h2 {
  font-size: clamp(1.7rem, 3vw, 2.3rem);
  margin-bottom: 10px;
}

.motion-placard p.placard-meta {
  font-family: var(--font-mono);
  font-size: 0.76rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0;
}

/* Field Documentation Gallery */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-top: 28px;
}

.gallery-grid .specimen-frame img {
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

/* Direct Order Request Form */
.order-wrapper {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 32px;
  margin-top: 28px;
  align-items: start;
}

.order-wrapper.single-column {
  grid-template-columns: 1fr;
  max-width: 760px;
  margin: 28px auto 0 auto;
}

.form-box,
.summary-box {
  background-color: var(--bg-card);
  border: 1.5px solid var(--ink);
  padding: 28px;
}

.form-row {
  margin-bottom: 18px;
}

.form-row-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

label {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.76rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 6px;
}

input[type="text"],
input[type="email"],
input[type="number"],
textarea {
  display: block;
  width: 100%;
  max-width: 100%;
  padding: 11px 12px;
  border: 1.5px solid var(--ink);
  background-color: var(--bg-paper);
  color: var(--ink);
  font-family: var(--font-mono);
  font-size: 1rem;
  line-height: 1.45;
  appearance: none;
  -webkit-appearance: none;
  box-shadow: none;
}

textarea {
  resize: vertical;
  min-height: 108px;
  overflow-y: auto;
}

input:focus,
textarea:focus {
  outline: 2px solid var(--ink);
  outline-offset: 1px;
  background-color: var(--bg-card);
}

.qty-card {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 14px;
  border: 1px solid var(--ink);
  background-color: var(--bg-paper);
  margin-bottom: 14px;
}

.qty-info strong {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.86rem;
}

.qty-info span {
  font-family: var(--font-mono);
  font-size: 0.76rem;
  color: var(--muted);
}

.qty-card input[type="number"] {
  width: 88px;
  text-align: center;
  background-color: var(--bg-card);
}

.estimate-bar {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  border-top: 2px solid var(--ink);
  border-bottom: 2px solid var(--ink);
  padding: 14px 0;
  margin: 20px 0 12px 0;
  font-family: var(--font-mono);
}

.estimate-bar .total-val {
  font-size: 1.35rem;
  font-weight: 600;
}

.estimate-subline {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--ink);
  margin: 0 0 6px 0;
}

.order-result {
  margin-top: 18px;
  padding: 16px;
  border: 1.5px solid var(--ink);
  background-color: var(--bg-paper);
}

.order-result p {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  margin: 0 0 12px 0;
}

.order-result-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.order-preview-text {
  width: 100%;
  max-width: 100%;
  min-height: 220px;
  padding: 14px;
  border: 1px solid var(--ink);
  background-color: var(--bg-paper);
  font-family: var(--font-mono);
  font-size: 0.78rem;
  line-height: 1.5;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  word-break: break-word;
  overflow-x: auto;
  margin: 14px 0;
}

.copy-feedback {
  font-family: var(--font-mono);
  font-size: 0.76rem;
  color: var(--ink);
  margin-top: 10px;
  min-height: 1.2em;
}

.btn:disabled,
.btn[disabled] {
  opacity: 0.48;
  cursor: not-allowed;
  pointer-events: none;
}

.stock-readout {
  margin: 18px 0 0 0;
  padding: 10px 12px;
  border: 1px solid var(--ink);
  background-color: var(--bg-paper);
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.stock-readout.sold-out {
  background-color: var(--ink);
  color: var(--bg-paper);
  font-weight: 600;
}

.qty-limit-note {
  display: inline-block;
  font-weight: 600;
  color: var(--ink);
}

/* Footer */
.site-footer {
  padding: 36px 0 48px 0;
  font-family: var(--font-mono);
  font-size: 0.78rem;
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}

/* Reduced Motion Respect */
@media (prefers-reduced-motion: reduce) {
  .banner-bg-video {
    display: none;
  }

  .motion-banner {
    background-image: url("images/poster-apiary-loop.jpg");
    background-size: cover;
    background-position: center;
  }
}

/* Responsive Breakpoints */
@media (max-width: 960px) {
  .hero-grid,
  .product-grid,
  .order-wrapper {
    grid-template-columns: 1fr;
  }

  .gallery-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 760px) {
  .brood-grid-landscape,
  .brood-grid-portrait {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .container {
    padding: 0 16px;
  }

  .attr-bar,
  .media-pair,
  .gallery-grid,
  .form-row-split {
    grid-template-columns: 1fr;
  }

  .attr-cell {
    border-right: 0;
    border-bottom: 1.5px solid var(--ink);
  }

  .attr-cell:last-child {
    border-bottom: 0;
  }

  .btn {
    width: 100%;
    padding: 13px 16px;
  }

  .qty-card {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }

  .qty-card input[type="number"] {
    width: 110px;
  }

  .hero {
    padding: 36px 0 44px 0;
  }

  .section {
    padding: 44px 0;
  }

  .hero-card,
  .spec-panel,
  .form-box,
  .summary-box,
  .motion-placard {
    padding: 20px;
  }
}


/* Dev Staging Top Banner */
.top-strip.dev-strip {
  background-color: #5A1A1A;
  color: #FAF9F6;
}

.nav-links a[aria-current="page"] {
  text-decoration: underline;
  text-underline-offset: 5px;
  text-decoration-thickness: 2px;
  font-weight: 600;
}

/* Keep Field Station looping video visible even when OS Reduced Motion / Battery Saver is active */
@media (prefers-reduced-motion: reduce) {
  .banner-bg-video {
    display: block !important;
  }
}

/* Embedded V5 Waggle Dance Diagram */
.wd-svg {
  width: 100%;
  height: auto;
  display: block;
}

/* Home Page 2-Card Apiary Allocation Overview */
.shop-overview-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 28px;
  margin-top: 28px;
}

.shop-overview-grid > * {
  min-width: 0;
}

.overview-card {
  background-color: var(--bg-card);
  border: 1.5px solid var(--ink);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.overview-card .specimen-frame {
  padding: 0;
  border: 0;
}

.overview-card .specimen-frame img {
  aspect-ratio: 4 / 3;
}

.overview-card h3 {
  font-family: var(--font-display);
  font-size: 1.65rem;
  font-weight: 400;
  margin: 0;
  line-height: 1.1;
}

.overview-meta {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--muted);
  margin: 0;
}

.overview-card .btn-group {
  margin-top: auto;
  padding-top: 8px;
}

/* Accident-Proof Stepper & Notices */
.add-basket-panel {
  margin-top: 20px;
  padding: 18px;
  border: 1.5px solid var(--ink);
  background-color: var(--bg-paper);
}

.stepper-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
}

.stepper-box {
  display: inline-flex;
  align-items: center;
  border: 1.5px solid var(--ink);
  background-color: var(--bg-card);
}

.stepper-btn {
  width: 42px;
  height: 42px;
  border: 0;
  background-color: var(--bg-card);
  color: var(--ink);
  font-family: var(--font-mono);
  font-size: 1.15rem;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.stepper-btn:hover:not(:disabled) {
  background-color: var(--ink);
  color: var(--bg-paper);
}

.stepper-btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.stepper-val {
  min-width: 44px;
  text-align: center;
  font-family: var(--font-mono);
  font-size: 1rem;
  font-weight: 600;
  border-left: 1px solid var(--ink);
  border-right: 1px solid var(--ink);
  line-height: 42px;
  padding: 0 8px;
}

.stepper-box.compact .stepper-btn {
  width: 34px;
  height: 34px;
  font-size: 1rem;
}

.stepper-box.compact .stepper-val {
  min-width: 34px;
  line-height: 34px;
  font-size: 0.9rem;
}

.qty-warning {
  margin: 14px 0 0 0;
  padding: 12px 14px;
  border: 1.5px solid #5A1A1A;
  background-color: #FFF7F5;
  color: #5A1A1A;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  line-height: 1.5;
}

.notice-banner {
  margin: 22px 0;
  padding: 18px 20px;
  border: 1.5px solid var(--ink);
  background-color: #FFFDF7;
}

.notice-banner strong {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 6px;
}

.notice-banner p {
  margin: 0;
  font-size: 0.92rem;
}

/* Basket Page */
.basket-container {
  max-width: 780px;
  margin: 28px auto 0 auto;
}

.basket-empty {
  background-color: var(--bg-card);
  border: 1.5px solid var(--ink);
  padding: 32px;
  text-align: center;
}

.basket-list {
  display: grid;
  gap: 14px;
}

.basket-item {
  display: grid;
  grid-template-columns: 76px 1fr auto;
  gap: 16px;
  align-items: center;
  background-color: var(--bg-card);
  border: 1.5px solid var(--ink);
  padding: 14px 16px;
}

.basket-item > * {
  min-width: 0;
}

.basket-thumb {
  width: 76px;
  height: 76px;
  object-fit: cover;
  border: 1px solid var(--line-subtle);
}

.basket-item-info strong {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.9rem;
  margin-bottom: 4px;
}

.basket-item-info span {
  font-family: var(--font-mono);
  font-size: 0.76rem;
  color: var(--muted);
}

.basket-item-actions {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}

.basket-line-price {
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: 0.92rem;
  min-width: 90px;
  text-align: right;
}

.remove-link {
  background: none;
  border: 0;
  padding: 4px 0;
  font-family: var(--font-mono);
  font-size: 0.74rem;
  text-transform: uppercase;
  text-decoration: underline;
  color: var(--muted);
  cursor: pointer;
}

.remove-link:hover {
  color: var(--ink);
}

.basket-totals-box {
  background-color: var(--bg-card);
  border: 1.5px solid var(--ink);
  padding: 20px 24px;
  margin-top: 16px;
}

.checkout-single {
  margin-top: 20px;
}

.checkout-option-card {
  background-color: var(--bg-card);
  border: 1.5px solid var(--ink);
  padding: 24px;
}

.checkout-option-card h3 {
  font-family: var(--font-display);
  font-size: 1.45rem;
  font-weight: 400;
  margin: 4px 0 10px 0;
}

@media (max-width: 820px) {
  .shop-overview-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .basket-item {
    grid-template-columns: 60px 1fr;
    gap: 12px;
  }

  .basket-thumb {
    width: 60px;
    height: 60px;
  }

  .basket-item-actions {
    grid-column: 1 / -1;
    justify-content: space-between;
  }

  .basket-line-price {
    min-width: 0;
    text-align: left;
  }
}


/* Subtle Footer & Checkout Review Prompt */
.review-quiet-box {
  margin-top: 28px;
  padding: 16px 18px;
  border: 1px solid var(--line-subtle);
  background-color: var(--bg-paper);
  display: flex;
  align-items: center;
  gap: 18px;
}

.review-qr-img {
  width: 88px;
  height: 88px;
  flex-shrink: 0;
  padding: 8px;
  background-color: #FFFFFF;
  border: 1px solid var(--line-subtle);
  image-rendering: pixelated;
}

.review-quiet-copy p {
  margin: 0 0 6px 0;
  font-size: 0.86rem;
  color: var(--muted);
}

.review-quiet-link {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  text-decoration: underline;
  text-underline-offset: 4px;
}

@media (max-width: 520px) {
  .review-quiet-box {
    flex-direction: column;
    align-items: flex-start;
  }
}
