/* PierForge — shared stylesheet
   Accent: #C8321A (warm red, slightly darker than pitch-deck #E83A2C for screen comfort)
   Background: #F5F3F0 (warm off-white)
   Text: #1A1A18 (near-black ink)
   Secondary text: #6B6B66
   Border / divider: #E0DDD8
*/

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

:root {
  --accent:       #C8321A;
  --accent-hover: #A8260F;
  --bg:           #F5F3F0;
  --bg-dark:      #1A1A18;
  --ink:          #1A1A18;
  --ink-2:        #3D3D38;
  --ink-3:        #6B6B66;
  --border:       #E0DDD8;
  --white:        #FFFFFF;
  --section-gap:  clamp(5rem, 10vw, 9rem);
  --content-max:  1120px;
  --radius:       4px;
}

html {
  font-size: 16px;
}

@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

body {
  background: var(--bg);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", sans-serif;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ─── LAYOUT ─────────────────────────────────────────────────── */

.container {
  width: 100%;
  max-width: var(--content-max);
  margin-inline: auto;
  padding-inline: clamp(1.25rem, 5vw, 3rem);
}

section {
  padding-block: var(--section-gap);
}

section + section {
  border-top: 1px solid var(--border);
}

/* ─── NAVIGATION ─────────────────────────────────────────────── */

.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(245, 243, 240, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.nav-inner {
  max-width: var(--content-max);
  margin-inline: auto;
  padding-inline: clamp(1.25rem, 5vw, 3rem);
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  text-decoration: none;
  color: var(--ink);
  font-weight: 700;
  font-size: 1.0625rem;
  letter-spacing: -0.01em;
  flex-shrink: 0;
}

.nav-logo {
  width: 30px;
  height: 30px;
  background: var(--accent);
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.nav-logo svg {
  width: 17px;
  height: 17px;
  fill: #fff;
}

.lang-switcher {
  display: flex;
  align-items: center;
  gap: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  font-size: 0.8125rem;
}

.lang-btn {
  padding: 0.35rem 0.7rem;
  background: transparent;
  border: none;
  border-left: 1px solid var(--border);
  color: var(--ink-3);
  cursor: pointer;
  text-decoration: none;
  display: block;
  transition: background 0.15s, color 0.15s;
  white-space: nowrap;
}

.lang-btn:first-child {
  border-left: none;
}

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

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

.lang-btn.active {
  background: var(--ink);
  color: var(--white);
}

/* ─── HERO ───────────────────────────────────────────────────── */

.hero {
  padding-block: clamp(5rem, 12vw, 10rem);
  border-top: none;
}

.hero-eyebrow {
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 1.5rem;
}

.hero-headline {
  font-size: clamp(2.25rem, 5.5vw, 4rem);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.025em;
  color: var(--ink);
  max-width: 16ch;
  margin-bottom: 1.75rem;
}

.hero-subhead {
  font-size: clamp(1rem, 2vw, 1.25rem);
  color: var(--ink-2);
  max-width: 52ch;
  margin-bottom: 2.5rem;
  line-height: 1.6;
}

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

.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: var(--radius);
  padding: 0.875rem 1.75rem;
  font-size: 0.9375rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.15s;
  letter-spacing: -0.01em;
}

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

.btn-primary:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
}

.hero-note {
  font-size: 0.8125rem;
  color: var(--ink-3);
}

.hero-micronote {
  font-size: 0.85rem;
  color: var(--ink-3);
  margin: -0.5rem 0 1.5rem;
  font-style: italic;
}

/* ─── SECTION LABELS ─────────────────────────────────────────── */

.section-label {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin-bottom: 1rem;
}

.section-title {
  font-size: clamp(1.625rem, 3.5vw, 2.5rem);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: var(--ink);
  margin-bottom: 1rem;
  max-width: 22ch;
}

.section-body {
  font-size: 1.0625rem;
  color: var(--ink-2);
  max-width: 58ch;
  margin-bottom: 3rem;
  line-height: 1.65;
}

/* ─── PROBLEM SECTION ────────────────────────────────────────── */

.pain-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.5rem;
  margin-top: 2.5rem;
}

.pain-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.75rem;
}

.pain-card-num {
  font-size: 2rem;
  font-weight: 700;
  color: var(--accent);
  line-height: 1;
  margin-bottom: 0.75rem;
  letter-spacing: -0.03em;
}

.pain-card-title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 0.5rem;
}

