/* ==========================================
   CODETASIUM SOFTWARE - MAIN STYLESHEET
   Responsive: Desktop · Tablet · Mobile
   ========================================== */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600&family=Space+Grotesk:wght@300;400;500;600;700&family=Libre+Baskerville:ital,wght@0,400;0,700;1,400&family=JetBrains+Mono:wght@400;500&family=Montserrat:wght@700;800;900&display=swap');

:root {
  --brand: #66f1c2;
  --brand-dark: #3dd4a8;
  --brand-glow: rgba(102,241,194,.3);
  --msapi: #FF8559;
  --msapi-dark: #e86d40;
  --msapi-glow: rgba(255,133,89,.3);
  --bg: #f8fafb;
  --bg-card: #ffffff;
  --bg-dark: #0d1117;
  --text-primary: #0d1117;
  --text-secondary: #4a5568;
  --text-muted: #718096;
  --border: #e2e8f0;
  --border-dark: #1e2a3a;
  --shadow-sm: 0 1px 3px rgba(0,0,0,.08);
  --shadow-md: 0 4px 16px rgba(0,0,0,.1);
  --shadow-lg: 0 12px 40px rgba(0,0,0,.15);
  --radius: 12px;
  --radius-lg: 20px;
  --font-display: 'Montserrat','Trebuchet MS',Arial,sans-serif;
  --font-body: 'Space Grotesk',sans-serif;
  --font-mono: 'JetBrains Mono',monospace;
  --header-h: 72px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body { font-family: var(--font-body); background: var(--bg); color: var(--text-primary); line-height: 1.6; overflow-x: hidden; }

/* ══════════════════════════════════════════
   HEADER
══════════════════════════════════════════ */
.site-header {
  position: fixed; top: 0; left: 0; right: 0;
  height: var(--header-h);
  background: rgba(255,255,255,.95);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  z-index: 1000;
  transition: box-shadow .3s;
}
.site-header.scrolled { box-shadow: 0 2px 20px rgba(0,0,0,.1); }

.header-inner {
  max-width: 1280px; margin: 0 auto; height: 100%;
  padding: 0 2rem;
  display: flex; align-items: center; justify-content: space-between; gap: 1.5rem;
}

.header-logo {
  display: flex; align-items: center; gap: .6rem;
  text-decoration: none; flex-shrink: 0;
}
.header-logo img { height: 52px; width: auto; }
.header-company-name { display: flex; flex-direction: column; line-height: 1.15; }
.hcn-top, .hcn-bottom {
  font-family: 'Inter','Segoe UI',Arial,sans-serif;
  font-size: 1.05rem; font-weight: 500;
  color: #8a9bb0; letter-spacing: .06em;
}

/* ── NAV ── */
.header-nav {
  display: flex; align-items: center; gap: .15rem; list-style: none;
}
.header-nav a {
  text-decoration: none; color: var(--text-secondary);
  font-size: .88rem; font-weight: 500;
  padding: .45rem .8rem; border-radius: 8px;
  transition: color .2s, background .2s;
  display: flex; align-items: center; gap: .25rem;
}
.header-nav a:hover, .header-nav a.active {
  color: var(--text-primary);
  background: rgba(102,241,194,.15);
}

/* ── ACTIONS ── */
.header-actions {
  display: flex; align-items: center; gap: .65rem; flex-shrink: 0;
}
.btn-schedule {
  font-family: var(--font-body); font-size: .82rem; font-weight: 500;
  color: var(--text-secondary); text-decoration: none;
  padding: .45rem .9rem; border-radius: 8px;
  border: 1px solid var(--border); transition: all .2s; white-space: nowrap;
}
.btn-schedule:hover { border-color: var(--brand); color: var(--text-primary); background: var(--brand-glow); }
.btn-login {
  font-family: var(--font-body); font-size: .82rem; font-weight: 600;
  color: var(--bg-dark); text-decoration: none;
  padding: .45rem 1.1rem; border-radius: 8px;
  background: var(--brand); border: none; cursor: pointer;
  transition: all .2s; white-space: nowrap;
}
.btn-login:hover { background: var(--brand-dark); transform: translateY(-1px); box-shadow: 0 4px 12px var(--brand-glow); }

/* ── LANG SWITCHER ── */
.lang-switcher {
  display: flex; gap: .2rem;
  background: var(--bg); border: 1px solid var(--border); border-radius: 8px; padding: 3px;
}
.lang-btn {
  font-family: var(--font-mono); font-size: .72rem; font-weight: 500;
  padding: .22rem .55rem; border-radius: 5px; border: none;
  cursor: pointer; background: transparent; color: var(--text-muted); transition: all .15s;
}
.lang-btn.active { background: var(--brand); color: var(--bg-dark); }

/* ── HAMBURGER ── */
.hamburger {
  display: none; flex-direction: column; justify-content: center;
  gap: 5px; cursor: pointer; padding: 6px;
  background: none; border: none; border-radius: 8px;
  transition: background .2s; width: 40px; height: 40px;
}
.hamburger:hover { background: rgba(102,241,194,.12); }
.hamburger span {
  display: block; width: 22px; height: 2px;
  background: var(--text-primary); border-radius: 2px; transition: all .3s;
}
/* Hamburger open state */
.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); }

