/**
 * stitchfloor.com — the sales site.
 *
 * Standalone, because public/site/ is deployed as its own Vercel project
 * and must carry everything it needs. It deliberately does NOT import
 * app/globals.css: that file is 4,000 lines of product chrome, and a
 * marketing page that loaded it would inherit every future layout change
 * made for the factory desks.
 *
 * What IS shared, and must stay shared:
 *   - the palette below, copied from Brand Guidelines v1.0 page 3, which is
 *     the same set :root declares in app/globals.css.
 *   - Inter, self-hosted from ./fonts. Relative, because this directory is
 *     served both at / (its own project) and at /site/ (inside the app
 *     build, which is what makes it testable in a browser). An absolute
 *     /fonts/ worked in exactly one of those.
 *   - the logo, which is GENERATED from components/brand/logo.tsx by
 *     scripts/gen-brand-svg.mjs rather than redrawn here.
 *
 * There is no serif and no italic in this system (Brand Guidelines page 3),
 * so emphasis is colour and weight.
 */

@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('fonts/Inter-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
    U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191,
    U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('fonts/Inter-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7,
    U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F,
    U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F,
    U+A720-A7FF;
}

:root {
  --moss: #2f3d28;
  --moss-deep: #253120;
  --charcoal: #1f1f1f;
  --sand: #d7cdc1;
  --stone: #eae7e2;
  --bg: #faf9f6;
  --card: #ffffff;
  --muted: #6b665c;
  --border: #dcd7cc;
  --accent: #3f5136;
  --shell: 1120px;
}

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

html {
  scroll-behavior: smooth;
  /* The sticky header is 66px; an anchor jump has to clear it. */
  scroll-padding-top: 86px;
}
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}

body {
  margin: 0;
  font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  font-size: 17px;
  line-height: 1.6;
  color: var(--charcoal);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3 {
  margin: 0;
  line-height: 1.12;
  letter-spacing: -0.022em;
  font-weight: 700;
}
p {
  margin: 0;
}
a {
  color: var(--accent);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}
/**
 * `height: auto` is load-bearing, not tidiness. Every screenshot carries its
 * intrinsic `width`/`height` attributes so the browser reserves the right
 * box before the PNG arrives and the page does not jump -- but those
 * attributes also FIX the rendered height, so `width: 100%` alone scales a
 * 2720x1720 shot down to 500px wide inside a box still 1720px tall. It
 * renders as a mostly-empty frame, which is exactly how this first looked.
 */
img {
  max-width: 100%;
  height: auto;
  display: block;
}

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

/**
 * The ring has to be visible on the ground it lands on.
 *
 * `--accent` (#3f5136) against `--moss` is 1.34:1 and against `--moss-deep`
 * is 1.59:1 — WCAG 2.4.11 wants 3:1. Both dark sections contain focusable
 * elements, and one of them is the primary conversion button, so a
 * keyboard user could not see where they were on the thing the page exists
 * to get them to press.
 */
.cta :focus-visible,
.site-footer :focus-visible {
  outline-color: var(--stone);
}

/** Present for a screen reader, absent for everyone else. */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

/* A keyboard user's first stop, and the only thing above the header. */
/**
 * `fixed`, not `absolute`. Focused after any scroll -- shift-tabbing back
 * out of the header, say -- an absolutely positioned skip link renders at
 * the top of the DOCUMENT, which is off-screen and therefore invisible at
 * the one moment it exists to be seen.
 */
.skip {
  position: fixed;
  left: -9999px;
  top: 8px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px 16px;
  z-index: 50;
}
.skip:focus {
  left: 16px;
}

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

/* ----------------------------------------------------------------- header */

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgb(250 249 246 / 88%);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
.site-header .shell {
  display: flex;
  align-items: center;
  gap: 28px;
  height: 66px;
}
.site-header .logo {
  height: 30px;
  width: auto;
  flex: none;
}
.site-nav {
  display: flex;
  gap: 26px;
  margin-left: auto;
  font-size: 15px;
  font-weight: 500;
}
.site-nav a {
  color: var(--muted);
  text-decoration: none;
}
.site-nav a:hover {
  color: var(--charcoal);
}

/* ----------------------------------------------------------------- button */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 46px;
  padding: 0 22px;
  border-radius: 8px;
  border: 1px solid transparent;
  font: inherit;
  font-size: 16px;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  transition:
    background 0.15s,
    border-color 0.15s,
    color 0.15s;
}
.btn-primary {
  background: var(--moss);
  color: #ffffff;
}
.btn-primary:hover {
  background: var(--moss-deep);
}
.btn-ghost {
  background: transparent;
  color: var(--charcoal);
  border-color: var(--border);
}
.btn-ghost:hover {
  border-color: var(--sand);
  background: var(--stone);
}
.btn-light {
  background: var(--stone);
  color: var(--moss);
}
.btn-light:hover {
  background: #ffffff;
}
.btn-outline-light {
  background: transparent;
  color: var(--stone);
  /* 35% was 2.54:1 against moss; WCAG 1.4.11 wants 3:1 for the boundary of
     a control. 55% computes to 4.0:1. */
  border-color: rgb(234 231 226 / 55%);
}
.btn-outline-light:hover {
  border-color: var(--stone);
}
.btn-sm {
  height: 38px;
  padding: 0 16px;
  font-size: 15px;
}

