/* ----------------------------------------------------------
   Base styles
---------------------------------------------------------- */

:root {
  --color-primary: #0057b8;        /* Clean clinical blue */
  --color-primary-dark: #003f82;
  --color-secondary: #e8f1fb;      /* Soft dental blue */
  --color-accent: #00a8e8;         /* Highlight blue */
  --color-text: #1a1a1a;
  --color-text-muted: #555;
  --color-bg: #ffffff;
  --color-bg-alt: #f7f9fc;
  --color-border: #e0e6ef;

  --font-body: "Inter", Arial, sans-serif;
  --font-heading: "Inter", Arial, sans-serif;

  --max-width: 1200px;
  --radius: 8px;
  --shadow: 0 4px 12px rgba(0,0,0,0.06);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: var(--font-body);
  color: var(--color-text);
  background: var(--color-bg);
  line-height: 1.6;
  font-size: 17px;
}

img {
  max-width: 100%;
  display: block;
}

@media (max-width: 768px) {
  header nav {
    flex-direction: column;
    align-items: flex-start;
  }
}

.container {
  width: 90%;
  max-width: var(--max-width);
  margin: 0 auto;
}

/* ----------------------------------------------------------
   Header
---------------------------------------------------------- */

/* Base layout
.nav-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem;
}

Hide nav by default on mobile
.nav-links {
  display: none;
  flex-direction: column;
  gap: 1rem;
  margin-top: 1rem;
}

Hamburger button
.hamburger {
  display: flex;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
}

.hamburger span {
  width: 24px;
  height: 2px;
  background: #000;
  transition: 0.3s;
}

When menu is open
.nav-links.open {
  display: flex;
} */

/* Desktop breakpoint */
@media (min-width: 768px) {
  .hamburger {
    display: none;
  }

  .nav-links {
    display: flex;
    flex-direction: row;
    gap: 2rem;
    margin: 0;
  }
}


  header .cta-button {
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
  }


.site-header {
  background: var(--color-bg);
  border-bottom: 1px solid var(--color-border);
  padding: 16px 0;
  position: sticky;
  top: 0;
  z-index: 1000;
}

.header-inner {
  display: flex;
  align-items: center;
}

.logo {
  flex: 0 0 25%;
}

.main-nav {
  margin-left: 25%;
}

.logo a {
  text-decoration: none;
  color: var(--color-text);
  display: flex;
  align-items: center;
  gap: 8px;
}

.logo-mark {
  background: var(--color-primary);
  color: #fff;
  padding: 6px 10px;
  border-radius: var(--radius);
  font-weight: 700;
}

.logo-text {
  font-size: 20px;
  font-weight: 600;
}

.main-nav {
  position: relative;
}

.main-nav ul {
  list-style: none;
}

.main-nav a {
  text-decoration: none;
  color: var(--color-text);
  font-weight: 600;
  font-size: 1.125rem;
  padding: 8px 12px;
  border-radius: 4px;
  transition: all 0.2s ease;
  display: inline-block;
}

.main-nav a:hover {
  color: var(--color-primary);
  background-color: var(--color-secondary);
}

.main-nav .cta-button {
  background-color: var(--color-primary);
  color: #fff;
  font-weight: 600;
}

.main-nav .cta-button:hover {
  background-color: var(--color-primary-dark);
  color: #fff;
}

/* ----------------------------------------------------------
   Mobile Navigation Layer (added after desktop CSS)
---------------------------------------------------------- */

/* Hamburger button (hidden on desktop) */
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 12px;
  pointer-events: auto;
}

.nav-toggle-bar {
  width: 24px;
  height: 2px;
  background: var(--color-text);
  transition: 0.3s;
}

/* Hamburger animation when open */
.nav-toggle.open .nav-toggle-bar:nth-child(1) {
  transform: rotate(-45deg) translate(-5px, 5px);
}

.nav-toggle.open .nav-toggle-bar:nth-child(2) {
  opacity: 0;
}

.nav-toggle.open .nav-toggle-bar:nth-child(3) {
  transform: rotate(45deg) translate(-5px, -5px);
}