/* ══════════════════════════════════════════
   DROPDOWNS (desktop)
══════════════════════════════════════════ */
.has-dropdown { position: relative; display: flex; align-items: center; }
.has-dropdown > a { display: flex; align-items: center; gap: .25rem; }
.dd-arrow { transition: transform .2s; flex-shrink: 0; opacity: .5; }
.has-dropdown:hover .dd-arrow { transform: rotate(180deg); opacity: 1; }

/* dd-toggle: arrow button — hidden on desktop (hover handles it) */
.dd-toggle {
  display: none;
  background: none; border: none; padding: 4px 8px;
  cursor: pointer; border-radius: 6px;
  color: var(--text-secondary); line-height: 0;
  transition: background .2s; flex-shrink: 0;
}
.dd-toggle:hover { background: rgba(102,241,194,.15); }

.dropdown {
  position: absolute; top: calc(100% + 8px); left: 50%;
  transform: translateX(-50%) translateY(-6px);
  min-width: 220px; background: white;
  border: 1px solid var(--border); border-radius: 12px;
  box-shadow: 0 8px 32px rgba(0,0,0,.12);
  padding: .5rem; list-style: none;
  opacity: 0; visibility: hidden;
  transition: opacity .2s, transform .2s, visibility .2s;
  z-index: 999;
}
.dropdown::before {
  content: ''; position: absolute; top: -6px; left: 50%;
  transform: translateX(-50%);
  width: 12px; height: 6px; background: white;
  clip-path: polygon(50% 0%,0% 100%,100% 100%);
  border-left: 1px solid var(--border); border-right: 1px solid var(--border);
}
.has-dropdown:hover .dropdown { opacity: 1; visibility: visible; transform: translateX(-50%) translateY(0); }
.dropdown li a {
  display: flex; align-items: center; gap: .6rem;
  padding: .55rem .9rem; border-radius: 8px;
  font-size: .875rem; font-weight: 500; font-family: 'Inter','Segoe UI',Arial,sans-serif;
  color: var(--text-secondary); text-decoration: none;
  transition: background .15s, color .15s; white-space: nowrap;
}
.dropdown li a:hover { background: rgba(102,241,194,.12); color: var(--text-primary); }
.dd-icon {
  width: 26px; height: 26px; display: flex; align-items: center; justify-content: center;
  background: rgba(102,241,194,.1); border-radius: 6px;
  color: var(--brand-dark); flex-shrink: 0; transition: background .15s;
}
.dropdown li a:hover .dd-icon { background: rgba(102,241,194,.2); }
.dd-icon-msapi { background: rgba(255,133,89,.1); color: var(--msapi); }
.dropdown li a:hover .dd-icon-msapi { background: rgba(255,133,89,.2); }
.has-dropdown:nth-child(3) .dropdown { min-width: 250px; }

