/* ============================================
   DentalImplantInfo.ca — Brand & System pages
   Extends style.css. Uses its custom properties.
   ============================================ */

:root {
  --brand-accent: #b8863b;      /* editorial gold, for spec/technical accents */
  --brand-accent-soft: #f7f1e6;
  --evidence: #2f6f5e;          /* independent-evidence green */
  --evidence-soft: #eef5f2;
  --claim: #7a6a54;             /* manufacturer-claim neutral */
  --claim-soft: #faf7f2;
}

/* --- Brands mega menu --------------------------------------------- */
.dropdown-brands {
  display: none;
  grid-template-columns: repeat(3, minmax(190px, 1fr));
  gap: 0.15rem 0.5rem;
  width: max-content;
  max-width: min(94vw, 720px);
  padding: 0.9rem 1rem;
}
.has-dropdown:hover .dropdown-brands,
.has-dropdown:focus-within .dropdown-brands,
.has-dropdown.open .dropdown-brands { display: grid; }
.has-megamenu { position: relative; }
.has-megamenu .dropdown-brands { left: auto; right: 0; }
.dropdown-brands li { width: auto; }
.dropdown-brands a {
  display: block;
  padding: 0.5rem 0.7rem;
  border-radius: var(--radius);
  line-height: 1.35;
  white-space: nowrap;
}
.dropdown-brands a:hover { background: var(--color-primary-light); border-bottom-color: transparent; }
.nav-country {
  display: block;
  font-size: 0.72rem;
  color: var(--color-text-light);
  font-weight: 400;
  letter-spacing: 0.01em;
}

/* --- Breadcrumbs --------------------------------------------------- */
.breadcrumbs {
  background: var(--color-bg-alt);
  border-bottom: 1px solid var(--color-border);
  font-size: 0.84rem;
}
.breadcrumbs .container { max-width: var(--max-width); margin: 0 auto; padding: 0.7rem 1.5rem; }
.breadcrumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: 0.4rem; margin: 0; padding: 0; }
.breadcrumbs li { color: var(--color-text-light); }
.breadcrumbs li + li::before { content: "›"; margin-right: 0.45rem; color: var(--color-border); }
.breadcrumbs a { border-bottom: none; }
.breadcrumbs a:hover { text-decoration: underline; }
.breadcrumbs [aria-current] { color: var(--color-text); font-weight: 500; }

