@font-face {
  font-family: "IBM Plex Sans";
  src: url("/assets/fonts/ibm-plex-sans-400.ttf") format("truetype");
  font-display: swap;
  font-style: normal;
  font-weight: 400;
}

@font-face {
  font-family: "IBM Plex Sans";
  src: url("/assets/fonts/ibm-plex-sans-500.ttf") format("truetype");
  font-display: swap;
  font-style: normal;
  font-weight: 500;
}

@font-face {
  font-family: "IBM Plex Sans";
  src: url("/assets/fonts/ibm-plex-sans-600.ttf") format("truetype");
  font-display: swap;
  font-style: normal;
  font-weight: 600;
}

@font-face {
  font-family: "IBM Plex Sans";
  src: url("/assets/fonts/ibm-plex-sans-700.ttf") format("truetype");
  font-display: swap;
  font-style: normal;
  font-weight: 700;
}

@font-face {
  font-family: "IBM Plex Serif";
  src: url("/assets/fonts/ibm-plex-serif-500.ttf") format("truetype");
  font-display: swap;
  font-style: normal;
  font-weight: 500;
}

@font-face {
  font-family: "IBM Plex Serif";
  src: url("/assets/fonts/ibm-plex-serif-600.ttf") format("truetype");
  font-display: swap;
  font-style: normal;
  font-weight: 600;
}

/* ─── Design Tokens ───────────────────────────────────────── */
:root {
  --bg: #f4f2ed;
  --surface: #ffffff;
  --surface-tinted: #faf8f4;
  --surface-dark: #1c2b33;
  --text: #1c2b33;
  --text-muted: #5a6b74;
  --line: rgba(28, 43, 51, 0.1);
  --line-strong: rgba(28, 43, 51, 0.18);
  --accent: #b7672b;
  --accent-soft: #f0dfd0;
  --steel: #6b7c84;
  --success: #2f6a57;
  --shadow-sm: 0 1px 3px rgba(28, 43, 51, 0.06), 0 4px 14px rgba(28, 43, 51, 0.06);
  --shadow: 0 4px 16px rgba(28, 43, 51, 0.07), 0 12px 40px rgba(28, 43, 51, 0.08);
  --radius-sm: 10px;
  --radius: 16px;
  --radius-lg: 24px;
  --container: 1180px;
  --gutter: clamp(1rem, 2vw, 1.5rem);
  --space-xs: clamp(0.5rem, 0.8vw, 0.75rem);
  --space-sm: clamp(0.9rem, 1vw, 1.1rem);
  --space-md: clamp(1.25rem, 1.5vw, 1.6rem);
  --space-lg: clamp(1.75rem, 2.5vw, 2.75rem);
  --space-xl: clamp(2.5rem, 4vw, 4.5rem);
  --space-2xl: clamp(4rem, 7vw, 7rem);
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "IBM Plex Sans", sans-serif;
  color: var(--text);
  background-color: var(--bg);
  line-height: 1.65;
  min-height: 100vh;
}

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

a {
  color: inherit;
  text-decoration-color: rgba(183, 103, 43, 0.45);
  text-underline-offset: 0.2em;
}

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

p,
ul,
ol,
table {
  margin: 0 0 var(--space-md);
}

ul,
ol {
  padding-left: 1.3rem;
}

h1,
h2,
h3,
h4 {
  margin: 0 0 var(--space-sm);
  line-height: 1.15;
  text-wrap: balance;
}

h1,
.display {
  font-family: "IBM Plex Serif", serif;
  font-weight: 600;
  letter-spacing: -0.025em;
}

h1 {
  font-size: clamp(2.2rem, 4.5vw, 3.8rem);
}

h2 {
  font-size: clamp(1.5rem, 2.4vw, 2.2rem);
}

h3 {
  font-size: clamp(1.1rem, 1.6vw, 1.5rem);
}

