/* Stepify website. The palette is the desktop client's, lifted from
   stepify/plugin/plugin.cpp: the warm four-corner gradient the window is
   painted with, the dark-brown ink every label uses, the coral and purple of
   the two footprint buttons, the cream popup and the status greens/reds. */

:root {
  --sun-tl: #fcce54;   /* IM_COL32(252,206,84)  gradient top-left     */
  --sun-tr: #f7b842;   /* IM_COL32(247,184,66)  gradient top-right    */
  --sun-br: #e6962d;   /* IM_COL32(230,150,45)  gradient bottom-right */
  --sun-bl: #eca534;   /* IM_COL32(236,165,52)  gradient bottom-left  */
  --ink: #46280c;      /* IM_COL32(70,40,12)    kInk                  */
  --ink-soft: rgba(90, 55, 20, 0.78);          /* subtitle            */
  --cream: #f8e2aa;    /* IM_COL32(248,226,170) popup background      */
  --coral: #d6543f;    /* ImVec4(0.84,0.33,0.25) CHOOSE VIDEO foot    */
  --violet: #7342b8;   /* ImVec4(0.45,0.26,0.72) STEPIFY foot         */
  --ok: #285a1e;       /* IM_COL32(40,90,30)    backend ok            */
  --err: #96190f;      /* IM_COL32(150,25,15)   backend error         */
  --halo: #fff8e4;     /* IM_COL32(255,248,228) hover halo            */
  --shadow: rgba(60, 30, 5, 0.14);             /* ground shadow       */
  --paper: #fffaf0;
  --line: rgba(70, 40, 12, 0.14);
  --radius: 14px;
  --max: 1080px;
  --font: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  color-scheme: light;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.55;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; }
img, svg { max-width: 100%; }
h1, h2, h3 { line-height: 1.15; margin: 0 0 0.5em; letter-spacing: -0.01em; }
h1 { font-size: clamp(2.1rem, 5vw, 3.4rem); font-weight: 800; }
h2 { font-size: clamp(1.6rem, 3.2vw, 2.2rem); font-weight: 800; }
h3 { font-size: 1.15rem; font-weight: 700; }
p { margin: 0 0 1em; }
.wrap { width: min(var(--max), 100% - 2rem); margin-inline: auto; }
.muted { color: var(--ink-soft); }
code, kbd { font-family: var(--mono); font-size: 0.9em; background: rgba(70, 40, 12, 0.07); padding: 0.1em 0.35em; border-radius: 5px; }
.skip { position: absolute; left: -999px; }
.skip:focus { left: 1rem; top: 1rem; background: var(--cream); padding: 0.5rem 1rem; z-index: 99; }

/* ---- header ------------------------------------------------------------ */
.top {
  position: sticky; top: 0; z-index: 10;
  background: rgba(255, 250, 240, 0.86);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.top .wrap { display: flex; align-items: center; gap: 1.25rem; min-height: 64px; }
.brand { display: flex; align-items: center; gap: 0.6rem; text-decoration: none; font-weight: 900; letter-spacing: 0.08em; font-size: 1.05rem; }
.brand svg { width: 14px; height: 28px; }
.nav { display: flex; gap: 1.25rem; margin-left: auto; }
.nav a { text-decoration: none; font-weight: 600; font-size: 0.95rem; color: var(--ink-soft); }
.nav a:hover { color: var(--ink); }
.btn {
  display: inline-flex; align-items: center; gap: 0.5rem;
  padding: 0.7rem 1.2rem; border-radius: 999px; font-weight: 700; text-decoration: none;
  border: 2px solid transparent; transition: transform 0.15s ease, box-shadow 0.15s ease;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-1px); box-shadow: 0 8px 20px var(--shadow); }
