/*
  Declared rules with real class names, not utilities.

  The style panel edits rules it can find — a page written in utility classes
  opens in Sitefold with every control dead. That is `strategy.md` §2b, and it
  is why this file looks like a stylesheet somebody wrote rather than a build
  artefact. This site is meant to be edited in the product it advertises.
*/

/*
  The workspace's palette, said again in this project's own names.

  Sitefold's chrome was relifted from `cursor-colour-scheme` on 2026-09-07 and
  this file did not follow, so the page advertising the product was drawn in
  the palette the product had stopped using — a `#ffffff` panel on `#f7f7f7`
  in light, and `#202024` on `#1a1a1a` in dark. Same values here now, and the
  same two structural ideas behind them:

  **Two surfaces.** `--ground` is the canvas and `--panel` is one step toward
  the middle from it: lighter in dark, darker in light, so the canvas is always
  the more extreme end. The preview window in the hero is the panel; everything
  else is the ground.

  **One overlay at low opacity.** `--hairline` and `--field` are the ink at 7%
  and 4% rather than colours of their own, so a line is a shade of whatever it
  is drawn on — the mechanism the app's `index.css` describes at length.

  This is still hand-written CSS with real class names, for the reason below:
  the style panel edits rules it can find, and this site is meant to be
  editable in the product it advertises.
*/

:root {
  --overlay: #141414;
  --ground: #fcfcfc;
  --panel: #f3f3f3;
  --ink: #141414;
  --muted: #606060;
  /*
    The third ink, and pitched rather than taken. The reference's fourth step
    is `#a8a8a8`, which is 2.14:1 on the panel — and both things wearing this
    are text somebody reads: the file tabs on the preview window and the line
    in the footer. 4.53:1 on the panel, 4.90:1 on the ground.
  */
  --faint: #6f6f6f;
  --hairline: color-mix(in srgb, var(--overlay) 7%, transparent);
  --field: color-mix(in srgb, var(--overlay) 4%, transparent);
  /*
    The three syntax hues, which are now the editor's own — `SourceEditor`'s
    `tag`, `property` and `string`. The code in the hero is a picture of what
    this product shows you, so it is drawn in the colours it would actually be
    shown in rather than in three near-misses chosen for this page.
  */
  --tag: #8a5200;
  --attr: #1f6f6b;
  --str: #3f7d20;
  --sans: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, Helvetica, Arial,
    sans-serif;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
}

@media (prefers-color-scheme: dark) {
  :root {
    --overlay: #e4e4e4;
    --ground: #141414;
    --panel: #181818;
    --ink: #eeeeee;
    --muted: #909090;
    /* `#707070` is the reference's own and 3.59:1 on the panel. This is 4.81. */
    --faint: #858585;
    --tag: #e3ab63;
    --attr: #6fd3c9;
    --str: #a3d982;
  }
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
  /*
    The page is taller than the screen on purpose. The hero is sized to leave
    the top of the preview showing, and what shows is the reason to scroll.
  */
  overflow-x: hidden;
}

/* ------------------------------------------------------------------ bar -- */

.bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  height: 60px;
  padding: 0 clamp(20px, 4vw, 40px);
  border-bottom: 1px solid var(--hairline);
}

.brand {
  display: flex;
  align-items: center;
  gap: 9px;
  color: inherit;
  text-decoration: none;
}

.mark {
  width: 19px;
  height: auto;
  fill: currentColor;
}

.wordmark {
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.2px;
}

.signin {
  padding: 7px 15px;
  border: 1px solid var(--hairline);
  border-radius: 7px;
  color: inherit;
  font-size: 14px;
  font-weight: 500;
  line-height: 20px;
  text-decoration: none;
  transition: border-color 150ms ease, background 150ms ease;
}

.signin:hover {
  border-color: var(--muted);
  background: var(--field);
}

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

.hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  /*
    `svh` rather than `vh`. On a phone `100vh` is the viewport with the address
    bar hidden, so anything sized to it is taller than the screen until you
    scroll — the one bug every full-height section has.

    68 rather than 100, less the bar: what is left of the screen is where the
    preview starts, and the part of it that shows above the fold is the whole
    point of the section.
  */
  min-height: calc(68svh - 60px);
  padding: clamp(48px, 8vh, 96px) clamp(24px, 6vw, 48px) 0;
}

.eyebrow {
  margin: 0 0 clamp(18px, 2.5vw, 26px);
  font-family: var(--mono);
  font-size: 12px;
  line-height: 18px;
  letter-spacing: 1.6px;
  text-transform: uppercase;
  color: var(--muted);
}

.claim {
  margin: 0;
  max-width: 15ch;
  font-size: clamp(40px, 6.4vw, 82px);
  line-height: 1;
  letter-spacing: -0.035em;
  font-weight: 400;
  text-wrap: balance;
}