small,
.eyebrow,
.meta {
  font-size: 0.8rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

/* ─── Accessibility ───────────────────────────────────────── */
.skip-link {
  position: absolute;
  left: 1rem;
  top: -4rem;
  background: var(--surface-dark);
  color: #fff;
  padding: 0.75rem 1.1rem;
  border-radius: 6px;
  z-index: 200;
  text-decoration: none;
  font-size: 0.9rem;
}

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

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ─── Layout shell ────────────────────────────────────────── */
.site-shell {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

main {
  flex: 1;
}

.container {
  width: min(var(--container), calc(100% - 2rem));
  margin: 0 auto;
}

/* ─── Header ──────────────────────────────────────────────── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(244, 242, 237, 0.94);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 4.5rem;
}

/* ─── Brand ───────────────────────────────────────────────── */
.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  flex-shrink: 0;
}

.brand-mark {
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 8px;
  background: linear-gradient(140deg, var(--accent) 0%, #7a3e15 52%, var(--surface-dark) 100%);
  position: relative;
  flex-shrink: 0;
}

.brand-mark::before,
.brand-mark::after {
  content: "";
  position: absolute;
  inset: 0.4rem;
  border: 1.5px solid rgba(255, 255, 255, 0.3);
  border-radius: 4px;
}

.brand-mark::after {
  inset: auto 0.5rem 0.5rem;
  height: 0.22rem;
  background: rgba(255, 255, 255, 0.48);
  border: 0;
  border-radius: 2px;
}

.brand-text {
  display: grid;
  gap: 0.1rem;
}

.brand-title {
  font-weight: 700;
  letter-spacing: -0.02em;
  font-size: 1rem;
  line-height: 1.2;
}

.brand-subtitle {
  color: var(--text-muted);
  font-size: 0.8rem;
  line-height: 1.2;
}

/* ─── Nav toggle (mobile) ─────────────────────────────────── */
.nav-toggle {
  display: none;
  border: 1px solid var(--line-strong);
  background: var(--surface);
  color: var(--text);
  border-radius: 8px;
  width: 2.75rem;
  height: 2.75rem;
  cursor: pointer;
  align-items: center;
  justify-content: center;
}

.nav-toggle-line,
.nav-toggle-line::before,
.nav-toggle-line::after {
  display: block;
  width: 1.15rem;
  height: 2px;
  background: currentColor;
  border-radius: 2px;
  transition: transform 0.2s ease, opacity 0.2s ease;
  margin: 0 auto;
  position: relative;
}

.nav-toggle-line::before,
.nav-toggle-line::after {
  content: "";
  position: absolute;
  left: 0;
}

.nav-toggle-line::before {
  top: -0.38rem;
}

.nav-toggle-line::after {
  top: 0.38rem;
}

/* ─── Navigation ──────────────────────────────────────────── */
.site-nav {
  display: flex;
  align-items: center;
}

.nav-list,
.nav-sublist {
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-list {
  display: flex;
  align-items: center;
  gap: 0.2rem;
}

.nav-item {
  position: relative;
}

.nav-link,
.nav-summary {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.55rem 0.85rem;
  border-radius: 6px;
  text-decoration: none;
  font-size: 0.9rem;
  color: var(--text-muted);
  transition: background-color 0.15s ease, color 0.15s ease;
  cursor: pointer;
  list-style: none;
}

.nav-link[aria-current="page"],
.nav-link:hover,
.nav-summary:hover,
.nav-item[open] > .nav-summary {
  color: var(--text);
  background: rgba(28, 43, 51, 0.07);
}

.nav-summary::-webkit-details-marker {
  display: none;
}

.nav-sublist {
  position: absolute;
  left: 0;
  top: calc(100% + 0.5rem);
  min-width: 17rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 0.4rem;
  box-shadow: var(--shadow);
  z-index: 10;
}

.nav-sublist a {
  display: block;
  padding: 0.72rem 0.85rem;
  border-radius: 6px;
  text-decoration: none;
  font-size: 0.88rem;
  color: var(--text-muted);
  transition: background-color 0.15s, color 0.15s;
}

.nav-sublist a:hover,
.nav-sublist a[aria-current="page"] {
  background: rgba(28, 43, 51, 0.06);
  color: var(--text);
}

/* ─── Page sections ───────────────────────────────────────── */
.page-section {
  padding: var(--space-xl) 0;
}

.page-section-tight {
  padding-top: var(--space-lg);
}

.hero {
  padding: var(--space-xl) 0 var(--space-lg);
}

/* ─── Grids ───────────────────────────────────────────────── */
.hero-grid,
.split-grid,
.content-grid,
.feature-grid,
.gallery-grid,
.overview-grid,
.contact-grid {
  display: grid;
  gap: var(--space-lg);
}

.hero-grid {
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  align-items: start;
}

/* ─── Hero copy: plain, no card ───────────────────────────── */
.hero-copy {
  padding-top: var(--space-sm);
}

.hero-copy p,
.page-hero p {
  max-width: 44rem;
  color: var(--text-muted);
  font-size: clamp(1rem, 1.2vw, 1.08rem);
}

.hero-copy ul {
  color: var(--text-muted);
  font-size: 0.97rem;
}

.hero-copy ul li {
  margin-bottom: 0.3rem;
}

/* ─── Cards ───────────────────────────────────────────────── */
.panel,
.gallery-card,
.legal-shell,
.product-panel,
.overview-panel,
.highlight-card,
.contact-card {
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
  border-radius: var(--radius);
}

.panel,
.legal-shell,
.contact-card,
.overview-panel {
  padding: clamp(1.5rem, 2.5vw, 2.25rem);
}

/* ─── Stat cards ──────────────────────────────────────────── */
.stat-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.75rem;
  margin-top: var(--space-lg);
}

.stat-card {
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
  border-radius: var(--radius-sm);
  padding: 1.25rem 1rem;
}

.stat-value {
  font-size: 2.2rem;
  font-weight: 700;
  letter-spacing: -0.04em;
  color: var(--text);
  line-height: 1;
  margin-bottom: 0.4rem;
}

.stat-label {
  color: var(--text-muted);
  font-size: 0.86rem;
  line-height: 1.4;
}

/* ─── Eyebrow label ───────────────────────────────────────── */
.eyebrow {
  display: inline-flex;
  gap: 0.55rem;
  align-items: center;
  color: var(--accent);
  margin-bottom: var(--space-sm);
  font-weight: 600;
}

.eyebrow::before {
  content: "";
  width: 1.6rem;
  height: 2px;
  background: currentColor;
  border-radius: 2px;
}

/* ─── Hero visual ─────────────────────────────────────────── */
.hero-visual {
  display: grid;
  gap: 0.75rem;
}

.hero-stack {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
}

.highlight-card,
.gallery-card,
.product-panel {
  overflow: hidden;
}

.highlight-card img,
.gallery-card img,
.product-panel img,
.overview-lead img {
  aspect-ratio: 4 / 3;
  object-fit: cover;
  width: 100%;
}

.highlight-card figcaption,
.gallery-card figcaption {
  padding: 0.8rem 1rem 0.9rem;
  color: var(--text-muted);
  font-size: 0.86rem;
  line-height: 1.45;
}

/* ─── Buttons ─────────────────────────────────────────────── */
.hero-actions,
.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: var(--space-lg);
}

.button,
.button-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 2.9rem;
  padding: 0.75rem 1.5rem;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.93rem;
  transition: opacity 0.15s, box-shadow 0.15s, background-color 0.15s;
}