/* ------------------------------------------------------------------- hero */

.hero {
  padding: 72px 0 8px;
}
.eyebrow {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 18px;
}
.hero h1 {
  font-size: clamp(38px, 6vw, 62px);
  max-width: 17ch;
}
.hero .lede {
  margin-top: 22px;
  font-size: clamp(18px, 2.2vw, 21px);
  color: var(--muted);
  max-width: 62ch;
}
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 32px;
}
.hero-note {
  margin-top: 16px;
  font-size: 14.5px;
  color: var(--muted);
}

/* The screenshot frame: a window onto the product, not a floating rectangle. */
.frame {
  margin-top: 46px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--card);
  overflow: hidden;
  box-shadow:
    0 1px 2px rgb(31 31 31 / 4%),
    0 18px 44px -20px rgb(31 31 31 / 22%);
}
.frame-bar {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 11px 14px;
  border-bottom: 1px solid var(--border);
  background: var(--bg);
}
.frame-bar span {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--sand);
}
.frame-bar p {
  margin-left: 10px;
  font-size: 13px;
  color: var(--muted);
}
/* Inside a .split the frame is the grid item itself, so it carries no top
   margin of its own. Was an inline style attribute on two elements. */
.frame-flush {
  margin-top: 0;
}
.frame img {
  width: 100%;
}

/* ------------------------------------------------------------------ strip */

.strip {
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  margin-top: 64px;
  background: var(--card);
}
.strip ul {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  margin: 0;
  padding: 0;
  list-style: none;
  background: var(--border);
}
.strip li {
  background: var(--card);
  padding: 26px 24px;
}
.strip b {
  display: block;
  font-size: 15px;
  font-weight: 700;
}
.strip span {
  display: block;
  margin-top: 4px;
  font-size: 14.5px;
  color: var(--muted);
}

/* --------------------------------------------------------------- sections */

section {
  padding: 86px 0;
}
.section-head {
  max-width: 64ch;
  margin-bottom: 46px;
}
.section-head h2 {
  font-size: clamp(28px, 4vw, 40px);
}
.section-head p {
  margin-top: 16px;
  font-size: 18px;
  color: var(--muted);
}

.tint {
  background: var(--card);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

/* The problem statement: one box per place the answer currently lives. */
.problem {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
}
.problem div {
  background: var(--bg);
  padding: 26px 24px;
}
.problem b {
  display: block;
  font-size: 15px;
  color: var(--accent);
  margin-bottom: 8px;
}
.problem p {
  font-size: 16px;
  color: var(--muted);
}

/* ------------------------------------------------------------------ desks */

.desks {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 18px;
}
.desk {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 26px 24px 24px;
}
.desk h3 {
  font-size: 19px;
}
.desk > p {
  margin-top: 8px;
  font-size: 15.5px;
  color: var(--muted);
}
.desk ul {
  margin: 18px 0 0;
  padding: 0;
  list-style: none;
  font-size: 15.5px;
}
.desk li {
  position: relative;
  padding: 7px 0 7px 20px;
  border-top: 1px solid var(--border);
}
.desk li::before {
  content: '';
  position: absolute;
  left: 2px;
  top: 16px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--sand);
}

/* ------------------------------------------------------------------ split */

