/* hotter.dev: the workshop. A green cutting mat, with paper lying on it.
   Home, privacy, 404 and every new idea page (templates/idea.html) use this file. */

@font-face { font-family: "Barlow"; font-weight: 400; font-style: normal; font-display: swap; src: url("/assets/fonts/barlow-400.woff2") format("woff2"); }
@font-face { font-family: "Barlow"; font-weight: 600; font-style: normal; font-display: swap; src: url("/assets/fonts/barlow-600.woff2") format("woff2"); }
@font-face { font-family: "Barlow Condensed"; font-weight: 600; font-style: normal; font-display: swap; src: url("/assets/fonts/barlow-condensed-600.woff2") format("woff2"); }

:root {
  --mat: #17513f;        /* the cutting mat */
  --mat-deep: #103c2f;   /* its shadowed edge */
  --print: #e9f1d9;      /* the pale ink printed on a mat */
  --print-dim: #c4d6b9;
  --paper: #fcfcf7;
  --ink: #13211b;
  --muted: #4a5a52;
  --line: #d5dccf;
  --tape: #ffd447;       /* masking tape */
  --accent: #17513f;     /* idea pages override this */
  --gutter: max(1.25rem, calc((100vw - 68rem) / 2));
  --body: "Barlow", "Avenir Next", "Segoe UI", system-ui, sans-serif;
  --display: "Barlow Condensed", "Avenir Next Condensed", "Arial Narrow", "Barlow", sans-serif;
}

*, ::before, ::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
[hidden] { display: none !important; }

body {
  margin: 0;
  min-height: 100vh;
  color: var(--print);
  font: 400 1.125rem/1.55 var(--body);
  background-color: var(--mat);
  /* mat grid: a strong line every 3rem, a faint one every 0.75rem */
  background-image:
    linear-gradient(rgba(233, 241, 217, 0.12) 1px, transparent 1px),
    linear-gradient(90deg, rgba(233, 241, 217, 0.12) 1px, transparent 1px),
    linear-gradient(rgba(233, 241, 217, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(233, 241, 217, 0.04) 1px, transparent 1px);
  background-size: 3rem 3rem, 3rem 3rem, 0.75rem 0.75rem, 0.75rem 0.75rem;
  background-position: -1px -1px;
}
/* the ruler printed along the mat's top edge */
body::before {
  content: "";
  display: block;
  height: 1.5rem;
  background-color: var(--mat-deep);
  background-image:
    linear-gradient(90deg, var(--print) 2px, transparent 2px),
    linear-gradient(90deg, rgba(233, 241, 217, 0.6) 1px, transparent 1px);
  background-size: 3rem 100%, 0.75rem 40%;
  background-repeat: repeat-x;
  background-position: -1px 100%, -1px 100%;
}

header, footer { padding: 0 var(--gutter); }
header { padding-top: clamp(2.25rem, 6vw, 4.5rem); padding-bottom: 2.25rem; }
footer { padding-top: 2.25rem; padding-bottom: 3rem; font-size: 0.95rem; color: var(--print-dim); }
footer p { margin: 0; }

h1, h2, h3 { font-family: var(--display); font-weight: 600; text-wrap: balance; }
h1 { font-size: clamp(2.5rem, 7vw, 4.25rem); line-height: 0.98; letter-spacing: -0.005em; margin: 0 0 1.25rem; max-width: 20ch; }
h2 { font-size: 1.7rem; line-height: 1.15; margin: 2.5rem 0 0.4rem; }
h3 { font-size: 1.3rem; line-height: 1.2; margin: 1.6rem 0 0.2rem; }
p { margin: 0 0 1rem; }
.lead { font-size: 1.3rem; line-height: 1.45; color: var(--print); max-width: 34rem; }
.small { font-size: 0.95rem; }
header > .small { font-family: var(--display); font-size: 1.3rem; margin: 0 0 1rem; color: var(--tape); }

a { color: inherit; text-decoration-line: underline; text-decoration-thickness: 2px; text-underline-offset: 0.18em; text-decoration-color: var(--tape); }
a:hover { background: var(--tape); color: var(--ink); text-decoration-color: var(--ink); }
:focus-visible { outline: 3px solid var(--ink); outline-offset: 2px; box-shadow: 0 0 0 8px var(--tape); border-radius: 2px; }

/* ---------- Paper: by default <main> is a sheet lying on the mat ---------- */
main {
  max-width: 46rem;
  margin: 0 var(--gutter);
  padding: clamp(1.4rem, 5vw, 3.5rem);
  color: var(--ink);
  background: var(--paper);
  border-radius: 2px;
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.3), 0 14px 24px -16px rgba(0, 0, 0, 0.65);
}
main > :first-child { margin-top: 0; }
main > :last-child { margin-bottom: 0; }
main a, .offer a { text-decoration-color: var(--accent); }
main p, main li { max-width: 38rem; }