/* ══════════════════════════════════════════
   MOBILE NAV (open state)
══════════════════════════════════════════ */
@media (max-width: 900px) {
  .hamburger { display: flex; }
  .btn-schedule { display: none; }

  .header-nav {
    display: none;
    position: fixed;
    top: var(--header-h); left: 0; right: 0;
    background: #fff;
    border-bottom: 1px solid var(--border);
    box-shadow: 0 8px 32px rgba(0,0,0,.12);
    padding: 1rem 1.25rem 1.5rem;
    flex-direction: column;
    align-items: stretch;
    gap: .25rem;
    max-height: calc(100vh - var(--header-h));
    overflow-y: auto;
    z-index: 999;
  }
  .header-nav.open { display: flex; }

  /* Regular nav links on mobile */
  .header-nav > li > a {
    padding: .7rem .9rem;
    font-size: .95rem;
    border-radius: 10px;
    color: var(--text-primary);
    flex: 1;
  }
  .header-nav > li > a:hover,
  .header-nav > li > a.active {
    background: rgba(102,241,194,.15);
    color: var(--text-primary);
  }

  /* has-dropdown li: link + toggle button side by side */
  .has-dropdown {
    flex-wrap: wrap;
  }
  .has-dropdown > a {
    flex: 1;
    padding: .7rem .9rem;
    font-size: .95rem;
    border-radius: 10px 0 0 10px;
    color: var(--text-primary);
  }
  .has-dropdown > a:hover, .has-dropdown > a.active {
    background: rgba(102,241,194,.15);
  }

  /* Show the toggle arrow button on mobile */
  .dd-toggle {
    display: flex; align-items: center; justify-content: center;
    width: 40px; height: 40px;
    border-radius: 0 10px 10px 0;
    padding: 0;
    border-left: 1px solid var(--border);
  }
  .dd-toggle .dd-arrow { opacity: .6; }
  .has-dropdown.open .dd-toggle .dd-arrow { transform: rotate(180deg); opacity: 1; }

  /* Mobile dropdown — inline accordion */
  .dropdown {
    position: static;
    transform: none !important;
    opacity: 1; visibility: visible;
    box-shadow: none; border: none; border-radius: 0;
    background: #f4f8fc;
    padding: .25rem 0 .5rem .75rem;
    margin-top: .25rem;
    border-left: 2px solid rgba(102,241,194,.4);
    display: none;
    width: 100%;
  }
  .dropdown::before { display: none; }
  .has-dropdown.open .dropdown { display: block; }
  .dropdown li a { padding: .5rem .75rem; font-size: .88rem; white-space: normal; }

  /* Mobile: separator before actions */
  .header-nav::after {
    content: '';
    display: block;
    border-top: 1px solid var(--border);
    margin: .75rem 0 .25rem;
  }
  .header-nav .mobile-actions {
    display: flex; align-items: center; gap: .75rem; padding: .5rem 0;
    flex-wrap: wrap;
  }
}

/* Tablet: hide full company name text to save space */
@media (max-width: 768px) {
  .header-inner { padding: 0 1.25rem; gap: 1rem; }
  .header-company-name { display: none; }
  .header-logo img { height: 44px; }
}

@media (max-width: 480px) {
  .header-inner { padding: 0 1rem; }
  .btn-login { font-size: .78rem; padding: .4rem .85rem; }
  .lang-btn { font-size: .68rem; padding: .18rem .45rem; }
}