.btn-coral { background: var(--coral); color: #fff; }
.btn-violet { background: var(--violet); color: #fff; }
.btn-ghost { border-color: var(--ink); color: var(--ink); background: transparent; }
.btn-ghost:hover { background: rgba(70, 40, 12, 0.06); }
.btn.small { padding: 0.45rem 0.9rem; font-size: 0.9rem; }

/* ---- hero ---------------------------------------------------------------- */
.hero {
  background: linear-gradient(135deg, var(--sun-tl) 0%, var(--sun-tr) 40%, var(--sun-bl) 70%, var(--sun-br) 100%);
  padding-block: clamp(3rem, 7vw, 5.5rem) clamp(3rem, 7vw, 5rem);
  overflow: hidden;
}
.hero .wrap { display: grid; grid-template-columns: 1.05fr 1fr; gap: 3rem; align-items: center; }
.hero h1 { margin-bottom: 0.6rem; }
.hero .lede { font-size: 1.2rem; max-width: 34ch; }
.pill {
  display: inline-block; font-size: 0.78rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase;
  background: rgba(255, 255, 255, 0.35); border: 1px solid rgba(70, 40, 12, 0.25); border-radius: 999px;
  padding: 0.25rem 0.75rem; margin-bottom: 1rem;
}
.cta { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 1.5rem; }
.fine { font-size: 0.85rem; margin-top: 0.75rem; color: var(--ink-soft); }

/* The app window, reproduced: the same gradient, the same two feet, the same
   labels, status line, backend line and brand footer the client draws. */
.app {
  position: relative; aspect-ratio: 16 / 10; width: 100%;
  background: linear-gradient(135deg, var(--sun-tl), var(--sun-tr) 45%, var(--sun-br));
  border-radius: 12px; box-shadow: 0 30px 60px -20px rgba(60, 30, 5, 0.45), 0 0 0 1px rgba(70, 40, 12, 0.18);
  font-family: var(--mono); color: var(--ink); overflow: hidden;
  container-type: inline-size;
}
.app .bar { position: absolute; inset: 0 0 auto 0; height: 7%; display: flex; align-items: center; padding: 0 3%; gap: 2%; background: rgba(255, 255, 255, 0.25); font-size: 2.6cqw; }
.app .bar .dots { display: flex; gap: 4px; }
.app .bar .dots i { width: 8px; height: 8px; border-radius: 50%; background: rgba(70, 40, 12, 0.35); }
.app .ml { position: absolute; left: 3%; top: 10%; font-size: 2.3cqw; color: var(--ok); }
.app .size { position: absolute; right: 3%; top: 9.5%; font-size: 2.4cqw; background: rgba(255, 255, 255, 0.28); padding: 0.2em 0.6em; border-radius: 4px; }
.app .feet { position: absolute; left: 0; right: 0; top: 21%; height: 30cqw; display: flex; justify-content: center; gap: 10cqw; }
.app .foot { position: relative; width: 12.8cqw; height: 30cqw; flex: 0 0 auto; display: flex; flex-direction: column; align-items: center; }
.app .foot svg { height: 100%; width: 100%; filter: drop-shadow(0 10px 6px rgba(60, 30, 5, 0.22)); transition: transform 0.2s ease; }
.app .foot:hover svg { transform: translateY(-2.5%) scale(1.04); }
.app .label { position: absolute; top: 102%; font-size: 3.2cqw; font-weight: 700; letter-spacing: 0.04em; white-space: nowrap; }
.app .status { position: absolute; left: 0; right: 0; top: 80%; text-align: center; font-size: 2.8cqw; }
.app .brandline { position: absolute; left: 3%; bottom: 4%; line-height: 1.2; }
.app .brandline b { display: block; font-size: 3.6cqw; letter-spacing: 0.04em; }
.app .brandline span { font-size: 2.2cqw; color: var(--ink-soft); }

/* ---- sections ------------------------------------------------------------ */
section { padding-block: clamp(3rem, 7vw, 5.5rem); }
section + section { border-top: 1px solid var(--line); }
.section-head { max-width: 60ch; margin-bottom: 2rem; }
.eyebrow { font-size: 0.8rem; font-weight: 800; letter-spacing: 0.12em; text-transform: uppercase; color: var(--coral); margin-bottom: 0.5rem; }
.eyebrow.violet { color: var(--violet); }
.grid { display: grid; gap: 1.25rem; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 1.5rem;
  box-shadow: 0 1px 2px rgba(60, 30, 5, 0.04);
}
.card .num {
  display: inline-grid; place-items: center; width: 2.2rem; height: 2.2rem; border-radius: 50%;
  background: var(--cream); font-weight: 800; margin-bottom: 0.9rem;
}
.card.coral .num { background: var(--coral); color: #fff; }
.card.violet .num { background: var(--violet); color: #fff; }
.card.ok .num { background: var(--ok); color: #fff; }
.card p:last-child { margin-bottom: 0; }

/* ---- privacy / split diagram -------------------------------------------- */
.split { background: var(--cream); }
.split .wrap { display: grid; grid-template-columns: 1fr 1fr; gap: 3rem; align-items: center; }
.flow { display: grid; gap: 0.75rem; }
.flow .box {
  background: #fff; border-radius: var(--radius); border: 1px solid var(--line); padding: 1rem 1.25rem;
  display: grid; grid-template-columns: auto 1fr; gap: 0.25rem 1rem; align-items: start;
}
.flow .box .where { font-size: 0.75rem; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase; grid-column: 1 / -1; }
.flow .box.here .where { color: var(--ok); }
.flow .box.there .where { color: var(--violet); }
.flow .box dt { font-weight: 700; }
.flow .box dd { margin: 0; color: var(--ink-soft); font-size: 0.95rem; }
.flow .wire { text-align: center; font-size: 0.85rem; font-weight: 700; color: var(--ink-soft); }
.flow .wire b { font-family: var(--mono); color: var(--ink); background: #fff; border: 1px solid var(--line); padding: 0.15em 0.6em; border-radius: 999px; }
.checks { list-style: none; padding: 0; margin: 1rem 0 0; display: grid; gap: 0.6rem; }
.checks li { padding-left: 1.8rem; position: relative; }
.checks li::before { content: ""; position: absolute; left: 0; top: 0.35em; width: 1.1rem; height: 1.1rem; border-radius: 50%; background: var(--ok); mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Ccircle cx='10' cy='10' r='10'/%3E%3Cpath d='M5.5 10.5l3 3 6-6' stroke='%23000' stroke-width='2.2' fill='none' stroke-linecap='round' stroke-linejoin='round' style='mix-blend-mode:destination-out'/%3E%3C/svg%3E") center / contain no-repeat; }

/* ---- download ------------------------------------------------------------ */
.dl .grid { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.dl .card h3 { display: flex; align-items: center; gap: 0.5rem; }
.dl .card .file { font-size: 0.85rem; margin: 0.5rem 0 0; }
.tag { font-size: 0.7rem; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase; padding: 0.2em 0.6em; border-radius: 999px; background: var(--cream); }
.tag.soon { background: rgba(115, 66, 184, 0.12); color: var(--violet); }
.req { margin: 0.5rem 0 0; padding-left: 1.2rem; font-size: 0.95rem; }
.req li { margin-bottom: 0.3rem; }
.req li::marker { color: var(--coral); }

/* ---- faq ----------------------------------------------------------------- */
.faq details { border-top: 1px solid var(--line); padding: 0.9rem 0; }
.faq details:last-child { border-bottom: 1px solid var(--line); }
.faq summary { cursor: pointer; font-weight: 700; list-style: none; display: flex; justify-content: space-between; gap: 1rem; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-weight: 400; color: var(--coral); font-size: 1.3rem; line-height: 1; }
.faq details[open] summary::after { content: "\2212"; }
.faq details p { margin: 0.6rem 0 0; color: var(--ink-soft); max-width: 70ch; }

/* ---- footer -------------------------------------------------------------- */
footer { border-top: 1px solid var(--line); padding-block: 2rem; font-size: 0.9rem; color: var(--ink-soft); }
footer .wrap { display: flex; flex-wrap: wrap; gap: 1rem 2rem; align-items: center; }
footer nav { display: flex; flex-wrap: wrap; gap: 1.25rem; margin-left: auto; }

/* ---- responsive ---------------------------------------------------------- */
@media (max-width: 860px) {
  .hero .wrap, .split .wrap { grid-template-columns: 1fr; }
  .hero .app { max-width: 560px; }
  .nav { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .btn, .app .foot svg { transition: none; }
}

/* ---- account page -------------------------------------------------------- */
.account { padding-block: clamp(2rem, 5vw, 3.5rem); min-height: 60vh; }
.wrap.narrow { max-width: 640px; }
.h2 { font-size: clamp(1.5rem, 3vw, 2rem); font-weight: 800; margin: 0 0 0.4em; }
.h3 { font-size: 1.1rem; font-weight: 700; margin: 0 0 0.3em; }
.account .card + .card, .account .stats + .card { margin-top: 1rem; }
.tabs { display: flex; gap: 0.25rem; margin-bottom: 1rem; border-bottom: 1px solid var(--line); }
.tab { background: none; border: 0; border-bottom: 3px solid transparent; padding: 0.6rem 0.9rem; font: inherit; font-weight: 700; color: var(--ink-soft); cursor: pointer; }
.tab.is-active { color: var(--ink); border-bottom-color: var(--coral); }
.form label { display: block; font-weight: 700; margin: 0.9rem 0 0; }
.form input { display: block; width: 100%; margin-top: 0.3rem; padding: 0.65rem 0.8rem; font: inherit; border: 1px solid rgba(70, 40, 12, 0.3); border-radius: 10px; background: #fff; color: var(--ink); }
.form input:focus { outline: 2px solid var(--violet); outline-offset: 1px; border-color: transparent; }
.form .hint { display: block; font-weight: 400; font-size: 0.85rem; color: var(--ink-soft); margin-top: 0.25rem; }
.form .btn { margin-top: 1.2rem; }
.form .fine, .account .fine { margin-top: 1rem; font-size: 0.85rem; color: var(--ink-soft); }
.linkish { background: none; border: 0; padding: 0; font: inherit; color: var(--violet); text-decoration: underline; cursor: pointer; }
.msg { margin: 1rem 0 0; padding: 0.6rem 0.8rem; border-radius: 10px; font-size: 0.95rem; background: var(--cream); }
.msg.err { background: rgba(150, 25, 15, 0.1); color: var(--err); }
.msg.ok { background: rgba(40, 90, 30, 0.1); color: var(--ok); }
.dash-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 1rem; margin-bottom: 1.25rem; flex-wrap: wrap; }
.dash-head .h2 { margin: 0; word-break: break-all; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 0.75rem; }
.stat { background: linear-gradient(135deg, var(--sun-tl), var(--sun-br)); border-radius: var(--radius); padding: 1rem 1.1rem; display: grid; gap: 0.1rem; }
.stat-v { font-size: 2rem; font-weight: 800; line-height: 1.1; font-variant-numeric: tabular-nums; }
.stat-l { font-size: 0.85rem; font-weight: 700; color: rgba(70, 40, 12, 0.8); text-transform: uppercase; letter-spacing: 0.05em; }
.usage { width: 100%; border-collapse: collapse; margin-top: 0.75rem; font-variant-numeric: tabular-nums; }
.usage th { text-align: left; font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--ink-soft); padding: 0.4rem 0.5rem; border-bottom: 1px solid var(--line); }
.usage td { padding: 0.55rem 0.5rem; border-bottom: 1px solid var(--line); }
.usage .num, .usage th.num { text-align: right; }
.usage .bar-col { width: 40%; }
.usage .bar { display: block; height: 0.8rem; min-width: 2px; border-radius: 999px; background: var(--violet); }
.usage tr:first-child .bar { background: var(--coral); }
@media (max-width: 520px) { .usage .bar-col { width: 25%; } }
.account section { padding: 0; border: 0; }

/* ---- pricing ------------------------------------------------------------- */
.pricing .plans { grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); align-items: stretch; }
.plan { display: flex; flex-direction: column; }
.plan h3 { display: flex; align-items: center; gap: 0.5rem; }
.plan .plan-minutes { font-size: 1.05rem; margin: 0.2rem 0 0.4rem; }
.plan .plan-minutes b { font-size: 1.9rem; font-weight: 800; letter-spacing: -0.02em; }
.plan .req { margin-bottom: 1.25rem; }
.plan .btn { margin-top: auto; align-self: flex-start; }
.plan.featured { border-color: var(--coral); box-shadow: 0 12px 30px -16px rgba(214, 84, 63, 0.55); }
.pricing .fine { margin-top: 1.25rem; max-width: 70ch; }

/* ---- plan meter on the account page ------------------------------------- */
.stat-of { font-size: 1rem; font-weight: 700; color: rgba(70, 40, 12, 0.75); margin-left: 0.2rem; }
.meter { display: block; height: 0.5rem; margin-top: 0.5rem; border-radius: 999px; background: rgba(70, 40, 12, 0.18); overflow: hidden; }
.meter-fill { display: block; height: 100%; width: 0; border-radius: 999px; background: var(--ink); transition: width 0.4s ease; }
.meter-fill.is-full { background: var(--err); }