.lede {
  margin: clamp(20px, 2.4vw, 28px) 0 0;
  max-width: 52ch;
  font-size: clamp(16px, 1.25vw, 18px);
  line-height: 1.6;
  color: var(--muted);
  text-wrap: pretty;
}

.enter {
  display: inline-flex;
  align-items: center;
  margin-top: clamp(24px, 3vw, 34px);
  padding: 13px 22px;
  border-radius: 8px;
  background: var(--ink);
  color: var(--ground);
  font-size: 15px;
  font-weight: 500;
  line-height: 20px;
  text-decoration: none;
  transition: opacity 150ms ease;
}

.enter:hover {
  opacity: 0.88;
}

/* -------------------------------------------------------------- preview -- */

.preview {
  padding: 0 clamp(16px, 4vw, 56px);
}

.window {
  max-width: 1180px;
  margin: 0 auto;
  /*
    Closed on all four sides. The first version left the bottom border off, on
    the idea that the window ran off the page — but the page has a footer, so
    it did not run off anything and the missing edge read as a mistake. The
    peek is the fold's job, not the border's: the hero is sized so the top of
    this shows and the rest is a scroll away.
  */
  border: 1px solid var(--hairline);
  border-radius: 14px;
  background: var(--panel);
  overflow: hidden;
}

.titlebar {
  display: flex;
  align-items: stretch;
  height: 40px;
  border-bottom: 1px solid var(--hairline);
  background: var(--ground);
}

.tab {
  display: flex;
  align-items: center;
  padding: 0 16px;
  border-right: 1px solid var(--hairline);
  font-family: var(--mono);
  font-size: 12px;
  line-height: 18px;
  color: var(--faint);
  white-space: nowrap;
}

.tab.is-on {
  background: var(--panel);
  color: var(--ink);
}

.panes {
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 460px;
}

/* ------ left: the page ------ */

.canvas {
  display: flex;
  align-items: center;
  border-right: 1px solid var(--hairline);
  padding: clamp(28px, 4vw, 56px);
  background: var(--ground);
}

.page {
  text-align: left;
}

.page-eyebrow {
  margin: 0 0 12px;
  font-size: 12px;
  line-height: 18px;
  letter-spacing: 1.4px;
  text-transform: uppercase;
  color: var(--muted);
}

.page-title {
  margin: 0;
  max-width: 12ch;
  font-size: clamp(26px, 2.6vw, 38px);
  line-height: 1.06;
  letter-spacing: -0.02em;
  font-weight: 500;
}

.page-copy {
  margin: 14px 0 0;
  max-width: 34ch;
  font-size: 15px;
  line-height: 1.55;
  color: var(--muted);
}

.page-button {
  display: inline-block;
  margin-top: 22px;
  padding: 9px 16px;
  border-radius: 7px;
  background: var(--ink);
  color: var(--ground);
  font-size: 14px;
  font-weight: 500;
  line-height: 20px;
}

/* ------ right: the file ------ */

.source {
  margin: 0;
  padding: clamp(20px, 2.5vw, 32px);
  overflow-x: auto;
  font-family: var(--mono);
  font-size: 12.5px;
  line-height: 1.75;
  color: var(--muted);
  tab-size: 2;
}

.source .tag {
  color: var(--tag);
}

.source .attr {
  color: var(--attr);
}

.source .str {
  color: var(--str);
}

@media (max-width: 820px) {
  .panes {
    grid-template-columns: 1fr;
    min-height: 0;
  }

  .canvas {
    border-right: 0;
    border-bottom: 1px solid var(--hairline);
  }
}

/* ----------------------------------------------------------------- foot -- */

.foot {
  padding: 28px clamp(24px, 6vw, 48px);
}

.note {
  margin: 0;
  font-family: var(--mono);
  font-size: 11px;
  line-height: 18px;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  text-align: center;
  color: var(--faint);
}

/* ------------------------------------------------------------ the small print -- */

/*
  The two documents, in the footer as well as on the sign-up form.

  On the form because that is where somebody agrees to them; here because that
  is where somebody goes looking afterwards. A legal page reachable only from
  the screen you have already passed through is a page you cannot re-read.

  `/legal` is served by the app on this host — see `SHARED` in
  `worker/routing.ts` — which is why these are ordinary paths and not links to
  the other hostname.
*/
.small-print {
  display: flex;
  gap: 8px;
  justify-content: center;
  margin: 10px 0 0;
}

.small-print a {
  color: inherit;
  text-decoration-color: color-mix(in srgb, currentColor 40%, transparent);
  text-underline-offset: 2px;
  transition: color 150ms ease;
}

.small-print a:hover {
  color: var(--muted);
}
