/* H4711 Precision Industrial Espresso & Pour-Over Hardware Brand Stylesheet
 * Palette: pure white, cool concrete stone, anodized matte black, brushed steel & walnut accent.
 * Zero external fonts or CDN assets. 0px horizontal overflow across desktop & mobile.
 */

:root {
  --bg: #ffffff;
  --stone: #f2f3f4;
  --stone-deep: #e7e9ec;
  --ink: #141618;
  --ink-soft: #43484f;
  --ink-muted: #666d76;
  --walnut: #7d5638;
  --line: #dcdfe3;
  --line-strong: #b8bec7;
  --danger: #9b2626;
  --ok: #215c45;
  --max-w: 1180px;
  --reading-w: 760px;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
}

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

html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  line-height: 1.7;
  overflow-x: hidden;
  text-rendering: optimizeLegibility;
}

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

a {
  color: inherit;
  text-decoration-color: var(--line-strong);
  text-underline-offset: 0.22em;
}

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

:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 3px;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--ink);
  color: var(--bg);
  padding: 0.75rem 1.25rem;
  z-index: 200;
  text-decoration: none;
  font-size: 0.9rem;
}

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

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

.reading-wrap {
  max-width: var(--reading-w);
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.96);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(8px);
}

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

.brand-mark {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  font-family: var(--mono);
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: 0.42em;
  text-indent: 0.42em;
  color: var(--ink);
  padding: 0.35rem 0.65rem;
  border-left: 3px solid var(--walnut);
  background: var(--stone);
  line-height: 1.15;
  transition: background-color 0.18s ease, color 0.18s ease;
}

.brand-mark:hover {
  background: var(--ink);
  color: var(--bg);
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 1.75rem;
}

.site-nav a {
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--ink-soft);
  padding: 0.25rem 0;
  border-bottom: 2px solid transparent;
  transition: color 0.18s ease, border-color 0.18s ease;
}

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

.nav-toggle {
  display: none;
  appearance: none;
  background: var(--stone);
  border: 1px solid var(--line-strong);
  color: var(--ink);
  padding: 0.45rem 0.85rem;
  font-size: 0.82rem;
  font-family: var(--mono);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  cursor: pointer;
}

/* Typography */
.eyebrow {
  display: inline-block;
  font-family: var(--mono);
  font-size: 0.74rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--walnut);
  margin: 0 0 0.8rem;
  font-weight: 700;
}

.spec-code {
  font-family: var(--mono);
  font-size: 0.88em;
  background: var(--stone);
  padding: 0.1rem 0.35rem;
  border: 1px solid var(--line);
}

h1,
h2,
h3,
h4 {
  font-family: var(--sans);
  font-weight: 600;
  color: var(--ink);
  letter-spacing: -0.025em;
  margin-top: 0;
}

h1 {
  font-size: clamp(2rem, 3.6vw, 3.05rem);
  line-height: 1.14;
  margin-bottom: 1.05rem;
}

h2 {
  font-size: clamp(1.45rem, 2.3vw, 2rem);
  line-height: 1.22;
  margin-bottom: 0.85rem;
}

h3 {
  font-size: 1.16rem;
  line-height: 1.32;
  margin-bottom: 0.5rem;
}

p {
  margin-top: 0;
  margin-bottom: 1.15rem;
  color: var(--ink-soft);
}

.lead {
  font-size: 1.06rem;
  line-height: 1.72;
  color: var(--ink-soft);
}

/* Buttons */
.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  margin-top: 1.5rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.78rem 1.45rem;
  font-size: 0.88rem;
  font-weight: 600;
  font-family: var(--sans);
  letter-spacing: 0.04em;
  text-decoration: none;
  border: 1px solid var(--ink);
  background: var(--ink);
  color: var(--bg);
  cursor: pointer;
  transition: background-color 0.18s ease, border-color 0.18s ease, color 0.18s ease;
}

.btn:hover {
  background: #2c3035;
  border-color: #2c3035;
}

.btn-outline {
  background: var(--bg);
  color: var(--ink);
  border-color: var(--line-strong);
}

.btn-outline:hover {
  background: var(--stone);
  border-color: var(--ink);
}

.btn-small {
  padding: 0.38rem 0.78rem;
  font-size: 0.8rem;
}

/* Sections */
.section {
  padding: 4.4rem 0;
  border-bottom: 1px solid var(--line);
}

.section-stone {
  background: var(--stone);
}

.section-header {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1.25rem;
  margin-bottom: 2.4rem;
}

.section-header p {
  max-width: 560px;
  margin-bottom: 0;
}

/* Hero */
.hero {
  padding: 3.4rem 0 4.4rem;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, var(--stone) 0%, var(--bg) 100%);
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1.15fr);
  gap: 3rem;
  align-items: center;
}

.hero-media {
  margin: 0;
  border: 1px solid var(--line);
  background: var(--bg);
  overflow: hidden;
}

