/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.01em;
  border-radius: 100px;
  padding: 13px 26px;
  transition: all 0.22s;
  cursor: pointer;
  border: none;
}
/* White-on-dark in light mode (a dark pill with white text); inverts in dark mode. */
.btn-white { background: var(--t1); color: #fff; }
html.dark .btn-white { color: var(--bg); }
.btn-white:hover { opacity: 0.88; transform: translateY(-1px); }
.btn-ghost { background: transparent; color: var(--t2); border: 0.5px solid var(--b2); }
.btn-ghost:hover { border-color: var(--b3); color: var(--t1); }
.btn-green {
  background: var(--g);
  color: #fff;
  box-shadow: 0 4px 20px var(--g-glow);
}
.btn-green:hover { transform: translateY(-2px); box-shadow: 0 8px 30px rgba(29,158,117,0.28); }
.btn-wa {
  background: #25D366;
  color: #fff;
  box-shadow: 0 4px 20px rgba(37,211,102,0.22);
}
.btn-wa:hover { transform: translateY(-2px); box-shadow: 0 8px 28px rgba(37,211,102,0.35); }
.btn-lg { padding: 16px 34px; font-size: 14px; }
.btn-sm { padding: 10px 20px; font-size: 12px; }
.btn-block { width: 100%; }

/* Nav */
nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 400;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  transition: all 0.3s ease;
}
nav.scrolled {
  background: var(--nav-scroll-bg);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border-bottom: 0.5px solid var(--b1);
}
.nav-inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 5vw;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
}
.nav-logo-mark { width: 30px; height: 30px; }
.nav-wordmark {
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--t1);
}
.nav-wordmark span { color: var(--g); }
.nav-links { display: flex; align-items: center; gap: 32px; }
.nav-links a {
  font-size: 13px;
  color: var(--t3);
  letter-spacing: 0.01em;
  transition: color 0.2s;
}
.nav-links a:hover,
.nav-links a.active { color: var(--t1); }
.nav-right { display: flex; align-items: center; gap: 10px; }

/* Hamburger button */
.ham {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 4px;
  background: none;
  border: none;
  cursor: pointer;
}
.ham span {
  display: block;
  width: 22px;
  height: 1.5px;
  background: var(--t2);
  border-radius: 2px;
  transition: all 0.3s;
}
/* Open state applied by JS so the bars become an X */
.ham.open span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.ham.open span:nth-child(2) { opacity: 0; }
.ham.open span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }

/* Mobile nav drawer */
.mob-nav {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 380;
  background: var(--bg-1);
  flex-direction: column;
  padding: 100px 6vw 40px;
  gap: 4px;
}
.mob-nav.open { display: flex; }
.mob-nav a {
  font-family: var(--sans);
  font-size: 20px;
  font-weight: 400;
  color: var(--t1);
  padding: 16px 0;
  border-bottom: 0.5px solid var(--b1);
}
.mob-cta { display: flex; flex-direction: column; gap: 10px; margin-top: 28px; }
.mob-cta .btn { justify-content: center; }

.mob-theme-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 0;
  border-bottom: 0.5px solid var(--b1);
  font-size: 20px;
  font-weight: 400;
  color: var(--t1);
}
.mob-theme-row .theme-toggle { border: 0.5px solid var(--b2); }

/* Theme toggle button */
.theme-toggle {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: transparent;
  border: 0.5px solid var(--b2);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
  flex-shrink: 0;
}
.theme-toggle:hover { border-color: var(--b3); background: var(--bg-2); }
.theme-toggle svg {
  width: 15px;
  height: 15px;
  stroke: var(--t2);
  fill: none;
  stroke-width: 1.8;
  transition: stroke 0.2s;
}
/* Light is default, so the sun shows; dark mode swaps to the moon. */
.icon-sun { display: block; }
.icon-moon { display: none; }
html.dark .icon-sun { display: none; }
html.dark .icon-moon { display: block; }

