/* ══════════════════════════════════════════
   NEXXLY — assets/css/site.css
   Public-facing site styles.
   Loaded via <link> in includes/_base.php.
════════════════════════════════════════════ */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --navy:        #1A3A5C;
  --navy-dark:   #0D2640;
  --mid:         #2B5F8E;
  --accent:      #0EA5E9;
  --accent-dark: #0284C7;
  --dark:        #0D1F30;
  --light:       #F0F5FA;
  --rule:        #DDE6EE;
  --muted:       #7A9BB5;
  --label:       #7A9BB5;
  --white:       #FFFFFF;
  --text:        #1A2B3C;
  --text-soft:   #4A6580;
  --hh:          72px;
  --r:           8px;
  --rl:          16px;
  --sh:          0 1px 3px rgba(13,31,48,.08), 0 1px 2px rgba(13,31,48,.06);
  --sm:          0 4px 16px rgba(13,31,48,.12), 0 2px 6px rgba(13,31,48,.08);
  --sl:          0 12px 40px rgba(13,31,48,.18);
  --ease:        cubic-bezier(.4, 0, .2, 1);
  --font:        'Outfit', sans-serif;
}

html  { scroll-behavior: smooth; }
body  { font-family: var(--font); color: var(--text); background: var(--white); line-height: 1.6; -webkit-font-smoothing: antialiased; }
img, svg { display: block; }
a   { text-decoration: none; color: inherit; }
ul  { list-style: none; }
button { font-family: var(--font); cursor: pointer; border: none; background: none; }

/* ── HEADER ── */
.site-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
  height: var(--hh);
  background: var(--white);
  border-bottom: 1px solid var(--rule);
  transition: box-shadow .2s var(--ease);
}
.site-header.scrolled { box-shadow: 0 1px 12px rgba(13,31,48,.09); }

.header-inner {
  max-width: 1200px; margin: 0 auto; padding: 0 32px;
  height: 100%; display: flex; align-items: center; gap: 32px;
}

/* Logo lockup */
.site-logo { display: flex; align-items: center; gap: 14px; flex-shrink: 0; color: var(--navy); transition: opacity .2s; }
.site-logo:hover { opacity: .75; }
.logo-mark  { color: var(--navy); flex-shrink: 0; }
.logo-text-group { display: flex; flex-direction: column; gap: 2px; }
.logo-wordmark { font-weight: 800; font-size: 16px; letter-spacing: 5px; color: var(--navy); line-height: 1; text-transform: uppercase; }
.logo-tagline  { font-size: 9px; font-weight: 300; letter-spacing: 2.5px; text-transform: uppercase; color: var(--label); line-height: 1; }

/* Inline nav */
.site-nav { display: flex; align-items: center; gap: 0; flex: 1; }
.site-nav-link {
  font-size: 10px; font-weight: 700; letter-spacing: 2.5px; text-transform: uppercase;
  color: var(--label); padding: 8px 16px; border-radius: var(--r);
  transition: color .15s, background .15s; white-space: nowrap;
}
.site-nav-link:hover  { color: var(--navy); background: var(--light); }
.site-nav-link.active { color: var(--accent); }

/* Header actions */
.header-actions { display: flex; align-items: center; gap: 8px; margin-left: auto; }

/* Hamburger */
.hamburger {
  display: none; flex-direction: column; justify-content: center; align-items: stretch; gap: 5px;
  width: 34px; height: 34px; padding: 4px; border-radius: var(--r);
  background: none; border: none; cursor: pointer; -webkit-appearance: none; appearance: none;
  transition: background .15s; flex-shrink: 0; margin-left: auto;
}
.hamburger:hover { background: var(--light); }
.hamburger span {
  display: block; width: 100%; min-width: 18px; height: 2px;
  background: #1A3A5C; border-radius: 2px; flex-shrink: 0;
  transition: transform .28s var(--ease), opacity .28s;
}
.hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ── MOBILE DRAWER ── */
.drawer {
  position: fixed; top: var(--hh); left: 0; right: 0; bottom: 0; z-index: 999;
  background: var(--white); padding: 20px 20px 40px; overflow-y: auto;
  transform: translateX(-100%); transition: transform .35s var(--ease);
  border-top: 1px solid var(--rule);
}
.drawer.open { transform: translateX(0); }
.overlay {
  position: fixed; inset: 0; z-index: 998; background: rgba(13,31,48,.4);
  opacity: 0; visibility: hidden; transition: opacity .3s, visibility .3s;
}
.overlay.show { opacity: 1; visibility: visible; }