/* ---------- Home: the ideas lie straight on the mat ---------- */
main.bench { max-width: none; padding: 0 var(--gutter); margin: 0; color: var(--print); background: none; box-shadow: none; }
.site { font-family: var(--display); font-size: 1.5rem; line-height: 1; margin: 0 0 clamp(2rem, 7vw, 4.5rem); }
.site span { display: inline-block; padding: 0.3rem 0.7rem 0.35rem; color: var(--ink); background: var(--tape); transform: rotate(-1.5deg); }
.home h1 { font-size: clamp(3.1rem, 9.5vw, 6.75rem); line-height: 0.92; max-width: 13ch; margin-bottom: 1.75rem; }
.home header { padding-bottom: clamp(2.5rem, 6vw, 4.5rem); }
@media (min-width: 60rem) {
  .home header { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 23rem); column-gap: 3rem; align-items: end; }
  .home .site { grid-column: 1 / -1; }
  .home h1 { margin-bottom: 0; }
  .home .lead { margin-bottom: 0.6rem; }
}
.bench h2 { margin: 0 0 1.75rem; }
.bench .terms { margin-top: 3rem; max-width: 34rem; color: var(--print-dim); }
.bench .terms h2 { color: var(--print); margin-bottom: 0.4rem; }

ul.ideas { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 19rem), 1fr)); gap: 2.25rem 1.5rem; }
ul.ideas li {
  position: relative;
  max-width: none;
  min-height: 10.5rem;
  padding: 1.9rem 1.5rem 1.5rem;
  color: var(--muted);
  font-size: 1.1rem;
  line-height: 1.4;
  background: var(--paper);
  border-radius: 2px;
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.3), 0 12px 18px -14px rgba(0, 0, 0, 0.7);
  transition: transform 0.15s ease-out;
}
/* a strip of masking tape holds each slip down */
ul.ideas li::before { content: ""; position: absolute; top: -0.7rem; left: 1.5rem; width: 5rem; height: 1.5rem; background: var(--tape); opacity: 0.93; transform: rotate(-2.5deg); box-shadow: 0 1px 1px rgba(0, 0, 0, 0.2); }
ul.ideas li:nth-child(even)::before { left: auto; right: 2rem; transform: rotate(2deg); }
ul.ideas li:nth-child(3n)::before { left: 42%; transform: rotate(-1deg); }
ul.ideas br { display: none; }
ul.ideas a { display: block; margin-bottom: 0.5rem; font: 600 2.1rem/1.02 var(--display); color: var(--ink); text-decoration-color: var(--mat); }
ul.ideas a::after { content: ""; position: absolute; inset: 0; }   /* the whole slip is the link */
ul.ideas a:hover { background: none; }
ul.ideas li:hover { transform: translateY(-4px) rotate(-0.4deg); }
ul.ideas li:hover a { text-decoration-color: var(--tape); text-decoration-thickness: 5px; }
ul.ideas li:focus-within { outline: 3px solid var(--ink); outline-offset: 2px; box-shadow: 0 0 0 8px var(--tape); }
ul.ideas a:focus-visible { outline: none; box-shadow: none; }

/* an outline where the next slip goes; also the empty state ("Nothing is live yet.") */
ul.ideas::after, .bench > p:not([class]) {
  display: flex; align-items: flex-end;
  min-height: 10.5rem;
  margin: 0;
  padding: 1.5rem;
  font-size: 1.05rem;
  color: var(--print-dim);
  border: 2px dashed rgba(233, 241, 217, 0.6);
  border-radius: 2px;
}
ul.ideas::after { content: "Empty spot. The next idea goes here."; }
.bench > p:not([class]) { max-width: 29rem; font: 600 2.1rem/1.05 var(--display); color: var(--print); }

/* 404: the outline a removed slip leaves behind */
.gone { max-width: 34rem; margin: 0 var(--gutter); padding: clamp(1.5rem, 5vw, 2.75rem); border: 2px dashed rgba(233, 241, 217, 0.6); border-radius: 2px; }
.gone h1 { margin-bottom: 1rem; }
.gone .lead { margin: 0; font-size: 1.2rem; }

