/* ApexFlow Softwares — site styles */
:root {
  --ink: #0E1116;
  --ink-2: #171B22;
  --ink-3: #232935;
  --paper: #F5F3EE;
  --tint: #ECE8DF;
  --card: #FFFFFF;
  --line: #E1DCD1;
  --line-dark: #2A303B;
  --text: #14171D;
  --muted: #5B6270;
  --muted-dark: #A2A9B6;
  --accent: #FF5A1F;
  --accent-hover: #E84A10;
  --flow: #5B8CFF;

  --font-display: "Bricolage Grotesque", "Inter", system-ui, sans-serif;
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, Menlo, monospace;

  --radius: 18px;
  --radius-sm: 12px;
  --container: 1180px;
  --shadow: 0 1px 2px rgba(14, 17, 22, .04), 0 12px 32px -12px rgba(14, 17, 22, .16);
}

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

html { scroll-behavior: smooth; scroll-padding-top: 80px; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img, svg { display: block; max-width: 100%; }

a { color: inherit; }

h1, h2, h3 {
  font-family: var(--font-display);
  line-height: 1.08;
  letter-spacing: -0.02em;
  margin: 0 0 .5em;
  text-wrap: balance;
}

h1 { font-size: clamp(2.6rem, 6vw, 4.6rem); font-weight: 800; }
h2 { font-size: clamp(2rem, 4vw, 3.1rem); font-weight: 800; }
h3 { font-size: 1.25rem; font-weight: 700; letter-spacing: -0.01em; }

p { margin: 0 0 1em; }

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

.skip-link {
  position: absolute;
  left: -9999px;
  top: 8px;
  background: var(--accent);
  color: #fff;
  padding: 8px 14px;
  border-radius: 8px;
  z-index: 100;
}
.skip-link:focus { left: 8px; }

:focus-visible { outline: 3px solid var(--flow); outline-offset: 3px; border-radius: 6px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5em;
  padding: 14px 24px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 1rem;
  text-decoration: none;
  border: 1.5px solid transparent;
  cursor: pointer;
  transition: background .2s, color .2s, border-color .2s, transform .2s;
  font-family: inherit;
}
.btn:hover { transform: translateY(-1px); }
.btn-accent { background: var(--accent); color: #fff; }
.btn-accent:hover { background: var(--accent-hover); }
.btn-ghost { border-color: rgba(255, 255, 255, .25); color: #fff; }
.btn-ghost:hover { border-color: #fff; }
.btn-ghost-dark { border-color: var(--line); color: var(--text); background: transparent; }
.btn-ghost-dark:hover { border-color: var(--text); }
.btn-small { padding: 10px 18px; font-size: .95rem; }
.btn-block { width: 100%; }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--ink);
  border-bottom: 1px solid rgba(255, 255, 255, .06);
  color: #fff;
}

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

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}
.brand-name {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.3rem;
  letter-spacing: -0.02em;
}
.brand-name span { color: var(--accent); }

.nav-menu {
  display: flex;
  align-items: center;
  gap: 28px;
}
.nav-menu a:not(.btn) {
  text-decoration: none;
  font-size: .95rem;
  font-weight: 500;
  color: rgba(255, 255, 255, .78);
  transition: color .2s;
}
.nav-menu a:not(.btn):hover { color: #fff; }

.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 0;
  background: transparent;
  cursor: pointer;
  position: relative;
}
.nav-toggle span {
  position: absolute;
  left: 11px;
  right: 11px;
  height: 2px;
  background: #fff;
  border-radius: 2px;
  transition: transform .25s, top .25s;
}
.nav-toggle span:first-child { top: 17px; }
.nav-toggle span:last-child { top: 25px; }
.nav-toggle[aria-expanded="true"] span:first-child { top: 21px; transform: rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:last-child { top: 21px; transform: rotate(-45deg); }

/* ---------- Hero ---------- */
.hero {
  background:
    radial-gradient(900px 500px at 85% 10%, rgba(91, 140, 255, .18), transparent 60%),
    radial-gradient(700px 500px at 10% 90%, rgba(255, 90, 31, .16), transparent 60%),
    var(--ink);
  color: #fff;
  padding: 88px 0 0;
  overflow: hidden;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 56px;
  align-items: center;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 6px 14px;
  border: 1px solid rgba(255, 255, 255, .15);
  border-radius: 999px;
  font-size: .85rem;
  font-weight: 500;
  color: rgba(255, 255, 255, .85);
  margin-bottom: 24px;
}
.dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 4px rgba(255, 90, 31, .25);
}

.hero h1 em {
  font-style: normal;
  color: var(--accent);
  position: relative;
  white-space: nowrap;
}
.hero h1 em::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: .04em;
  height: .12em;
  background: var(--flow);
  border-radius: 99px;
  opacity: .85;
}