/* Mobile behaviour */
@media (max-width: 768px) {

  .site-header {
    padding: 12px 0;
  }

  /* Adjust header layout for mobile */
  .header-inner {
    position: relative;
  }

  .logo {
    flex: none;
  }

  .nav-toggle {
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    z-index: 1004;
  }

  .main-nav {
    margin-left: 0;
  }

  /* Hide the desktop nav on mobile */
  .main-nav ul {
    display: none;
    flex-direction: column;
    gap: 1rem;
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: var(--color-bg);
    padding: 5rem 1rem 1rem 1rem;
    z-index: 1003;
    box-sizing: border-box;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
  }

  /* Close button for mobile menu */
  .main-nav ul::before {
    content: '×';
    position: absolute;
    top: 1rem;
    right: 1rem;
    font-size: 2rem;
    color: var(--color-text);
    cursor: pointer;
    z-index: 1004;
  }

  /* Mobile menu overlay */
  .main-nav.nav-open::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1002;
    opacity: 0;
    transition: opacity 0.3s ease;
  }

  /* Show nav when hamburger is toggled */
  .main-nav.nav-open ul {
    display: flex;
    opacity: 1;
    visibility: visible;
  }

  .main-nav.nav-open::before {
    opacity: 1;
  }

  /* Show hamburger on mobile */
  .nav-toggle {
    display: flex;
  }
}

/* Desktop override (restores original layout) */
@media (min-width: 769px) {
  .nav-toggle {
    display: none;
  }

  .main-nav ul {
    display: flex;
    flex-direction: row;
    gap: 24px;
  }
}

/* ----------------------------------------------------------
   Buttons
---------------------------------------------------------- */

.btn {
  display: inline-block;
  padding: 12px 20px;
  border-radius: var(--radius);
  text-decoration: none;
  font-weight: 600;
  transition: 0.2s ease;
}

.btn-primary {
  background: var(--color-primary);
  color: #fff;
}

.btn-primary:hover {
  background: var(--color-primary-dark);
}

.btn-secondary {
  background: var(--color-secondary);
  color: var(--color-primary);
}

.btn-secondary:hover {
  background: #d7e7f7;
}

.btn-small {
  padding: 8px 14px;
  font-size: 14px;
}

/* ----------------------------------------------------------
   Hero
---------------------------------------------------------- */

.hero-card {
  padding: 2rem 2.25rem;
  border-radius: 12px;
  background: #ffffff;
  border: 1px solid #e6e6e6;
  box-shadow:
    0 2px 4px rgba(0,0,0,0.03),
    0 8px 20px rgba(0,0,0,0.04);
}

.hero-card h2 {
  font-size: 1.25rem;
  margin-bottom: 1rem;
  letter-spacing: 0.2px;
}

/* Make section headings span the full width of their container (specific to ORI section)
   Ensures the heading uses the full box width rather than collapsing to content width. */
#stability-score h2,
.section h2 {
  display: block;
  width: 100%;
}

.hero-metrics li {
  display: flex;
  justify-content: space-between;
  padding: 0.35rem 0;
  border-bottom: 1px solid #f2f2f2;
}

.hero-metrics li:last-child {
  border-bottom: none;
}

.metric-label {
  font-size: 0.95rem;
  color: #444;
}

.metric-value {
  font-weight: 600;
  color: #111;
}

.hero-card-note {
  margin-top: 1.25rem;
  font-size: 0.9rem;
  color: #666;
  line-height: 1.45;
  letter-spacing: 0.15px;
}

.hero {
  padding: 6rem 0 5rem;
  background: linear-gradient(
    to bottom,
    #f7f7f7 0%,
    #ffffff 100%
  );
}

.hero {
  padding: 6rem 0 5rem;
  background: linear-gradient(
    to bottom,
    #f7f7f7 0%,
    #ffffff 100%
  );
}

.hero {
  padding: 80px 0;
  background: var(--color-bg-alt);
}

.hero-inner {
  display: flex;
  align-items: center;
  gap: 60px;
}

.hero-copy {
  flex: 1;
}

.hero-copy h1 {
  font-size: 42px;
  line-height: 1.2;
  margin-bottom: 20px;
}

.hero-subtitle {
  font-size: 20px;
  color: var(--color-text-muted);
  margin-bottom: 30px;
}

.hero-actions {
  display: flex;
  gap: 16px;
  margin-bottom: 20px;
}