/* ---------- Idea pages: price offer, signup, tools, tables ---------- */
.offer { position: relative; max-width: 31rem; margin: 2.5rem 0 0; padding: 2rem 1.5rem 1.5rem; color: var(--ink); background: var(--paper); border-radius: 2px; box-shadow: 0 1px 0 rgba(0, 0, 0, 0.3), 0 12px 18px -14px rgba(0, 0, 0, 0.7); }
.offer::before { content: ""; position: absolute; top: -0.7rem; left: 1.5rem; width: 5rem; height: 1.5rem; background: var(--tape); opacity: 0.93; transform: rotate(-2.5deg); box-shadow: 0 1px 1px rgba(0, 0, 0, 0.2); }
.offer h2 { margin-top: 0; }
.offer > :last-child { margin-bottom: 0; }
.offer .price, .price { font: 600 2.1rem/1.05 var(--display); margin-bottom: 0.5rem; }

button { font: 600 1.05rem/1.2 var(--body); }
button.buy, .tool button, form[data-signup] button { padding: 0.85rem 1.3rem; color: #fff; background: var(--accent); border: 2px solid var(--accent); border-radius: 2px; cursor: pointer; }
button.buy:hover, .tool button:hover, form[data-signup] button:hover { background: var(--ink); border-color: var(--ink); }
.tool button.plain { color: var(--accent); background: none; }
.tool button.plain:hover { color: #fff; background: var(--accent); border-color: var(--accent); }
button:disabled { opacity: 0.6; cursor: default; }

form[data-signup] { display: flex; flex-wrap: wrap; gap: 0.5rem; margin: 1.25rem 0 0; }
form[data-signup] input[type="email"] { flex: 1 1 13rem; min-width: 0; padding: 0.8rem 0.9rem; font: inherit; color: var(--ink); background: #fff; border: 2px solid var(--ink); border-radius: 2px; }
form[data-signup] [data-note] { flex-basis: 100%; margin: 0.25rem 0 0; font-size: 0.95rem; line-height: 1.45; color: var(--muted); min-height: 2.9em; }
form[data-signup].done input, form[data-signup].done button { display: none; }
form[data-signup].done [data-note] { font-size: 1.1rem; font-weight: 600; color: var(--ink); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.tool { margin: 1.75rem 0; padding: 1.25rem; background: #eef3e9; border: 1px solid var(--line); border-left: 6px solid var(--accent); border-radius: 2px; }
.tool h2, .tool h3 { margin-top: 0; }
.tool > :last-child { margin-bottom: 0; }
.fields { display: grid; grid-template-columns: repeat(auto-fit, minmax(11rem, 1fr)); gap: 0.9rem; margin-bottom: 1rem; }
.fields label { display: block; font-size: 0.95rem; font-weight: 600; color: var(--ink); }
.fields input, .fields select, .tool textarea { display: block; width: 100%; margin-top: 0.3rem; padding: 0.55rem 0.65rem; font: 400 1.05rem/1.4 var(--body); color: var(--ink); background: #fff; border: 2px solid var(--ink); border-radius: 2px; }
.tool textarea { min-height: 7rem; font: 0.85rem/1.45 ui-monospace, Menlo, Consolas, monospace; }
.result { font: 600 2.4rem/1.05 var(--display); margin: 0.5rem 0 0.75rem; min-height: 1.05em; font-variant-numeric: tabular-nums; }

.scroll { overflow-x: auto; max-width: 100%; }
table { width: 100%; border-collapse: collapse; font-size: 1rem; }
th, td { padding: 0.5rem 0.7rem; text-align: left; border-bottom: 1px solid var(--line); white-space: nowrap; }
th { font-size: 0.9rem; font-weight: 600; color: var(--muted); border-bottom: 2px solid var(--ink); }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
td.wrap { white-space: normal; }
tr.pick td { background: #fff3c4; font-weight: 600; }

.checks { list-style: none; padding: 0; margin: 0.5rem 0 0; }
.checks li { padding: 0.4rem 0 0.4rem 1.7rem; position: relative; border-top: 1px solid var(--line); }
.checks li::before { position: absolute; left: 0; font-weight: 600; }
.checks li.ok::before { content: "\2713"; color: #17663a; }
.checks li.warn::before { content: "!"; color: #8f5200; }
.checks li.fail::before { content: "\2717"; color: #b3261e; }
.parties { display: grid; grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr)); gap: 1rem; margin: 1rem 0; }
.parties h3 { margin: 0 0 0.2rem; font: 600 0.9rem/1.3 var(--body); color: var(--muted); }
.parties p { margin: 0; }

@media (max-width: 30rem) {
  body { font-size: 1.0625rem; }
  main { margin: 0 0.75rem; }
  .lead { font-size: 1.2rem; }
}
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
  ul.ideas li:hover { transform: none; }
}
::placeholder { color: #5d6b63; opacity: 1; }