/* ══════════════════════════════════════════
   FOOTER
══════════════════════════════════════════ */
.site-footer { background: var(--bg-dark); color: rgba(255,255,255,.7); padding: 4rem 2rem 2rem; }
.footer-inner { max-width: 1280px; margin: 0 auto; }
.footer-top {
  display: grid; grid-template-columns: 1.5fr repeat(3,1fr);
  gap: 3rem; padding-bottom: 3rem;
  border-bottom: 1px solid var(--border-dark);
}
.footer-logo-row { display: flex; align-items: center; gap: .75rem; margin-bottom: 1rem; }
.footer-brand img { height: 44px; opacity: .95; }
.footer-company-name { display: flex; flex-direction: column; line-height: 1.2; }
.fcn-top, .fcn-bottom {
  font-family: 'Inter','Segoe UI',Arial,sans-serif;
  font-size: .72rem; font-weight: 500; color: #8a9bb0; letter-spacing: .08em;
}
.footer-email {
  display: inline-flex; align-items: center; gap: .5rem;
  margin-top: .85rem; font-size: .82rem;
  color: rgba(255,255,255,.5); text-decoration: none; transition: color .2s;
}
.footer-email:hover { color: var(--brand); }
.footer-email svg { flex-shrink: 0; opacity: .7; }
.footer-tagline { font-size: .88rem; line-height: 1.6; color: rgba(255,255,255,.5); margin-bottom: 1.5rem; font-style: italic; }
.social-links { display: flex; gap: .75rem; margin-bottom: 1rem; }
.social-link {
  display: flex; align-items: center; justify-content: center;
  width: 36px; height: 36px; border-radius: 8px;
  background: rgba(255,255,255,.08); color: rgba(255,255,255,.7);
  text-decoration: none; transition: all .2s;
}
.social-link:hover { background: var(--brand); color: var(--bg-dark); transform: translateY(-2px); }
.footer-col h4 {
  font-family: var(--font-display); font-size: .82rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: .1em;
  color: rgba(255,255,255,.9); margin-bottom: .85rem;
}
.footer-col ul { list-style: none; }
.footer-col ul li { margin-bottom: .5rem; }
.footer-col ul a { color: rgba(255,255,255,.5); text-decoration: none; font-size: .85rem; transition: color .2s; }
.footer-col ul a:hover { color: var(--brand); }
.footer-bottom {
  padding-top: 1.5rem; display: flex; align-items: center;
  justify-content: space-between; flex-wrap: wrap; gap: 1rem;
}
.footer-copyright { font-size: .78rem; color: rgba(255,255,255,.35); }

/* Footer responsive */
@media (max-width: 1024px) {
  .footer-top { grid-template-columns: 1fr 1fr; gap: 2rem; }
}
@media (max-width: 600px) {
  .footer-top { grid-template-columns: 1fr; gap: 2rem; }
  .site-footer { padding: 3rem 1.25rem 2rem; }
}

/* ══════════════════════════════════════════
   LAYOUT UTILITIES
══════════════════════════════════════════ */
.page-wrapper { padding-top: var(--header-h); min-height: 100vh; }
.container { max-width: 1280px; margin: 0 auto; padding: 0 2rem; }
.section { padding: 5rem 0; }

@media (max-width: 768px) {
  .container { padding: 0 1.25rem; }
  .section { padding: 3.5rem 0; }
}
@media (max-width: 480px) {
  .container { padding: 0 1rem; }
  .section { padding: 2.75rem 0; }
}

.section-label {
  display: inline-block;
  font-family: 'Inter','Segoe UI',Arial,sans-serif;
  font-size: .75rem; font-weight: 500; text-transform: uppercase; letter-spacing: .12em;
  color: var(--brand-dark); background: rgba(102,241,194,.12);
  padding: .35rem .85rem; border-radius: 100px; margin-bottom: 1rem;
  border: 1px solid rgba(102,241,194,.25);
}
.section-title {
  font-family: var(--font-display);
  font-size: clamp(1.75rem,4vw,3rem); font-weight: 800; line-height: 1.15;
  color: var(--text-primary); margin-bottom: 1rem;
}
.section-subtitle {
  font-family: 'Inter','Segoe UI',Arial,sans-serif;
  font-size: 1.05rem; color: var(--text-secondary); max-width: 600px; line-height: 1.7;
}

