/* Joint.IO marketing site. Dark, tech look built on the logo's orange. */

:root {
  --brand: #FC6429;          /* logo orange */
  --brand-hover: #FF7A45;
  --brand-soft: rgba(252, 100, 41, 0.12);
  --brand-line: rgba(252, 100, 41, 0.35);

  --bg: #0A0A0C;
  --surface: #121215;
  --surface-2: #18181C;
  --border: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.14);

  --text: #F4F4F5;
  --text-2: #A1A1AA;
  --text-3: #71717A;
  --ok: #34D399;

  --radius: 14px;
  --radius-sm: 8px;
  --max: 1200px;
  --gutter: 24px;

  --font: "Geist", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --mono: "Geist Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }

/* Faint grid behind everything, fading out toward the bottom of the viewport */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background-image:
    linear-gradient(var(--border) 1px, transparent 1px),
    linear-gradient(90deg, var(--border) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, #000 30%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, #000 30%, transparent 75%);
  opacity: 0.55;
  pointer-events: none;
}

.container { max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }

/* ── Type ─────────────────────────────────────────────── */

h1, h2, h3 { letter-spacing: -0.03em; line-height: 1.1; font-weight: 600; }
h1 { font-size: clamp(2.5rem, 5.5vw, 4.25rem); }
h2 { font-size: clamp(1.9rem, 3.6vw, 2.75rem); }
h3 { font-size: 1.15rem; letter-spacing: -0.01em; line-height: 1.3; }
p { color: var(--text-2); }
.lead { font-size: 1.15rem; color: var(--text-2); max-width: 40rem; }
.accent { color: var(--brand); }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--mono);
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--brand);
}
.eyebrow::before {
  content: "";
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--brand);
  box-shadow: 0 0 12px var(--brand);
}

.mono { font-family: var(--mono); }

/* ── Buttons ──────────────────────────────────────────── */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 20px;
  border-radius: var(--radius-sm);
  font: 500 0.95rem var(--font);
  border: 1px solid transparent;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s, transform 0.2s, box-shadow 0.2s;
  white-space: nowrap;
}
.btn-primary { background: var(--brand); color: #0A0A0C; }
.btn-primary:hover { background: var(--brand-hover); box-shadow: 0 8px 30px rgba(252, 100, 41, 0.3); transform: translateY(-1px); }
.btn-ghost { border-color: var(--border-strong); color: var(--text); background: rgba(255, 255, 255, 0.02); }
.btn-ghost:hover { border-color: rgba(255, 255, 255, 0.3); background: rgba(255, 255, 255, 0.05); }
.btn .arrow { transition: transform 0.2s; }
.btn:hover .arrow { transform: translateX(3px); }
.btn-row { display: flex; gap: 12px; flex-wrap: wrap; }

/* ── Header ───────────────────────────────────────────── */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(10, 10, 12, 0.72);
  backdrop-filter: saturate(160%) blur(14px);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid var(--border);
}
.nav { display: flex; align-items: center; justify-content: space-between; height: 64px; gap: 24px; }
.nav-logo img { height: 30px; width: auto; }
.nav-links { display: flex; align-items: center; gap: 4px; list-style: none; }
.nav-links a {
  display: block;
  padding: 8px 12px;
  border-radius: 6px;
  font-size: 0.9rem;
  color: var(--text-2);
  transition: color 0.2s, background 0.2s;
}
.nav-links a:hover { color: var(--text); background: rgba(255, 255, 255, 0.04); }
.nav-links a[aria-current="page"] { color: var(--text); }
.nav-cta { display: flex; align-items: center; gap: 8px; }
.nav-cta .btn { padding: 8px 14px; font-size: 0.875rem; }

.menu-toggle {
  display: none;
  width: 40px; height: 40px;
  border: 1px solid var(--border-strong);
  border-radius: 8px;
  background: transparent;
  color: var(--text);
  cursor: pointer;
  align-items: center;
  justify-content: center;
}
.menu-toggle svg { width: 18px; height: 18px; }

@media (max-width: 900px) {
  .nav-links {
    display: none;
    position: absolute;
    top: 64px; left: 0; right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 12px var(--gutter) 20px;
    background: rgba(10, 10, 12, 0.97);
    border-bottom: 1px solid var(--border);
  }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 12px 4px; font-size: 1rem; border-bottom: 1px solid var(--border); border-radius: 0; }
  .menu-toggle { display: inline-flex; }
}
@media (max-width: 480px) {
  .nav-cta .btn { display: none; }
}