.mob-nav { display: flex; flex-direction: column; gap: 2px; }
.mob-link {
  display: block; width: 100%; padding: 14px 16px;
  font-size: 10px; font-weight: 700; letter-spacing: 2.5px; text-transform: uppercase;
  color: var(--text-soft); border-radius: var(--r);
  transition: color .15s, background .15s;
}
.mob-link:hover           { color: var(--navy); background: var(--light); }
.mob-item.active .mob-link { color: var(--accent); background: rgba(14,165,233,.06); }
.mob-ctas { margin-top: 28px; display: flex; flex-direction: column; gap: 10px; padding-top: 20px; border-top: 1px solid var(--rule); }

/* ── BUTTONS ── */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: auto; min-width: 112px; padding: 7px 18px;
  font-family: var(--font); font-size: 10px; font-weight: 700;
  letter-spacing: 2px; text-transform: uppercase; border-radius: 5px;
  transition: background .25s, color .25s, border-color .25s;
  white-space: nowrap; cursor: pointer;
}
.btn:active { opacity: .8; }
.btn-primary { background: var(--accent); color: var(--white); border: 1.5px solid var(--accent); }
.btn-primary:hover { background: var(--accent-dark); border-color: var(--accent-dark); }
.btn-ghost { background: transparent; color: var(--navy); border: 1.5px solid var(--rule); }
.btn-ghost:hover { background: var(--light); border-color: rgba(26,58,92,.2); }
.btn-outline { background: transparent; color: var(--white); border: 1.5px solid rgba(255,255,255,.35); }
.btn-outline:hover { background: rgba(255,255,255,.12); border-color: rgba(255,255,255,.6); }
.btn-lg   { width: auto; min-width: 160px; padding: 11px 24px; font-size: 12px; justify-content: center; }
.btn-full { width: 100%; }
.btn-sm   { padding: 8px 18px !important; font-size: 11px !important; }

/* ── HERO ── */
.hero { position: relative; padding-top: calc(var(--hh) + 80px); padding-bottom: 100px; overflow: hidden; background: var(--light); }
.hero-bg {
  position: absolute; inset: 0;
  background:
    radial-gradient(ellipse 70% 60% at 80% 20%, rgba(14,165,233,.18) 0%, transparent 60%),
    radial-gradient(ellipse 50% 50% at 10% 80%, rgba(26,58,92,.12) 0%, transparent 60%),
    linear-gradient(160deg, #e8f2fb 0%, #f0f5fa 50%, #dbeeff 100%);
  z-index: 0;
}
.hero-bg::after {
  content: ''; position: absolute; right: -120px; top: -80px; width: 600px; height: 700px;
  background: linear-gradient(135deg, rgba(14,165,233,.12) 0%, rgba(26,58,92,.06) 100%);
  clip-path: polygon(20% 0%, 100% 0%, 100% 80%, 0% 100%);
}
.hero-inner {
  position: relative; z-index: 1; max-width: 1200px; margin: 0 auto; padding: 0 24px;
  display: grid; grid-template-columns: 1fr 1fr; gap: 60px; align-items: center;
}
.hero-eyebrow { display: inline-block; font-size: 11px; font-weight: 600; letter-spacing: 3px; text-transform: uppercase; color: var(--accent); margin-bottom: 20px; }
.hero-heading { font-size: clamp(36px, 5vw, 60px); font-weight: 800; line-height: 1.08; color: var(--dark); margin-bottom: 8px; }
.hero-heading .alt { color: var(--accent); display: block; }
.hero-sub { font-size: clamp(16px, 2vw, 19px); font-weight: 300; color: var(--text-soft); margin-bottom: 40px; line-height: 1.65; }
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; align-items: center; }
.hero-visual { display: flex; justify-content: center; align-items: center; }

