/* ============================================================
   Farasa — dark, premium B2B site
   Type: LL Circular first (if licensed/installed), DM Sans web
   fallback, then system geometric sans.
   ============================================================ */

:root {
  --bg0: #0a0d12;          /* page */
  --bg1: #0e1219;          /* raised sections */
  --bg2: #12171f;          /* cards */
  --bg3: #171d27;          /* hover surfaces */
  --line: rgba(233, 237, 243, 0.08);
  --line-strong: rgba(233, 237, 243, 0.18);
  --text: #eef1f5;
  --body: #a6afbc;
  --muted: #6e7885;
  --accent: #e0813c;
  --accent-bright: #f0934e;
  --accent-soft: rgba(224, 129, 60, 0.13);
  --ink-on-accent: #16110b;

  --font: "LL Circular", "Circular Std", "Circular", "DM Sans",
          -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
          Helvetica, Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  --radius: 14px;
  --radius-pill: 999px;
  --container: 1160px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

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

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

body {
  font-family: var(--font);
  color: var(--body);
  background: var(--bg0);
  line-height: 1.65;
  font-size: 1rem;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

body.nav-open { overflow: hidden; }

::selection { background: var(--accent); color: var(--ink-on-accent); }

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

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

.narrow { max-width: 780px; }

.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.skip-link {
  position: fixed;
  top: -48px;
  left: 16px;
  z-index: 200;
  background: var(--accent);
  color: var(--ink-on-accent);
  font-weight: 600;
  padding: 10px 18px;
  border-radius: var(--radius-pill);
  text-decoration: none;
  transition: top 0.2s var(--ease);
}

.skip-link:focus-visible { top: 12px; }

/* ---------- Type ---------- */

h1, h2, h3 {
  color: var(--text);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.12;
  text-wrap: balance;
}

h1 {
  font-size: clamp(2.6rem, 5.8vw, 4.1rem);
  font-weight: 700;
  letter-spacing: -0.03em;
}

h1 .accent {
  color: var(--accent);
  background: linear-gradient(100deg, var(--accent-bright), var(--accent) 60%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

h2 {
  font-size: clamp(1.75rem, 3.6vw, 2.6rem);
  margin-bottom: 1.1rem;
  max-width: 24ch;
}

.narrow h2 { max-width: none; }

h3 { font-size: 1.08rem; margin-bottom: 0.45rem; }

.eyebrow {
  font-size: 0.76rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--accent);
  margin-bottom: 1.1rem;
}

.lede, .section-lede {
  font-size: 1.12rem;
  max-width: 56ch;
}

a { color: inherit; }

/* ---------- Buttons ---------- */

.btn {
  display: inline-block;
  padding: 0.9rem 1.8rem;
  border-radius: var(--radius-pill);
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 600;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background-color 0.25s var(--ease),
              border-color 0.25s var(--ease),
              color 0.25s var(--ease),
              box-shadow 0.3s var(--ease);
  will-change: transform;
}

.btn-primary {
  background: var(--accent);
  color: var(--ink-on-accent);
}

.btn-primary:hover {
  background: var(--accent-bright);
  box-shadow: 0 0 32px rgba(224, 129, 60, 0.35);
}

.btn-ghost {
  color: var(--text);
  border-color: var(--line-strong);
  background: transparent;
}

.btn-ghost:hover {
  border-color: var(--text);
  background: rgba(233, 237, 243, 0.04);
}

.btn-sm { padding: 0.55rem 1.25rem; font-size: 0.88rem; }

.btn:focus-visible,
a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

/* ---------- Header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(10, 13, 18, 0.72);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s var(--ease);
}

.site-header.scrolled { border-bottom-color: var(--line); }

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  height: 76px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 1.18rem;
  letter-spacing: -0.02em;
  color: var(--text);
  text-decoration: none;
}

.brand-mark {
  width: 12px;
  height: 12px;
  border-radius: 4px;
  background: var(--accent);
  display: inline-block;
  box-shadow: 0 0 14px rgba(224, 129, 60, 0.55);
}

.site-nav {
  display: none;
  gap: 30px;
}

.site-nav a {
  position: relative;
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--body);
  text-decoration: none;
  padding: 4px 0;
  transition: color 0.2s var(--ease);
}

.site-nav a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -2px;
  width: 100%;
  height: 2px;
  border-radius: 2px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s var(--ease);
}

.site-nav a:hover { color: var(--text); }

.site-nav a.active { color: var(--text); }
.site-nav a.active::after { transform: scaleX(1); }

@media (min-width: 880px) {
  .site-nav { display: flex; }
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 14px;
}

/* Hamburger */

.nav-toggle {
  display: inline-flex;
  flex-direction: column;
  justify-content: center;
  gap: 6px;
  width: 40px;
  height: 40px;
  padding: 0 9px;
  background: transparent;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  cursor: pointer;
}

.nav-toggle span {
  display: block;
  height: 2px;
  border-radius: 2px;
  background: var(--text);
  transition: transform 0.3s var(--ease);
}

.nav-toggle.open span:first-child { transform: translateY(4px) rotate(45deg); }
.nav-toggle.open span:last-child { transform: translateY(-4px) rotate(-45deg); }

@media (min-width: 880px) {
  .nav-toggle { display: none; }
}

.mobile-nav {
  position: fixed;
  inset: 76px 0 0 0;
  z-index: 90;
  background: var(--bg0);
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 40px 24px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);
  transition: opacity 0.3s var(--ease), transform 0.3s var(--ease), visibility 0.3s;
}

.mobile-nav.open {
  opacity: 1;
  visibility: visible;
  transform: none;
}

.mobile-nav a {
  font-size: 1.6rem;
  font-weight: 600;
  color: var(--text);
  text-decoration: none;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}

.mobile-nav-cta { color: var(--accent); }

/* ---------- Hero ---------- */

.hero {
  position: relative;
  padding: clamp(72px, 10vw, 140px) 0 clamp(64px, 8vw, 110px);
  background-image:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 56px 56px;
  background-position: center top;
}

.hero::after {
  /* fade the grid toward the bottom */
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(10, 13, 18, 0.6), var(--bg0) 88%);
  pointer-events: none;
}

.hero-glow {
  position: absolute;
  top: -220px;
  left: 50%;
  transform: translateX(-50%);
  width: 900px;
  height: 520px;
  background: radial-gradient(ellipse at center, rgba(224, 129, 60, 0.14), transparent 65%);
  pointer-events: none;
  filter: blur(6px);
}

.hero-inner {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 56px;
  align-items: center;
}

@media (min-width: 940px) {
  .hero-inner { grid-template-columns: 1.08fr 0.92fr; }
}

.hero-copy .lede { margin: 1.5rem 0 2.3rem; }

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 28px;
  list-style: none;
  margin-top: 2.8rem;
}