/* ── Sections ─────────────────────────────────────────── */

section { padding: 112px 0; position: relative; }
.section-tight { padding: 72px 0; }
.section-head { max-width: 46rem; margin-bottom: 56px; }
.section-head h2 { margin: 16px 0 16px; }
.section-head.center { margin-left: auto; margin-right: auto; text-align: center; }
.section-head.center .lead { margin: 0 auto; }
.divider { border-top: 1px solid var(--border); }

/* ── Hero ─────────────────────────────────────────────── */

.hero { padding: 96px 0 88px; overflow: hidden; }
.hero + section { padding-top: 32px; }
.hero::after {
  content: "";
  position: absolute;
  width: 900px; height: 600px;
  top: -260px; left: 50%;
  transform: translateX(-30%);
  background: radial-gradient(closest-side, rgba(252, 100, 41, 0.18), transparent);
  pointer-events: none;
  z-index: -1;
}
.hero-grid { display: grid; grid-template-columns: 1.05fr 1fr; gap: 56px; align-items: center; }
.hero h1 { margin: 20px 0 24px; }
.hero .lead { margin-bottom: 36px; }
.hero-note { margin-top: 20px; font-family: var(--mono); font-size: 0.78rem; color: var(--text-3); }

.page-hero { padding: 88px 0 56px; }
.page-hero h1 { font-size: clamp(2.25rem, 4.6vw, 3.5rem); margin: 18px 0 20px; max-width: 18ch; }
.page-hero .lead { margin-bottom: 32px; }
.page-hero::after {
  content: "";
  position: absolute;
  width: 700px; height: 480px;
  top: -240px; left: -120px;
  background: radial-gradient(closest-side, rgba(252, 100, 41, 0.14), transparent);
  pointer-events: none;
  z-index: -1;
}

/* Sync console: the logo's arc reused as "POS connected to Joint" */
.console {
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(24, 24, 28, 0.9), rgba(14, 14, 17, 0.95));
  box-shadow: 0 40px 120px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(255, 255, 255, 0.02) inset;
  overflow: hidden;
}
.console-bar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  font-family: var(--mono); font-size: 0.75rem; color: var(--text-3);
}
.console-bar .live { display: inline-flex; align-items: center; gap: 8px; color: var(--ok); }
.console-bar .live::before {
  content: ""; width: 7px; height: 7px; border-radius: 50%;
  background: var(--ok); box-shadow: 0 0 10px var(--ok);
  animation: pulse 2s infinite;
}
.dots { display: inline-flex; gap: 6px; }
.dots i { width: 10px; height: 10px; border-radius: 50%; background: rgba(255, 255, 255, 0.12); display: block; }

.link-diagram { padding: 28px 24px 8px; }
.link-diagram svg { width: 100%; height: auto; display: block; overflow: visible; }
.link-diagram .node-label { font-family: var(--mono); font-size: 13px; fill: var(--text); }
.link-diagram .node-sub { font-family: var(--mono); font-size: 11px; fill: var(--text-3); }

.event-log {
  list-style: none;
  padding: 8px 16px 18px;
  font-family: var(--mono);
  font-size: 0.78rem;
  min-height: 182px;
}
.event-log li {
  display: grid;
  grid-template-columns: 64px 92px 1fr;
  gap: 12px;
  padding: 7px 8px;
  border-radius: 6px;
  color: var(--text-2);
  animation: slideIn 0.4s ease both;
}
.event-log li:first-child { background: rgba(255, 255, 255, 0.03); }
.event-log time { color: var(--text-3); }
.event-log .tag { color: var(--brand); }
.event-log .tag.ok { color: var(--ok); }

@keyframes pulse { 50% { opacity: 0.35; } }
@keyframes slideIn { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }

/* ── Stats strip ──────────────────────────────────────── */

.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: rgba(18, 18, 21, 0.6);
}
.stat { padding: 28px 28px 24px; }
.stat + .stat { border-left: 1px solid var(--border); }
.stat-value { font-size: 2rem; font-weight: 600; letter-spacing: -0.03em; }
.stat-label { font-family: var(--mono); font-size: 0.75rem; color: var(--text-3); text-transform: uppercase; letter-spacing: 0.06em; margin-top: 4px; }