/* Shared page hero (used on every non-home page) */
.page-hero {
  min-height: 52vh;
  display: flex;
  align-items: flex-end;
  padding-top: var(--nav-h);
  background: var(--bg);
  position: relative;
  overflow: hidden;
}
.page-hero.compact { min-height: 44vh; }
.page-hero-glow {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(ellipse 50% 60% at 70% 50%, rgba(29,158,117,0.06) 0%, transparent 60%);
}
.page-hero-inner {
  padding: 80px 5vw;
  max-width: var(--max);
  margin: 0 auto;
  width: 100%;
  position: relative;
  z-index: 1;
}
.ph-tag {
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--t4);
  margin-bottom: 20px;
}
.ph-title {
  font-family: var(--serif);
  font-size: clamp(40px,5.5vw,70px);
  font-weight: 400;
  color: var(--t1);
  line-height: 1.08;
  max-width: 680px;
  margin-bottom: 20px;
}
.ph-title em { font-style: italic; color: var(--t3); }
.ph-title.compact { font-size: clamp(36px,5vw,60px); }
.ph-sub {
  font-size: 17px;
  color: var(--t2);
  font-weight: 300;
  max-width: 480px;
  line-height: 1.72;
}

/* Shared CTA strip (used by home, about, systems, case studies) */
.cta-strip {
  background: var(--bg-1);
  padding: 100px 0;
  border-top: 0.5px solid var(--b1);
  position: relative;
  overflow: hidden;
}
.cta-strip::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 50% 60% at 50% 0%, rgba(29,158,117,0.07) 0%, transparent 65%);
  pointer-events: none;
}
.cta-inner {
  text-align: center;
  max-width: 640px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
}
.cta-title {
  font-family: var(--serif);
  font-size: clamp(32px,4.5vw,56px);
  font-weight: 400;
  color: var(--t1);
  line-height: 1.1;
  margin-bottom: 16px;
}
.cta-sub {
  font-size: 16px;
  color: var(--t2);
  font-weight: 300;
  line-height: 1.72;
  margin-bottom: 36px;
  max-width: 460px;
  margin-left: auto;
  margin-right: auto;
}
.cta-actions {
  display: flex;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
}

/* Footer */
footer {
  background: var(--bg-1);
  border-top: 0.5px solid var(--b1);
  padding: 64px 0 0;
}
.footer-inner { max-width: var(--max); margin: 0 auto; padding: 0 5vw; }
.footer-top {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 48px;
  padding-bottom: 48px;
  border-bottom: 0.5px solid var(--b1);
}
.footer-brand-word {
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--t1);
  display: block;
  margin-bottom: 12px;
}
.footer-brand-word span { color: var(--g); }
.footer-brand p {
  font-size: 13px;
  color: var(--t3);
  line-height: 1.7;
  max-width: 260px;
}
.footer-col-head {
  font-size: 9.5px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--t4);
  margin-bottom: 16px;
}
.footer-links { display: flex; flex-direction: column; gap: 10px; }
.footer-links a {
  font-size: 13px;
  color: var(--t3);
  transition: color 0.2s;
}
.footer-links a:hover { color: var(--t1); }
.footer-bottom {
  padding: 22px 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.footer-copy { font-size: 11.5px; color: var(--t4); }

/* Floating WhatsApp button (present on every page) */
.wa-fab {
  position: fixed;
  bottom: 28px;
  right: 28px;
  z-index: 500;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: #25D366;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 28px rgba(37,211,102,0.38);
  transition: all 0.22s;
  text-decoration: none;
}
.wa-fab:hover { transform: scale(1.1); box-shadow: 0 12px 36px rgba(37,211,102,0.5); }
.wa-fab svg { width: 26px; height: 26px; fill: #fff; }

/* Responsive collapse for nav + footer */
@media (max-width: 1024px) {
  .footer-top { grid-template-columns: 1fr 1fr; gap: 32px; }
}
@media (max-width: 768px) {
  .nav-links,
  .nav-right { display: none; }
  .ham { display: flex; }
  .footer-top { grid-template-columns: 1fr; gap: 28px; }
  .footer-bottom { flex-direction: column; gap: 8px; text-align: center; }
  .cta-actions {
    flex-direction: column;
    align-items: stretch;
    max-width: 300px;
    margin: 0 auto;
  }
  .cta-actions .btn { justify-content: center; }
}
@media (max-width: 480px) {
  .footer-top { gap: 20px; }
  .page-hero-inner { padding: 80px 4vw; }
}
