/* ==========================================================
   UxFold Lab website
   Colors live in :root. Dark mode swaps them automatically.
   ========================================================== */

:root {
  --bg: #ffffff;
  --bg-tint: #f7f6f4;
  --surface: #ffffff;
  --text: #121214;
  --text-2: #55565c;
  --text-3: #85868c;
  --line: #e7e5e2;
  --accent: #e2480f;          /* the one accent color */
  --accent-hover: #c93d0b;
  --accent-soft: #fdebe3;
  --on-accent: #ffffff;
  --glow: rgba(255, 110, 40, 0.22);
  --shadow: 0 1px 2px rgba(16, 16, 20, .06), 0 12px 32px -8px rgba(16, 16, 20, .16), 0 40px 80px -24px rgba(16, 16, 20, .22);

  --radius: 14px;
  --radius-lg: 22px;
  --max: 1120px;
  --max-wide: 1240px;
  --gutter: 24px;
  --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, monospace;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0b0b0c;
    --bg-tint: #111113;
    --surface: #151517;
    --text: #f3f3f4;
    --text-2: #a4a5ab;
    --text-3: #75767c;
    --line: #232326;
    --accent: #ff6a2b;
    --accent-hover: #ff8250;
    --accent-soft: rgba(255, 106, 43, .12);
    --on-accent: #160700;
    --glow: rgba(255, 100, 30, 0.20);
    --shadow: 0 0 0 1px rgba(255, 255, 255, .07), 0 20px 50px -12px rgba(0, 0, 0, .7), 0 50px 100px -30px rgba(0, 0, 0, .8);
  }
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
p { margin: 0 0 1em; }
h1, h2, h3 { margin: 0; font-weight: 600; letter-spacing: -0.025em; line-height: 1.1; }
h1 { font-size: clamp(2.6rem, 6.4vw, 4.75rem); letter-spacing: -0.04em; line-height: 1.02; font-weight: 700; }
h2 { font-size: clamp(1.9rem, 3.6vw, 2.9rem); letter-spacing: -0.035em; }
h3 { font-size: 1.2rem; letter-spacing: -0.015em; line-height: 1.3; }

.container { width: 100%; max-width: calc(var(--max) + var(--gutter) * 2); margin: 0 auto; padding: 0 var(--gutter); }
.container--wide { max-width: calc(var(--max-wide) + var(--gutter) * 2); }

.eyebrow {
  margin: 0 0 16px;
  font-size: .8rem;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--accent);
}
.lead { font-size: clamp(1.1rem, 1.6vw, 1.28rem); color: var(--text-2); line-height: 1.55; }
.note { margin: 0; font-size: .9rem; color: var(--text-3); }
.muted { color: var(--text-3); }

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

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 18px;
  border-radius: 999px;
  background: var(--accent);
  color: var(--on-accent);
  font-weight: 600;
  font-size: .95rem;
  text-decoration: none;
  transition: background .2s ease, transform .2s ease, box-shadow .2s ease;
}
.btn:hover { background: var(--accent-hover); }
.btn:active { transform: translateY(1px); }
.btn--small { padding: 8px 16px; font-size: .88rem; }
.btn--large {
  padding: 16px 30px;
  font-size: 1.05rem;
  box-shadow: 0 8px 24px -8px var(--glow), inset 0 1px 0 rgba(255, 255, 255, .18);
}
.btn--large:hover { transform: translateY(-1px); box-shadow: 0 14px 32px -8px var(--glow), inset 0 1px 0 rgba(255, 255, 255, .18); }

kbd {
  font-family: var(--font);
  font-size: .88em;
  font-weight: 500;
  padding: 1px 7px;
  border: 1px solid var(--line);
  border-bottom-width: 2px;
  border-radius: 6px;
  background: var(--surface);
  white-space: nowrap;
}

