/* siftware.dev - one stylesheet, one self-hosted typeface, no external requests.
   Colour tokens are checked for contrast in light and dark by tests/test_contrast.py. */
@font-face {
  font-family: "Familjen Grotesk";
  src: url("/fonts/familjen-grotesk.woff2") format("woff2");
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
}

:root {
  color-scheme: light dark;
  --bg: #f3f5f4;
  --surface: #ffffff;
  --text: #15212b;
  --muted: #4b5862;
  --accent: #276457;
  --on-accent: #ffffff;
  --border: #7b8790;
  --focus: #276457;
  --grid: #d5e1dd;
  --bar: #bcd8cf;
  --frame: #1c252c;
  --frame-edge: #3a4650;
  --inv-bg: #15212b;
  --inv-text: #e9f0ee;
  --inv-muted: #b3c2c9;
  --inv-accent: #8fd3c3;
  --shadow: #15212b;
  --font: "Familjen Grotesk", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --wide: 74rem;
  --measure: 38rem;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f1a21;
    --surface: #16232c;
    --text: #e6edf1;
    --muted: #a3b1bb;
    --accent: #72c6b3;
    --on-accent: #0f1a21;
    --border: #6b7882;
    --focus: #72c6b3;
    --grid: #1f2f39;
    --bar: #24433f;
    --frame: #05090c;
    --frame-edge: #46535d;
    --inv-bg: #e6edf1;
    --inv-text: #15212b;
    --inv-muted: #44525c;
    --inv-accent: #1f5a4e;
    --shadow: #000000;
  }
}

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

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

@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
  .bars span { animation: grow 900ms cubic-bezier(.2, .7, .2, 1) both; animation-delay: calc(var(--i, 0) * 90ms + 200ms); }
  @keyframes grow { from { transform: scaleX(0); } to { transform: scaleX(1); } }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 1.125rem/1.55 var(--font);
  font-feature-settings: "tnum" 0;
}

img { max-width: 100%; height: auto; }

a { color: var(--accent); text-underline-offset: 0.18em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }

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

.skip {
  position: absolute;
  left: 1rem;
  top: -10rem;
  padding: 0.5rem 1rem;
  background: var(--surface);
  color: var(--text);
  border: 2px solid var(--focus);
  z-index: 10;
}
.skip:focus { top: 1rem; }

.wrap { max-width: var(--measure); margin: 0 auto; padding: 0 1rem; }
.wide { max-width: var(--wide); margin: 0 auto; padding: 0 1.25rem; }

header.site .wrap, header.site .wide { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 4.25rem; }
header.site { border-bottom: 1px solid var(--grid); }
.brand { display: inline-flex; align-items: center; gap: 0.6rem; color: var(--text); text-decoration: none; font-weight: 700; font-size: 1.125rem; letter-spacing: -0.01em; }
.brand img { display: block; }

main { padding: 2.5rem 0 3rem; }
main.sales { padding: 0; }

h1, h2, h3 { line-height: 1.08; letter-spacing: -0.02em; font-weight: 700; }
h1 { font-size: clamp(2.25rem, 5.5vw, 3rem); margin: 0 0 1rem; }
h2 { font-size: clamp(1.75rem, 3.6vw, 2.5rem); margin: 0 0 1rem; }
h3 { font-size: 1.25rem; margin: 1.75rem 0 0.35rem; letter-spacing: -0.01em; }
p, ul { margin: 0 0 1rem; }
ul { padding-left: 1.25rem; }
li { margin-bottom: 0.4rem; }

.lede { font-size: 1.3rem; line-height: 1.45; }
.muted { color: var(--muted); }
.small { font-size: 0.95rem; }

/* ---------- hero ---------- */
.hero { padding: clamp(2.5rem, 7vw, 5.5rem) 0 clamp(3rem, 8vw, 6rem); overflow: hidden; }
.hero .wide { display: grid; gap: clamp(2rem, 5vw, 3.5rem); align-items: center; }
@media (min-width: 62em) {
  .hero .wide { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); }
}
.hero h1 { font-size: clamp(2.75rem, 6.4vw, 4.75rem); line-height: 0.98; letter-spacing: -0.035em; margin-bottom: 1.5rem; max-width: 13ch; }
.hero .lede { max-width: 30rem; color: var(--muted); }
.quiet { display: inline-block; margin-top: 0.75rem; font-weight: 700; font-size: 1.125rem; }

