/* ===========================================
   TYNWALD — Home / landing page styles
   Builds on top of styles.css tokens (colors, fonts)
   =========================================== */

.home-body {
  background: var(--paper);
}

/* ===================== PUBLIC NAV ===================== */

.public-nav {
  border-bottom: 1px solid var(--line);
  background: var(--paper);
  position: sticky;
  top: 0;
  z-index: 10;
}

.public-nav-inner {
  max-width: 1080px;
  margin: 0 auto;
  padding: 18px 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.public-links {
  display: flex;
  gap: 28px;
}

.public-links a {
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 500;
  color: var(--ink-soft);
  text-decoration: none;
}

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

.public-nav-actions {
  display: flex;
  align-items: center;
  gap: 16px;
}

.btn-ghost {
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 500;
  color: var(--ink);
  text-decoration: none;
  padding: 8px 4px;
}

.btn-primary-link {
  font-family: var(--font-mono);
  font-size: 13px;
  text-decoration: none;
  background: var(--ink);
  color: var(--paper);
  padding: 9px 16px;
  white-space: nowrap;
  border: 1px solid var(--gold-dim);
  clip-path: polygon(0 0, calc(100% - 10px) 0, 100% 10px, 100% 100%, 10px 100%, 0 calc(100% - 10px));
  transition: box-shadow 0.15s ease, background 0.15s ease;
}

.btn-primary-link:hover {
  background: var(--ink-soft);
  box-shadow: 0 0 18px -4px var(--gold-glow);
}

.btn-primary-link.large {
  font-size: 14px;
  padding: 13px 22px;
}

.btn-primary-link.light {
  background: var(--paper);
  color: var(--ink);
}

.btn-primary-link.light:hover {
  background: var(--manila);
}

.btn-ghost.large {
  font-size: 14px;
  padding: 13px 22px;
  border: 1px solid var(--line);
  border-radius: 2px;
}

/* ===================== HERO: CASE FILE ===================== */

.hero {
  padding: 56px 32px 64px;
  display: flex;
  justify-content: center;
  background: var(--manila);
  background-image:
    repeating-linear-gradient(
      0deg,
      rgba(28, 26, 23, 0.015),
      rgba(28, 26, 23, 0.015) 1px,
      transparent 1px,
      transparent 3px
    );
}

.case-file {
  max-width: 720px;
  width: 100%;
  background: var(--paper);
  border: 1px solid var(--line);
  border-top: 4px solid var(--ink);
  padding: 36px 40px 32px;
  position: relative;
  box-shadow: 0 18px 40px -20px rgba(28, 26, 23, 0.35), 0 0 0 1px var(--gold-dim);
  clip-path: polygon(
    0 0, calc(100% - 22px) 0, 100% 22px,
    100% 100%, 22px 100%, 0 calc(100% - 22px)
  );
}

.case-file::after {
  content: '';
  position: absolute;
  top: 14px;
  right: 14px;
  width: 34px;
  height: 34px;
  pointer-events: none;
  background-image:
    linear-gradient(var(--gold-dim) 1px, transparent 1px),
    linear-gradient(90deg, var(--gold-dim) 1px, transparent 1px);
  background-size: 8px 8px;
  opacity: 0.5;
}

.case-file-tab {
  position: absolute;
  top: 0;
  left: 36px;
  transform: translateY(-100%);
  background: var(--ink);
  color: var(--paper);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  padding: 6px 12px;
  clip-path: polygon(0 0, 100% 0, 100% 100%, 8px 100%, 0 calc(100% - 8px));
  box-shadow: 0 0 12px -3px var(--gold-glow);
}

.case-file-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 18px;
}

.case-file-label {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.08em;
  color: var(--slate-soft);
  text-transform: uppercase;
  margin-bottom: 6px;
}

.case-file-value-large {
  font-family: var(--font-serif);
  font-weight: 700;
  font-size: 44px;
  color: var(--ink);
  letter-spacing: -0.01em;
  line-height: 1;
}

.case-file-header-right {
  text-align: right;
}

.case-file-row {
  padding: 16px 0;
}

.case-file-value {
  font-family: var(--font-serif);
  font-weight: 600;
  font-size: 19px;
  color: var(--ink);
}

.case-file-summary {
  padding: 16px 0 8px;
}

.case-file-summary p {
  font-family: var(--font-sans);
  font-size: 15px;
  color: var(--ink-soft);
  line-height: 1.6;
  max-width: 580px;
  margin: 0;
}

.case-file-actions {
  display: flex;
  gap: 14px;
  margin-top: 24px;
  flex-wrap: wrap;
}

.case-file-footer {
  margin-top: 28px;
  padding-top: 16px;
  border-top: 1px dashed var(--line);
  display: flex;
  gap: 10px;
  align-items: center;
}

/* ===================== STATS STRIP ===================== */