.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 56px;
  align-items: center;
}
.split h2 {
  font-size: clamp(28px, 4vw, 40px);
}
.split .lede {
  margin-top: 18px;
  font-size: 18px;
  color: var(--muted);
}
.points {
  margin: 28px 0 0;
  padding: 0;
  list-style: none;
}
.points li {
  padding: 16px 0;
  border-top: 1px solid var(--border);
}
.points li:last-child {
  border-bottom: 1px solid var(--border);
}
.points b {
  display: block;
  font-size: 16.5px;
}
.points span {
  display: block;
  margin-top: 4px;
  font-size: 15.5px;
  color: var(--muted);
}

/* The phone shot overlapping the desk shot, because that is what the
   product is: the same screen, in a pocket, on the floor. */
.shots {
  position: relative;
}
.shots .phone {
  position: absolute;
  right: -14px;
  bottom: -26px;
  width: 27%;
  min-width: 132px;
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
  background: var(--card);
  box-shadow: 0 14px 34px -12px rgb(31 31 31 / 30%);
}

/* -------------------------------------------------------------- comparison */

.compare-scroll {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--bg);
}
table.compare {
  width: 100%;
  min-width: 780px;
  border-collapse: collapse;
  font-size: 15.5px;
}
table.compare th,
table.compare td {
  text-align: left;
  padding: 15px 18px;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}
table.compare thead th {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
  background: var(--stone);
  border-bottom: 1px solid var(--sand);
}
table.compare tbody th {
  font-weight: 600;
  width: 25%;
  color: var(--charcoal);
}
table.compare td {
  color: var(--muted);
}
table.compare tr > *:last-child {
  background: rgb(47 61 40 / 5%);
  color: var(--charcoal);
  font-weight: 500;
  border-left: 1px solid var(--border);
}
table.compare thead th:last-child {
  background: var(--moss);
  color: #ffffff;
}
table.compare tbody tr:last-child th,
table.compare tbody tr:last-child td {
  border-bottom: 0;
}
.compare-note {
  margin-top: 14px;
  font-size: 14px;
  color: var(--muted);
  max-width: 78ch;
}

/**
 * On a phone the table becomes one card per row.
 *
 * It was a horizontally scrolling table first, and that was wrong in a way
 * worth recording: the first column a visitor sees is "Registers &
 * WhatsApp", the Stitchfloor column is four columns off-screen to the
 * right, and nothing on screen says to swipe. The one section whose whole
 * job is to land the comparison was showing everybody the competition and
 * hiding the answer -- on the device most of these buyers actually use.
 *
 * Each `<td>` carries the column name in `data-label`, printed by the
 * ::before below, so the markup stays a real table for a screen reader and
 * for anything that prints it.
 */
@media (max-width: 860px) {
  .compare-scroll {
    overflow-x: visible;
    border: 0;
    background: transparent;
    border-radius: 0;
  }
  table.compare {
    display: block;
    min-width: 0;
  }
  table.compare thead {
    display: none;
  }
  table.compare tbody,
  table.compare tr {
    display: block;
  }
  table.compare tr {
    border: 1px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 14px;
    background: var(--bg);
  }
  table.compare tbody th {
    display: block;
    width: auto;
    font-size: 16.5px;
    padding: 13px 16px;
    background: var(--stone);
    border-bottom: 1px solid var(--sand);
  }
  table.compare td {
    display: grid;
    grid-template-columns: 40% 1fr;
    gap: 14px;
    padding: 11px 16px;
    font-size: 15px;
    border-bottom: 1px solid var(--border);
  }
  table.compare td::before {
    content: attr(data-label);
    font-size: 12.5px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--muted);
    line-height: 1.75;
  }
  table.compare tr > td:last-child {
    border-left: 0;
    border-bottom: 0;
  }
  table.compare tr > td:last-child::before {
    color: var(--moss);
  }
  table.compare tbody tr:last-child th {
    border-bottom: 1px solid var(--sand);
  }
}

/* ------------------------------------------------------------------- team */

.team {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
  gap: 18px;
}
.person {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 26px 24px;
}
.person .initials {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--stone);
  color: var(--moss);
  font-weight: 700;
  font-size: 16px;
  letter-spacing: 0.02em;
  margin-bottom: 16px;
}
.person h3 {
  font-size: 19px;
}
.person .role {
  margin-top: 3px;
  font-size: 14px;
  font-weight: 600;
  color: var(--accent);
}
.person p {
  margin-top: 12px;
  font-size: 15.5px;
  color: var(--muted);
}
.origin {
  margin-top: 26px;
  padding: 22px 24px;
  border: 1px solid var(--border);
  border-left: 3px solid var(--moss);
  border-radius: 12px;
  background: var(--bg);
  font-size: 16.5px;
  max-width: 78ch;
}