/* the schedule the devices sit on: day columns, people rows, booked bars */
.stage { position: relative; padding: 1rem 0; }
.plan {
  position: absolute;
  inset: 0 -3rem 0 -1rem;
  background:
    repeating-linear-gradient(to right, var(--grid) 0 1px, transparent 1px 20%),
    repeating-linear-gradient(to bottom, var(--grid) 0 1px, transparent 1px 3.5rem);
  border-radius: 0.5rem;
  overflow: hidden;
}
.bars span {
  position: absolute;
  height: 1.6rem;
  border-radius: 0.3rem;
  background: var(--bar);
  transform-origin: left center;
}
.bars .b0 { left: 2%; top: 1.0rem; width: 38%; --i: 0; }
.bars .b1 { left: 42%; top: 1.0rem; width: 36%; --i: 1; }
.bars .b2 { left: 6%; top: 4.5rem; width: 54%; --i: 2; }
.bars .b3 { left: 64%; top: 4.5rem; width: 30%; --i: 3; }
.bars .b4 { left: 22%; top: 8.0rem; width: 40%; --i: 4; }
.bars .b5 { left: 0%; top: 11.5rem; width: 26%; --i: 5; }
.bars .b6 { left: 30%; top: 11.5rem; width: 50%; --i: 6; }
.bars .b7 { left: 12%; top: 15.0rem; width: 44%; --i: 7; }
.bars .b8 { left: 58%; top: 15.0rem; width: 34%; --i: 8; }
.bars .b9 { left: 4%; top: 18.5rem; width: 30%; --i: 9; }
.bars .b10 { left: 38%; top: 18.5rem; width: 46%; --i: 10; }

/* iPad and iPhone placed in proportion to the stage width, worked out from the viewport */
.devices { --stage: calc(100vw - 2.5rem); position: relative; width: var(--stage); aspect-ratio: 1 / 1; }
@media (min-width: 62em) {
  .devices { --stage: min(41rem, calc((100vw - 6rem) * 0.58)); }
}
/* portrait iPad to the left, the iPhone overlapping its lower right edge */
.devices .ipad { --w: calc(var(--stage) * 0.62); position: absolute; left: 6%; top: 0; }
.devices .iphone { --w: calc(var(--stage) * 0.31); position: absolute; right: 4%; bottom: 0; }

/* ---------- device frames (pure CSS) ---------- */
.device { position: relative; margin: 0; background: var(--frame); box-shadow: inset 0 0 0 1px var(--frame-edge), 0 1.5rem 3rem -1.5rem var(--shadow); }
/* Frames take their shape from the screenshot: both are portrait, the width is set and the height
   follows the image's own ratio. object-fit means a wrong-shaped file is letterboxed, never stretched. */
.device picture, .device img { display: block; width: 100%; height: auto; max-height: none; }
.device img { object-fit: contain; }
.iphone { --w: clamp(9.5rem, 24vw, 15rem); width: var(--w); padding: calc(var(--w) * 0.035); border-radius: calc(var(--w) * 0.17); }
.iphone img { border-radius: calc(var(--w) * 0.135); aspect-ratio: 1206 / 2622; }
.iphone::after {
  content: "";
  position: absolute;
  top: calc(var(--w) * 0.06);
  left: 50%;
  width: calc(var(--w) * 0.3);
  height: calc(var(--w) * 0.085);
  transform: translateX(-50%);
  border-radius: 999px;
  background: var(--frame);
}
.ipad { --w: min(80vw, 24rem); width: var(--w); padding: calc(var(--w) * 0.04); border-radius: calc(var(--w) * 0.075); }
.ipad img { border-radius: calc(var(--w) * 0.038); aspect-ratio: 1640 / 2360; }
.ipad.landscape { --w: min(92vw, 34rem); padding: calc(var(--w) * 0.03); border-radius: calc(var(--w) * 0.055); }
.ipad.landscape img { border-radius: calc(var(--w) * 0.026); aspect-ratio: 2360 / 1640; }

