/* ============================================================
   RESET & CSS VARIABLES
   ============================================================ */

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

:root {
  --ink: #1a1a18;
  --ink-muted: #6b6b62;
  --ink-faint: #b0afa6;
  --paper: #f7f5f0;
  --paper-warm: #edeae2;
  --paper-card: #ffffff;
  --accent: #3d5a3e;
  --accent-light: #e8efe8;
  --accent-mid: #8aac8b;
  --rule: #d8d5cc;
  --sans: "DM Sans", sans-serif;
  --serif: "Playfair Display", serif;
}

/* ============================================================
   BASE TYPOGRAPHY & LAYOUT
   ============================================================ */

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--sans);
  background: var(--paper);
  color: var(--ink);
  font-size: 16px;
  line-height: 1.75;
  font-weight: 300;
}

body::-webkit-scrollbar {
  width: 10px;
}
body::-webkit-scrollbar-track {
  background: var(--paper);
}
body::-webkit-scrollbar-thumb {
  background: var(--rule);
  border-radius: 5px;
}
body::-webkit-scrollbar-thumb:hover {
  background: var(--accent);
}

h1 {
  font-family: var(--serif);
  font-size: clamp(2rem, 5vw, 3.2rem);
  line-height: 1.15;
  font-weight: 600;
  color: var(--ink);
  max-width: 700px;
  margin-bottom: 1.25rem;
}
h1 em {
  font-style: italic;
  color: var(--accent);
}

h2 {
  font-family: var(--serif);
  font-size: 1.75rem;
  font-weight: 600;
  line-height: 1.25;
  margin-bottom: 1.5rem;
  color: var(--ink);
}

h3 {
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-muted);
  margin: 2rem 0 0.75rem;
}

p {
  margin-bottom: 1rem;
  color: var(--ink);
}
p:last-child {
  margin-bottom: 0;
}

a {
  color: inherit;
  text-decoration: none;
  transition: opacity 0.2s ease;
}
a:hover {
  opacity: 0.75;
}

blockquote {
  border-left: 3px solid var(--accent);
  margin: 2rem 0;
  padding: 0.25rem 0 0.25rem 1.5rem;
}
blockquote p {
  font-family: var(--serif);
  font-size: 1.2rem;
  font-style: italic;
  line-height: 1.5;
  color: var(--ink);
}

/* ============================================================
   PAGE STRUCTURE — HEADER, MAIN, SECTION, FOOTER
   ============================================================ */

header {
  padding: 3rem 2rem 2.5rem;
  max-width: 860px;
  margin: 0 auto;
}

main {
  max-width: 860px;
  margin: 0 auto;
  padding: 0 2rem 6rem;
}

section {
  padding: 3.5rem 0;
  border-bottom: 1px solid var(--rule);
}
section:last-child {
  border-bottom: none;
}

footer {
  max-width: 860px;
  margin: 0 auto;
  padding: 2rem;
  border-top: 1px solid var(--rule);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.8rem;
  color: var(--ink-faint);
}
.footer-links {
  display: flex;
  align-items: center;
  gap: 0;
}
.footer-links a + a::before,
.footer-links a + button::before,
.footer-links button + a::before {
  content: "·";
  margin: 0 0.6rem;
  opacity: 0.4;
}
.email-copy-btn {
  background: none;
  border: none;
  padding: 0;
  margin: 0;
  font: inherit;
  color: inherit;
  cursor: pointer;
  text-decoration: none;
}
@media (max-width: 580px) {
  footer {
    flex-direction: column;
    align-items: center;
    gap: 0.6rem;
    text-align: center;
  }
}

/* ============================================================
   UTILITY CLASSES
   ============================================================ */

.eyebrow {
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 500;
  margin-bottom: 1rem;
}

.subtitle {
  font-size: 1.05rem;
  color: var(--ink-muted);
  max-width: 560px;
  line-height: 1.65;
}

.section-label {
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 500;
  margin-bottom: 0.75rem;
}

.tag {
  display: inline-block;
  background: var(--accent-light);
  color: var(--accent);
  font-size: 0.75rem;
  font-weight: 500;
  padding: 0.2rem 0.65rem;
  border-radius: 2px;
  margin-right: 0.4rem;
  margin-bottom: 0.4rem;
}