button.button,
button.button-secondary {
  border: 0;
  cursor: pointer;
  font-family: inherit;
}

.button {
  background: var(--surface-dark);
  color: #fff;
  box-shadow: 0 2px 6px rgba(28, 43, 51, 0.18);
}

.button:hover {
  opacity: 0.88;
  box-shadow: 0 4px 14px rgba(28, 43, 51, 0.22);
  text-decoration: none;
}

.button-secondary {
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--line-strong);
}

.button-secondary:hover {
  background: rgba(28, 43, 51, 0.05);
}

.email-reveal:not(.button) {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--accent);
  cursor: pointer;
  font: inherit;
  font-weight: 600;
  vertical-align: middle;
}

.email-reveal-icon {
  width: 1.12em;
  height: 1.12em;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex: 0 0 auto;
}

.email-reveal:not(.button):hover span,
.email-reveal-link:hover {
  text-decoration: underline;
}

/* ─── Section header ──────────────────────────────────────── */
.section-header {
  margin-bottom: var(--space-lg);
  display: grid;
  gap: 0.5rem;
}

.section-header p {
  max-width: 48rem;
  color: var(--text-muted);
}

/* ─── Feature grid (3 panels) ────────────────────────────── */
.feature-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.panel h3,
.product-panel h3 {
  margin-bottom: 0.75rem;
}

