/* =========================
   Base Reset
   ========================= */

* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
}

body {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
               Roboto, "Helvetica Neue", Arial, sans-serif;
  background: #f4f5f7;
  color: #0f172a;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

/* =========================
   Header / Footer
   ========================= */

.site-header,
.site-footer {
  background: #0b1220;
  color: #ffffff;
}

.site-header {
  height: 80px;
  display: flex;
  align-items: center;
  box-shadow: 0 1px 0 rgba(255,255,255,0.05), 0 4px 24px rgba(0,0,0,0.22);
  position: sticky;
  top: 0;
  z-index: 100;
}

.site-footer {
  padding: 72px 24px 64px;
  font-size: 14px;
  border-top: 1px solid rgba(255,255,255,0.07);
}

.site-header a,
.site-footer a {
  color: #ffffff;
  text-decoration: none;
}

/* =========================
   Header Layout
   ========================= */

.site-header-inner {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}

.site-brand a {
  font-size: 17px;
  font-weight: 700;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  color: #ffffff;
  opacity: 0.95;
  transition: opacity 0.2s ease;
}

.site-brand a:hover {
  opacity: 1;
}

.site-nav {
  display: flex;
  align-items: center;
}

.site-nav a {
  font-weight: 500;
  margin-left: 36px;
  font-size: 13px;
  letter-spacing: 0.2px;
  opacity: 0.72;
  transition: opacity 0.2s ease;
}

.site-nav a:hover {
  opacity: 1;
}

/* =========================
   Layout Containers
   ========================= */

.site-main {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 40px 140px 40px;
}

.page-content {
  max-width: 860px;
  margin: 0 auto;
  padding: 100px 40px 120px;
}

/* =========================
   Section Rhythm
   ========================= */

.site-main > section {
  padding: 120px 0;
  border-bottom: 1px solid rgba(15,23,42,0.07);
}

.site-main > section:last-of-type {
  border-bottom: none;
}

.page-content > section {
  margin-bottom: 100px;
}

/* =========================
   Hero
   ========================= */

.hero {
  display: grid;
  grid-template-columns: 1.25fr 0.75fr;
  gap: 100px;
  padding: 140px 0 120px 0;
  border-bottom: 1px solid rgba(15,23,42,0.07);
}

.hero-content h1 {
  font-size: 54px;
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: -0.8px;
  margin-bottom: 36px;
  color: #0b1220;
}

.hero-content p {
  font-size: 17px;
  color: #475569;
  margin-bottom: 24px;
  max-width: 580px;
  line-height: 1.75;
}

.hero-actions {
  margin-top: 44px;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px;
}

.hero-visual {
  min-height: 420px;
  border-radius: 8px;
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
  box-shadow: 0 32px 80px rgba(15, 23, 42, 0.12), 0 0 0 1px rgba(15,23,42,0.06);
}

/* =========================
   Buttons
   ========================= */

.cta-button {
  display: inline-block;
  padding: 14px 30px;
  background: #1e3a5f;
  color: #ffffff;
  text-decoration: none;
  border-radius: 6px;
  font-weight: 600;
  font-size: 14px;
  letter-spacing: 0.3px;
  transition: background 0.2s ease, box-shadow 0.2s ease, transform 0.15s ease;
  box-shadow: 0 2px 8px rgba(30,58,95,0.18);
}

.cta-button:hover {
  background: #274b78;
  box-shadow: 0 4px 16px rgba(30,58,95,0.28);
  transform: translateY(-1px);
}

.cta-button.secondary {
  background: transparent;
  color: #1e3a5f;
  border: 1.5px solid rgba(30,58,95,0.35);
  box-shadow: none;
}

.cta-button.secondary:hover {
  background: rgba(30, 58, 95, 0.05);
  border-color: rgba(30,58,95,0.6);
  transform: translateY(-1px);
}

/* =========================
   Headings
   ========================= */

h1, h2, h3 {
  margin-top: 0;
}

h2 {
  font-size: 32px;
  font-weight: 700;
  letter-spacing: -0.3px;
  margin-bottom: 28px;
  color: #0b1220;
}

h3 {
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -0.1px;
  margin-bottom: 12px;
  color: #0f172a;
}

/* =========================
   Page Content Typography
   ========================= */

.page-content h1 {
  font-size: 42px;
  font-weight: 700;
  letter-spacing: -0.6px;
  line-height: 1.1;
  margin-bottom: 36px;
  color: #0b1220;
  padding-bottom: 28px;
  border-bottom: 1px solid rgba(15,23,42,0.08);
}

.page-content p {
  font-size: 16px;
  color: #334155;
  line-height: 1.8;
  margin-bottom: 20px;
}

.page-content ul {
  color: #334155;
  line-height: 1.8;
  margin-bottom: 24px;
  padding-left: 22px;
}

.page-content ul li {
  margin-bottom: 8px;
}

.page-content h2 {
  font-size: 26px;
  margin-top: 56px;
  margin-bottom: 20px;
  padding-top: 0;
}

/* =========================
   Home Visual Blocks
   ========================= */

.home-visual {
  width: 100%;
  height: 400px;
  margin-top: 48px;
  border-radius: 10px;
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
  border: 1px solid rgba(15,23,42,0.08);
  box-shadow: 0 20px 60px rgba(15,23,42,0.1), 0 0 0 1px rgba(15,23,42,0.04);
}

/* =========================
   Inputs
   ========================= */

input[type="number"],
input[type="text"] {
  padding: 10px 14px;
  border-radius: 6px;
  border: 1.5px solid #cbd5e1;
  font-size: 15px;
  background: #ffffff;
  color: #0f172a;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  width: 200px;
}

input:focus {
  outline: none;
  border-color: #1e3a5f;
  box-shadow: 0 0 0 3px rgba(30,58,95,0.1);
}

/* =========================
   Footer Grid
   ========================= */

.site-footer-inner {
  max-width: 1180px;
  margin: 0 auto;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: start;
  gap: 40px;
}

.footer-left {
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-left a {
  opacity: 0.75;
  font-size: 14px;
  transition: opacity 0.2s ease;
}

.footer-left a:hover {
  opacity: 1;
}

.footer-center {
  text-align: center;
}

.footer-center p {
  opacity: 0.5;
  font-size: 13px;
  margin-bottom: 12px;
}

.footer-nav {
  display: flex;
  justify-content: center;
  gap: 20px;
}

.footer-nav a {
  opacity: 0.5;
  font-size: 13px;
  transition: opacity 0.2s ease;
}

.footer-nav a:hover {
  opacity: 0.85;
}

.footer-right {
  text-align: right;
}

.footer-right address {
  font-style: normal;
  line-height: 1.7;
  opacity: 0.55;
  font-size: 13px;
}

/* =========================
   Back to Top
   ========================= */

.back-to-top {
  position: fixed;
  right: 28px;
  bottom: 28px;
  z-index: 999;
  width: 44px;
  height: 44px;
  border-radius: 999px;
  border: 1px solid rgba(15,23,42,0.16);
  background: #ffffff;
  color: #0f172a;
  font-size: 16px;
  line-height: 1;
  display: none;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 8px 32px rgba(15,23,42,0.12);
  transition: box-shadow 0.2s ease, transform 0.15s ease;
}

.back-to-top:hover {
  box-shadow: 0 12px 40px rgba(15,23,42,0.18);
  transform: translateY(-2px);
}

.back-to-top.show {
  display: flex;
}

/* =========================
   Diagnostic Cards (hub + diagnostics page)
   ========================= */

.diag-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  margin-top: 32px;
}

.diag-card {
  background: #ffffff;
  border: 1px solid rgba(15,23,42,0.08);
  border-left: 3px solid rgba(15,23,42,0.08);
  border-radius: 8px;
  padding: 24px 26px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.15s ease;
}

.diag-card:hover {
  border-left-color: #1e3a5f;
  box-shadow: 0 8px 32px rgba(15,23,42,0.08);
  transform: translateY(-2px);
}

.diag-card h3 {
  font-size: 17px;
  margin-bottom: 10px;
  color: #0b1220;
}

.diag-card p {
  font-size: 14px;
  color: #475569;
  margin: 0 0 10px 0;
  line-height: 1.65;
}

.diag-card p:last-child {
  margin-bottom: 0;
}

.diag-card a {
  color: #1e3a5f;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  letter-spacing: 0.2px;
  opacity: 0.85;
  transition: opacity 0.2s ease;
}

.diag-card a:hover {
  opacity: 1;
}

.diag-card ul {
  margin: 10px 0 0 18px;
  color: #475569;
  font-size: 14px;
  line-height: 1.65;
}

.diag-card ul li {
  margin-bottom: 6px;
}

@media (min-width: 900px) {
  .diag-grid {
    grid-template-columns: 1fr 1fr;
  }

  .diag-grid.single-col {
    grid-template-columns: 1fr;
  }
}

@media (min-width: 1100px) {
  .diag-grid.three-col {
    grid-template-columns: 1fr 1fr 1fr;
  }
}

/* =========================
   Tool Pages
   ========================= */

.site-main.tool-page {
  padding-top: 0;
  padding-bottom: 100px;
}

.tool-intro {
  max-width: 760px;
  margin: 0 auto;
  padding: 72px 0 56px;
  border-bottom: 1px solid rgba(15,23,42,0.08);
}

.tool-eyebrow {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: #1e3a5f;
  margin-bottom: 16px;
  opacity: 0.85;
}

.tool-intro h1 {
  font-size: 40px;
  font-weight: 700;
  letter-spacing: -0.5px;
  line-height: 1.1;
  margin-bottom: 28px;
  color: #0b1220;
}

.tool-intro p {
  font-size: 16px;
  color: #475569;
  line-height: 1.8;
  margin-bottom: 18px;
}

.tool-intro p:last-child {
  margin-bottom: 0;
}

/* =========================
   Tool Section + Input Grid
   ========================= */

.tool-section {
  max-width: 900px;
  margin: 0 auto;
  padding-top: 48px;
}

.tool-section p {
  color: #475569;
  margin-bottom: 16px;
  font-size: 15px;
}

.tool-input-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
  margin-top: 0;
}

