/* =========================================================
   FlamsX Inc — styles.css
   ========================================================= */

:root {
  --bg: #0b0f1a;
  --bg-alt: #0e1424;
  --surface: #121a2e;
  --surface-2: #16203a;
  --border: rgba(148, 163, 184, 0.14);
  --border-strong: rgba(148, 163, 184, 0.28);
  --text: #e8edf7;
  --text-muted: #9aa7bd;
  --text-dim: #6b7890;
  --teal: #5eead4;
  --indigo: #818cf8;
  --accent-grad: linear-gradient(120deg, #5eead4 0%, #818cf8 100%);
  --shadow: 0 20px 50px -20px rgba(0, 0, 0, 0.7);
  --radius: 16px;
  --radius-sm: 10px;
  --maxw: 1120px;
  --font-sans: "Inter", system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif;
  --font-display: "Space Grotesk", var(--font-sans);
}

/* ---------- Reset / base ---------- */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation: none !important; transition: none !important; }
}

body {
  margin: 0;
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

h1, h2, h3 { font-family: var(--font-display); line-height: 1.14; letter-spacing: -0.02em; margin: 0; }
p { margin: 0; }
a { color: inherit; text-decoration: none; }
img, svg { display: block; }
ul, ol { margin: 0; padding: 0; list-style: none; }

.container { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: 24px; }

.grad {
  background: var(--accent-grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--teal);
  margin-bottom: 14px;
}

.lede { color: var(--text-muted); font-size: 1.08rem; }

.skip-link {
  position: absolute; left: -999px; top: 0; z-index: 100;
  background: var(--teal); color: #06231f; padding: 10px 16px;
  border-radius: 0 0 8px 0; font-weight: 600;
}
.skip-link:focus { left: 0; }

:focus-visible { outline: 2px solid var(--teal); outline-offset: 3px; border-radius: 4px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: 8px; font-weight: 600; font-size: 0.96rem;
  padding: 12px 22px; border-radius: 999px; cursor: pointer;
  border: 1px solid transparent; transition: transform .18s ease, box-shadow .18s ease, background .18s ease, border-color .18s ease;
  white-space: nowrap;
}
.btn-lg { padding: 15px 30px; font-size: 1.02rem; }
.btn-primary {
  background: var(--accent-grad); color: #06231f;
  box-shadow: 0 10px 30px -10px rgba(94, 234, 212, 0.5);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 16px 36px -12px rgba(129, 140, 248, 0.55); }
.btn-ghost {
  background: rgba(255, 255, 255, 0.02); color: var(--text);
  border-color: var(--border-strong);
}
.btn-ghost:hover { transform: translateY(-2px); border-color: var(--teal); color: #fff; }

/* ---------- Header / Nav ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  backdrop-filter: blur(12px);
  background: rgba(11, 15, 26, 0.72);
  border-bottom: 1px solid transparent;
  transition: border-color .25s ease, background .25s ease;
}
.site-header.scrolled { border-bottom-color: var(--border); background: rgba(11, 15, 26, 0.88); }

.nav { display: flex; align-items: center; justify-content: space-between; height: 72px; }

.brand { display: inline-flex; align-items: center; gap: 10px; }
.brand-mark {
  display: grid; place-items: center; width: 40px; height: 40px;
  border-radius: 11px; background: rgba(94, 234, 212, 0.08);
  border: 1px solid var(--border);
}
.brand-name { font-family: var(--font-display); font-weight: 700; font-size: 1.2rem; letter-spacing: -0.01em; }
.brand-inc { color: var(--teal); font-weight: 600; }

.nav-links { display: flex; align-items: center; gap: 8px; }
.nav-links > a { padding: 8px 14px; border-radius: 8px; color: var(--text-muted); font-weight: 500; transition: color .18s ease, background .18s ease; }
.nav-links > a:hover { color: var(--text); }
.nav-links .btn-ghost { color: var(--text); }

.nav-toggle {
  display: none; flex-direction: column; gap: 5px; width: 44px; height: 44px;
  align-items: center; justify-content: center;
  background: transparent; border: 1px solid var(--border); border-radius: 10px; cursor: pointer;
}
.nav-toggle span { width: 20px; height: 2px; background: var(--text); border-radius: 2px; transition: transform .25s ease, opacity .2s ease; }
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.mobile-menu { display: none; flex-direction: column; padding: 8px 24px 20px; border-bottom: 1px solid var(--border); background: rgba(11, 15, 26, 0.96); }
.mobile-menu a { padding: 12px 4px; color: var(--text-muted); border-bottom: 1px solid var(--border); font-weight: 500; }
.mobile-menu a:last-child { border-bottom: none; }

/* ---------- Hero ---------- */
.hero { position: relative; padding: 92px 0 64px; overflow: hidden; }
.hero-glow {
  position: absolute; inset: -20% 0 auto 0; height: 620px; z-index: 0;
  background:
    radial-gradient(48% 55% at 22% 20%, rgba(94, 234, 212, 0.18), transparent 60%),
    radial-gradient(45% 55% at 82% 12%, rgba(129, 140, 248, 0.20), transparent 62%);
  filter: blur(6px);
  pointer-events: none;
}
.hero-inner { position: relative; z-index: 1; max-width: 860px; }
.hero h1 { font-size: clamp(2.3rem, 6vw, 4rem); margin-bottom: 22px; }
.hero .lede { max-width: 680px; font-size: clamp(1.02rem, 2.2vw, 1.22rem); }

.hero-cta { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 34px; }

.hero-stats {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px;
  margin: 56px 0 0; padding-top: 34px; border-top: 1px solid var(--border);
}
.hero-stats dt { font-family: var(--font-display); font-weight: 600; font-size: 1.02rem; color: var(--text); margin-bottom: 4px; }
.hero-stats dd { margin: 0; color: var(--text-muted); font-size: 0.94rem; }

/* ---------- Sections ---------- */
.section { padding: 88px 0; }
.section-alt { background: var(--bg-alt); border-block: 1px solid var(--border); }
.section-head { max-width: 720px; margin-bottom: 52px; }
.section-head h2 { font-size: clamp(1.7rem, 4vw, 2.5rem); }

/* ---------- Service cards ---------- */
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.card {
  background: linear-gradient(180deg, var(--surface) 0%, var(--bg-alt) 100%);
  border: 1px solid var(--border); border-radius: var(--radius);
  padding: 30px 26px; box-shadow: var(--shadow);
  transition: transform .25s ease, border-color .25s ease;
}
.card:hover { transform: translateY(-6px); border-color: var(--border-strong); }
.card-icon {
  display: grid; place-items: center; width: 52px; height: 52px; border-radius: 13px;
  background: rgba(129, 140, 248, 0.10); color: var(--teal);
  border: 1px solid var(--border); margin-bottom: 20px;
}
.card h3 { font-size: 1.32rem; margin-bottom: 10px; }
.card > p { color: var(--text-muted); margin-bottom: 18px; }
.card-list li {
  position: relative; padding-left: 22px; margin-bottom: 9px; color: var(--text-muted); font-size: 0.94rem;
}
.card-list li::before {
  content: ""; position: absolute; left: 0; top: 9px; width: 8px; height: 8px;
  border-radius: 50%; background: var(--accent-grad);
}

/* ---------- Steps ---------- */
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; counter-reset: step; }
.steps li {
  position: relative; padding: 28px 22px; border-radius: var(--radius);
  background: var(--surface); border: 1px solid var(--border);
}
.step-num {
  display: inline-block; font-family: var(--font-display); font-size: 1.05rem; font-weight: 700;
  color: #06231f; background: var(--accent-grad); padding: 4px 12px; border-radius: 999px; margin-bottom: 16px;
}
.steps h3 { font-size: 1.2rem; margin-bottom: 8px; }
.steps p { color: var(--text-muted); font-size: 0.95rem; }

/* ---------- Value grid ---------- */
.value-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.value {
  padding: 28px; border-radius: var(--radius); background: var(--surface);
  border: 1px solid var(--border); transition: border-color .25s ease, transform .25s ease;
}
.value:hover { border-color: var(--border-strong); transform: translateY(-4px); }
.value h3 { font-size: 1.24rem; margin-bottom: 8px; }
.value p { color: var(--text-muted); }

/* ---------- CTA ---------- */
.cta {
  background:
    radial-gradient(60% 120% at 80% 0%, rgba(129, 140, 248, 0.14), transparent 60%),
    radial-gradient(60% 120% at 10% 100%, rgba(94, 234, 212, 0.12), transparent 60%),
    var(--bg-alt);
  border-top: 1px solid var(--border);
}
.cta-inner {
  display: flex; align-items: center; justify-content: space-between; gap: 40px; flex-wrap: wrap;
}
.cta-copy { max-width: 560px; }
.cta-copy h2 { font-size: clamp(1.7rem, 4vw, 2.4rem); margin-bottom: 12px; }
.cta-action { display: flex; flex-direction: column; align-items: flex-start; gap: 14px; }
.contact-email { font-family: var(--font-display); font-size: 1.1rem; color: var(--text); border-bottom: 1px dashed var(--border-strong); padding-bottom: 2px; }
.contact-email:hover { color: var(--teal); border-color: var(--teal); }
.copy-email {
  background: transparent; border: 1px solid var(--border-strong); color: var(--text-muted);
  padding: 8px 16px; border-radius: 999px; cursor: pointer; font-size: 0.88rem; font-weight: 500;
  transition: color .18s ease, border-color .18s ease;
}
.copy-email:hover { color: var(--text); border-color: var(--teal); }

/* ---------- Footer ---------- */
.site-footer { background: var(--bg); border-top: 1px solid var(--border); padding-top: 56px; }
.footer-inner { display: flex; justify-content: space-between; gap: 40px; flex-wrap: wrap; padding-bottom: 40px; border-bottom: 1px solid var(--border); }
.footer-brand { max-width: 340px; }
.footer-brand p { color: var(--text-muted); margin-top: 12px; font-size: 0.95rem; }
.footer-links { display: flex; flex-direction: column; gap: 10px; }
.footer-links a { color: var(--text-muted); font-size: 0.95rem; }
.footer-links a:hover { color: var(--teal); }
.footer-bottom { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; padding: 22px 24px 32px; }
.footer-bottom p { color: var(--text-dim); font-size: 0.88rem; }
.to-top { color: var(--text-muted); font-size: 0.88rem; }
.to-top:hover { color: var(--teal); }

/* ---------- Toast ---------- */
.toast {
  position: fixed; left: 50%; bottom: 32px; transform: translateX(-50%) translateY(20px);
  background: var(--surface-2); color: var(--text); border: 1px solid var(--border-strong);
  padding: 12px 22px; border-radius: 999px; box-shadow: var(--shadow);
  opacity: 0; transition: opacity .25s ease, transform .25s ease; z-index: 80; font-size: 0.92rem;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ---------- Reveal animation ---------- */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity .6s ease, transform .6s ease; }
.reveal.in { opacity: 1; transform: none; }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .cards { grid-template-columns: 1fr; }
  .steps { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 760px) {
  .nav-links { display: none; }
  .nav-toggle { display: flex; }
  .mobile-menu.open { display: flex; }
  .hero { padding: 64px 0 48px; }
  .section { padding: 64px 0; }
  .hero-stats { grid-template-columns: 1fr; gap: 14px; }
  .value-grid { grid-template-columns: 1fr; }
  .cta-inner { flex-direction: column; align-items: flex-start; }
}
@media (max-width: 480px) {
  .steps { grid-template-columns: 1fr; }
  .container { padding-inline: 18px; }
}