/* Placeholder notice — swap with real content */
.sample-notice {
  background: #f0f7f0;
  border: 1px solid var(--accent-mid);
  border-radius: 4px;
  padding: 0.6rem 1rem;
  margin: 0.75rem 0 1.25rem;
  font-size: 0.78rem;
  color: var(--accent);
  letter-spacing: 0.04em;
}
.sample-notice strong {
  font-weight: 500;
  text-transform: uppercase;
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  margin-right: 0.4rem;
}

/* ============================================================
   HERO IMAGE
   ============================================================ */

.hero-wrap {
  max-width: 860px;
  margin: 0 auto;
  border-bottom: 1px solid var(--rule);
  padding: 0 2rem 1.5rem;
}
.hero-img {
  width: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
  border-radius: 4px;
  margin-bottom: 0.75rem;
}
.hero-caption {
  font-size: 0.75rem;
  color: var(--ink-faint);
  letter-spacing: 0.05em;
}

/* ============================================================
   META STRIP
   ============================================================ */

.meta-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 0;
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  margin: 2.5rem 0 0;
}
.meta-item {
  flex: 1;
  min-width: 120px;
  padding: 1rem 1.25rem;
  border-right: 1px solid var(--rule);
}
.meta-item:last-child {
  border-right: none;
}
.meta-label {
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin-bottom: 0.25rem;
  font-weight: 500;
}
.meta-value {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--ink);
}
@media (max-width: 740px) {
  .meta-strip {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
  }
  .meta-item {
    flex: none;
    width: 100%;
    padding: 1rem 1.25rem;
    border-right: 1px solid var(--rule);
    border-bottom: 1px solid var(--rule);
  }
  .meta-item:nth-child(2n) {
    border-right: none;
  }
  .meta-item:nth-child(n + 3) {
    border-bottom: none;
  }
}
@media (max-width: 580px) {
  .meta-strip {
    display: flex;
    flex-direction: column;
    grid-template-columns: none;
  }
  .meta-item {
    flex: 1;
    width: 100%;
    padding: 1rem 1.25rem;
    border-right: none;
    border-bottom: 1px solid var(--rule);
  }
  .meta-item:nth-child(n) {
    border-bottom: 1px solid var(--rule);
  }
  .meta-item:last-child {
    border-bottom: none;
  }
}

/* ============================================================
   DIAGRAM & IMAGE COMPONENTS
   ============================================================ */

.diagram-frame {
  width: 100%;
  background: var(--paper-card);
  border: 1px solid var(--rule);
  border-radius: 4px;
  margin: 1.5rem 0;
  overflow: hidden;
}
.diagram-frame img {
  display: block;
  width: 100%;
}
.diagram-caption {
  font-size: 0.75rem;
  color: var(--ink-faint);
  letter-spacing: 0.05em;
  padding: 0.6rem 1rem;
  border-top: 1px solid var(--rule);
  background: var(--paper-warm);
}

.two-col-img {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin: 1rem 0;
}
@media (max-width: 580px) {
  .two-col-img {
    grid-template-columns: 1fr;
  }
}

/* ============================================================
   PROBLEM GRID
   ============================================================ */

.problem-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--rule);
  border: 1px solid var(--rule);
  border-radius: 6px;
  overflow: hidden;
  margin: 2rem 0;
}
@media (max-width: 900px) {
  .problem-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 640px) {
  .problem-grid {
    grid-template-columns: 1fr;
  }
}
.problem-card {
  background: var(--paper-card);
  padding: 1.25rem 1.25rem 1.5rem;
}
.problem-icon {
  width: 32px;
  height: 32px;
  background: var(--accent-light);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 0.75rem;
}
.problem-card h4 {
  font-size: 0.85rem;
  font-weight: 500;
  margin-bottom: 0.4rem;
  color: var(--ink);
}
.problem-card p {
  font-size: 0.825rem;
  color: var(--ink-muted);
  line-height: 1.55;
  margin: 0;
}

/* ============================================================
   TABLES — SPEC & COMPETITIVE ANALYSIS
   ============================================================ */