.pain-card-body {
  font-size: 0.9375rem;
  color: var(--ink-3);
  line-height: 1.55;
}

/* ─── SOLUTION / WORKFLOW TABLE ──────────────────────────────── */

.workflow-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 2.5rem;
  font-size: 0.9375rem;
}

.workflow-table th {
  text-align: left;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-3);
  padding: 0.75rem 1rem;
  border-bottom: 2px solid var(--border);
}

.workflow-table td {
  padding: 1rem;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
  color: var(--ink-2);
  line-height: 1.5;
}

.workflow-table tr:last-child td {
  border-bottom: none;
}

.workflow-table td:first-child {
  font-weight: 600;
  color: var(--ink);
  white-space: nowrap;
}

.td-before {
  color: var(--ink-3);
}

.td-after {
  color: var(--ink);
}

/* ─── WHY NOW ────────────────────────────────────────────────── */

.timing-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
  margin-top: 2.5rem;
}

.timing-item {
  display: flex;
  gap: 1rem;
}

.timing-bullet {
  flex-shrink: 0;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  margin-top: 0.55rem;
}

.timing-text h3 {
  font-size: 1rem;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 0.35rem;
}

.timing-text p {
  font-size: 0.9375rem;
  color: var(--ink-3);
  line-height: 1.55;
}

/* ─── DIFFERENTIATION ────────────────────────────────────────── */

.diff-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
  margin-top: 2.5rem;
}

.diff-card {
  border-left: 3px solid var(--accent);
  padding: 1.25rem 1.5rem;
  background: var(--white);
  border-radius: 0 var(--radius) var(--radius) 0;
}

.diff-card h3 {
  font-size: 0.9375rem;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 0.4rem;
}

.diff-card p {
  font-size: 0.9rem;
  color: var(--ink-3);
  line-height: 1.55;
}

/* ─── STATUS SECTION ─────────────────────────────────────────── */

.status-strip {
  background: var(--bg-dark);
  color: var(--white);
  padding-block: var(--section-gap);
  border-top: none;
}

.status-strip .section-label {
  color: rgba(255,255,255,0.55);
}

.status-strip .section-title {
  color: var(--white);
}

.status-strip .section-body {
  color: rgba(255,255,255,0.65);
}

.status-items {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 2rem;
  margin-top: 2.5rem;
}

.status-item h3 {
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.55);
  margin-bottom: 0.5rem;
}

.status-item p {
  font-size: 0.9375rem;
  color: rgba(255,255,255,0.8);
  line-height: 1.55;
}

/* ─── CTA / WAITLIST ─────────────────────────────────────────── */

.cta-section {
  text-align: center;
}

.cta-section .section-title {
  max-width: none;
  margin-inline: auto;
  margin-bottom: 1.25rem;
}

.cta-section .section-body {
  margin-inline: auto;
  margin-bottom: 2.5rem;
}

.form-note {
  font-size: 0.8125rem;
  color: var(--ink-3);
  margin-top: 0.5rem;
}

/* ─── FOOTER ─────────────────────────────────────────────────── */

footer {
  border-top: 1px solid var(--border);
  padding-block: 2.5rem;
}