/* ── Cards ────────────────────────────────────────────── */

.card {
  position: relative;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  padding: 28px;
  transition: border-color 0.25s, transform 0.25s, background 0.25s;
}
a.card:hover { border-color: var(--brand-line); background: var(--surface-2); transform: translateY(-2px); }
.card-index { font-family: var(--mono); font-size: 0.75rem; color: var(--text-3); }
.card h3 { margin: 18px 0 10px; }
.card p { font-size: 0.95rem; }
.card .more { display: inline-flex; gap: 6px; margin-top: 20px; font-size: 0.9rem; color: var(--brand); }
a.card:hover .more .arrow { transform: translateX(3px); }
.more .arrow { transition: transform 0.2s; }

.icon {
  width: 40px; height: 40px;
  border-radius: 10px;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--brand-soft);
  border: 1px solid var(--brand-line);
  color: var(--brand);
}
.icon svg { width: 20px; height: 20px; }
.card-top { display: flex; justify-content: space-between; align-items: flex-start; }

.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }

/* ── Steps ────────────────────────────────────────────── */

.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.step { padding: 32px 28px; background: rgba(18, 18, 21, 0.6); }
.step + .step { border-left: 1px solid var(--border); }
.step-num { font-family: var(--mono); font-size: 0.75rem; color: var(--brand); }
.step h3 { margin: 14px 0 10px; }
.step p { font-size: 0.95rem; }
.step ul { list-style: none; margin-top: 16px; display: grid; gap: 8px; }
.step li { font-family: var(--mono); font-size: 0.78rem; color: var(--text-2); display: flex; gap: 8px; }
.step li::before { content: "+"; color: var(--brand); }

/* ── Split feature (copy + visual) ────────────────────── */

.split { display: grid; grid-template-columns: 1fr 1.15fr; gap: 64px; align-items: center; }
.split.reverse > :first-child { order: 2; }
.split h2 { margin: 16px 0 16px; }
.split .lead { margin-bottom: 28px; }

.checks { list-style: none; display: grid; gap: 14px; }
.checks li { display: grid; grid-template-columns: 22px 1fr; gap: 10px; color: var(--text-2); }
.checks li strong { color: var(--text); font-weight: 500; }
.checks svg { width: 18px; height: 18px; color: var(--brand); margin-top: 3px; }

/* Screenshot in a window frame */
.frame {
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  background: var(--surface-2);
  overflow: hidden;
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.45);
}
.frame-bar {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
  font-family: var(--mono); font-size: 0.72rem; color: var(--text-3);
}
.frame img { width: 100%; height: auto; }

/* Phone screenshots side by side */
.phones { display: flex; justify-content: center; gap: 20px; align-items: flex-start; }
.phones img {
  width: min(46%, 250px);
  border-radius: 28px;
  border: 1px solid var(--border-strong);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.5);
}
.phones img:nth-child(2) { margin-top: 48px; }

.glow-wrap { position: relative; }
.glow-wrap::before {
  content: "";
  position: absolute; inset: 10% 5%;
  background: radial-gradient(closest-side, rgba(252, 100, 41, 0.18), transparent);
  filter: blur(20px);
  z-index: -1;
}

/* ── Integration diagram ──────────────────────────────── */

.integration {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 24px;
  align-items: center;
}
.int-box { border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); padding: 24px; }
.int-box.brand { border-color: var(--brand-line); background: linear-gradient(180deg, rgba(252, 100, 41, 0.07), var(--surface)); }
.int-box h3 { font-family: var(--mono); font-size: 0.85rem; font-weight: 500; letter-spacing: 0.02em; color: var(--text-3); text-transform: uppercase; margin-bottom: 14px; }
.int-box ul { list-style: none; display: grid; gap: 10px; }
.int-box li { display: flex; align-items: center; gap: 10px; font-size: 0.95rem; }
.int-box li::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--text-3); }
.int-box.brand li::before { background: var(--brand); }
.int-link { display: grid; gap: 10px; justify-items: center; font-family: var(--mono); font-size: 0.72rem; color: var(--text-3); }
.int-link svg { width: 120px; height: 40px; overflow: visible; }

/* ── CTA band ─────────────────────────────────────────── */