.bom-table-wrap,
.comp-table-wrap {
  overflow-x: auto;
  margin: 1.5rem 0;
}
.comp-table-wrap::-webkit-scrollbar {
  height: 8px;
}
.comp-table-wrap::-webkit-scrollbar-track {
  background: var(--paper-warm);
}
.comp-table-wrap::-webkit-scrollbar-thumb {
  background: var(--rule);
  border-radius: 4px;
}
.comp-table-wrap::-webkit-scrollbar-thumb:hover {
  background: var(--accent);
}

.spec-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
  margin: 1.5rem 0;
}
.spec-table thead tr {
  border-bottom: 2px solid var(--ink);
}
.spec-table th {
  text-align: left;
  padding: 0.6rem 0.75rem 0.6rem 0;
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-muted);
  font-weight: 500;
}
.spec-table td {
  padding: 0.75rem 0.75rem 0.75rem 0;
  border-bottom: 1px solid var(--rule);
  color: var(--ink);
  vertical-align: top;
}
.spec-table th:first-child {
  width: 30%;
}
.spec-table td:first-child {
  font-weight: 500;
  width: 30%;
}
.spec-table--bom th:first-child,
.spec-table--bom td:first-child {
  width: 4%;
  font-weight: 400;
}
.spec-table--bom th:nth-child(4),
.spec-table--bom td:nth-child(4) {
  width: 4%;
}
.spec-table--ergonomics th:nth-child(2),
.spec-table--ergonomics td:nth-child(2),
.spec-table--ergonomics th:nth-child(3),
.spec-table--ergonomics td:nth-child(3) {
  width: 10%;
  min-width: 45px;
}
.spec-table tr:last-child td {
  border-bottom: none;
}
.spec-table--design th:nth-child(1),
.spec-table--design td:nth-child(1) {
  width: 22%;
}
.spec-table--design th:nth-child(2),
.spec-table--design td:nth-child(2) {
  width: 20%;
}
.spec-table--design th:nth-child(3),
.spec-table--design td:nth-child(3) {
  width: 10%;
  text-align: center;
  white-space: nowrap;
}
.spec-table--design th:nth-child(4),
.spec-table--design td:nth-child(4) {
  width: 48%;
  color: var(--ink-muted);
  font-size: 0.8rem;
}
.spec-meets {
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--accent);
  letter-spacing: 0.03em;
}

.comp-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
  font-size: 0.825rem;
  margin: 1.5rem 0;
}
@media (max-width: 760px) {
  .comp-table {
    table-layout: auto;
    min-width: 100%;
  }
}
.comp-table th {
  text-align: left;
  padding: 0.5rem 0.75rem;
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-muted);
  font-weight: 500;
  background: var(--paper-warm);
  border: 1px solid var(--rule);
}
.comp-table th.photo-col {
  width: 80px;
  text-align: center;
}
.comp-table th.name-col {
  width: auto;
  flex: 1;
}
.comp-table th.feat-col {
  width: 80px;
  text-align: center;
  line-height: 1.3;
}
.comp-table th.price-col {
  width: 100px;
  text-align: center;
}
.comp-table td {
  padding: 0.75rem;
  border: 1px solid var(--rule);
  vertical-align: middle;
  color: var(--ink);
}
.comp-table td.check,
.comp-table td.cross {
  width: 80px;
  text-align: center;
  padding: 0.5rem 0.25rem;
}
.comp-table td.check span,
.comp-table td.cross span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 500;
}
.comp-table td.check span {
  background: #eaf3de;
  color: #27500a;
}
.comp-table td.cross span {
  background: #fcebeb;
  color: #791f1f;
}

/* Highlight row for this design in the comparison table */
.this-design td {
  background: var(--accent-light) !important;
}
.this-design td:first-child {
  border-left: 3px solid #3d5a3e;
  font-weight: 500;
  color: var(--accent);
}

/* ============================================================
   INSIGHT CALLOUT
   ============================================================ */

.insight {
  background: var(--accent-light);
  border-left: 3px solid var(--accent);
  padding: 1.25rem 1.5rem;
  border-radius: 0 4px 4px 0;
  margin: 1.5rem 0;
}
.insight p {
  font-size: 0.9rem;
  color: var(--ink);
  margin: 0;
}
.insight strong {
  font-weight: 500;
  color: var(--accent);
}

/* ============================================================
   PROCESS STEPS — DESIGN CONSTRAINTS & RESEARCH STEPS
   ============================================================ */

