/* Tokens, type, buttons, nav, footer and scroll reveal. */
@font-face {
  font-family: "Plus Jakarta Sans";
  font-weight: 200 800;
  font-display: swap;
  src: url("../fonts/plus-jakarta-sans.woff2") format("woff2");
}

:root {
  --bg: #f6f7fb;
  --surface: #ffffff;
  --surface-2: #f1f4f9;
  --ink: #0f172a;
  --text: #1f2a37;
  --text-2: #4b5563;
  --text-3: #667085;
  --line: #e3e6ea;
  --line-strong: #cfd5dc;
  --brand: #1b6ae8;
  --brand-2: #1557c4;
  --brand-soft: #eaf2fe;
  --brand-glow: rgba(27, 106, 232, 0.35);
  --violet: #7c5cff;
  --violet-soft: #efeaff;
  --emerald: #10b981;
  --emerald-soft: #e3f8ef;
  --amber: #f59e0b;
  --amber-soft: #fff4dd;
  --rose: #f43f5e;
  --navy: #0b1220;
  --navy-2: #121c31;
  --navy-3: #1a2740;
  --on-navy: #e6ecf7;
  --on-navy-2: #a9b6cc;
  --font: "Plus Jakarta Sans", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --r-sm: 10px;
  --r: 16px;
  --r-lg: 24px;
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.06), 0 2px 8px rgba(15, 23, 42, 0.05);
  --shadow: 0 10px 30px -10px rgba(15, 23, 42, 0.18), 0 2px 8px rgba(15, 23, 42, 0.06);
  --shadow-lg: 0 40px 80px -30px rgba(15, 23, 42, 0.35), 0 12px 24px -12px rgba(15, 23, 42, 0.18);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --wrap: 1180px;
  --gutter: 24px;
  --nav-h: 72px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  font: 400 17px/1.6 var(--font);
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img, svg, video { display: block; max-width: 100%; }
img { height: auto; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; }
h1, h2, h3, h4, p, ul, figure { margin: 0; }
ul { padding: 0; list-style: none; }
strong { font-weight: 700; }