.hero-meta li {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--muted);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.hero-meta li::before {
  content: "";
  width: 5px; height: 5px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 8px rgba(224, 129, 60, 0.7);
}

/* Load-in animation */

.intro-rise,
.intro-stagger span {
  opacity: 0;
  transform: translateY(22px);
  animation: rise 0.85s var(--ease) forwards;
  animation-delay: calc(var(--d, 0) * 90ms);
}

.intro-stagger span { display: inline-block; }

@keyframes rise {
  to { opacity: 1; transform: none; }
}

/* ---------- Ticker ---------- */

.ticker {
  overflow: hidden;
  border-block: 1px solid var(--line);
  padding: 16px 0;
  background: var(--bg1);
}

.ticker-track {
  display: flex;
  width: max-content;
  animation: ticker 36s linear infinite;
}

.ticker:hover .ticker-track { animation-play-state: paused; }

.ticker-track span {
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  padding-right: 56px;
}

.ticker-track span::before {
  content: "";
  width: 5px; height: 5px;
  border-radius: 50%;
  background: var(--accent);
  margin-right: 56px;
  opacity: 0.7;
}

@keyframes ticker {
  to { transform: translateX(-50%); }
}

/* ---------- Sections ---------- */

.section {
  position: relative;
  padding: clamp(72px, 9vw, 130px) 0;
}

.section-raised {
  background: var(--bg1);
  border-block: 1px solid var(--line);
}

.section-lede { margin-bottom: 2.6rem; }

/* Problem */

.problem-grid {
  display: grid;
  gap: 28px;
  margin-top: 0.5rem;
}

@media (min-width: 700px) {
  .problem-grid { grid-template-columns: repeat(3, 1fr); }
}

.problem-item {
  border-top: 2px solid var(--line-strong);
  padding-top: 1.2rem;
  transition: border-color 0.3s var(--ease);
}

.problem-item:hover { border-top-color: var(--accent); }

.problem-item p { font-size: 0.95rem; }

/* Deliver cards — cursor spotlight */

.card-grid {
  display: grid;
  gap: 18px;
  margin-top: 2.6rem;
}

@media (min-width: 700px) {
  .card-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 1040px) {
  .card-grid { grid-template-columns: repeat(4, 1fr); }
}