/* ---------- body sections ---------- */
.band { padding: clamp(3.5rem, 8vw, 6.5rem) 0; }
.band + .band { border-top: 1px solid var(--grid); }
.problem p { font-size: clamp(1.3rem, 2.4vw, 1.65rem); line-height: 1.35; max-width: 34rem; letter-spacing: -0.01em; }
.problem p.punch { font-weight: 700; color: var(--accent); }

.feature .wide { display: grid; gap: clamp(2rem, 5vw, 4rem); align-items: center; }
.feature .copy { max-width: 32rem; }
.feature figure { margin: 0; justify-self: center; }
@media (min-width: 52em) {
  .feature .wide { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .feature.flip figure { order: 2; }
  .feature .iphone { --w: 16rem; }
}

/* feature grid: icon, name, one line */
dl.desk { display: grid; grid-template-columns: repeat(auto-fill, minmax(15.5rem, 1fr)); gap: 2.25rem 2.5rem; margin: 2.25rem 0 0; }
dl.desk div { padding-top: 1.1rem; border-top: 2px solid var(--grid); }
dl.desk dt { font-weight: 700; font-size: 1.15rem; letter-spacing: -0.01em; }
dl.desk dd { margin: 0.3rem 0 0; color: var(--muted); }
.ico { display: block; margin-bottom: 0.7rem; fill: none; stroke: var(--accent); stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }

.proof { background: var(--inv-bg); color: var(--inv-text); }
.proof .muted { color: var(--inv-muted); }
.proof a { color: var(--inv-accent); }
.proof p { max-width: 36rem; }
.proof .wide { display: grid; gap: clamp(2.5rem, 6vw, 4.5rem); align-items: center; }
.proof figure { margin: 0; justify-self: center; }
@media (min-width: 52em) { .proof .wide { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); } }
.proof .big { font-size: clamp(1.4rem, 2.6vw, 1.8rem); line-height: 1.3; letter-spacing: -0.01em; }

ul.notyet { list-style: none; padding: 0; display: grid; gap: 0.5rem 2rem; }
ul.notyet li { margin: 0; padding-left: 1.1rem; position: relative; }
ul.notyet li::before { content: ""; position: absolute; left: 0; top: 0.7em; width: 0.5rem; height: 2px; background: var(--muted); }

.close h2 { font-size: clamp(2.25rem, 5.5vw, 3.75rem); line-height: 1; letter-spacing: -0.03em; max-width: 14ch; }
.close .lede { color: var(--muted); max-width: 32rem; }

/* ---------- sign-up form (index) and the receiver's buttons ---------- */
.signup {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 0.6rem;
  padding: clamp(1.25rem, 3vw, 2rem);
  margin: 2rem 0 0;
  max-width: 36rem;
}
.field { margin-bottom: 1rem; }
.field label { display: block; font-weight: 700; margin-bottom: 0.25rem; }
.field .hint { font-weight: 400; color: var(--muted); font-size: 0.95rem; }
input[type="email"], input[type="text"], textarea {
  width: 100%;
  font: inherit;
  color: var(--text);
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 0.4rem;
  padding: 0.6rem 0.75rem;
}
textarea { min-height: 5rem; resize: vertical; }
.check { display: flex; gap: 0.65rem; align-items: flex-start; margin-bottom: 1.25rem; }
.check input { width: 1.25rem; height: 1.25rem; margin: 0.2rem 0 0; flex: none; accent-color: var(--accent); }
button {
  font: inherit;
  font-weight: 700;
  color: var(--on-accent);
  background: var(--accent);
  border: 2px solid var(--accent);
  border-radius: 0.45rem;
  padding: 0.7rem 1.4rem;
  cursor: pointer;
}
button:hover { text-decoration: underline; }
.signup button + p { margin: 0.85rem 0 0; }
.trap { position: absolute; left: -100vw; width: 1px; height: 1px; overflow: hidden; }

footer.site { border-top: 1px solid var(--grid); padding: 1.75rem 0 2.5rem; color: var(--muted); font-size: 0.95rem; }
footer.site p { margin: 0 0 0.5rem; }
footer.site a { color: var(--muted); }