.hero-media img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

.hero-caption {
  padding: 0.78rem 1rem;
  font-size: 0.82rem;
  color: var(--ink-muted);
  border-top: 1px solid var(--line);
  background: var(--bg);
}

/* Spec Bar (Dark Anodized Band) */
.metric-band {
  background: var(--ink);
  color: var(--bg);
}

.metric-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.metric-item {
  padding: 1.65rem 1.35rem;
  border-right: 1px solid rgba(255, 255, 255, 0.14);
}

.metric-item:last-child {
  border-right: 0;
}

.metric-value {
  display: block;
  font-family: var(--mono);
  font-size: 1.32rem;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 0.35rem;
}

.metric-label {
  display: block;
  font-size: 0.83rem;
  color: rgba(255, 255, 255, 0.78);
  line-height: 1.48;
}

/* Cards & Grids */
.pillar-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1.5rem;
}

.guide-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.75rem;
}

.card {
  display: flex;
  flex-direction: column;
  background: var(--bg);
  border: 1px solid var(--line);
  transition: border-color 0.18s ease;
}

.card:hover {
  border-color: var(--ink);
}

.card-media {
  overflow: hidden;
  background: var(--stone);
  border-bottom: 1px solid var(--line);
}

.card-media img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
}

.card-body {
  padding: 1.3rem;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.card-meta {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--walnut);
  margin-bottom: 0.45rem;
  font-weight: 700;
}

.card-body p {
  font-size: 0.92rem;
  margin-bottom: 1rem;
  flex: 1;
}

.card-link {
  font-size: 0.86rem;
  font-weight: 600;
  color: var(--ink);
  text-decoration: none;
  border-bottom: 2px solid var(--walnut);
  align-self: flex-start;
  padding-bottom: 0.1rem;
}

.split-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 3rem;
  align-items: center;
}

.principle-list {
  list-style: none;
  padding: 0;
  margin: 1.4rem 0 0;
  border-top: 1px solid var(--line);
}

.principle-list li {
  padding: 1rem 0;
  border-bottom: 1px solid var(--line);
}

.principle-list strong {
  display: block;
  font-size: 1.02rem;
  color: var(--ink);
  margin-bottom: 0.22rem;
}

.principle-list span {
  font-size: 0.92rem;
  color: var(--ink-soft);
}

/* Inner Page Hero */
.page-hero {
  padding: 3.4rem 0 2.6rem;
  background: var(--stone);
  border-bottom: 1px solid var(--line);
}

.breadcrumb {
  font-family: var(--mono);
  font-size: 0.78rem;
  color: var(--ink-muted);
  margin-bottom: 1rem;
}

.breadcrumb a {
  text-decoration: none;
  color: var(--ink-muted);
}

.breadcrumb a:hover {
  color: var(--ink);
  text-decoration: underline;
}

.page-meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem;
  margin-top: 1.2rem;
  font-family: var(--mono);
  font-size: 0.8rem;
  color: var(--ink-muted);
}

/* Article Layout */
.article-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 3.5rem;
  align-items: start;
}

.article-body h2 {
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--line);
}

.article-body h2:first-child {
  margin-top: 0;
  padding-top: 0;
  border-top: 0;
}

.article-body ul,
.article-body ol {
  padding-left: 1.3rem;
  color: var(--ink-soft);
  margin-bottom: 1.35rem;
}

.article-body li {
  margin-bottom: 0.5rem;
}

.article-figure {
  margin: 2rem 0;
  border: 1px solid var(--line);
  background: var(--bg);
}

.article-figure img {
  width: 100%;
}

.article-figure figcaption {
  padding: 0.75rem 1rem;
  font-size: 0.83rem;
  color: var(--ink-muted);
  border-top: 1px solid var(--line);
}

.photo-pair {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.25rem;
  margin: 2rem 0;
}

.photo-pair figure {
  margin: 0;
  border: 1px solid var(--line);
  background: var(--bg);
}

.photo-pair img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
}

.photo-pair figcaption {
  padding: 0.65rem 0.9rem;
  font-size: 0.82rem;
  color: var(--ink-muted);
  border-top: 1px solid var(--line);
}

.sidebar-box {
  border: 1px solid var(--line);
  background: var(--stone);
  padding: 1.4rem;
  margin-bottom: 1.5rem;
}

.sidebar-box h3 {
  font-size: 1rem;
  margin-bottom: 0.75rem;
  letter-spacing: 0.02em;
}

.sidebar-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.sidebar-list li {
  padding: 0.48rem 0;
  border-bottom: 1px solid var(--line);
  font-size: 0.88rem;
}

.sidebar-list li:last-child {
  border-bottom: 0;
}

.sidebar-list a {
  text-decoration: none;
  color: var(--ink-soft);
}

.sidebar-list a:hover {
  color: var(--ink);
  text-decoration: underline;
}