.tool-segment {
  background: #ffffff;
  border: 1px solid rgba(15,23,42,0.09);
  border-radius: 10px;
  padding: 28px;
  box-shadow: 0 2px 8px rgba(15,23,42,0.04);
}

.segment-description {
  font-size: 13px;
  font-weight: 600;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  margin-bottom: 18px;
}

.tool-field {
  display: flex;
  flex-direction: column;
}

.tool-field label {
  font-size: 14px;
  font-weight: 600;
  color: #1e293b;
  line-height: 1.3;
}

.tool-field input {
  width: 160px;
  flex-shrink: 0;
}

.tool-helper {
  font-size: 12px;
  color: #64748b;
  line-height: 1.5;
  max-width: 32ch;
}

/* =========================
   Data Visibility Paragraph
   ========================= */

.tool-visibility {
  max-width: 900px;
  margin: 36px auto 0;
  padding: 24px 28px;
  background: #f8fafc;
  border-radius: 8px;
  border: 1px solid rgba(15,23,42,0.07);
  border-left: 3px solid rgba(30,58,95,0.25);
}

.tool-visibility p {
  font-size: 14px;
  color: #475569;
  line-height: 1.75;
  margin: 0;
}

/* =========================
   Tool Buttons
   ========================= */

.tool-buttons {
  max-width: 900px;
  margin: 28px auto 0;
}

