/* ==========================================================================
   OrthoMetry — Porcelain Light
   Static stylesheet. Local fonts only. No imports, no scripting.
   ========================================================================== */

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

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

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  margin: 0;
  background: #F3F1EB;
  color: #14202E;
  font-family: 'Geist', 'Segoe UI', system-ui, -apple-system, 'Helvetica Neue', Arial, sans-serif;
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ---------- Typography ---------- */
h1,
h2,
h3,
h4,
h5,
h6 {
  margin: 0;
  color: #14202E;
  font-family: 'Geist', 'Segoe UI', system-ui, -apple-system, 'Helvetica Neue', Arial, sans-serif;
  line-height: 1.2;
}

h1 {
  font-size: clamp(2.2rem, 5vw, 3.2rem);
  font-weight: 800;
  letter-spacing: -0.02em;
}

h2 {
  font-size: 1.7rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

h3 {
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}

p {
  margin: 0 0 1em;
}

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

ul,
ol {
  margin: 0 0 1em;
}

code,
kbd,
samp,
pre {
  font-family: 'Geist Mono', 'Cascadia Code', Consolas, monospace;
}

img,
svg {
  max-width: 100%;
}

img {
  height: auto;
}

strong,
b {
  font-weight: 700;
  color: #14202E;
}

::selection {
  background: #0F766E;
  color: #FFFFFF;
}

/* Links: underlined in body contexts; navigation and buttons override. */
a {
  color: #0F766E;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  transition: color 150ms ease;
}

a:hover {
  color: #0B5D56;
}

[id] {
  scroll-margin-top: 96px;
}

/* ---------- Focus / accessibility ---------- */
:focus-visible {
  outline: 2px solid #0F766E;
  outline-offset: 2px;
}

/* ---------- Skip link ---------- */
.skip-link {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 200;
  padding: 10px 16px;
  background: #FFFFFF;
  color: #0F766E;
  border: 1px solid #0F766E;
  border-radius: 0 0 10px 0;
  font-weight: 700;
  text-decoration: none;
  transform: translateY(-150%);
}

.skip-link:focus,
.skip-link:focus-visible {
  transform: translateY(0);
  outline-offset: -2px;
}

/* ---------- Layout shell ---------- */
.site-main {
  flex: 1;
}

.container {
  width: 100%;
  max-width: 1080px;
  margin-inline: auto;
  padding-inline: clamp(18px, 4vw, 28px);
}

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.9);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid #E6E1D6;
}

.header-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 18px;
  padding-block: 14px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: #14202E;
  text-decoration: none;
}

.brand:hover {
  color: #14202E;
  text-decoration: none;
}

.brand-logo {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border: 1px solid #E6E1D6;
  border-radius: 9px;
  background: #FFFFFF;
  object-fit: contain;
  flex: none;
}

.brand-name {
  font-size: 1.08rem;
  font-weight: 800;
  letter-spacing: -0.01em;
  color: #14202E;
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px;
  margin-left: auto;
}

.site-nav a {
  display: inline-block;
  padding: 8px 12px;
  border-radius: 9px;
  color: #5B6B7E;
  font-size: 0.95rem;
  font-weight: 600;
  text-decoration: none;
  transition: background-color 150ms ease, color 150ms ease;
}

.site-nav a:hover {
  background: #F2EFE8;
  color: #14202E;
}

.site-nav a[aria-current="page"] {
  background: rgba(15, 118, 110, 0.10);
  color: #0F766E;
  font-weight: 700;
}

.site-nav a.nav-cta {
  margin-left: 6px;
  padding: 8px 14px;
  border: 1px solid rgba(15, 118, 110, 0.4);
  border-radius: 9px;
  color: #0F766E;
  font-weight: 700;
  background: transparent;
}

.site-nav a.nav-cta:hover {
  background: #0F766E;
  border-color: #0F766E;
  color: #FFFFFF;
}