.stats-strip {
  display: flex;
  justify-content: center;
  gap: 0;
  flex-wrap: wrap;
  background: var(--ink);
  padding: 32px 24px;
  position: relative;
  border-top: 1px solid var(--gold-dim);
  border-bottom: 1px solid var(--gold-dim);
  box-shadow: inset 0 0 40px -20px var(--gold-glow);
}

.stat {
  flex: 1;
  min-width: 160px;
  max-width: 220px;
  text-align: center;
  padding: 0 16px;
}

.stat-number {
  font-family: var(--font-serif);
  font-weight: 700;
  font-size: 30px;
  color: var(--paper);
}

.stat-label {
  font-family: var(--font-mono);
  font-size: 11px;
  color: rgba(247, 244, 236, 0.6);
  margin-top: 6px;
  letter-spacing: 0.02em;
}

/* ===================== SHARED SECTION LAYOUT ===================== */

.section-inner {
  max-width: 880px;
  margin: 0 auto;
  padding: 72px 32px;
}

.about-section .section-inner {
  text-align: center;
  padding-bottom: 40px;
}

.section-inner h2 {
  font-family: var(--font-serif);
  font-weight: 700;
  font-size: 30px;
  color: var(--ink);
  margin: 8px 0 16px;
  line-height: 1.25;
}

.about-section h2 {
  max-width: 620px;
  margin-left: auto;
  margin-right: auto;
}

.section-lead {
  font-family: var(--font-sans);
  font-size: 15.5px;
  color: var(--ink-soft);
  line-height: 1.65;
  max-width: 560px;
  margin: 0 auto;
}

/* ===================== FEATURES ===================== */

.features-section {
  background: var(--manila);
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-top: 36px;
}

.feature-card {
  background: var(--paper);
  border: 1px solid var(--line);
  padding: 22px 20px;
  position: relative;
  clip-path: polygon(0 0, calc(100% - 14px) 0, 100% 14px, 100% 100%, 14px 100%, 0 calc(100% - 14px));
  transition: box-shadow 0.15s ease;
}

.feature-card:hover {
  box-shadow: 0 0 0 1px var(--gold-dim), 0 10px 26px -18px var(--gold-glow);
}

.feature-stamp {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--slate-soft);
  border: 1px solid var(--line);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 22px;
  margin-bottom: 14px;
  clip-path: polygon(0 0, calc(100% - 6px) 0, 100% 6px, 100% 100%, 6px 100%, 0 calc(100% - 6px));
}

.feature-card h3 {
  font-family: var(--font-serif);
  font-weight: 600;
  font-size: 17px;
  color: var(--ink);
  margin: 0 0 8px;
}

.feature-card p {
  font-family: var(--font-sans);
  font-size: 13.5px;
  color: var(--ink-soft);
  line-height: 1.55;
  margin: 0;
}

/* ===================== CTA BAND ===================== */

.cta-band {
  background: var(--ink);
  padding: 56px 32px;
  border-top: 1px solid var(--gold-dim);
  box-shadow: inset 0 0 50px -22px var(--gold-glow);
}

.cta-inner {
  max-width: 880px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
}

.cta-heading {
  font-family: var(--font-serif);
  font-weight: 700;
  font-size: 26px;
  color: var(--paper);
  margin: 6px 0 0;
}

/* ===================== FOOTER ===================== */

.public-footer {
  background: var(--paper);
  border-top: 1px solid var(--line);
}

.footer-inner {
  max-width: 1080px;
  margin: 0 auto;
  padding: 32px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
}

.brand-name.small {
  font-size: 19px;
}

.footer-tagline {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.05em;
  color: var(--slate-soft);
  margin-top: 4px;
}

.footer-links {
  display: flex;
  gap: 24px;
}

.footer-links a {
  font-family: var(--font-sans);
  font-size: 13.5px;
  color: var(--ink-soft);
  text-decoration: none;
}

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

/* ===================== RESPONSIVE ===================== */

@media (max-width: 760px) {
  .feature-grid {
    grid-template-columns: 1fr;
  }

  .case-file {
    padding: 28px 22px 24px;
  }

  .case-file-value-large {
    font-size: 32px;
  }

  .public-links {
    display: none;
  }

  .stats-strip {
    gap: 24px 0;
  }

  .cta-inner {
    flex-direction: column;
    align-items: flex-start;
  }

  .case-file-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .case-file-actions a {
    text-align: center;
  }

  .cta-heading {
    font-size: 22px;
  }

  .section-inner {
    padding: 48px 20px;
  }

  .section-inner h2 {
    font-size: 24px;
  }
}

@media (max-width: 420px) {
  .public-nav-actions {
    gap: 8px;
  }

  .btn-ghost {
    font-size: 13px;
    padding: 8px 2px;
  }

  .btn-primary-link {
    font-size: 12px;
    padding: 8px 12px;
  }

  .case-file-header {
    flex-wrap: wrap;
    gap: 12px;
    align-items: flex-start;
  }

  .case-file-value-large {
    font-size: 26px;
  }
}