#calculateButton,
#shareWhatsAppButton,
#contactButton {
  padding: 13px 24px;
  border-radius: 7px;
  border: none;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.2px;
  cursor: pointer;
  transition: background 0.2s ease, box-shadow 0.2s ease, transform 0.15s ease;
  font-family: inherit;
}

#calculateButton,
#contactButton {
  background: #1e3a5f;
  color: #ffffff;
  box-shadow: 0 2px 8px rgba(30,58,95,0.2);
}

#calculateButton:hover,
#contactButton:hover {
  background: #274b78;
  box-shadow: 0 4px 16px rgba(30,58,95,0.3);
  transform: translateY(-1px);
}

#shareWhatsAppButton {
  background: #25D366;
  color: #ffffff;
  margin-left: 12px;
  box-shadow: 0 2px 8px rgba(37,211,102,0.2);
}

#shareWhatsAppButton:hover {
  background: #1ebe5d;
  box-shadow: 0 4px 16px rgba(37,211,102,0.3);
  transform: translateY(-1px);
}

/* =========================
   Tool Result / Report
   ========================= */

#result {
  max-width: 900px;
  margin: 32px auto 0;
  border-radius: 10px;
  background: #ffffff;
  border: 1px solid rgba(15,23,42,0.1);
  overflow: hidden;
  box-shadow: 0 4px 24px rgba(15,23,42,0.07);
}