/* --- Brand / system hero ------------------------------------------- */
.brand-hero {
  background: linear-gradient(160deg, var(--color-primary-dark) 0%, var(--color-primary) 62%, #24407f 100%);
  color: var(--color-white);
  padding: 3.5rem 1.5rem 3rem;
}
.brand-hero .container { max-width: 1100px; margin: 0 auto; }
.brand-hero .eyebrow {
  font-size: 0.76rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #a9bce4;
  font-weight: 600;
  margin-bottom: 0.75rem;
}
.brand-hero h1 { font-family: var(--font-heading); color: var(--color-white); font-size: clamp(2.1rem, 4.6vw, 3.2rem); line-height: 1.1; margin-bottom: 1rem; letter-spacing: -0.01em; }
.brand-hero .lede { font-size: 1.1rem; max-width: 62ch; color: #dbe3f2; }
.brand-meta {
  display: flex; flex-wrap: wrap; gap: 0 2.2rem;
  margin-top: 1.8rem; padding-top: 1.4rem;
  border-top: 1px solid rgba(255,255,255,0.18);
}
.brand-meta div { padding: 0.35rem 0; }
.brand-meta dt { font-size: 0.72rem; letter-spacing: 0.1em; text-transform: uppercase; color: #97ace0; font-weight: 600; }
.brand-meta dd { margin: 0.15rem 0 0; font-size: 0.98rem; color: var(--color-white); font-weight: 500; }

/* --- At-a-glance spec panel ---------------------------------------- */
.glance {
  background: var(--color-bg-alt);
  border: 1px solid var(--color-border);
  border-left: 3px solid var(--brand-accent);
  border-radius: var(--radius);
  padding: 1.6rem 1.8rem;
  margin: 2rem 0;
}
.glance h2, .glance h3 {
  font-size: 0.78rem; letter-spacing: 0.13em; text-transform: uppercase;
  color: var(--brand-accent); margin-bottom: 1.1rem; font-family: var(--font-body); font-weight: 700;
}
.glance dl { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 1.1rem 2rem; margin: 0; }
.glance dt { font-size: 0.74rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--color-text-light); font-weight: 600; }
.glance dd { margin: 0.2rem 0 0; font-weight: 500; line-height: 1.5; }

/* --- Spec tables ---------------------------------------------------- */
.table-scroll { overflow-x: auto; margin: 1.8rem 0; -webkit-overflow-scrolling: touch; }
table.spec {
  width: 100%; border-collapse: collapse; font-size: 0.93rem; min-width: 520px;
}
table.spec caption {
  text-align: left; font-size: 0.8rem; color: var(--color-text-light);
  padding-bottom: 0.7rem; font-style: italic;
}
table.spec th, table.spec td { padding: 0.7rem 0.9rem; text-align: left; border-bottom: 1px solid var(--color-border); vertical-align: top; }
table.spec thead th {
  background: var(--color-primary); color: var(--color-white);
  font-size: 0.76rem; letter-spacing: 0.07em; text-transform: uppercase; font-weight: 600;
  border-bottom: none; position: sticky; top: 0;
}
table.spec tbody tr:nth-child(even) { background: var(--color-bg-alt); }
table.spec tbody th { font-weight: 600; color: var(--color-primary); }
table.spec td.num { font-variant-numeric: tabular-nums; white-space: nowrap; }

/* Comparison table: sticky first column */
table.compare th:first-child, table.compare td:first-child {
  position: sticky; left: 0; background: var(--color-white); z-index: 1;
  border-right: 1px solid var(--color-border); font-weight: 600;
}
table.compare tbody tr:nth-child(even) td:first-child { background: var(--color-bg-alt); }
table.compare thead th:first-child { background: var(--color-primary); z-index: 2; }

/* --- System lineup cards -------------------------------------------- */
.system-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 1.2rem; margin: 2rem 0; }
.system-card {
  display: block; padding: 1.5rem 1.6rem;
  border: 1px solid var(--color-border); border-radius: var(--radius);
  background: var(--color-white); box-shadow: var(--shadow);
  transition: box-shadow var(--transition), transform var(--transition), border-color var(--transition);
  border-bottom: 1px solid var(--color-border);
}
.system-card:hover { box-shadow: var(--shadow-lg); transform: translateY(-2px); border-color: var(--color-accent); }
.system-card h3 { font-size: 1.16rem; margin-bottom: 0.3rem; color: var(--color-primary); }
.system-card .sys-type {
  font-size: 0.72rem; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--brand-accent); font-weight: 700; margin-bottom: 0.6rem;
}
.system-card p { font-size: 0.93rem; color: var(--color-text-light); margin: 0; line-height: 1.6; }
.system-card .sys-spec {
  margin-top: 0.9rem; padding-top: 0.8rem; border-top: 1px solid var(--color-border);
  font-size: 0.82rem; color: var(--color-text-light); font-variant-numeric: tabular-nums;
}