.lead {
  font-size: 1.18rem;
  color: rgba(255, 255, 255, .74);
  max-width: 34em;
}

.hero-ctas { display: flex; flex-wrap: wrap; gap: 12px; margin: 32px 0 28px; }

.hero-points {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 22px;
  font-size: .92rem;
  color: rgba(255, 255, 255, .62);
}
.hero-points li { display: flex; align-items: center; gap: 8px; }
.hero-points li::before {
  content: "";
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: rgba(255, 90, 31, .18) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 14 14'%3E%3Cpath d='M4 7.2l2 2 4-4.4' fill='none' stroke='%23FF5A1F' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/100% no-repeat;
}

/* Hero visual */
.hero-visual {
  position: relative;
  min-height: 520px;
  padding-right: 24px;
}
.window {
  background: var(--ink-2);
  border: 1px solid var(--line-dark);
  border-radius: var(--radius);
  box-shadow: 0 30px 60px -20px rgba(0, 0, 0, .6);
  width: 100%;
  overflow: hidden;
}
.window-bar {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line-dark);
  font-family: var(--font-mono);
  font-size: .78rem;
  color: var(--muted-dark);
}
.window-bar i { width: 11px; height: 11px; border-radius: 50%; background: #3A414E; }
.window-bar i:first-child { background: #FF5F57; }
.window-bar i:nth-child(2) { background: #FEBC2E; }
.window-bar i:nth-child(3) { background: #28C840; }
.window-bar span { margin-left: 10px; }
.code {
  margin: 0;
  padding: 22px 22px 28px;
  font-family: var(--font-mono);
  font-size: .86rem;
  line-height: 1.75;
  color: #D7DCE5;
  overflow-x: auto;
}
.code .k { color: #FF8A5C; }
.code .s { color: #9BE59B; }
.code .f { color: #8FB2FF; }
.code .c { color: #6B7383; }

.phone {
  position: absolute;
  right: -24px;
  top: 150px;
  width: 180px;
  height: 360px;
  background: #0A0C10;
  border: 6px solid #2B313C;
  border-radius: 36px;
  box-shadow: 0 30px 60px -16px rgba(0, 0, 0, .7);
  padding: 10px;
  animation: float 6s ease-in-out infinite;
}
.phone-notch {
  width: 70px;
  height: 18px;
  background: #2B313C;
  border-radius: 0 0 12px 12px;
  margin: -10px auto 10px;
}
.phone-screen {
  background: var(--paper);
  border-radius: 24px;
  height: calc(100% - 18px);
  padding: 16px 14px;
  color: var(--text);
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.ph-head { display: flex; align-items: center; justify-content: space-between; }
.ph-title { font-family: var(--font-display); font-weight: 800; font-size: 1rem; }
.ph-pill {
  font-size: .65rem;
  font-weight: 600;
  background: rgba(40, 200, 64, .15);
  color: #1A8A2E;
  padding: 3px 8px;
  border-radius: 99px;
}
.ph-chart {
  background: #fff;
  border-radius: 14px;
  padding: 14px 10px;
  height: 92px;
  box-shadow: var(--shadow);
}
.ph-chart svg { width: 100%; height: 100%; }
.ph-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #fff;
  border-radius: 10px;
  padding: 10px;
}
.ph-row span { width: 55%; height: 8px; border-radius: 6px; background: var(--tint); }
.ph-row b { width: 18%; height: 8px; border-radius: 6px; background: var(--flow); opacity: .7; }
.ph-btn {
  margin-top: auto;
  background: var(--ink);
  color: #fff;
  text-align: center;
  border-radius: 12px;
  padding: 10px;
  font-size: .8rem;
  font-weight: 600;
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

/* Marquee */
.marquee {
  margin-top: 96px;
  border-top: 1px solid rgba(255, 255, 255, .08);
  padding: 22px 0;
  overflow: hidden;
  mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
}
.marquee-track {
  display: flex;
  gap: 56px;
  width: max-content;
  animation: scroll 40s linear infinite;
}
.marquee-track span {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.15rem;
  color: rgba(255, 255, 255, .45);
  white-space: nowrap;
}
@keyframes scroll { to { transform: translateX(calc(-50% - 28px)); } }

/* ---------- Sections ---------- */
.section { padding: 112px 0; }
.section-dark { background: var(--ink); color: #fff; }
.section-tint { background: var(--tint); }

.section-head { max-width: 680px; margin-bottom: 56px; }
.section-head > p:last-child { color: var(--muted); font-size: 1.1rem; }
.section-dark .section-head > p:last-child { color: var(--muted-dark); }

.kicker {
  font-family: var(--font-mono);
  font-size: .82rem;
  font-weight: 500;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 14px;
}

/* Services */
.cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 32px 28px;
  transition: transform .25s, box-shadow .25s, border-color .25s;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: transparent; }
.card p { color: var(--muted); margin: 0; }
.icon {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  background: var(--ink);
  display: grid;
  place-items: center;
  margin-bottom: 22px;
}
.icon svg {
  width: 26px;
  height: 26px;
  fill: none;
  stroke: var(--accent);
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* Process */
.steps {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  counter-reset: step;
}
.step {
  position: relative;
  padding: 28px 24px 30px;
  border: 1px solid var(--line-dark);
  border-radius: var(--radius);
  background: var(--ink-2);
}
.step p { color: var(--muted-dark); margin: 0; font-size: .97rem; }
.step-num {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: .85rem;
  color: var(--accent);
  margin-bottom: 40px;
}
.step::after {
  content: "";
  position: absolute;
  top: 38px;
  left: 64px;
  right: 24px;
  height: 1px;
  background: linear-gradient(90deg, var(--line-dark), transparent);
}

/* What we build */
.tiles {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-auto-rows: minmax(200px, auto);
  gap: 20px;
}
.tile {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}
.tile p { color: var(--muted); margin: 0; }
.tile-lg {
  grid-row: span 2;
  background:
    radial-gradient(400px 300px at 100% 0%, rgba(91, 140, 255, .35), transparent 70%),
    radial-gradient(400px 300px at 0% 100%, rgba(255, 90, 31, .3), transparent 70%),
    var(--ink);
  color: #fff;
  border: 0;
}
.tile-lg h3 { font-size: 2rem; }
.tile-lg p { color: rgba(255, 255, 255, .72); font-size: 1.05rem; }
.tag {
  align-self: flex-start;
  font-family: var(--font-mono);
  font-size: .75rem;
  text-transform: uppercase;
  letter-spacing: .04em;
  padding: 4px 10px;
  border-radius: 99px;
  border: 1px solid currentColor;
  color: var(--accent);
  margin-bottom: auto;
}
.tile h3 { margin-top: 32px; }

/* Why */
.why { display: grid; grid-template-columns: 1fr 1.1fr; gap: 56px; align-items: start; }
.why .section-head { margin-bottom: 0; }
.why-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 14px; }
.why-list li {
  background: var(--card);
  border-radius: var(--radius-sm);
  padding: 20px 22px 20px 58px;
  position: relative;
  color: var(--muted);
}
.why-list li strong { color: var(--text); }
.why-list li::before {
  content: "";
  position: absolute;
  left: 20px;
  top: 22px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--accent) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 22 22'%3E%3Cpath d='M6.5 11.3l3 3 6-6.6' fill='none' stroke='%23fff' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/100% no-repeat;
}

/* Plans */
.plans { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; align-items: stretch; }
.plan {
  position: relative;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 36px 30px 30px;
  display: flex;
  flex-direction: column;
}
.plan h3 { font-size: 1.7rem; margin-bottom: .2em; }
.plan-sub { color: var(--muted); }
.plan ul { list-style: none; padding: 0; margin: 12px 0 32px; display: grid; gap: 12px; }
.plan li { padding-left: 28px; position: relative; }
.plan li::before {
  content: "";
  position: absolute;
  left: 0;
  top: .45em;
  width: 14px;
  height: 8px;
  border-left: 2px solid var(--accent);
  border-bottom: 2px solid var(--accent);
  transform: rotate(-45deg);
}
.plan .btn { margin-top: auto; }
.plan-featured { background: var(--ink); color: #fff; border-color: var(--ink); }
.plan-featured .plan-sub { color: var(--muted-dark); }
.badge {
  position: absolute;
  top: -13px;
  left: 30px;
  background: var(--accent);
  color: #fff;
  font-size: .78rem;
  font-weight: 600;
  padding: 4px 12px;
  border-radius: 99px;
}

/* FAQ */
.faq-wrap { display: grid; grid-template-columns: 1fr 1.6fr; gap: 56px; align-items: start; }
.faq-wrap .section-head { margin-bottom: 0; }
.faq { display: grid; gap: 12px; }
.faq details {
  background: var(--card);
  border-radius: var(--radius-sm);
  padding: 0 24px;
}
.faq summary {
  cursor: pointer;
  list-style: none;
  padding: 22px 32px 22px 0;
  font-weight: 600;
  font-size: 1.05rem;
  position: relative;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+";
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1.5rem;
  font-weight: 400;
  color: var(--accent);
  transition: transform .2s;
}
.faq details[open] summary::after { transform: translateY(-50%) rotate(45deg); }
.faq details p { color: var(--muted); padding-bottom: 22px; margin: 0; }

/* Contact */
.contact {
  background:
    radial-gradient(700px 400px at 0% 0%, rgba(255, 90, 31, .16), transparent 60%),
    var(--ink);
}
.contact-grid { display: grid; grid-template-columns: 1fr 1.1fr; gap: 64px; align-items: start; }
.contact-email {
  display: inline-block;
  font-family: var(--font-display);
  font-size: clamp(1.3rem, 2.4vw, 1.7rem);
  font-weight: 700;
  color: #fff;
  text-decoration: none;
  border-bottom: 2px solid var(--accent);
  margin: 12px 0 32px;
  word-break: break-all;
}
.socials { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 10px; }
.socials a {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 1px solid var(--line-dark);
  color: #fff;
  transition: background .2s, border-color .2s;
}
.socials a:hover { background: var(--accent); border-color: var(--accent); }
.socials svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.socials svg .fill { fill: currentColor; stroke: none; }

.contact-form {
  background: var(--ink-2);
  border: 1px solid var(--line-dark);
  border-radius: var(--radius);
  padding: 32px;
  display: grid;
  gap: 18px;
}
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.contact-form label {
  display: grid;
  gap: 8px;
  font-size: .88rem;
  font-weight: 500;
  color: var(--muted-dark);
}
.contact-form input,
.contact-form select,
.contact-form textarea {
  width: 100%;
  font: inherit;
  font-size: 1rem;
  color: #fff;
  background: var(--ink);
  border: 1px solid var(--line-dark);
  border-radius: 10px;
  padding: 12px 14px;
  transition: border-color .2s;
}
.contact-form textarea { resize: vertical; min-height: 130px; }
.contact-form input:focus,
.contact-form select:focus,
.contact-form textarea:focus { outline: none; border-color: var(--accent); }
.contact-form [aria-invalid="true"] { border-color: #FF6B6B; }
.form-note { margin: 0; font-size: .9rem; color: var(--muted-dark); min-height: 1.4em; }

/* Footer */
.site-footer { background: #090B0F; color: var(--muted-dark); padding: 40px 0; font-size: .92rem; }
.footer-grid { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; }
.footer-grid p { margin: 0; }
.brand-light { color: #fff; }

/* Reveal on scroll */
.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s ease, transform .6s ease; }
.js .reveal.in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .reveal { opacity: 1; transform: none; transition: none; }
  .phone, .marquee-track { animation: none; }
}

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-visual { max-width: 560px; }
  .cards, .tiles, .plans { grid-template-columns: repeat(2, 1fr); }
  .steps { grid-template-columns: repeat(2, 1fr); }
  .why, .faq-wrap, .contact-grid { grid-template-columns: 1fr; gap: 40px; }
  .plan-featured { order: -1; }
}

@media (max-width: 820px) {
  .nav-toggle { display: block; }
  .nav-menu {
    position: fixed;
    inset: 72px 0 auto 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 12px 24px 24px;
    background: var(--ink);
    border-bottom: 1px solid var(--line-dark);
    transform: translateY(-8px);
    opacity: 0;
    visibility: hidden;
    transition: opacity .2s, transform .2s, visibility .2s;
  }
  .nav-menu.open { opacity: 1; transform: none; visibility: visible; }
  .nav-menu a:not(.btn) { padding: 14px 0; border-bottom: 1px solid var(--line-dark); font-size: 1.05rem; }
  .nav-menu .btn { margin-top: 16px; }
}

@media (max-width: 640px) {
  body { font-size: 16px; }
  .container { padding: 0 16px; }
  .section { padding: 80px 0; }
  .hero { padding-top: 56px; }
  .hero-visual { min-height: 0; padding-bottom: 20px; }
  .window { width: 100%; }
  .phone { display: none; }
  .marquee { margin-top: 56px; }
  .cards, .tiles, .plans, .steps, .field-row { grid-template-columns: 1fr; }
  .tile-lg { grid-row: auto; min-height: 280px; }
  .contact-form { padding: 22px; }
  .footer-grid { flex-direction: column; align-items: flex-start; }
}