.footer-inner {
  max-width: var(--content-max);
  margin-inline: auto;
  padding-inline: clamp(1.25rem, 5vw, 3rem);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.footer-copy {
  font-size: 0.8125rem;
  color: var(--ink-3);
}

.footer-links {
  display: flex;
  gap: 1.5rem;
  font-size: 0.8125rem;
}

.footer-links a {
  color: var(--ink-3);
  text-decoration: none;
  transition: color 0.15s;
}

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

/* ─── CTA STEPS ──────────────────────────────────────────────── */

.cta-steps {
  margin: 1.75rem auto 0;
  padding-left: 1.25rem;
  max-width: 540px;
  text-align: left;
}

.cta-steps li {
  font-size: 0.95rem;
  color: var(--ink-2);
  line-height: 1.6;
  margin-bottom: 0.5rem;
}

.cta-steps li::marker {
  color: var(--accent);
  font-weight: 600;
}

/* ─── TRUST STRIP ────────────────────────────────────────────── */

.trust-strip {
  padding: 3rem 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.trust-quote {
  margin: 0;
  text-align: center;
  max-width: 720px;
  margin-inline: auto;
}

.trust-quote p {
  font-size: clamp(1.1rem, 2.2vw, 1.5rem);
  line-height: 1.45;
  color: var(--ink);
  font-style: italic;
  margin: 0 0 1rem;
}

.trust-quote cite {
  font-style: normal;
  font-size: 0.85rem;
  color: var(--ink-3);
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

/* ─── RESPONSIVE ─────────────────────────────────────────────── */

@media (max-width: 640px) {
  /* Mobile workflow table: stacked card layout */
  .workflow-table,
  .workflow-table thead,
  .workflow-table tbody,
  .workflow-table tr {
    display: block;
    width: 100%;
  }

  .workflow-table thead {
    position: absolute;
    top: -9999px;
    left: -9999px;
  }

  .workflow-table tr {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    margin-bottom: 1rem;
    padding: 1rem;
  }

  .workflow-table td {
    display: block;
    border: none;
    border-bottom: 1px solid var(--border);
    padding: 0.6rem 0;
  }

  .workflow-table td:last-child {
    border-bottom: none;
    padding-bottom: 0;
  }

  .workflow-table td:first-child {
    font-size: 0.8rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--ink-3);
    font-weight: 700;
    padding-top: 0;
    white-space: normal;
  }

  .workflow-table td.td-before::before {
    content: attr(data-label-before);
    font-weight: 600;
    color: var(--ink-3);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    display: block;
    margin-bottom: 0.25rem;
  }

  .workflow-table td.td-after::before {
    content: attr(data-label-after);
    font-weight: 600;
    color: var(--accent);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    display: block;
    margin-bottom: 0.25rem;
  }

  .nav-inner {
    gap: 0.5rem;
  }

  .lang-btn {
    padding: 0.3rem 0.5rem;
    font-size: 0.75rem;
  }
}

/* ─── STAT ROW ───────────────────────────────────────────────── */

.stat-row {
  display: flex;
  flex-wrap: wrap;
  gap: 3rem;
  margin-top: 3rem;
  padding-top: 2.5rem;
  border-top: 1px solid var(--border);
}

.stat-item {
  flex: 1 1 220px;
}

.stat-number {
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 700;
  color: var(--ink);
  line-height: 1;
  letter-spacing: -0.03em;
  margin-bottom: 0.3rem;
}

.stat-label {
  font-size: 0.875rem;
  color: var(--ink-3);
}

/* ─── LEGAL PAGES (privacy, terms) ───────────────────────────── */

.container-narrow {
  max-width: 760px;
}

.legal-section {
  padding: 5rem 0 6rem;
}

.legal-title {
  font-size: clamp(2.25rem, 5vw, 3.5rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.05;
  color: var(--ink);
  margin: 0.5rem 0 0.75rem;
}

.legal-effective {
  font-size: 0.875rem;
  color: var(--ink-3);
  margin: 0 0 2.5rem;
  letter-spacing: 0.02em;
}

.legal-intro {
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--ink-2);
  margin: 0 0 2.5rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--border);
}

.legal-section h2 {
  font-size: 1.25rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--ink);
  margin: 2.25rem 0 0.85rem;
  line-height: 1.3;
}

.legal-section p,
.legal-section li {
  font-size: 1rem;
  line-height: 1.65;
  color: var(--ink-2);
}

.legal-section p {
  margin: 0 0 1.1rem;
}

.legal-section ul {
  margin: 0 0 1.4rem;
  padding-left: 1.25rem;
}

.legal-section li {
  margin-bottom: 0.6rem;
}

.legal-section li::marker {
  color: var(--accent, #C8321A);
}

.legal-section strong {
  color: var(--ink);
  font-weight: 600;
}

.legal-section code {
  background: rgba(0, 0, 0, 0.05);
  padding: 0.1em 0.4em;
  border-radius: 4px;
  font-size: 0.92em;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  color: var(--ink);
}

.legal-section a {
  color: var(--accent, #C8321A);
  text-decoration: underline;
  text-underline-offset: 2px;
  text-decoration-thickness: 1px;
}

.legal-section a:hover {
  text-decoration-thickness: 2px;
}

.legal-back {
  margin-top: 3rem;
  padding-top: 1.75rem;
  border-top: 1px solid var(--border);
  font-size: 0.95rem;
}

.legal-back a {
  color: var(--ink-3);
  text-decoration: none;
  font-weight: 500;
}

.legal-back a:hover {
  color: var(--accent, #C8321A);
}

@media (max-width: 640px) {
  .legal-section {
    padding: 3.5rem 0 4rem;
  }
  .legal-section h2 {
    font-size: 1.1rem;
    margin-top: 1.75rem;
  }
}