/* Mock dashboard card */
.hero-card { width: 100%; max-width: 480px; background: var(--white); border-radius: var(--rl); border: 1px solid var(--rule); box-shadow: var(--sl); overflow: hidden; }
.hc-header { padding: 14px 18px; border-bottom: 1px solid var(--rule); display: flex; align-items: center; gap: 6px; }
.hc-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--rule); }
.hc-dot:nth-child(1) { background: #f87171; } .hc-dot:nth-child(2) { background: #fbbf24; } .hc-dot:nth-child(3) { background: #34d399; }
.hc-title { font-size: 11px; font-weight: 600; letter-spacing: 1.5px; text-transform: uppercase; color: var(--muted); margin-left: 8px; }
.hc-body { padding: 22px; }
.stat-row { display: flex; gap: 10px; margin-bottom: 16px; }
.stat { flex: 1; background: var(--light); border-radius: 10px; padding: 13px; border: 1px solid var(--rule); }
.stat-val { font-size: 22px; font-weight: 700; color: var(--navy); line-height: 1; margin-bottom: 4px; }
.stat-lbl { font-size: 10px; color: var(--muted); text-transform: uppercase; letter-spacing: 1px; }
.bar-lbl { font-size: 10px; color: var(--muted); text-transform: uppercase; letter-spacing: 1px; margin-bottom: 10px; }
.bars { display: flex; flex-direction: column; gap: 8px; }
.bar-row { display: flex; align-items: center; gap: 10px; }
.bar-name { font-size: 12px; color: var(--text-soft); min-width: 90px; }
.bar-track { flex: 1; height: 8px; background: var(--rule); border-radius: 100px; overflow: hidden; }
.bar-fill { height: 100%; background: linear-gradient(90deg, var(--accent), var(--mid)); border-radius: 100px; animation: grow .8s var(--ease) forwards; transform-origin: left; }
@keyframes grow { from { transform: scaleX(0); } to { transform: scaleX(1); } }
.bar-pct { font-size: 12px; font-weight: 600; color: var(--navy); min-width: 32px; text-align: right; }
.mock-alert { margin-top: 14px; padding: 11px 13px; background: rgba(14,165,233,.08); border: 1px solid rgba(14,165,233,.2); border-radius: 8px; font-size: 12px; color: var(--navy); display: flex; align-items: flex-start; gap: 8px; }
.mock-alert-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); flex-shrink: 0; margin-top: 3px; }

/* ── SECTIONS ── */
section { padding: 80px 0; }
.wrap { max-width: 1200px; margin: 0 auto; padding: 0 24px; }
.eyebrow    { font-size: 11px; font-weight: 600; letter-spacing: 3px; text-transform: uppercase; color: var(--accent); margin-bottom: 14px; }
.sec-title  { font-size: clamp(26px, 4vw, 44px); font-weight: 700; color: var(--dark); line-height: 1.15; margin-bottom: 14px; }
.sec-sub    { font-size: 17px; font-weight: 300; color: var(--text-soft); line-height: 1.65; max-width: 600px; }
.tc { text-align: center; }
.tc .sec-sub { margin: 0 auto; }

/* Feature grid */
.fg { display: grid; grid-template-columns: repeat(3,1fr); gap: 22px; margin-top: 52px; }
.fc { background: var(--white); border: 1px solid var(--rule); border-radius: var(--rl); padding: 30px; transition: box-shadow .25s, border-color .25s, transform .25s; }
.fc:hover { box-shadow: var(--sm); border-color: rgba(14,165,233,.3); transform: translateY(-2px); }
.fi { width: 46px; height: 46px; border-radius: 11px; background: rgba(14,165,233,.1); display: flex; align-items: center; justify-content: center; margin-bottom: 18px; color: var(--accent); }
.ft { font-size: 16px; font-weight: 700; color: var(--dark); margin-bottom: 9px; }
.fb { font-size: 14px; color: var(--text-soft); line-height: 1.65; }