/* ---------- Hero ---------- */
.hero {
  background-color: #F3F1EB;
  background-image:
    radial-gradient(600px 300px at 15% 0%, rgba(15, 118, 110, 0.12), transparent 70%),
    radial-gradient(500px 260px at 85% 10%, rgba(183, 121, 31, 0.10), transparent 70%);
  background-repeat: no-repeat;
  border-bottom: 1px solid #E6E1D6;
  padding-block: clamp(56px, 9vw, 104px);
}

.hero-lean {
  padding-block: clamp(40px, 6vw, 64px);
}

.hero-inner {
  width: 100%;
  max-width: 1080px;
  margin-inline: auto;
  padding-inline: clamp(18px, 4vw, 28px);
}

.hero-title {
  max-width: 18ch;
  margin: 0;
  font-size: clamp(2.2rem, 5vw, 3.2rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.1;
  color: #14202E;
}

.hero-sub {
  max-width: 62ch;
  margin: 18px 0 0;
  font-size: 1.15rem;
  line-height: 1.65;
  color: #5B6B7E;
}

.hero-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 26px 0 0;
  padding: 0;
  list-style: none;
}

.badge {
  display: inline-flex;
  align-items: center;
  padding: 6px 14px;
  border: 1px solid #E6E1D6;
  border-radius: 999px;
  background: #FFFFFF;
  color: #14202E;
  font-size: 0.85rem;
  font-weight: 600;
  line-height: 1.4;
  white-space: nowrap;
}

.badge::before {
  content: "";
  display: inline-block;
  width: 6px;
  height: 6px;
  margin-right: 8px;
  border-radius: 50%;
  background: #0F766E;
  flex: none;
}

.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 22px;
  border: 1px solid transparent;
  border-radius: 11px;
  font-family: inherit;
  font-size: 0.98rem;
  font-weight: 700;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 150ms ease, border-color 150ms ease, color 150ms ease, box-shadow 150ms ease;
}

.btn-primary {
  background: #0F766E;
  border-color: #0F766E;
  color: #FFFFFF;
}

.btn-primary:hover {
  background: #0B5D56;
  border-color: #0B5D56;
  color: #FFFFFF;
}

.btn-ghost {
  background: #FFFFFF;
  border-color: #D6CFC1;
  color: #14202E;
}

.btn-ghost:hover {
  background: #F2EFE8;
  border-color: #D6CFC1;
  color: #14202E;
}

/* ---------- Sectioning ---------- */
.kicker {
  margin: 0 0 10px;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #0F766E;
}

.section {
  padding-block: clamp(48px, 7vw, 84px);
}

.section-alt {
  background: #EFEDE6;
  border-block: 1px solid #E6E1D6;
}

.section-title {
  margin: 0;
  font-size: 1.7rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.25;
  color: #14202E;
}

.section-sub {
  max-width: 70ch;
  margin: 8px 0 0;
  color: #5B6B7E;
}

/* ---------- Card grid ---------- */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 250px), 1fr));
  gap: 18px;
  margin-top: 28px;
}

.card {
  background: #FFFFFF;
  border: 1px solid #E6E1D6;
  border-radius: 14px;
  padding: 22px;
  box-shadow: 0 12px 30px -18px rgba(20, 32, 46, 0.18);
  transition: transform 150ms ease, box-shadow 150ms ease, border-color 150ms ease;
}

.card:hover {
  transform: translateY(-2px);
  border-color: #D6CFC1;
  box-shadow: 0 24px 50px -24px rgba(20, 32, 46, 0.25);
}

.card-title {
  margin: 0 0 8px;
  font-size: 1.02rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: #14202E;
}

.card p {
  margin: 0;
  color: #5B6B7E;
}

/* ---------- Integration scope cards ---------- */
.scope-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr));
  gap: 18px;
  margin-top: 28px;
}

.scope-card {
  background: #FFFFFF;
  border: 1px solid #E6E1D6;
  border-top: 3px solid #0F766E;
  border-radius: 14px;
  padding: 24px;
  box-shadow: 0 12px 30px -18px rgba(20, 32, 46, 0.18);
  transition: transform 150ms ease, box-shadow 150ms ease, border-color 150ms ease;
}