.card, .why-item {
  position: relative;
  overflow: hidden;
  background: var(--bg2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px 24px;
  transition: transform 0.35s var(--ease),
              border-color 0.35s var(--ease),
              background-color 0.35s var(--ease);
}

.card::before, .why-item::before {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0;
  background: radial-gradient(340px circle at var(--mx, 50%) var(--my, 50%),
              var(--accent-soft), transparent 65%);
  transition: opacity 0.35s var(--ease);
  pointer-events: none;
}

.card:hover, .why-item:hover {
  transform: translateY(-4px);
  border-color: var(--line-strong);
  background: var(--bg3);
}

.card:hover::before, .why-item:hover::before { opacity: 1; }

.card-index {
  display: block;
  font-family: var(--mono);
  font-size: 0.8rem;
  color: var(--accent);
  margin-bottom: 1.7rem;
}

.card p, .why-item p { font-size: 0.93rem; }

/* Why + stats */

.stats-band {
  display: grid;
  gap: 28px;
  margin: 2.8rem 0 3.2rem;
  padding: 2rem 0;
  border-block: 1px solid var(--line);
}

@media (min-width: 700px) {
  .stats-band { grid-template-columns: repeat(4, 1fr); }
}

.stat-num {
  display: block;
  font-size: clamp(2rem, 3.4vw, 2.7rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text);
  font-variant-numeric: tabular-nums;
  line-height: 1.1;
}

.stat-num > span { color: var(--accent); }

.stat-label {
  display: block;
  margin-top: 0.4rem;
  font-size: 0.85rem;
  color: var(--muted);
}

.why-grid {
  display: grid;
  gap: 18px;
}

@media (min-width: 700px) {
  .why-grid { grid-template-columns: repeat(2, 1fr); }
}

/* Serve */

.serve-list {
  list-style: none;
  margin-top: 1rem;
}

.serve-list li {
  padding: 1.15rem 0;
  border-bottom: 1px solid var(--line);
  font-size: 1.15rem;
  font-weight: 500;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 16px;
  transition: padding-left 0.3s var(--ease);
}

.serve-list li:first-child { border-top: 1px solid var(--line); }

.serve-list li:hover { padding-left: 12px; }

.serve-list li::before {
  content: "";
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--accent);
  flex: none;
  box-shadow: 0 0 10px rgba(224, 129, 60, 0.6);
}

/* Steps */

.steps {
  list-style: none;
  counter-reset: step;
  display: grid;
  gap: 32px;
  margin-top: 2.8rem;
}

@media (min-width: 840px) {
  .steps { grid-template-columns: repeat(4, 1fr); }
}

.step { position: relative; }

.step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px; height: 38px;
  border-radius: 50%;
  border: 1.5px solid var(--line-strong);
  color: var(--text);
  font-weight: 600;
  font-size: 0.9rem;
  margin-bottom: 1.1rem;
  transition: background-color 0.25s var(--ease),
              border-color 0.25s var(--ease),
              color 0.25s var(--ease),
              box-shadow 0.25s var(--ease);
}

.step:hover .step-num {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--ink-on-accent);
  box-shadow: 0 0 22px rgba(224, 129, 60, 0.4);
}

.step p { font-size: 0.93rem; }

@media (min-width: 840px) {
  .step:not(:last-child)::after {
    content: "";
    position: absolute;
    top: 19px;
    left: 56px;
    right: 14px;
    height: 1px;
    background: var(--line-strong);
  }
}

/* Contact */

.section-cta {
  background:
    radial-gradient(600px 300px at 50% 0%, rgba(224, 129, 60, 0.08), transparent 70%),
    var(--bg1);
  border-block: 1px solid var(--line);
}

.contact-form {
  margin-top: 1rem;
  display: grid;
  gap: 20px;
}

.form-row {
  display: grid;
  gap: 20px;
}

@media (min-width: 640px) {
  .form-row { grid-template-columns: 1fr 1fr; }
}

.contact-form label {
  display: grid;
  gap: 8px;
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--text);
}

.contact-form input,
.contact-form textarea {
  font: inherit;
  font-size: 0.95rem;
  color: var(--text);
  background: var(--bg2);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  padding: 0.85rem 1rem;
  transition: border-color 0.2s var(--ease), box-shadow 0.2s var(--ease);
}

.contact-form input::placeholder,
.contact-form textarea::placeholder { color: var(--muted); }

.contact-form input:focus,
.contact-form textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.contact-form textarea { resize: vertical; }

.contact-form .btn { justify-self: start; margin-top: 0.4rem; }

/* ---------- Footer ---------- */

.site-footer {
  border-top: 1px solid var(--line);
  padding: 56px 0 0;
  background: var(--bg0);
  overflow: hidden;
}