/* Content row */
.cr { display: grid; grid-template-columns: 1fr 1fr; gap: 72px; align-items: center; margin-top: 56px; }
.cr.rev { direction: rtl; }
.cr.rev > * { direction: ltr; }
.cv { background: var(--light); border-radius: var(--rl); border: 1px solid var(--rule); aspect-ratio: 4/3; display: flex; align-items: center; justify-content: center; color: var(--muted); font-size: 12px; letter-spacing: 1.5px; text-transform: uppercase; }
.cl { margin-top: 18px; display: flex; flex-direction: column; gap: 11px; }
.cl li { display: flex; gap: 11px; font-size: 15px; color: var(--text-soft); align-items: flex-start; }
.cl li::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); flex-shrink: 0; margin-top: 7px; }
.cc { margin-top: 26px; }

/* CTA band */
.cta-band { background: var(--dark); }
.cta-in { max-width: 1200px; margin: 0 auto; padding: 72px 24px; display: flex; flex-direction: column; align-items: flex-start; gap: 28px; }
.cta-in > div:first-child { max-width: 680px; }
.cta-band .sec-title { color: var(--white); }
.cta-band .sec-sub   { color: rgba(255,255,255,.6); }
.cta-acts { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }

/* Page hero (inner pages) */
.page-hero {
  padding-top: calc(var(--hh) + 64px); padding-bottom: 64px;
  background: linear-gradient(160deg, var(--dark) 0%, var(--navy) 100%);
  color: var(--white); position: relative; overflow: hidden;
}
.page-hero::after { content: ''; position: absolute; right: -80px; top: -60px; width: 400px; height: 500px; background: rgba(14,165,233,.1); clip-path: polygon(20% 0%, 100% 0%, 100% 80%, 0% 100%); }
.page-hero .wrap      { position: relative; z-index: 1; }
.page-hero .eyebrow   { color: rgba(14,165,233,.9); }
.page-hero .hero-heading { color: var(--white); }
.page-hero .hero-sub  { color: rgba(255,255,255,.65); max-width: 540px; margin-top: 14px; margin-bottom: 0; }

/* ── FOOTER ── */
.site-footer { background: var(--dark); border-top: 1px solid rgba(255,255,255,.07); }
.foot-in {
  max-width: 1200px; margin: 0 auto; padding: 24px 32px;
  display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap;
}
.foot-logo { color: var(--white); }
.foot-logo .logo-wordmark { color: var(--white); }
.foot-logo .logo-tagline  { color: rgba(255,255,255,.7); }
.foot-logo .logo-mark     { color: var(--white); }
.foot-copy { font-size: 10px; color: rgba(255,255,255,.7); letter-spacing: .5px; }

/* Footer legal links */
.foot-legal { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; justify-content: center; }
.foot-legal-link {
  font-size: 11px; font-weight: 400; letter-spacing: .3px; color: rgba(255,255,255,.55);
  text-decoration: none; background: none; border: none; padding: 0;
  cursor: pointer; font-family: inherit; transition: color .15s; white-space: nowrap;
}
.foot-legal-link:hover { color: rgba(255,255,255,.9); }
.foot-legal-sep { color: rgba(255,255,255,.2); font-size: 11px; user-select: none; }