/* Accent top border on feature panels */
.feature-grid .panel {
  border-top: 3px solid var(--accent);
  border-top-left-radius: var(--radius);
  border-top-right-radius: var(--radius);
}

.muted {
  color: var(--text-muted);
}

/* ─── Overview / product table section ───────────────────── */
.overview-grid {
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
  align-items: start;
}

.overview-lead {
  display: grid;
  gap: 0.75rem;
}

.overview-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.93rem;
}

.overview-table th,
.overview-table td {
  text-align: left;
  padding: 0.85rem 0.9rem;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}

.overview-table th {
  color: var(--steel);
  font-size: 0.78rem;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.overview-table tr:last-child td {
  border-bottom: 0;
}

.overview-table a {
  text-decoration-color: transparent;
}

.overview-table a:hover {
  text-decoration-color: var(--accent);
}

.code-pill {
  display: inline-flex;
  align-items: center;
  min-width: 4.4rem;
  justify-content: center;
  padding: 0.25rem 0.55rem;
  border-radius: 5px;
  background: var(--accent-soft);
  color: #6b3310;
  font-weight: 600;
  font-size: 0.84rem;
  text-decoration: none;
}

/* ─── Product cards ───────────────────────────────────────── */
.product-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-lg);
}

.product-panel .product-body {
  display: grid;
  gap: 0.75rem;
  padding: 1rem 1.1rem 1.25rem;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.tag {
  display: inline-flex;
  padding: 0.3rem 0.65rem;
  border-radius: 5px;
  background: var(--accent-soft);
  color: #6b3310;
  font-size: 0.82rem;
  font-weight: 500;
}

/* ─── Inner page hero (no card, just text block) ──────────── */
.page-hero {
  padding-bottom: var(--space-md);
  display: grid;
  gap: var(--space-sm);
}

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

.page-hero-meta span {
  display: inline-flex;
  align-items: center;
  padding: 0.3rem 0.75rem;
  background: rgba(28, 43, 51, 0.06);
  border-radius: 5px;
  font-size: 0.86rem;
  color: var(--text-muted);
}

/* ─── Content grid (product detail) ──────────────────────── */
.content-grid {
  grid-template-columns: minmax(0, 0.72fr) minmax(0, 1.28fr);
  align-items: start;
}

.content-aside {
  position: sticky;
  top: 5.5rem;
  display: grid;
  gap: 1rem;
}

.aside-card {
  padding: 1.35rem;
  border-radius: var(--radius-sm);
  background: var(--surface-dark);
  color: #fff;
}

.aside-card .meta {
  color: rgba(255, 255, 255, 0.5);
  margin-bottom: 0.75rem;
  font-size: 0.78rem;
}

.aside-card ul {
  color: rgba(255, 255, 255, 0.8);
  font-size: 0.9rem;
  margin-bottom: 0;
  padding-left: 1.1rem;
}

.aside-card li {
  margin-bottom: 0.4rem;
}

/* ─── Rich text (detail page body) ───────────────────────── */
.rich-text > *:last-child {
  margin-bottom: 0;
}

.rich-text h2,
.rich-text h3 {
  margin-top: var(--space-lg);
}

.inline-figure {
  margin: var(--space-md) 0;
  overflow: hidden;
  border-radius: var(--radius-sm);
  background: var(--surface);
  border: 1px solid var(--line);
}

.inline-figure figcaption {
  padding: 0.75rem 1rem 1rem;
  color: var(--text-muted);
  font-size: 0.88rem;
  line-height: 1.5;
}

/* ─── Gallery ─────────────────────────────────────────────── */
.gallery-grid {
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
}

.gallery-card figcaption {
  padding: 0.75rem 0.9rem 1rem;
  color: var(--text-muted);
  font-size: 0.84rem;
  line-height: 1.5;
}

/* ─── Contact grid ────────────────────────────────────────── */
.contact-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.contact-card h2,
.legal-shell h1 {
  margin-bottom: 1rem;
}

/* ─── Legal shell ─────────────────────────────────────────── */
.legal-shell {
  max-width: 56rem;
}

.legal-shell p,
.legal-shell li {
  color: var(--text-muted);
}

.legal-shell h1 + h2,
.legal-shell h2 + h3 {
  margin-top: 1.75rem;
}

/* ─── Breadcrumbs ─────────────────────────────────────────── */
.breadcrumbs {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  color: var(--text-muted);
  font-size: 0.88rem;
  margin-bottom: var(--space-md);
}

.breadcrumbs a {
  text-decoration: none;
}

.breadcrumbs a:hover {
  text-decoration: underline;
  text-decoration-color: var(--accent);
}

.breadcrumbs span {
  color: rgba(28, 43, 51, 0.28);
}

/* ─── Footer ──────────────────────────────────────────────── */
.site-footer {
  padding: var(--space-xl) 0 var(--space-lg);
  margin-top: auto;
}

.footer-inner {
  display: grid;
  gap: 1rem;
  padding: 1.75rem;
  border-radius: var(--radius);
  background: var(--surface-dark);
  color: rgba(255, 255, 255, 0.7);
}

.footer-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1.5rem;
  flex-wrap: wrap;
  padding-bottom: 1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.footer-top strong {
  color: #fff;
  font-size: 0.97rem;
  letter-spacing: -0.01em;
}

.footer-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
}