/* Tables & Callouts */
.table-wrap {
  width: 100%;
  overflow-x: auto;
  margin: 1.5rem 0 2rem;
  border: 1px solid var(--line);
}

table {
  width: 100%;
  border-collapse: collapse;
  background: var(--bg);
  font-size: 0.91rem;
}

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

th {
  background: var(--stone);
  font-family: var(--mono);
  font-weight: 700;
  color: var(--ink);
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

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

.callout {
  border-left: 3px solid var(--walnut);
  background: var(--stone);
  padding: 1.15rem 1.35rem;
  margin: 1.75rem 0;
}

.callout strong {
  display: block;
  color: var(--ink);
  margin-bottom: 0.35rem;
  font-size: 0.95rem;
}

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

/* Contact */
.contact-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.15fr);
  gap: 3rem;
  align-items: start;
}

.info-panel {
  border: 1px solid var(--line);
  background: var(--stone);
  padding: 1.75rem;
}

.info-row {
  padding: 0.95rem 0;
  border-bottom: 1px solid var(--line);
}

.info-row:first-child {
  padding-top: 0;
}

.info-row:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.info-label {
  display: block;
  font-family: var(--mono);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--walnut);
  margin-bottom: 0.3rem;
  font-weight: 700;
}

.form-panel {
  border: 1px solid var(--line);
  background: var(--bg);
  padding: 2rem;
}

.form-panel fieldset {
  border: 0;
  padding: 0;
  margin: 0;
}

.field {
  margin-bottom: 1.25rem;
}

.field label {
  display: block;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 0.4rem;
}

.field input,
.field select,
.field textarea {
  width: 100%;
  padding: 0.72rem 0.85rem;
  font-family: var(--sans);
  font-size: 0.95rem;
  color: var(--ink);
  background: var(--bg);
  border: 1px solid var(--line-strong);
  border-radius: 0;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: 2px solid var(--ink);
  outline-offset: 0;
  border-color: var(--ink);
}

.field textarea {
  min-height: 140px;
  resize: vertical;
}

.field-hint {
  display: block;
  font-size: 0.8rem;
  color: var(--ink-muted);
  margin-top: 0.3rem;
}

.hp-field {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.form-status {
  margin-top: 1rem;
  min-height: 1.5rem;
  font-size: 0.9rem;
  color: var(--ink-soft);
}

.form-status.is-error {
  color: var(--danger);
}

.form-status.is-ok {
  color: var(--ok);
}

.copy-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
  margin-top: 0.35rem;
}

/* Footer */
.site-footer {
  background: var(--stone);
  border-top: 1px solid var(--line);
  padding: 3.5rem 0 2.5rem;
  color: var(--ink-soft);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1.1fr;
  gap: 2.5rem;
  padding-bottom: 2.5rem;
  border-bottom: 1px solid var(--line);
}

.footer-heading {
  font-family: var(--mono);
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink);
  margin: 0 0 0.9rem;
}

.footer-links {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-links li {
  margin-bottom: 0.45rem;
  font-size: 0.9rem;
}

.footer-links a {
  text-decoration: none;
  color: var(--ink-soft);
}

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

.footer-bottom {
  padding-top: 1.5rem;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.75rem 2rem;
  font-size: 0.82rem;
  color: var(--ink-muted);
}

.entity-note {
  margin: 0.85rem 0 0;
  font-size: 0.86rem;
  line-height: 1.65;
  color: var(--ink-muted);
}

/* Responsive */
@media (max-width: 1024px) {
  .pillar-grid,
  .guide-grid,
  .metric-strip,
  .footer-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .metric-item:nth-child(2) {
    border-right: 0;
  }
  .metric-item:nth-child(1),
  .metric-item:nth-child(2) {
    border-bottom: 1px solid rgba(255, 255, 255, 0.14);
  }
  .article-layout {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 760px) {
  .container {
    padding: 0 1.15rem;
  }
  .header-inner {
    min-height: 64px;
    flex-wrap: wrap;
    padding: 0.6rem 0;
  }
  .nav-toggle {
    display: inline-flex;
  }
  .site-nav {
    display: none;
    width: 100%;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.35rem;
    padding: 0.9rem 0 0.4rem;
    border-top: 1px solid var(--line);
  }
  .site-nav.is-open {
    display: flex;
  }
  .site-nav a {
    width: 100%;
    padding: 0.45rem 0;
  }
  .hero {
    padding: 2.25rem 0 3rem;
  }
  .hero-grid,
  .split-grid,
  .contact-grid,
  .pillar-grid,
  .guide-grid,
  .photo-pair,
  .footer-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 1.5rem;
  }
  .section {
    padding: 3rem 0;
  }
  .metric-strip {
    grid-template-columns: minmax(0, 1fr);
  }
  .metric-item {
    border-right: 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.14);
  }
  .metric-item:last-child {
    border-bottom: 0;
  }
  .form-panel {
    padding: 1.35rem;
  }
}