/* ---------- Nav ---------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 10;
  background: color-mix(in srgb, var(--bg) 78%, transparent);
  -webkit-backdrop-filter: saturate(180%) blur(16px);
  backdrop-filter: saturate(180%) blur(16px);
  border-bottom: 1px solid color-mix(in srgb, var(--line) 70%, transparent);
}
.nav__inner { display: flex; align-items: center; gap: 32px; height: 64px; }
.brand { display: flex; align-items: center; gap: 8px; text-decoration: none; }
.brand__logo { height: 24px; width: auto; }
.brand__lab { font-weight: 600; font-size: 1.05rem; color: var(--text-2); letter-spacing: -0.01em; transform: translateY(1px); }
.nav__links { display: flex; gap: 28px; margin-left: auto; }
.nav__links a { color: var(--text-2); text-decoration: none; font-size: .92rem; font-weight: 500; transition: color .2s; }
.nav__links a:hover { color: var(--text); }

/* ---------- Hero ---------- */
.hero { padding: clamp(64px, 10vw, 120px) 0 clamp(64px, 9vw, 120px); position: relative; isolation: isolate; }
.hero::before {
  /* soft warm glow behind the screenshot */
  content: "";
  position: absolute;
  left: 50%;
  top: 38%;
  width: min(1100px, 120vw);
  height: 700px;
  transform: translateX(-50%);
  background: radial-gradient(ellipse at center, var(--glow), transparent 65%);
  pointer-events: none;
  z-index: -1;
}
.hero__text { text-align: center; max-width: 860px; }
.hero h1 { margin-bottom: 24px; }
.hero .lead { max-width: 600px; margin: 0 auto 36px; }
.hero__cta { display: flex; flex-direction: column; align-items: center; gap: 16px; margin-bottom: clamp(56px, 7vw, 88px); }

/* ---------- Screenshots in a Mac window frame ---------- */
.shot { margin: 0; }
.shot picture, .shot img { display: block; }
.shot img {
  width: 100%;
  border-radius: 12px;
  box-shadow: var(--shadow);
  outline: 1px solid rgba(0, 0, 0, .08);
  outline-offset: -1px;
  background: #1a1a1c;
}
@media (prefers-color-scheme: dark) { .shot img { outline-color: rgba(255, 255, 255, .1); } }
.shot--hero img { border-radius: 14px; }
.shot figcaption { margin-top: 18px; text-align: center; font-size: .92rem; color: var(--text-3); }
.shot--welcome { max-width: 1040px; margin: clamp(56px, 7vw, 80px) auto 0; }

/* ---------- Sections ---------- */
.section { padding: clamp(80px, 11vw, 140px) 0; }
.section--tint { background: var(--bg-tint); border-block: 1px solid var(--line); }
.section__head { max-width: 720px; margin-bottom: clamp(40px, 6vw, 64px); }

/* How it works */
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.step { padding: 28px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.step__num {
  display: inline-grid;
  place-items: center;
  width: 32px;
  height: 32px;
  margin-bottom: 20px;
  border-radius: 9px;
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 600;
  font-size: .92rem;
}
.step h3 { margin-bottom: 8px; }
.step p { margin: 0; color: var(--text-2); font-size: .98rem; }

/* Two ways to edit */
.cards { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.card {
  display: flex;
  flex-direction: column;
  gap: 32px;
  padding: clamp(24px, 3vw, 36px);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
  overflow: hidden;
}
.card__text h3 { font-size: 1.45rem; letter-spacing: -0.025em; margin: 14px 0 10px; }
.card__text p { margin: 0; color: var(--text-2); }
.shot--card { margin-top: auto; }
.shot--card img { border-radius: 10px; }
.tag {
  display: inline-block;
  padding: 4px 11px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: .8rem;
  font-weight: 600;
}

/* Who it's for */
.who { display: grid; grid-template-columns: 1.15fr 1fr; gap: 32px 72px; align-items: start; }
.who__text h2 { margin-bottom: 20px; }
.who__text .lead { margin: 0; }
.who__list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.who__list li { padding: 20px 0; border-bottom: 1px solid var(--line); color: var(--text-2); }
.who__list strong { color: var(--text); font-weight: 600; }
.callout {
  grid-column: 1 / -1;
  display: flex;
  gap: 14px;
  align-items: flex-start;
  margin-top: 24px;
  padding: 22px 24px;
  border-radius: var(--radius);
  background: var(--accent-soft);
  color: var(--accent);
}
.callout svg { flex: none; margin-top: 3px; }
.callout p { margin: 0; color: var(--text); }

/* Install help */
.install { display: grid; grid-template-columns: 1fr 1.2fr; gap: 40px 80px; align-items: start; }
.install__intro h2 { margin-bottom: 20px; }
.install__intro p { color: var(--text-2); }
.install__intro a, .numbered a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 3px; }

.numbered { list-style: none; counter-reset: step; margin: 0; padding: 0; }
.numbered li {
  counter-increment: step;
  position: relative;
  padding: 18px 0 18px 52px;
  border-bottom: 1px solid var(--line);
  color: var(--text-2);
}
.numbered li:first-child { padding-top: 4px; }
.numbered li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: 14px;
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--text);
  color: var(--bg);
  font-size: .85rem;
  font-weight: 600;
}
.numbered li:first-child::before { top: 0; }
.numbered strong { color: var(--text); font-weight: 600; }