.footer-nav a {
  text-decoration: none;
  padding: 0.4rem 0.75rem;
  border-radius: 5px;
  font-size: 0.88rem;
  color: rgba(255, 255, 255, 0.6);
  transition: background-color 0.15s, color 0.15s;
}

.footer-nav a:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.07);
}

.footer-copy {
  font-size: 0.82rem;
  color: rgba(255, 255, 255, 0.38);
}

/* ─── Helpers ─────────────────────────────────────────────── */
.note {
  color: var(--text-muted);
  font-size: 0.88rem;
}

/* ─── Responsive: ≤ 980 px ───────────────────────────────── */
@media (max-width: 980px) {
  .nav-toggle {
    display: inline-flex;
  }

  .site-nav {
    position: absolute;
    inset: calc(100% + 0.4rem) 1rem auto;
    display: none;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow);
    padding: 0.5rem;
  }

  .site-nav.is-open {
    display: block;
  }

  .nav-list {
    display: grid;
    gap: 0.15rem;
  }

  .nav-list,
  .hero-grid,
  .overview-grid,
  .content-grid,
  .contact-grid,
  .product-grid,
  .feature-grid,
  .gallery-grid,
  .hero-stack,
  .stat-row {
    grid-template-columns: 1fr;
  }

  .nav-link,
  .nav-summary {
    width: 100%;
    justify-content: space-between;
    border-radius: 6px;
  }

  .nav-sublist {
    position: static;
    min-width: 0;
    box-shadow: none;
    border: 0;
    background: rgba(28, 43, 51, 0.05);
    margin-top: 0.2rem;
    border-radius: 6px;
  }

  .content-aside {
    position: static;
  }
}

/* ─── Responsive: ≤ 720 px ───────────────────────────────── */
@media (max-width: 720px) {
  .container {
    width: min(var(--container), calc(100% - 1rem));
  }

  .hero,
  .page-section {
    padding: var(--space-lg) 0;
  }

  .panel,
  .overview-panel,
  .legal-shell,
  .contact-card {
    padding: 1.25rem;
  }

  .footer-inner {
    padding: 1.25rem;
  }

  .hero-grid {
    gap: var(--space-md);
  }
}