.scope-card:hover {
  transform: translateY(-2px);
  border-color: #D6CFC1;
  border-top-color: #0F766E;
  box-shadow: 0 24px 50px -24px rgba(20, 32, 46, 0.25);
}

.scope-title {
  margin: 0 0 6px;
  font-size: 1.15rem;
  font-weight: 800;
  letter-spacing: -0.01em;
  color: #14202E;
}

.scope-chip {
  display: inline-block;
  margin: 6px 0 12px;
  padding: 4px 12px;
  background: rgba(15, 118, 110, 0.10);
  border: 1px solid rgba(15, 118, 110, 0.30);
  border-radius: 8px;
  color: #0F766E;
  font-family: 'Geist Mono', 'Cascadia Code', Consolas, monospace;
  font-size: 0.85rem;
  font-weight: 600;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

.scope-list {
  margin: 0;
  padding-left: 18px;
  color: #14202E;
}

.scope-list li {
  margin-block: 6px;
}

.scope-list li::marker {
  color: #0F766E;
}

.scope-card p {
  margin: 0 0 10px;
  color: #5B6B7E;
}

/* ---------- Callout ---------- */
.callout {
  margin-block: 20px;
  padding: 18px 22px;
  background: #F7F5F0;
  border: 1px solid #D6CFC1;
  border-left: 4px solid #0F766E;
  border-radius: 12px;
}

.callout-title {
  margin: 0 0 6px;
  font-size: 0.95rem;
  font-weight: 800;
  letter-spacing: 0.01em;
  color: #14202E;
}

.callout p {
  margin: 0;
  color: #14202E;
}

.callout a {
  color: #0F766E;
}

/* ---------- Legal pages ---------- */
.legal-meta {
  margin-top: 12px;
  font-size: 0.92rem;
  color: #5B6B7E;
}

.legal-body {
  max-width: 78ch;
}

.legal-body h2 {
  margin: 40px 0 0;
  padding-bottom: 8px;
  border-bottom: 1px solid #E6E1D6;
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: -0.01em;
  color: #14202E;
}

.legal-body h3 {
  margin: 24px 0 0;
  font-size: 1.05rem;
  font-weight: 700;
  color: #14202E;
}

.legal-body p {
  margin-block: 12px;
  color: #14202E;
}

.legal-body ul,
.legal-body ol {
  margin-block: 12px;
  padding-left: 22px;
  color: #14202E;
}

.legal-body li {
  margin-block: 6px;
}

.legal-body a {
  color: #0F766E;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.legal-body a:hover {
  color: #0B5D56;
}

.legal-body code {
  padding: 1px 7px;
  background: #F7F5F0;
  border: 1px solid #E6E1D6;
  border-radius: 6px;
  color: #0F766E;
  font-family: 'Geist Mono', 'Cascadia Code', Consolas, monospace;
  font-size: 0.88em;
  overflow-wrap: anywhere;
}

/* ---------- Tables ---------- */
.table-wrap {
  margin-block: 20px;
  overflow-x: auto;
  border-radius: 12px;
  -webkit-overflow-scrolling: touch;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  background: #FFFFFF;
  border: 1px solid #E6E1D6;
  font-size: 0.92rem;
  line-height: 1.55;
}

.data-table thead th {
  padding: 12px 14px;
  background: #F7F5F0;
  border-bottom: 1px solid #D6CFC1;
  color: #5B6B7E;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-align: left;
  white-space: nowrap;
}

.data-table td {
  padding: 12px 14px;
  border-bottom: 1px solid #E6E1D6;
  color: #14202E;
  text-align: left;
  vertical-align: top;
}

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

.data-table tbody tr:hover td {
  background: #FBFAF7;
}

.data-table code {
  padding: 1px 6px;
  background: #F7F5F0;
  border: 1px solid #E6E1D6;
  border-radius: 6px;
  color: #0F766E;
  font-family: 'Geist Mono', 'Cascadia Code', Consolas, monospace;
  font-size: 0.88em;
  white-space: nowrap;
}

/* ---------- Footer ---------- */
.site-footer {
  margin-top: auto;
  background: #0A121E;
  color: #A9B6C8;
}

.footer-inner {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 32px;
  padding-block: 48px;
}

.footer-brand,
.footer-col {
  min-width: 0;
}

.footer-title {
  margin: 0 0 8px;
  color: #F4F7FB;
  font-size: 1.1rem;
  font-weight: 800;
  letter-spacing: -0.01em;
}

.footer-note {
  max-width: 34ch;
  margin: 0;
  color: #A9B6C8;
  line-height: 1.6;
  font-size: 0.92rem;
}

.footer-heading {
  margin: 0 0 10px;
  color: #F4F7FB;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.footer-links {
  display: block;
  margin: 0;
  font-size: 0.92rem;
  line-height: 1.6;
}

.footer-links a,
p.footer-links a,
nav.footer-links a {
  display: block;
  padding-block: 3px;
  color: #5EEAD4;
  text-decoration: none;
  overflow-wrap: anywhere;
}

.footer-links a:hover,
p.footer-links a:hover,
nav.footer-links a:hover {
  color: #99F6E4;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.site-footer a:focus-visible {
  outline-color: #5EEAD4;
}

.footer-legal {
  padding-block: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  color: #A9B6C8;
  font-size: 0.82rem;
  line-height: 1.6;
}

.footer-legal p {
  margin: 0;
}

.footer-legal a {
  color: #5EEAD4;
  text-decoration: none;
}

.footer-legal a:hover {
  color: #99F6E4;
  text-decoration: underline;
}

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .header-inner {
    align-items: flex-start;
  }

  .site-nav {
    width: 100%;
    margin-left: 0;
    gap: 2px;
  }

  .site-nav a {
    padding: 7px 10px;
    font-size: 0.92rem;
  }

  .site-nav a.nav-cta {
    margin-left: 0;
  }
}