.process-steps {
  display: flex;
  flex-direction: column;
  gap: 0;
  margin: 2rem 0;
  border: 1px solid var(--rule);
  border-radius: 6px;
  overflow: hidden;
}
.process-step {
  display: grid;
  grid-template-columns: 56px 1fr;
  border-bottom: 1px solid var(--rule);
  background: var(--paper-card);
}
.process-step:last-child {
  border-bottom: none;
}
.process-step-num {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 1.25rem 0 0;
  font-family: var(--serif);
  font-size: 1.1rem;
  color: var(--ink-faint);
  border-right: 1px solid var(--rule);
}
.process-step-body {
  padding: 1.25rem 1.5rem;
}
.process-step-body h4 {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--ink);
  margin-bottom: 0.4rem;
}
.process-step-body p {
  font-size: 0.85rem;
  color: var(--ink-muted);
  margin: 0 0 0.75rem;
  line-height: 1.6;
}
.process-step-body p:last-child {
  margin-bottom: 0;
}

/* ============================================================
   FEATURE ROWS — SOLUTION SECTION
   ============================================================ */

.feature-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2.5rem;
  align-items: start;
  margin: 2rem 0;
}
@media (max-width: 600px) {
  .feature-row {
    grid-template-columns: 1fr;
  }
  .feature-row .diagram-frame:first-child {
    order: 2;
  }
}
.feature-text h3 {
  margin-top: 0;
  font-size: 1rem;
  letter-spacing: 0;
  text-transform: none;
  color: var(--ink);
  font-weight: 500;
}
.feature-number {
  font-family: var(--serif);
  font-size: 3rem;
  color: var(--rule);
  line-height: 1;
  margin-bottom: 0.5rem;
}

/* ============================================================
   PERSONA CARD
   ============================================================ */

.persona-card {
  background: var(--paper-card);
  border: 1px solid var(--rule);
  border-radius: 6px;
  padding: 2rem;
  margin: 1.5rem 0;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 1.5rem;
  align-items: start;
}
.persona-avatar {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--accent-light);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--serif);
  font-size: 1.4rem;
  color: var(--accent);
}
.persona-name {
  font-weight: 500;
  font-size: 1rem;
  margin-bottom: 0.15rem;
}
.persona-role {
  font-size: 0.8rem;
  color: var(--ink-faint);
  letter-spacing: 0.05em;
  margin-bottom: 1rem;
}
.persona-need {
  font-family: var(--serif);
  font-style: italic;
  font-size: 1rem;
  color: var(--ink);
  border-left: 3px solid var(--accent);
  padding-left: 1rem;
  margin-bottom: 1rem;
  line-height: 1.5;
}
.persona-bio {
  font-size: 0.875rem;
  color: var(--ink-muted);
  line-height: 1.65;
  margin-top: 0.75rem;
  margin-bottom: 0;
}
.persona-attrs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.75rem;
}
@media (max-width: 520px) {
  .persona-card {
    grid-template-columns: 1fr;
  }
}

/* ============================================================
   MARKET OPPORTUNITY GRID
   ============================================================ */

.opportunity-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--rule);
  border: 1px solid var(--rule);
  border-radius: 6px;
  overflow: hidden;
  margin: 1.5rem 0;
}
@media (max-width: 700px) {
  .opportunity-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
.opp-card {
  background: var(--paper-card);
  padding: 1.5rem 1.25rem;
  text-align: center;
}
.opp-number {
  font-family: var(--serif);
  font-size: 2rem;
  font-weight: 600;
  color: var(--accent);
  line-height: 1;
  margin-bottom: 0.4rem;
}
.opp-label {
  font-size: 0.8rem;
  color: var(--ink-muted);
  line-height: 1.4;
}

/* ============================================================
   REFLECTION GRID
   ============================================================ */

.reflection-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  margin-top: 1.5rem;
}
@media (max-width: 580px) {
  .reflection-grid {
    grid-template-columns: 1fr;
  }
}
.reflection-card {
  background: var(--paper-card);
  border: 1px solid var(--rule);
  border-radius: 6px;
  padding: 1.25rem 1.5rem;
}
.reflection-card h4 {
  font-size: 0.8rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin-bottom: 0.75rem;
  font-weight: 500;
}
.reflection-card p {
  font-size: 0.875rem;
  color: var(--ink-muted);
  line-height: 1.6;
  margin: 0;
}