/* Cookie modal */
.cookie-modal-overlay { display: none; position: fixed; inset: 0; background: rgba(13,31,48,.45); z-index: 900; }
.cookie-modal-overlay.show { display: block; }
.cookie-modal {
  display: none; position: fixed; top: 50%; left: 50%; transform: translate(-50%, -50%);
  width: calc(100% - 32px); max-width: 540px;
  background: var(--white); border: 1px solid var(--rule); border-radius: 16px;
  box-shadow: 0 20px 48px rgba(13,31,48,.16); z-index: 901; overflow: hidden;
}
.cookie-modal.show { display: block; }
.cookie-modal-inner { padding: 28px; }
.cookie-modal-header { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 14px; }
.cookie-modal-eyebrow { font-size: 9px; font-weight: 700; letter-spacing: 3px; text-transform: uppercase; color: var(--label); margin: 0 0 4px; }
.cookie-modal-title { font-size: 17px; font-weight: 800; color: var(--navy); letter-spacing: -.3px; margin: 0; }
.cookie-modal-close { background: none; border: none; font-size: 22px; line-height: 1; color: var(--label); cursor: pointer; padding: 2px 6px; border-radius: 6px; transition: background .15s, color .15s; font-family: inherit; }
.cookie-modal-close:hover { background: var(--light); color: var(--navy); }
.cookie-modal-intro { font-size: 13px; color: var(--muted); line-height: 1.65; margin: 0 0 20px; }
.cookie-modal-intro a { color: var(--accent); text-decoration: none; }
.cookie-modal-intro a:hover { text-decoration: underline; }
.cookie-group { border-top: 1px solid var(--rule); padding: 16px 0; }
.cookie-group:last-of-type { border-bottom: 1px solid var(--rule); margin-bottom: 20px; }
.cookie-group-header { display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.cookie-group-name { font-size: 13px; font-weight: 700; color: var(--navy); margin-bottom: 3px; }
.cookie-group-desc { font-size: 12px; color: var(--label); line-height: 1.5; }
.cookie-toggle { display: flex; align-items: center; gap: 7px; flex-shrink: 0; cursor: pointer; }
.cookie-toggle--locked { cursor: default; }
.cookie-checkbox { position: absolute; opacity: 0; width: 0; height: 0; }
.cookie-toggle-track { width: 36px; height: 20px; border-radius: 10px; background: var(--rule); position: relative; transition: background .2s; flex-shrink: 0; }
.cookie-toggle-track::after { content: ''; position: absolute; top: 3px; left: 3px; width: 14px; height: 14px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.2); transition: transform .2s; }
.cookie-checkbox:checked + .cookie-toggle-track,
.cookie-toggle-track--on { background: var(--accent); }
.cookie-checkbox:checked + .cookie-toggle-track::after { transform: translateX(16px); }
.cookie-toggle-track--on::after { transform: translateX(16px); }
.cookie-toggle-label { font-size: 10px; font-weight: 700; letter-spacing: 1.5px; text-transform: uppercase; color: var(--accent); white-space: nowrap; }
.cookie-modal-footer { display: flex; justify-content: flex-end; gap: 10px; }

/* Utility */
.bg-light  { background: var(--light); }
.bg-white  { background: var(--white); }

/* ══ RESPONSIVE ══════════════════════════ */
@media (max-width: 1100px) {
  .header-inner { padding: 0 20px; gap: 20px; }
  .site-nav-link { padding: 7px 11px; font-size: 9px; }
  .logo-wordmark { font-size: 14px; letter-spacing: 4px; }
}

@media (max-width: 768px) {
  .site-nav, .header-actions { display: none !important; }
  .hamburger { display: flex !important; }
  .hero-inner { grid-template-columns: 1fr; gap: 36px; text-align: center; }
  .hero-actions { justify-content: center; }
  .hero-visual { display: none; }
  .fg { grid-template-columns: 1fr 1fr; }
  .cr, .cr.rev { grid-template-columns: 1fr; direction: ltr; gap: 36px; }
  .cta-in { flex-direction: column; text-align: center; }
  .cta-acts { justify-content: center; }
}

@media (max-width: 600px) {
  :root { --hh: 62px; }
  section { padding: 52px 0; }
  .fg { grid-template-columns: 1fr; }
  .stat-row { flex-direction: column; }
  .foot-in { flex-direction: column; align-items: flex-start; gap: 12px; }
  .btn-lg { width: 100%; padding: 12px 20px; font-size: 13px; }
  .cookie-modal-footer { flex-direction: column; }
  .cookie-modal-footer .btn { text-align: center; }
}