.hero-meta {
  font-size: 15px;
  color: var(--color-text-muted);
}

.hero-visual {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

.hero-card {
  background: #fff;
  padding: 24px;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.hero-card h2 {
  font-size: 20px;
  margin-bottom: 16px;
}

.hero-metrics {
  list-style: none;
  margin-bottom: 16px;
}

.hero-metrics li {
  display: flex;
  justify-content: space-between;
  padding: 8px 0;
  border-bottom: 1px solid var(--color-border);
}

.metric-label {
  color: var(--color-text-muted);
}

.metric-value {
  font-weight: 600;
}

.metric-warning {
  color: #d9534f;
}

.metric-score {
  color: var(--color-primary);
}

.hero-card-note {
  font-size: 14px;
  color: var(--color-text-muted);
}

/* ----------------------------------------------------------
   Sections
---------------------------------------------------------- */

.section {
  padding: 80px 0;
}

.section-alt {
  background: var(--color-bg-alt);
}

.section-intro {
  max-width: 700px;
  margin-bottom: 40px;
  color: var(--color-text-muted);
}

/* ----------------------------------------------------------
   Grid
---------------------------------------------------------- */

.grid {
  display: grid;
  gap: 40px;
}

.grid-2 {
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

.grid-3 {
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

/* ----------------------------------------------------------
   Cards
---------------------------------------------------------- */

.card,
.tier-card {
  background: #fff;
  padding: 24px;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.card h3,
.tier-card h3 {
  margin-bottom: 12px;
}

.tier-tagline {
  color: var(--color-text-muted);
  margin-bottom: 16px;
}

.tier-points {
  list-style: none;
  margin-bottom: 16px;
}

.tier-points li {
  margin-bottom: 8px;
}

.tier-outcome {
  font-weight: 500;
  color: var(--color-primary-dark);
}

/* ----------------------------------------------------------
   Bullet lists
---------------------------------------------------------- */

.bullet-list {
  list-style: disc;
  padding-left: 20px;
  margin-bottom: 20px;
}

.bullet-list li {
  margin-bottom: 8px;
}

/* ----------------------------------------------------------
   Muted note
---------------------------------------------------------- */

.section-muted {
  background: #f0f4f9;
  padding: 40px 0;
}

.muted-note {
  text-align: center;
  color: var(--color-text-muted);
  font-size: 15px;
}

/* ----------------------------------------------------------
   Contact form
---------------------------------------------------------- */

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.contact-form input,
.contact-form textarea {
  padding: 12px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  font-size: 16px;
}

.contact-form input:focus,
.contact-form textarea:focus {
  outline: none;
  border-color: var(--color-primary);
}

.contact-alt {
  margin-top: 16px;
  font-size: 15px;
  color: var(--color-text-muted);
}

/* ----------------------------------------------------------
   Footer
---------------------------------------------------------- */

.site-footer {
  background: var(--color-bg);
  border-top: 1px solid var(--color-border);
  padding: 40px 0;
  text-align: center;
}

.footer-meta {
  color: var(--color-text-muted);
  font-size: 15px;
  margin-top: 8px;
}

/* Tier Summary Table */
.tier-summary-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 3rem 1rem;
}

.tier-summary-table td {
  vertical-align: top;
  padding: 1rem;
}

/* Diagnostic Pill */
.diagnostic-pill {
  text-align: center;
  margin: 0;
  padding: 0.75rem 1.5rem;
  background: var(--color-secondary);
  color: var(--color-primary);
  border-radius: 50px;
  font-weight: 600;
  font-size: 1.1rem;
  display: inline-block;
  box-shadow: var(--shadow);
}

/* ----------------------------------------------------------
   Responsive
---------------------------------------------------------- */

@media (max-width: 900px) {
  .hero-inner {
    flex-direction: column;
  }
}

@media (min-width: 768px) {
  .hamburger {
    display: none !important;
  }

  .nav-links {
    display: flex !important;
    flex-direction: row;
    gap: 2rem;
    margin: 0;
  }
}

/* Ensure section intro paragraphs in the stability section use full container width */
#stability-score .section-intro {
  display: block;
  width: 100%;
  max-width: none;
  white-space: normal;
  word-break: break-word;
  margin-bottom: 1rem;
}