/* ══════════════════════════════════════════
   BUTTONS
══════════════════════════════════════════ */
.btn {
  display: inline-flex; align-items: center; gap: .5rem;
  font-family: var(--font-body); font-weight: 600; font-size: .9rem;
  padding: .75rem 1.75rem; border-radius: 10px; border: none;
  cursor: pointer; text-decoration: none; transition: all .2s; white-space: nowrap;
}
.btn-primary { background: var(--brand); color: var(--bg-dark); }
.btn-primary:hover { background: var(--brand-dark); transform: translateY(-2px); box-shadow: 0 6px 20px var(--brand-glow); }
.btn-outline { background: transparent; color: var(--text-primary); border: 1.5px solid var(--border); }
.btn-outline:hover { border-color: var(--brand); background: var(--brand-glow); transform: translateY(-2px); }
.btn-msapi { background: var(--msapi); color: #fff; }
.btn-msapi:hover { background: var(--msapi-dark); transform: translateY(-2px); box-shadow: 0 6px 20px var(--msapi-glow); }

/* ══════════════════════════════════════════
   CARDS
══════════════════════════════════════════ */
.card {
  background: var(--bg-card); border-radius: var(--radius-lg);
  border: 1px solid var(--border); padding: 2rem; transition: all .3s;
}
.card:hover { box-shadow: var(--shadow-lg); border-color: rgba(102,241,194,.4); transform: translateY(-4px); }

/* ── GRIDS ── */
.grid-2 { display: grid; grid-template-columns: repeat(2,1fr); gap: 1.5rem; }
.grid-3 { display: grid; grid-template-columns: repeat(3,1fr); gap: 1.5rem; }
.grid-4 { display: grid; grid-template-columns: repeat(4,1fr); gap: 1.5rem; }

@media (max-width: 1024px) {
  .grid-3 { grid-template-columns: repeat(2,1fr); }
  .grid-4 { grid-template-columns: repeat(2,1fr); }
}
@media (max-width: 600px) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
}

/* ── BADGES ── */
.badge {
  display: inline-flex; align-items: center; gap: .35rem;
  font-family: 'Inter','Segoe UI',Arial,sans-serif;
  font-size: .72rem; font-weight: 500;
  padding: .3rem .7rem; border-radius: 100px;
  background: rgba(102,241,194,.12); color: var(--brand-dark);
  border: 1px solid rgba(102,241,194,.25);
}

/* ══════════════════════════════════════════
   ANIMATIONS
══════════════════════════════════════════ */
@keyframes fadeUp { from { opacity:0; transform:translateY(24px); } to { opacity:1; transform:translateY(0); } }
@keyframes fadeIn { from { opacity:0; } to { opacity:1; } }
@keyframes pulse-brand { 0%,100% { box-shadow:0 0 0 0 var(--brand-glow); } 50% { box-shadow:0 0 0 12px transparent; } }
@keyframes float { 0%,100% { transform:translateY(0); } 50% { transform:translateY(-8px); } }
@keyframes shimmer { from { background-position:-200% center; } to { background-position:200% center; } }

.anim-fade-up { animation: fadeUp .6s ease both; }
.anim-delay-1 { animation-delay: .1s; }
.anim-delay-2 { animation-delay: .2s; }
.anim-delay-3 { animation-delay: .3s; }
.anim-delay-4 { animation-delay: .4s; }

/* ══════════════════════════════════════════
   GLOBAL FONT RULES
══════════════════════════════════════════ */
.section-label, .badge, .saas-badge, .saas-product-label,
.msapi-label, .msapi-section-label, .about-badge,
.transform-label, .fcta-label, .sh-eyebrow, .lang-btn,
.ahd-stack-badge, .av-pill, .pricing-card-name,
.pricing-free-badge, .pricing-badge, .footer-tagline,
.tech-tag, .mdc-badge {
  font-family: 'Inter','Segoe UI',Arial,sans-serif !important;
}
.section-title, .sh-title, .transform-title, .fcta-title,
.sbc-body h3, .saas-product-name, .faq-q span {
  font-family: 'Montserrat','Trebuchet MS',Arial,sans-serif !important;
}