.footer-inner {
  display: grid;
  gap: 36px;
  padding-bottom: 48px;
}

@media (min-width: 840px) {
  .footer-inner {
    grid-template-columns: 1.5fr 1fr;
    align-items: start;
  }
}

.footer-brand p {
  font-size: 0.88rem;
  color: var(--muted);
  margin-top: 0.9rem;
  max-width: 34ch;
}

.footer-heading {
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--muted);
  margin-bottom: 4px;
}

.footer-links {
  display: flex;
  flex-direction: column;
  gap: 10px;
  font-size: 0.9rem;
}

.footer-links a {
  color: var(--body);
  text-decoration: none;
  transition: color 0.2s var(--ease);
  align-self: start;
}

.footer-links a:hover { color: var(--accent-bright); }

.footer-wordmark {
  font-size: clamp(4.5rem, 16vw, 13rem);
  font-weight: 700;
  letter-spacing: 0.02em;
  line-height: 0.78;
  text-align: center;
  color: transparent;
  -webkit-text-stroke: 1px rgba(233, 237, 243, 0.1);
  user-select: none;
  transform: translateY(12%);
  transition: -webkit-text-stroke-color 0.5s var(--ease);
}

.footer-wordmark:hover { -webkit-text-stroke-color: rgba(224, 129, 60, 0.4); }

/* ---------- Trajectory player ---------- */

.hero-visual {
  background: rgba(14, 18, 25, 0.85);
  border: 1px solid var(--line-strong);
  border-radius: 18px;
  backdrop-filter: blur(6px);
  box-shadow: 0 24px 80px -32px rgba(0, 0, 0, 0.8),
              0 0 60px rgba(224, 129, 60, 0.05);
}

.traj-player {
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.traj-id, .traj-phase, .traj-time, .traj-readout, .traj-tip {
  font-family: var(--mono);
}

.traj-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 15px 18px 0;
}

.traj-id {
  font-size: 0.72rem;
  color: var(--muted);
  letter-spacing: 0.02em;
}

.traj-phase {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent-bright);
  background: var(--accent-soft);
  border: 1px solid rgba(224, 129, 60, 0.3);
  border-radius: var(--radius-pill);
  padding: 3px 12px;
  min-width: 84px;
  text-align: center;
}

.traj-stage { position: relative; }

.traj-stage canvas {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 8 / 7;
  cursor: crosshair;
}

.traj-tip {
  position: absolute;
  z-index: 2;
  pointer-events: none;
  background: var(--text);
  color: var(--bg0);
  font-size: 0.7rem;
  line-height: 1;
  padding: 5px 9px;
  border-radius: 5px;
  white-space: nowrap;
  transform: translate(-50%, -140%);
}

.traj-controls {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 2px 18px 12px;
}

.traj-toggle {
  flex: none;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px solid var(--line-strong);
  background: transparent;
  color: var(--text);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: border-color 0.2s var(--ease), background-color 0.2s var(--ease);
}

.traj-toggle:hover {
  border-color: var(--accent);
  background: var(--accent-soft);
}

.traj-toggle svg { width: 11px; height: 11px; fill: currentColor; }
.traj-toggle .icon-play { display: none; }
.traj-toggle.paused .icon-play { display: block; margin-left: 2px; }
.traj-toggle.paused .icon-pause { display: none; }

.traj-controls input[type="range"] {
  flex: 1;
  accent-color: var(--accent);
  cursor: pointer;
  min-width: 0;
}

.traj-time {
  flex: none;
  font-size: 0.72rem;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  text-align: right;
  min-width: 86px;
}

.traj-readout {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 0 18px;
  padding: 10px 0 14px;
  border-top: 1px dashed var(--line-strong);
  font-size: 0.7rem;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.traj-hint { letter-spacing: 0.02em; }

@media (max-width: 480px) {
  .traj-hint { display: none; }
}

/* ---------- Reveal on scroll ---------- */

.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.75s var(--ease), transform 0.75s var(--ease);
}

.reveal.visible {
  opacity: 1;
  transform: none;
}

.reveal-stagger > * {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.65s var(--ease), transform 0.65s var(--ease);
  transition-delay: var(--sd, 0s);
}

.reveal.visible .reveal-stagger > *,
.reveal-stagger.visible > * {
  opacity: 1;
  transform: none;
}

/* ---------- Reduced motion ---------- */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal, .reveal-stagger > * { opacity: 1; transform: none; transition: none; }
  .intro-rise, .intro-stagger span { opacity: 1; transform: none; animation: none; }
  .ticker-track { animation: none; flex-wrap: wrap; width: auto; }
  .card, .why-item, .btn, .step-num { transition: none; }
}
