/* deals.sidestream.ai — one screen, mobile first, no framework (design 2026-10-13 §2.2).

   The look is www.sidestream.ai's "Trade Counter" (the www repo's src/styles/global.css): warm
   paper, near-black ink, a price-tag red, hard 2px rules and offset shadows, square corners;
   Roboto Slab headings, JetBrains Mono labels, Inter body. Everything here is self-hosted, because
   the page's CSP admits no third-party style or font, and nothing is inline (no style="", no
   <style>), so the pages never lean on style-src. The fonts are the latin subsets of the
   @fontsource files www ships, licences alongside in fonts/. */

@font-face {
  font-family: "Roboto Slab";
  font-style: normal;
  font-weight: 800;
  font-display: swap;
  src: url("/static/fonts/roboto-slab-latin-800-normal.woff2") format("woff2");
}

@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/static/fonts/inter-latin-400-normal.woff2") format("woff2");
}

@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("/static/fonts/inter-latin-700-normal.woff2") format("woff2");
}

@font-face {
  font-family: "JetBrains Mono";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("/static/fonts/jetbrains-mono-latin-700-normal.woff2") format("woff2");
}

/* www's tokens. The hex values are the oklch ones converted, for browsers without oklch; www's
   --ink-faint is left out on purpose — 3.9:1 on --bg, too faint for any text here. */
:root {
  --bg: #f7f3eb;
  --bg-alt: #eee7db;
  --ink: #181512;
  --ink-soft: #46423d;
  --rule: #cac3ba;
  --accent: #c21725;
  --accent-ink: #faf8f5;
  --stamp: #97000f;
  --paper: #fefbf6;
  --slab: "Roboto Slab", Georgia, serif;
  --sans: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    "Helvetica Neue", Arial, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  color-scheme: light;
}

@supports (color: oklch(0 0 0)) {
  :root {
    --bg: oklch(0.965 0.012 85);
    --bg-alt: oklch(0.93 0.018 82);
    --ink: oklch(0.2 0.008 70);
    --ink-soft: oklch(0.38 0.01 70);
    --rule: oklch(0.82 0.015 75);
    --accent: oklch(0.52 0.2 25);
    --accent-ink: oklch(0.98 0.005 85);
    --stamp: oklch(0.42 0.18 25);
    --paper: oklch(0.99 0.008 85);
  }
}

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

html {
  -webkit-text-size-adjust: 100%;
}

body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

::selection {
  background: var(--accent);
  color: var(--accent-ink);
}

a {
  color: var(--ink);
  text-decoration-color: var(--accent);
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
}

a:hover {
  color: var(--accent);
}

a:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
}

.wrap {
  width: 100%;
  max-width: 680px;
  margin: 0 auto;
  padding: 0 20px;
}

/* ---- Header: www's cream bar over a 2px ink rule; the logo goes to www. ---- */

.masthead {
  background: var(--bg);
  border-bottom: 2px solid var(--ink);
}

.masthead-bar {
  max-width: 1080px;
  margin: 0 auto;
  padding: 18px 20px;
}

.brand {
  display: inline-block;
  line-height: 0;
}

.brand img {
  height: 22px;
  width: auto;
}

main.wrap {
  flex: 1 0 auto;
  padding-top: 22px;
  padding-bottom: 40px;
}

/* ---- Hero ---- */

.eyebrow {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 12px;
  font-family: var(--mono);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  line-height: 1.3;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.eyebrow::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--rule);
}

.hero h1 {
  margin: 0 0 14px;
  font-family: var(--slab);
  font-size: clamp(1.8rem, 7.6vw, 2.75rem);
  font-weight: 800;
  line-height: 1.02;
  letter-spacing: -0.025em;
  text-wrap: balance;
}

.hl {
  color: var(--accent);
  white-space: nowrap;
}

.points {
  margin: 0 0 22px;
  padding: 0;
  list-style: none;
}

.points li {
  position: relative;
  margin: 0 0 4px;
  padding-left: 19px;
  color: var(--ink-soft);
  font-size: 0.97rem;
  line-height: 1.45;
}