.stuck { margin-top: 28px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.stuck summary {
  cursor: pointer;
  list-style: none;
  padding: 16px 20px;
  font-weight: 600;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.stuck summary::-webkit-details-marker { display: none; }
.stuck summary::after { content: "+"; font-size: 1.3rem; font-weight: 400; color: var(--text-3); transition: transform .2s; }
.stuck[open] summary::after { transform: rotate(45deg); }
.stuck__body { padding: 0 20px 20px; }
.stuck__body p { color: var(--text-2); font-size: .96rem; }
.code {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 12px 12px 16px;
  border-radius: 10px;
  background: #121214;
  color: #f1f1f2;
}
@media (prefers-color-scheme: dark) { .code { background: #000; border: 1px solid var(--line); } }
.code code { flex: 1; min-width: 0; font-family: var(--mono); font-size: .84rem; overflow-x: auto; white-space: nowrap; }
.copy {
  flex: none;
  padding: 6px 12px;
  border: 0;
  border-radius: 7px;
  background: rgba(255, 255, 255, .12);
  color: inherit;
  font: 500 .82rem var(--font);
  cursor: pointer;
}
.copy:hover { background: rgba(255, 255, 255, .2); }

/* Closing CTA */
.final__inner { text-align: center; display: flex; flex-direction: column; align-items: center; gap: 24px; }
.final h2 { font-size: clamp(2.2rem, 5vw, 3.6rem); letter-spacing: -0.04em; }

/* ---------- Footer ---------- */
.footer { border-top: 1px solid var(--line); padding: 40px 0 48px; font-size: .9rem; color: var(--text-2); }
.footer__inner { display: flex; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.footer p { margin: 0 0 6px; }
.footer__col:last-child { text-align: right; }
.footer__title { font-weight: 600; color: var(--text); }
.footer a { text-decoration: none; color: var(--text); }
.footer a:hover { color: var(--accent); }

/* ---------- Scroll fade-in (only when JS runs) ---------- */
.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity .8s cubic-bezier(.2, .7, .2, 1), transform .8s cubic-bezier(.2, .7, .2, 1); }
.js .reveal.is-visible { opacity: 1; transform: none; }
.steps .step:nth-child(2), .cards .card:nth-child(2) { transition-delay: .08s; }
.steps .step:nth-child(3) { transition-delay: .16s; }
@media (prefers-reduced-motion: reduce) { .js .reveal { opacity: 1; transform: none; transition: none; } }

/* ---------- Tablet ---------- */
@media (max-width: 960px) {
  .steps { grid-template-columns: 1fr; }
  .cards { grid-template-columns: 1fr; }
  .who, .install { grid-template-columns: 1fr; }
  .nav__links { display: none; }
  .nav__inner { justify-content: space-between; }
}

/* ---------- Mobile ---------- */
@media (max-width: 600px) {
  :root { --gutter: 16px; }
  body { font-size: 16px; }
  .btn--large { width: 100%; justify-content: center; }
  .hero__cta { align-items: stretch; text-align: center; }
  .shot img, .shot--hero img { border-radius: 8px; }
  .step { padding: 22px; }
  .section__head h2 br { display: none; }
  .footer__inner { flex-direction: column; }
  .footer__col:last-child { text-align: left; }
}