#result p {
  margin: 0;
  padding: 14px 28px;
  font-size: 15px;
  color: #334155;
  line-height: 1.75;
}

#result p:has(> strong:only-child) {
  background: #f8fafc;
  border-top: 1px solid rgba(15,23,42,0.07);
  padding: 18px 28px 14px;
}

#result p:first-child:has(> strong:only-child) {
  border-top: none;
}

#result p:has(> strong:only-child) strong {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1.8px;
  text-transform: uppercase;
  color: #1e3a5f;
}

#result table {
  width: 100%;
  border-collapse: collapse;
  margin: 0;
  font-size: 14px;
}

#result thead tr {
  background: #f1f5f9;
}

#result th {
  padding: 11px 18px;
  text-align: left;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: #64748b;
  border-bottom: 1px solid #e2e8f0;
}

#result td {
  padding: 11px 18px;
  color: #334155;
  border-bottom: 1px solid #f1f5f9;
}

#result tr:last-child td {
  border-bottom: none;
}

/* =========================
   Segment Fields (legacy support)
   ========================= */

.segment-fields {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: center;
}

.segment-fields label {
  font-size: 14px;
  font-weight: 600;
  color: #1e293b;
}

.segment-fields input {
  width: 180px;
}

/* =========================
   Mobile Hamburger
   ========================= */

.nav-toggle {
  display: none;
}

.nav-toggle-label {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  cursor: pointer;
}

.nav-toggle-label span {
  width: 24px;
  height: 2px;
  background: #ffffff;
  display: block;
  border-radius: 1px;
}

/* =========================
   Responsive
   ========================= */

@media (max-width: 900px) {

  .hero {
    grid-template-columns: 1fr;
    gap: 48px;
    padding: 80px 0 60px 0;
  }

  .hero-visual {
    min-height: 280px;
  }

  .hero-actions {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }

  .cta-button.secondary {
    margin-left: 0;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 28px;
  }

  .footer-left,
  .footer-right {
    text-align: center;
  }

  .footer-nav {
    justify-content: center;
  }

  .home-visual {
    height: 260px;
  }

  .site-main {
    padding-left: 24px;
    padding-right: 24px;
  }

  .page-content {
    padding-left: 24px;
    padding-right: 24px;
    padding-top: 64px;
  }

  .page-content h1 {
    font-size: 34px;
  }

}

@media (max-width: 768px) {

  .site-header {
    height: 72px;
  }

  .site-header-inner {
    justify-content: center;
    position: relative;
    padding: 0 24px;
  }

  .site-brand {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
  }

  .nav-toggle-label {
    display: flex;
    position: absolute;
    right: 24px;
  }

  .site-nav {
    display: none;
    position: absolute;
    top: 72px;
    left: 0;
    width: 100%;
    background: #0b1220;
    flex-direction: column;
    padding: 20px 0;
    border-top: 1px solid rgba(255,255,255,0.07);
    box-shadow: 0 8px 32px rgba(0,0,0,0.3);
  }

  .site-nav a {
    margin: 12px 0;
    text-align: center;
    font-size: 15px;
  }

  .nav-toggle:checked + .nav-toggle-label + .site-nav {
    display: flex;
  }

  .tool-segment-grid {
    grid-template-columns: 1fr !important;
  }

  .tool-field input,
  .segment-fields input {
    width: 100%;
  }

  #shareWhatsAppButton {
    margin-left: 0;
    margin-top: 10px;
    display: block;
  }

  #calculateButton,
  #shareWhatsAppButton,
  #contactButton {
    width: 100%;
    display: block;
  }

  .tool-intro h1 {
    font-size: 32px;
  }

  .hero-content h1 {
    font-size: 40px;
  }

  h2 {
    font-size: 26px;
  }

}