/* --- Callouts: jargon decoder, claims, evidence ---------------------- */
.decode, .claim-box, .evidence-box, .caution-box {
  border-radius: var(--radius); padding: 1.3rem 1.5rem; margin: 1.8rem 0;
  border-left: 3px solid; font-size: 0.96rem;
}
.decode { background: var(--brand-accent-soft); border-left-color: var(--brand-accent); }
.claim-box { background: var(--claim-soft); border-left-color: var(--claim); }
.evidence-box { background: var(--evidence-soft); border-left-color: var(--evidence); }
.caution-box { background: #fdf3f0; border-left-color: #b5563c; }
.decode > .label, .claim-box > .label, .evidence-box > .label, .caution-box > .label {
  display: block; font-size: 0.72rem; letter-spacing: 0.12em; text-transform: uppercase;
  font-weight: 700; margin-bottom: 0.6rem;
}
.decode > .label { color: var(--brand-accent); }
.claim-box > .label { color: var(--claim); }
.evidence-box > .label { color: var(--evidence); }
.caution-box > .label { color: #b5563c; }
.decode p:last-child, .claim-box p:last-child, .evidence-box p:last-child, .caution-box p:last-child { margin-bottom: 0; }

/* --- Diagrams -------------------------------------------------------- */
figure.diagram { margin: 2.4rem 0; }
figure.diagram svg { width: 100%; height: auto; display: block; }
figure.diagram .diagram-frame {
  border: 1px solid var(--color-border); border-radius: var(--radius);
  background: var(--color-bg-alt); padding: 1.8rem 1.5rem;
}
figure.diagram figcaption {
  font-size: 0.84rem; color: var(--color-text-light);
  margin-top: 0.8rem; line-height: 1.6; font-style: italic;
}

/* --- Questions to ask ------------------------------------------------ */
.ask-list { list-style: none; padding: 0; margin: 1.5rem 0; counter-reset: ask; }
.ask-list li {
  counter-increment: ask; position: relative;
  padding: 0.8rem 0 0.8rem 3rem;
  border-bottom: 1px solid var(--color-border);
}
.ask-list li:last-child { border-bottom: none; }
.ask-list li::before {
  content: counter(ask); position: absolute; left: 0; top: 0.85rem;
  width: 1.9rem; height: 1.9rem; border-radius: 50%;
  background: var(--color-primary-light); color: var(--color-primary);
  display: grid; place-items: center; font-size: 0.8rem; font-weight: 700;
}

/* --- Brand index grid ------------------------------------------------ */
.brand-index { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 1.3rem; margin: 2.2rem 0; }
.brand-tile {
  display: flex; flex-direction: column; padding: 1.7rem 1.8rem;
  border: 1px solid var(--color-border); border-top: 3px solid var(--color-primary);
  border-radius: var(--radius); background: var(--color-white);
  box-shadow: var(--shadow); transition: box-shadow var(--transition), transform var(--transition);
}
.brand-tile:hover { box-shadow: var(--shadow-lg); transform: translateY(-2px); }
.brand-tile h3 { font-size: 1.3rem; margin-bottom: 0.15rem; color: var(--color-primary); }
.brand-tile .origin { font-size: 0.78rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--color-text-light); font-weight: 600; margin-bottom: 0.8rem; }
.brand-tile p { font-size: 0.94rem; color: var(--color-text-light); flex: 1; margin-bottom: 1rem; line-height: 1.6; }
.brand-tile .sys-count { font-size: 0.82rem; color: var(--brand-accent); font-weight: 600; }

/* --- Reference list --------------------------------------------------- */
.refs { font-size: 0.85rem; color: var(--color-text-light); line-height: 1.65; }
.refs ol { padding-left: 1.3rem; }
.refs li { margin-bottom: 0.55rem; }
.refs a { word-break: break-word; }
.source-note {
  font-size: 0.84rem; color: var(--color-text-light); font-style: italic;
  border-top: 1px solid var(--color-border); padding-top: 1rem; margin-top: 2.5rem;
}
.footer-disclaimer { font-size: 0.8rem; opacity: 0.75; margin-top: 0.8rem; }

/* --- Responsive ------------------------------------------------------- */
@media (max-width: 900px) {
  .dropdown-brands { grid-template-columns: 1fr 1fr; max-width: 100%; width: auto; }
}
@media (max-width: 700px) {
  .dropdown-brands { grid-template-columns: 1fr; padding: 0.5rem; }
  .dropdown-brands a { white-space: normal; }
  .brand-hero { padding: 2.5rem 1.25rem 2.2rem; }
  .brand-meta { gap: 0 1.4rem; }
  .glance { padding: 1.3rem 1.25rem; }
  table.compare th:first-child, table.compare td:first-child { position: static; }
}


/* ============================================
   v2 — editorial measure, breakouts, motion
   ============================================ */

/* Reading measure for generated brand/system pages */
.content-section { padding: 2.5rem 1.5rem 4.5rem; }
.content-section > .container {
  max-width: 800px;
  margin: 0 auto;
}
.content-section .lede { font-size: 1.12rem; color: var(--color-text-light); }

/* Editorial headings — mirrors .page-content in style.css */
.content-section h2 {
  font-family: var(--font-heading);
  font-size: 1.85rem;
  font-weight: 700;
  color: var(--color-primary-dark);
  margin: 3.4rem 0 1.1rem;
  letter-spacing: -0.01em;
  padding-left: 1.25rem;
  border-left: 4px solid var(--color-accent);
  line-height: 1.3;
}
.content-section h3 {
  font-family: var(--font-heading);
  font-size: 1.3rem;
  font-weight: 600;
  color: var(--color-text);
  margin: 2.25rem 0 0.75rem;
  font-style: italic;
}
.content-section p { margin-bottom: 1.2rem; }
.content-section ul, .content-section ol { margin: 0 0 1.4rem 1.4rem; }
.content-section li { margin-bottom: 0.45rem; }
/* headings inside panels keep their own compact style */
.content-section .glance h2, .content-section .glance h3,
.content-section .system-card h3, .content-section .brand-tile h3,
.content-section .cta-banner h2 {
  border-left: none; padding-left: 0; margin-top: 0; font-style: normal; letter-spacing: 0;
}
.content-section .cta-banner h2 { color: var(--color-white); margin-bottom: 0.75rem; }
.content-section .system-card h3 { font-size: 1.16rem; margin-bottom: 0.3rem; color: var(--color-primary); }

/* Breakout: wide components escape the reading measure, prose does not */
.breakout,
.content-section .glance,
.content-section .system-grid,
.content-section figure.diagram,
.content-section .table-scroll,
.content-section .cta-banner,
.page-content .table-scroll,
.page-content .brand-index,
.page-content figure.diagram {
  --bw: min(1100px, calc(100vw - 4rem));
  width: var(--bw);
  margin-left: calc(50% - var(--bw) / 2);
  margin-right: 0;
}
.content-section .glance { margin-top: 2.4rem; margin-bottom: 2.6rem; }
.content-section .system-grid { margin-top: 2rem; margin-bottom: 2.6rem; }
.content-section figure.diagram, .page-content figure.diagram { margin-top: 2.6rem; margin-bottom: 2.8rem; }
.content-section .table-scroll, .page-content .table-scroll { margin-top: 1.8rem; margin-bottom: 2.2rem; }
.content-section .cta-banner { margin-top: 3.5rem; margin-bottom: 2.5rem; }
.page-content .brand-index { margin-top: 2.2rem; margin-bottom: 2.2rem; }

/* Diagrams: give them room, make captions legible */
figure.diagram .diagram-frame { padding: 2.4rem 2rem; }
figure.diagram figcaption {
  font-size: 0.95rem; color: var(--color-text-light); font-style: normal;
  margin-top: 1rem; line-height: 1.65; max-width: 72ch; margin-left: auto; margin-right: auto; text-align: center;
}
figure.diagram svg { max-width: 860px; margin: 0 auto; }

/* Spec panel: quieter label, calmer grid */
.glance dl { gap: 1.2rem 2.4rem; }
.glance dd { font-size: 0.98rem; }

/* Source note / references: keep in the measure, subdued */
.source-note { margin-top: 3rem; }

/* Page entrance — restrained, and off for reduced-motion users */
@media (prefers-reduced-motion: no-preference) {
  .brand-hero .eyebrow, .brand-hero h1, .brand-hero .lede, .brand-hero .brand-meta,
  .hero h1, .hero p, .hero .hero-buttons {
    animation: rise 0.4s cubic-bezier(0.2, 0.7, 0.2, 1) both;
  }
  .brand-hero h1, .hero p { animation-delay: 0.05s; }
  .brand-hero .lede, .hero .hero-buttons { animation-delay: 0.1s; }
  .brand-hero .brand-meta { animation-delay: 0.15s; }
  main > .content-section, main > .page-content > *, main > .section-cards {
    animation: rise 0.4s cubic-bezier(0.2, 0.7, 0.2, 1) 0.12s both;
  }
  @keyframes rise {
    from { opacity: 0; transform: translateY(10px); }
    to   { opacity: 1; transform: none; }
  }
}
h2[id], h3[id] { scroll-margin-top: 5rem; }

@media (max-width: 900px) {
  .has-megamenu .dropdown-brands { left: 0; right: auto; }
  .breakout,
  .content-section .glance, .content-section .system-grid, .content-section figure.diagram,
  .content-section .table-scroll, .content-section .cta-banner,
  .page-content .table-scroll, .page-content .brand-index, .page-content figure.diagram {
    --bw: 100%; width: 100%; margin-left: 0;
  }
  .content-section { padding: 2rem 1.25rem 3.5rem; }
  .content-section h2 { font-size: 1.55rem; margin-top: 2.6rem; }
  figure.diagram .diagram-frame { padding: 1.2rem 0.75rem; }
}

/* At-a-glance keeps its small label heading, not the editorial H2 */
.content-section .glance h2 {
  font-family: var(--font-body); font-size: 0.78rem; letter-spacing: 0.13em;
  text-transform: uppercase; color: var(--brand-accent); font-weight: 700; margin-bottom: 1.1rem;
}
/* Breadcrumb band aligns with the hero and breakout edge */
.breadcrumbs .container { max-width: 1100px; }

/* Mega-menu footer row: hub + compare, reachable on touch where the parent link only toggles */
.dropdown-brands .nav-all {
  grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 0.25rem 1.5rem;
  margin-top: 0.5rem; padding-top: 0.6rem; border-top: 1px solid var(--color-border);
}
.dropdown-brands .nav-all a { color: var(--color-primary); font-weight: 600; font-size: 0.86rem; }

/* Review line in the breadcrumb band */
.breadcrumbs .container { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; }
.breadcrumbs .reviewed { font-size: 0.78rem; color: var(--color-text-light); white-space: nowrap; }
@media (max-width: 700px) { .breadcrumbs .reviewed { white-space: normal; } }

/* Footer headings as h3 (no h2->h4 skip); visual match to the original h4 rule */
.footer-col h3.footer-h { color: var(--color-white); font-family: var(--font-heading); font-size: 1.05rem; margin: 0 0 1rem; font-weight: 700; font-style: normal; }
/* Visible FAQ on brand pages */
.faq-list { margin: 0.5rem 0 1.5rem; }
details.faq { border-bottom: 1px solid var(--color-border); padding: 0.85rem 0; }
details.faq summary { cursor: pointer; font-weight: 600; color: var(--color-primary); list-style: none; display: flex; justify-content: space-between; gap: 1rem; }
details.faq summary::-webkit-details-marker { display: none; }
details.faq summary::after { content: "+"; color: var(--brand-accent); font-weight: 700; }
details.faq[open] summary::after { content: "\2013"; }
details.faq p { margin: 0.7rem 0 0; color: var(--color-text); }