.wrap { width: min(var(--wrap), 100% - var(--gutter) * 2); margin-inline: auto; }
.skip { position: absolute; left: -999px; top: 8px; z-index: 100; background: var(--ink); color: #fff; padding: 8px 14px; border-radius: 8px; }
.skip:focus { left: 8px; }

/* Type */
h1, h2, h3 { font-weight: 700; letter-spacing: -0.025em; line-height: 1.08; color: var(--ink); text-wrap: balance; }
h1 { font-size: clamp(2.5rem, 1.6rem + 4vw, 4.6rem); font-weight: 800; }
h2 { font-size: clamp(2rem, 1.3rem + 2.6vw, 3.25rem); }
h3 { font-size: 1.25rem; letter-spacing: -0.01em; line-height: 1.3; }
.lede { font-size: clamp(1.05rem, 1rem + 0.4vw, 1.3rem); line-height: 1.55; color: var(--text-2); max-width: 60ch; text-wrap: pretty; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  font-size: 0.8rem; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--text-2);
}
.eyebrow::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--accent, var(--brand)); box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent, var(--brand)) 18%, transparent); }
.section-head { display: grid; gap: 18px; max-width: 760px; margin-bottom: clamp(40px, 6vw, 72px); }
.section-head h2 { margin-top: 2px; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 52px; padding: 0 26px; border-radius: 999px; border: 1px solid transparent;
  font-weight: 600; font-size: 1rem; white-space: nowrap; cursor: pointer;
  transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease), background 0.25s, border-color 0.25s;
  transform-style: preserve-3d;
}
.btn:active { transform: translateY(1px) scale(0.99); }
.btn-primary {
  color: #fff;
  background: linear-gradient(180deg, #2f7cf0 0%, var(--brand) 55%, var(--brand-2) 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.35), 0 10px 24px -8px var(--brand-glow), 0 2px 4px rgba(15, 23, 42, 0.12);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.35), 0 18px 32px -10px var(--brand-glow), 0 4px 8px rgba(15, 23, 42, 0.12); }
.btn-ghost { color: var(--ink); background: var(--surface); border-color: var(--line-strong); box-shadow: var(--shadow-sm); }
.btn-ghost:hover { transform: translateY(-2px); border-color: var(--brand); color: var(--brand-2); box-shadow: var(--shadow); }
.btn-light { color: var(--ink); background: #fff; box-shadow: 0 10px 30px -12px rgba(0, 0, 0, 0.6); }
.btn-light:hover { transform: translateY(-2px); }
.btn-outline-light { color: #fff; border-color: rgba(255, 255, 255, 0.35); background: rgba(255, 255, 255, 0.06); backdrop-filter: blur(8px); }
.btn-outline-light:hover { border-color: #fff; background: rgba(255, 255, 255, 0.12); transform: translateY(-2px); }
.btn-sm { min-height: 42px; padding: 0 18px; font-size: 0.92rem; }
.btn .arrow { transition: transform 0.35s var(--ease); }
.btn:hover .arrow { transform: translateX(3px); }

/* Nav */
.nav {
  position: fixed; inset: 0 0 auto; z-index: 50; height: var(--nav-h);
  transition: height 0.4s var(--ease), background 0.4s, box-shadow 0.4s, border-color 0.4s;
  border-bottom: 1px solid transparent;
}
.nav.is-scrolled { height: 60px; background: rgba(255, 255, 255, 0.78); backdrop-filter: saturate(160%) blur(14px); -webkit-backdrop-filter: saturate(160%) blur(14px); border-color: rgba(15, 23, 42, 0.08); box-shadow: 0 8px 30px -18px rgba(15, 23, 42, 0.25); }
.nav.on-dark:not(.is-scrolled) { color: #fff; }
.nav-inner { height: 100%; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.nav-brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 800; letter-spacing: -0.02em; font-size: 1.15rem; color: var(--ink); }
.nav-brand img { width: 100px; height: 44px; border-radius: 9px; }
/* Container */
.nav-brand {
  display: inline-grid;
  place-items: center;
  position: relative;
}

/* Base logo styles & smooth cross-fade */
.nav-brand img {
  grid-area: 1 / 1;
  width: auto;
  height: 90px;
  max-width: 120px;
  object-fit: contain;
  transition: opacity 0.3s ease;
}

/* 1. At start: transparent navbar */
.nav-brand .logo-transparent {
  opacity: 1;
}
.nav-brand .logo-scrolled {
  opacity: 0;
  pointer-events: none;
}

/* 2. After scrolling: white navbar */
.nav.is-scrolled .nav-brand .logo-transparent {
  opacity: 0;
  pointer-events: none;
}
.nav.is-scrolled .nav-brand .logo-scrolled {
  opacity: 1;
  pointer-events: auto;
}
.nav.on-dark:not(.is-scrolled) .nav-brand, .nav.on-dark:not(.is-scrolled) .nav-links a { color: #fff; }
.nav-links { display: flex; gap: 6px; }
.nav-links a { padding: 8px 14px; border-radius: 999px; font-weight: 600; font-size: 0.95rem; color: var(--text-2); white-space: nowrap; transition: background 0.25s, color 0.25s; }
.nav-links a:hover { background: rgba(27, 106, 232, 0.1); color: var(--brand-2); }
.nav.on-dark:not(.is-scrolled) .nav-links a:hover { background: rgba(255, 255, 255, 0.12); color: #fff; }
.nav-cta { display: flex; align-items: center; gap: 10px; }
.nav-toggle { display: none; width: 44px; height: 44px; border: 0; background: transparent; border-radius: 10px; cursor: pointer; position: relative; }
.nav-toggle i { position: absolute; left: 11px; right: 11px; height: 2px; background: currentColor; border-radius: 2px; transition: transform 0.35s var(--ease), opacity 0.25s, top 0.35s var(--ease); }
.nav-toggle i:nth-child(1) { top: 15px; } .nav-toggle i:nth-child(2) { top: 21px; } .nav-toggle i:nth-child(3) { top: 27px; }
.nav.is-open .nav-toggle i:nth-child(1) { top: 21px; transform: rotate(45deg); }
.nav.is-open .nav-toggle i:nth-child(2) { opacity: 0; }
.nav.is-open .nav-toggle i:nth-child(3) { top: 21px; transform: rotate(-45deg); }

@media (max-width: 1150px) {
  .nav-links { position: fixed; inset: var(--nav-h) 0 auto; background: rgba(255, 255, 255, 0.96); backdrop-filter: blur(14px); flex-direction: column; padding: 16px var(--gutter) 24px; gap: 4px; border-bottom: 1px solid var(--line); transform: translateY(-12px); opacity: 0; visibility: hidden; transition: transform 0.4s var(--ease), opacity 0.3s, visibility 0s 0.4s; }
  .nav.is-scrolled .nav-links { top: 60px; }
  .nav.is-open .nav-links { transform: none; opacity: 1; visibility: visible; transition: transform 0.4s var(--ease), opacity 0.3s; }
  .nav-links a { color: var(--ink) !important; font-size: 1.1rem; padding: 12px 14px; }
  .nav-toggle { display: block; }
  .nav-cta .btn-ghost { display: none; }
}

@media (max-width: 640px) {
  .nav-cta .btn-primary { min-height: 38px; padding: 0 14px; font-size: 0.88rem; }
}

/* Reveal on scroll */
[data-reveal] { opacity: 0; translate: 0 28px; transition: opacity 0.9s var(--ease), translate 0.9s var(--ease); transition-delay: calc(var(--i, 0) * 90ms); }
[data-reveal].is-in { opacity: 1; translate: 0 0; }
.no-js [data-reveal] { opacity: 1; translate: none; }
@media (prefers-reduced-motion: reduce) { [data-reveal] { opacity: 1; translate: none; transition: none; } }

/* Footer */
.footer { padding: 56px 0 40px; border-top: 1px solid var(--line); background: var(--surface); color: var(--text-2); font-size: 0.95rem; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 32px; }
.footer-brand { display: grid; gap: 12px; max-width: 320px; }
.footer-brand img { width: 150px; height: 66px; border-radius: 9px; }
.footer-h { font-size: 0.8rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-3); margin-bottom: 14px; }
.footer li + li { margin-top: 10px; }
.footer a:hover { color: var(--brand-2); }
.footer-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; margin-top: 40px; padding-top: 24px; border-top: 1px solid var(--line); font-size: 0.88rem; color: var(--text-3); }
.badge-row { display: flex; flex-wrap: wrap; gap: 10px; }
.badge { display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface-2); font-size: 0.82rem; font-weight: 600; color: var(--text-2); }
@media (max-width: 920px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .footer-grid { grid-template-columns: 1fr; } }

.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
/* ================= Modal Styles ================= */
.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(11, 18, 32, 0.72);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: grid;
  place-items: center;
  padding: 20px;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.modal-backdrop.is-open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.modal-dialog {
  position: relative;
  width: 100%;
  max-width: 880px;
  max-height: 90vh;
  background: var(--surface, #ffffff);
  border-radius: var(--r-lg, 24px);
  box-shadow: 0 25px 60px -15px rgba(0, 0, 0, 0.4), 0 0 0 1px rgba(15, 23, 42, 0.08);
  display: grid;
  grid-template-columns: 1fr 1.25fr;
  overflow: hidden;
  transform: scale(0.95) translateY(16px);
  transition: transform 0.35s var(--ease, cubic-bezier(0.16, 1, 0.3, 1));
}

.modal-backdrop.is-open .modal-dialog {
  transform: scale(1) translateY(0);
}

/* Close Button */
.modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid var(--line, #e3e6ea);
  background: var(--surface, #fff);
  color: var(--text-2, #4b5563);
  font-size: 22px;
  line-height: 1;
  display: grid;
  place-items: center;
  cursor: pointer;
  z-index: 10;
  transition: background 0.2s, color 0.2s, transform 0.2s;
}

.modal-close:hover {
  background: var(--surface-2, #f1f4f9);
  color: var(--ink, #0f172a);
  transform: scale(1.06);
}

/* Left Media Column */
.modal-media {
  position: relative;
  background: var(--navy, #0b1220);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}

.modal-media img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.85;
}

.modal-media-overlay {
  position: relative;
  z-index: 2;
  padding: 28px 24px;
  background: linear-gradient(to top, rgba(11, 18, 32, 0.95) 0%, rgba(11, 18, 32, 0.6) 60%, transparent 100%);
  color: #fff;
}

.modal-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(124, 92, 255, 0.2);
  border: 1px solid rgba(124, 92, 255, 0.4);
  color: #c9b8ff;
  font-size: 0.76rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 12px;
}

.modal-media-overlay h3 {
  color: #fff;
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 6px;
  letter-spacing: -0.01em;
}

.modal-media-overlay p {
  color: var(--on-navy-2, #a9b6cc);
  font-size: 0.86rem;
  line-height: 1.45;
}

/* Right Content Column */
.modal-content {
  padding: 36px 32px;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
}

.modal-eyebrow {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--brand, #1b6ae8);
  display: block;
  margin-bottom: 6px;
}

.modal-header h2 {
  font-size: 1.55rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--ink, #0f172a);
  margin-bottom: 6px;
}

.modal-header p {
  font-size: 0.9rem;
  color: var(--text-2, #4b5563);
  margin-bottom: 20px;
}

/* Iframe Wrapper */
.modal-iframe-wrapper {
  position: relative;
  width: 100%;
  height: 100%;
  min-height: 680px; /* Matches the left-screen height */
  overflow: hidden;
  display: flex;
}
.taika-form-iframe {
  width: 100%;
  height: 100%;
  min-height: 680px;
  border: none;
  display: block;
  overflow: hidden; /* Prevents scrollbar */
}

.modal-crm-iframe {
  width: 100%;
  height: 100%;
  min-height: 400px;
  border: none;
  display: block;
}

/* Responsive (Mobile/Tablet) */
@media (max-width: 768px) {
  .modal-dialog {
    grid-template-columns: 1fr;
    max-height: 94vh;
  }
  .modal-media {
    display: none; /* Hide side image on small phone screens so the form gets full space */
  }
  .modal-content {
    padding: 28px 20px;
  }
}