@media (max-width: 640px) {
  .hero {
    padding-block: clamp(44px, 11vw, 64px);
  }

  .hero-lean {
    padding-block: clamp(36px, 9vw, 48px);
  }

  .hero-title {
    max-width: 100%;
  }

  .hero-sub {
    font-size: 1.05rem;
  }

  .btn-row {
    flex-direction: column;
    align-items: stretch;
  }

  .btn-row .btn {
    width: 100%;
    justify-content: center;
  }

  .section {
    padding-block: clamp(40px, 9vw, 56px);
  }

  .card,
  .scope-card {
    padding: 20px;
  }

  .footer-inner {
    grid-template-columns: 1fr;
    gap: 26px;
    padding-block: 38px;
  }

  .footer-note {
    max-width: none;
  }

  .data-table {
    font-size: 0.88rem;
  }

  .data-table td,
  .data-table thead th {
    padding: 10px 12px;
  }
}

/* ---------- Print ---------- */
@media print {
  .site-header,
  .site-nav,
  .site-footer,
  .skip-link,
  .btn-row {
    display: none !important;
  }

  body {
    background: #FFFFFF;
    color: #000000;
    min-height: 0;
    display: block;
  }

  .site-main {
    flex: none;
  }

  .hero,
  .section,
  .section-alt {
    background: #FFFFFF !important;
    background-image: none !important;
    border: 0;
    padding-block: 18px;
  }

  .card,
  .scope-card,
  .callout,
  .data-table {
    box-shadow: none;
    border: 1px solid #999999;
  }

  .scope-card {
    border-top: 3px solid #999999;
  }

  a,
  .legal-body a {
    color: inherit;
    text-decoration: none;
  }

  .table-wrap {
    overflow: visible;
  }

  .container,
  .hero-inner {
    max-width: 100%;
    padding-inline: 0;
  }
}