.cta-band {
  position: relative;
  border: 1px solid var(--brand-line);
  border-radius: 20px;
  padding: 64px 48px;
  text-align: center;
  overflow: hidden;
  background:
    radial-gradient(600px 240px at 50% 0%, rgba(252, 100, 41, 0.18), transparent),
    var(--surface);
}
.cta-band h2 { margin-bottom: 14px; }
.cta-band p { margin: 0 auto 32px; max-width: 34rem; }
.cta-band .btn-row { justify-content: center; }

/* ── Team ─────────────────────────────────────────────── */

.team-card { display: grid; grid-template-columns: 56px 1fr; gap: 18px; align-items: center; }
.avatar {
  width: 56px; height: 56px; border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--mono); font-weight: 500;
  background: var(--brand-soft); border: 1px solid var(--brand-line); color: var(--brand);
}
.team-card h3 { margin: 0 0 2px; }
.team-role { font-family: var(--mono); font-size: 0.75rem; color: var(--brand); text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 10px; }

/* ── Demo form ────────────────────────────────────────── */

.demo-grid { display: grid; grid-template-columns: 1fr 1.1fr; gap: 56px; align-items: start; }
.form { display: grid; gap: 16px; }
.field { display: grid; gap: 6px; }
.field label { font-family: var(--mono); font-size: 0.75rem; color: var(--text-3); text-transform: uppercase; letter-spacing: 0.06em; }
.field input, .field textarea {
  width: 100%;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-strong);
  background: var(--bg);
  color: var(--text);
  font: 400 1rem var(--font);
  transition: border-color 0.2s, box-shadow 0.2s;
}
.field input:focus, .field textarea:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }
.field textarea { resize: vertical; min-height: 120px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
#form-status { font-size: 0.9rem; min-height: 1.2em; }
.form-success { color: var(--ok); }
.form-error { color: #F87171; }

/* ── Footer ───────────────────────────────────────────── */

.site-footer { border-top: 1px solid var(--border); padding: 64px 0 32px; margin-top: 40px; }
.footer-grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr; gap: 40px; }
.footer-brand img { height: 30px; width: auto; margin-bottom: 14px; }
.footer-brand p { font-size: 0.9rem; max-width: 22rem; }
.footer-col h4 { font-family: var(--mono); font-size: 0.75rem; font-weight: 500; color: var(--text-3); text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: 14px; }
.footer-col ul { list-style: none; display: grid; gap: 10px; }
.footer-col a { color: var(--text-2); font-size: 0.9rem; transition: color 0.2s; }
.footer-col a:hover { color: var(--text); }
.footer-bottom { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-top: 48px; padding-top: 24px; border-top: 1px solid var(--border); font-family: var(--mono); font-size: 0.75rem; color: var(--text-3); }

/* ── Reveal on scroll ─────────────────────────────────── */

.js [data-reveal] { opacity: 0; transform: translateY(16px); transition: opacity 0.6s ease, transform 0.6s ease; }
.js [data-reveal].in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .js [data-reveal] { opacity: 1; transform: none; }
}

/* ── Responsive ───────────────────────────────────────── */

@media (max-width: 1024px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .hero-grid, .split, .demo-grid { grid-template-columns: 1fr; gap: 48px; }
  .split.reverse > :first-child { order: 0; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .stat:nth-child(3) { border-left: none; }
  .stat:nth-child(n+3) { border-top: 1px solid var(--border); }
}
@media (max-width: 760px) {
  :root { --gutter: 16px; }
  section { padding: 80px 0; }
  .hero { padding: 64px 0 64px; }
  .page-hero { padding: 64px 0 40px; }
  .grid-4, .grid-3, .grid-2, .steps { grid-template-columns: 1fr; }
  .step + .step { border-left: none; border-top: 1px solid var(--border); }
  .integration { grid-template-columns: 1fr; }
  .int-link svg { transform: rotate(90deg); width: 60px; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }
  .cta-band { padding: 48px 20px; }
  .form-row { grid-template-columns: 1fr; }
  .event-log li { grid-template-columns: 56px 1fr; }
  .event-log li time { display: none; }
}

/* App page: launch options */
.card-featured { border-color: rgba(252, 100, 41, 0.45); }
.plan-label { font-family: var(--mono); font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-3); border: 1px solid var(--border); border-radius: 999px; padding: 4px 10px; }
.card-featured .plan-label { color: var(--brand); border-color: rgba(252, 100, 41, 0.45); }
.card .checks { margin-top: 20px; }
.team-role:last-child { margin-bottom: 0; }