/* www's ribbon dot: a small square of red, never a circle. */
.points li::before {
  content: "";
  position: absolute;
  left: 1px;
  top: 0.55em;
  width: 7px;
  height: 7px;
  background: var(--accent);
}

/* ---- The card: www's paper slip, 2px ink border, hard offset shadow. ---- */

.card {
  position: relative;
  background: var(--paper);
  border: 2px solid var(--ink);
  box-shadow: 5px 5px 0 var(--ink);
  padding: 20px 18px 22px;
}

.card h1 {
  margin: 0 0 10px;
  font-family: var(--slab);
  font-size: 1.6rem;
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.02em;
  text-wrap: balance;
}

/* :where() keeps these at one class, so the form's own paragraphs (.banner, .error, .consent,
   later in this file) win on colour and spacing. */
.card :where(p) {
  margin: 0 0 8px;
  color: var(--ink-soft);
}

.card :where(p:last-child) {
  margin-bottom: 0;
}

.notice-card p {
  color: var(--ink);
}

/* ---- The form ---- */

.banner {
  position: relative;
  margin: 0 0 16px;
  padding: 9px 12px 9px 28px;
  border: 2px solid var(--stamp);
  color: var(--stamp);
  font-weight: 700;
}

.banner::before {
  content: "";
  position: absolute;
  left: 11px;
  top: 1.05em;
  width: 7px;
  height: 7px;
  background: var(--stamp);
}

.field {
  margin: 0 0 14px;
}

.field label {
  display: block;
  margin: 0 0 5px;
  font-family: var(--mono);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  line-height: 1.4;
  text-transform: uppercase;
  color: var(--ink);
}

.optional {
  font-family: var(--sans);
  font-size: 0.85rem;
  font-weight: 400;
  letter-spacing: 0;
  text-transform: none;
  color: var(--ink-soft);
}

.field input,
.field textarea,
.field select {
  display: block;
  width: 100%;
  margin: 0;
  padding: 9px 12px;
  border: 2px solid var(--ink-soft);
  border-radius: 0;
  background: var(--paper);
  color: var(--ink);
  font: inherit;
  font-size: 16px; /* keeps iOS from zooming on focus */
  line-height: 1.4;
  -webkit-appearance: none;
  appearance: none;
  transition: border-color 0.15s ease;
}

.field input:hover,
.field textarea:hover,
.field select:hover {
  border-color: var(--ink);
}

.field input:focus,
.field textarea:focus,
.field select:focus {
  border-color: var(--ink);
  outline: 3px solid var(--accent);
  outline-offset: 2px;
}

/* The supplier form's "What do you have?" (/sell): a list pasted from a spreadsheet stays a list. */
.field textarea {
  min-height: 8.5em;
  resize: vertical;
}

.field textarea::placeholder {
  color: var(--ink-soft);
  opacity: 0.8;
}

/* The supplier form's role picker: appearance is reset above, so the arrow is drawn here — two
   gradient triangles, no image file and nothing the CSP would have to admit. */
.field select {
  padding-right: 40px;
  background-image: linear-gradient(45deg, transparent 50%, var(--ink) 50%),
    linear-gradient(135deg, var(--ink) 50%, transparent 50%);
  background-position: calc(100% - 20px) 50%, calc(100% - 14px) 50%;
  background-size: 6px 6px, 6px 6px;
  background-repeat: no-repeat;
  cursor: pointer;
}

.has-error input,
.has-error input:hover,
.has-error textarea,
.has-error textarea:hover,
.has-error select,
.has-error select:hover {
  border-color: var(--stamp);
}

.error {
  position: relative;
  margin: 6px 0 0;
  padding-left: 15px;
  color: var(--stamp);
  font-size: 0.9rem;
  font-weight: 700;
  line-height: 1.4;
}

.error::before {
  content: "";
  position: absolute;
  left: 1px;
  top: 0.45em;
  width: 7px;
  height: 7px;
  background: var(--stamp);
}