/* -------------------------------------------------------------------- cta */

.cta {
  background: var(--moss);
  color: var(--stone);
  padding: 82px 0;
}
.cta h2 {
  font-size: clamp(28px, 4.4vw, 42px);
  color: #ffffff;
  max-width: 20ch;
}
.cta p {
  margin-top: 18px;
  font-size: 18px;
  color: rgb(234 231 226 / 78%);
  max-width: 58ch;
}
.cta-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 32px;
}
.creds {
  margin-top: 28px;
  padding: 18px 20px;
  border: 1px solid rgb(234 231 226 / 22%);
  border-radius: 10px;
  font-size: 15px;
  color: rgb(234 231 226 / 80%);
  max-width: 58ch;
}
.creds code {
  font-family: inherit;
  font-weight: 600;
  color: #ffffff;
}

/* ----------------------------------------------------------------- footer */

.site-footer {
  background: var(--moss-deep);
  color: rgb(234 231 226 / 70%);
  padding: 44px 0;
  font-size: 14.5px;
}
.site-footer .shell {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 18px 28px;
}
.site-footer .logo {
  height: 26px;
  width: auto;
}
.site-footer a {
  color: var(--stone);
}
.site-footer .spacer {
  margin-left: auto;
}

/* ------------------------------------------------------------- responsive */

@media (max-width: 900px) {
  .split {
    grid-template-columns: 1fr;
    gap: 36px;
  }
  .strip ul {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 640px) {
  body {
    font-size: 16px;
  }
  section {
    padding: 62px 0;
  }
  .hero {
    padding: 48px 0 0;
  }
  .site-nav {
    display: none;
  }
  .strip ul {
    grid-template-columns: 1fr;
  }
  /* On a desk the phone shot overlaps its sibling; at this width it would
     cover the very screenshot it is meant to sit beside. */
  .shots .phone {
    position: static;
    width: 56%;
    margin: 16px auto 0;
  }
  .hero-actions .btn,
  .cta-actions .btn {
    flex: 1 1 100%;
  }
}

@media print {
  .site-header,
  .hero-actions,
  .cta-actions {
    display: none;
  }
}

/* ------------------------------------------------------------ prose
 *
 * privacy.html, and any other plain document added beside it.
 *
 * THESE RULES LIVE HERE RATHER THAN IN A <style> BLOCK ON THE PAGE, and
 * that is not tidiness. The `sales` project sends `style-src 'self'` with no
 * `unsafe-inline` (public/site/vercel.json), so an inline block is REFUSED
 * by the browser -- the page still renders, as unstyled full-width prose
 * with no paragraph spacing, and nothing fails. That is exactly how it was
 * written the first time and it was caught only by serving the directory
 * with its own real headers and reading the console.
 *
 * The landing page uses none of these selectors, so nothing here can move
 * it.
 */
/*
  This page is prose, which the sales page has none of -- its own styles
  are all cards, strips and comparison tables. Kept local rather than
  added to style.css so a text layout cannot shift the landing page.
*/
.doc {
  max-width: 46rem;
  margin: 0 auto;
  padding: 3rem 0 4rem;
}
.doc h1 {
  font-size: clamp(1.9rem, 5vw, 2.6rem);
  line-height: 1.15;
  margin: 0 0 0.75rem;
}
.doc h2 {
  font-size: 1.2rem;
  margin: 2.6rem 0 0.6rem;
}
.doc h3 {
  font-size: 1rem;
  margin: 1.6rem 0 0.4rem;
}
.doc p,
.doc li {
  line-height: 1.65;
}
/*
  style.css zeroes paragraph margins for the landing page's cards, so
  prose here runs together into one block without this. It read as a
  rendering fault in the first screenshot.
*/
.doc p {
  margin: 0 0 1rem;
}
.doc p:last-child {
  margin-bottom: 0;
}
.doc ul {
  padding-left: 1.2rem;
}
.doc li {
  margin: 0.35rem 0;
}
.doc .updated {
  font-size: 0.85rem;
  opacity: 0.7;
  margin: 0 0 2rem;
}
.doc .box {
  border: 1px solid rgba(31, 31, 31, 0.15);
  border-radius: 0.6rem;
  padding: 1rem 1.2rem;
  margin: 1.4rem 0;
  background: #fff;
}
.doc dt {
  font-weight: 600;
  margin-top: 1rem;
}
.doc dd {
  margin: 0.2rem 0 0;
}