.cf-turnstile {
  margin: 4px 0 12px;
  min-height: 65px; /* the widget's height, held so the button does not jump when it loads */
}

.consent {
  margin: 0 0 16px;
  font-size: 0.88rem;
}

/* www's .btn-primary: red, ink border, an offset shadow that presses in. */
button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  margin: 0;
  padding: 13px 20px;
  border: 2px solid var(--ink);
  border-radius: 0;
  background: var(--accent);
  box-shadow: 4px 4px 0 var(--ink);
  color: var(--accent-ink);
  font-family: var(--sans);
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  line-height: 1.3;
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

button:hover {
  transform: translate(-1px, -1px);
  box-shadow: 5px 5px 0 var(--ink);
}

button:active {
  transform: translate(2px, 2px);
  box-shadow: 1px 1px 0 var(--ink);
}

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

/* The arrow is decoration: the second declaration gives it empty alt text, so the button's name
   stays "Get our weekly deals"; a browser without the alt syntax keeps the first. */
.signup button::after {
  content: "\2192";
  content: "\2192" / "";
}

/* ---- The confirmed page's stamp (www's .stamp-lg), set down once. ---- */

.stamp {
  position: relative;
  display: inline-block;
  margin: 2px 0 16px 2px;
  padding: 0.55rem 0.9rem 0.5rem;
  border: 2px solid var(--stamp);
  color: var(--stamp);
  font-family: var(--mono);
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  line-height: 1;
  text-transform: uppercase;
  transform: rotate(-4deg);
  animation: stamp-down 0.32s cubic-bezier(0.2, 0.9, 0.3, 1.25) 0.1s both;
}

.stamp::before {
  content: "";
  position: absolute;
  inset: -2px;
  border: 2px solid var(--stamp);
  opacity: 0.3;
  transform: translate(2px, 2px);
  pointer-events: none;
}

@keyframes stamp-down {
  from {
    opacity: 0;
    transform: rotate(-10deg) scale(1.7);
  }
  to {
    opacity: 1;
    transform: rotate(-4deg) scale(1);
  }
}

/* ---- Footer: www's bg-alt band under a 2px ink rule. ---- */

.foot {
  padding: 18px 0 30px;
  background: var(--bg-alt);
  border-top: 2px solid var(--ink);
  font-size: 0.92rem;
}

.foot .wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
  justify-content: space-between;
}

.foot a {
  text-decoration: none;
}

.foot a:hover {
  text-decoration: underline;
  text-decoration-color: var(--accent);
}

/* Turnstile's widget is a fixed 300px. A phone under 400px gets a 16px gutter and a 12px card
   padding, so the widget fits the card exactly at 360px; under 360px the form card runs edge to
   edge rather than let the widget cross its border. */
@media (max-width: 399px) {
  .wrap {
    padding: 0 16px;
  }

  .masthead-bar {
    padding-inline: 16px;
  }

  .card {
    padding-inline: 12px;
  }
}

@media (max-width: 359px) {
  .signup {
    margin-inline: -16px;
    padding-inline: 10px;
    border-inline: 0;
    box-shadow: none;
  }
}

@media (min-width: 768px) {
  .wrap {
    padding: 0 32px;
  }

  .masthead-bar {
    padding: 20px 32px;
  }

  .brand img {
    height: 24px;
  }

  main.wrap {
    padding-top: 48px;
    padding-bottom: 64px;
  }

  .eyebrow {
    margin-bottom: 18px;
  }

  .hero h1 {
    margin-bottom: 20px;
  }

  .points {
    margin-bottom: 32px;
  }

  .points li {
    font-size: 1.02rem;
  }

  .card {
    padding: 28px 28px 30px;
  }

  .card h1 {
    font-size: 2rem;
  }

  button {
    width: auto;
    min-width: 280px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .stamp {
    animation: none;
  }

  button,
  .field input,
  .field textarea,
  .field select {
    transition: none;
  }
}
