/* Direction 1a "Paper & Ink" - system fonts only, no webfonts. */

:root {
  --paper: #faf7f2;
  --ink: #1c1917;
  --body: #57534e;
  --muted: #78716c;
  --faint: #a8a29e;
  --divider: #e8e2d6;
  --input-border: #d6d0c4;
  --card-border: #e2ddd3;
  --sienna: #a05e2c;
  --green: #65a30d;
  --green-text: #3f6212;
  --green-bg: #f1f0e4;
  --green-border: #dcdcc4;

  --serif: Georgia, "Times New Roman", serif;
  --sans: system-ui, sans-serif;
  --mono: ui-monospace, Menlo, Consolas, monospace;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
  /* Keep the footer on the bottom edge when the page is shorter than the window. */
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}

.main {
  flex: 1 0 auto;
}

a {
  color: inherit;
  text-decoration: none;
}

a:hover {
  opacity: .75;
}

.serif {
  font-family: var(--serif);
}

/* Rules run the full width of the window; the content inside stays centred. */
.band {
  width: 100%;
}

.band-top {
  border-top: 1px solid var(--divider);
}

.band-bottom {
  border-bottom: 1px solid var(--divider);
}

.wrap {
  max-width: 1060px;
  margin: 0 auto;
}

/* ---------- nav ---------- */

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 22px 48px;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 10px;
}

.nav-mark {
  width: 26px;
  height: 26px;
  flex: none;
  background: var(--ink);
  border-radius: 6px;
  display: grid;
  place-items: center;
  color: var(--paper);
  font-family: var(--serif);
  font-weight: 700;
  font-size: 13px;
}

.nav-word {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 17px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 24px;
  font-size: 14px;
  font-weight: 500;
  color: var(--body);
}

.nav-cta {
  background: var(--ink);
  color: var(--paper);
  font-weight: 600;
  padding: 9px 18px;
  border-radius: 999px;
  white-space: nowrap;
}

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

.hero {
  padding: 56px 48px 36px;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 32px;
}

.hero h1 {
  margin: 0;
  font-family: var(--serif);
  font-weight: 500;
  font-size: 52px;
  line-height: 1.05;
  letter-spacing: -.01em;
}

.hero h1 em {
  font-style: italic;
  color: var(--sienna);
}

.caret {
  display: inline-block;
  width: 3px;
  height: .82em;
  background: var(--sienna);
  margin-left: 3px;
  vertical-align: -.08em;
  animation: blink 1s steps(1) infinite;
}

@keyframes blink {
  50% { opacity: 0; }
}

.hero-sub {
  margin: 16px 0 0;
  font-size: 17px;
  color: var(--body);
  max-width: 46ch;
}

.trust {
  flex: none;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 600;
  color: var(--green-text);
  background: var(--green-bg);
  border: 1px solid var(--green-border);
  border-radius: 999px;
  padding: 8px 14px;
}

.trust-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--green);
}

/* ---------- tool ---------- */

.tool {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 28px;
  padding: 0 48px 48px;
  scroll-margin-top: 16px;
}

.stage {
  background: var(--ink);
  border-radius: 10px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.stage.is-over {
  outline: 2px dashed var(--sienna);
  outline-offset: -6px;
}

.stage canvas {
  width: 100%;
  display: block;
  border-radius: 6px;
}

.stage-actions {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 12px;
}

.stage-hint {
  font-size: 14px;
  color: var(--faint);
}

.stage-pick {
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  color: var(--paper);
  background: none;
  border: 1px solid #57534e;
  border-radius: 6px;
  padding: 6px 14px;
  font-family: inherit;
}

.stage-note {
  margin: 0;
  font-size: 12.5px;
  color: var(--muted);
  text-align: center;
}

.controls {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.label,
.labelrow {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--muted);
}

.label {
  display: block;
  margin-bottom: 6px;
}

.labelrow {
  display: flex;
  justify-content: space-between;
  margin-bottom: 4px;
}

.mono {
  font-family: var(--mono);
  font-weight: 500;
  font-size: 12px;
  text-transform: none;
  letter-spacing: 0;
}

.text-input {
  width: 100%;
  font: 400 16px var(--sans);
  padding: 11px 14px;
  border: 1px solid var(--input-border);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
}

input[type=range] {
  width: 100%;
  margin: 0;
  accent-color: var(--sienna);
}

.swatches {
  display: flex;
  gap: 10px;
  align-items: center;
}

.swatch {
  width: 28px;
  height: 28px;
  padding: 0;
  border-radius: 50%;
  cursor: pointer;
  border: 1px solid var(--input-border);
  background: var(--swatch);
}

.swatch.is-selected {
  border: 3px solid var(--sienna);
}

/* Custom colour: a native picker dressed as a fifth swatch. */
.swatch-custom {
  position: relative;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 1px solid var(--input-border);
  overflow: hidden;
  cursor: pointer;
  background:
    conic-gradient(#b91c1c, #a05e2c, #65a30d, #2563eb, #7c3aed, #b91c1c);
}

.swatch-custom.is-selected {
  border: 3px solid var(--sienna);
}

.swatch-custom input {
  position: absolute;
  inset: -8px;
  width: 200%;
  height: 200%;
  border: 0;
  padding: 0;
  opacity: 0;
  cursor: pointer;
}

.toggle {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  font-weight: 500;
  color: var(--body);
  cursor: pointer;
}

.toggle input {
  width: 16px;
  height: 16px;
  accent-color: var(--sienna);
  margin: 0;
}

.download {
  margin-top: 6px;
  cursor: pointer;
  font: 600 16px var(--sans);
  background: var(--ink);
  color: var(--paper);
  border: none;
  border-radius: 8px;
  padding: 14px;
  width: 100%;
}

.controls-foot {
  margin: 0;
  font-size: 12px;
  color: var(--faint);
  text-align: center;
}

.controls-foot button {
  color: var(--sienna);
  text-decoration: underline;
  background: none;
  border: 0;
  padding: 0;
  font: inherit;
  cursor: pointer;
}

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

.strip {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
}

.strip > div {
  padding: 28px 48px;
  border-right: 1px solid var(--divider);
}

.strip > div:last-child {
  border-right: 0;
}

.strip h3 {
  margin: 0 0 6px;
  font-family: var(--serif);
  font-weight: 600;
  font-size: 19px;
}

.strip h3 span {
  color: var(--green);
  margin-right: 8px;
}

.strip p {
  margin: 0;
  font-size: 14px;
  color: var(--body);
}

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

.foot {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 48px;
  font-size: 13px;
  color: var(--faint);
}

.foot a {
  color: var(--muted);
}

/* ---------- privacy page ---------- */

.prose {
  padding: 48px 48px 56px;
  max-width: 62ch;
}

.prose h1 {
  margin: 0 0 14px;
  font-family: var(--serif);
  font-weight: 500;
  font-size: 40px;
  line-height: 1.1;
  letter-spacing: -.01em;
}

.prose h2 {
  margin: 32px 0 8px;
  font-family: var(--serif);
  font-weight: 600;
  font-size: 19px;
}

.prose p {
  margin: 0;
  font-size: 15px;
  line-height: 1.65;
  color: var(--body);
}

/* ---------- responsive (not specified in the handoff) ---------- */

@media (max-width: 860px) {
  .nav,
  .hero,
  .foot {
    padding-left: 24px;
    padding-right: 24px;
  }

  .tool {
    grid-template-columns: 1fr;
    padding: 0 24px 32px;
  }

  .hero {
    padding-top: 36px;
    flex-direction: column;
    align-items: flex-start;
    gap: 20px;
  }

  .hero h1 {
    font-size: clamp(32px, 7.5vw, 52px);
  }

  /* Keep the image visible while the sliders are being dragged. */
  .stage {
    position: sticky;
    top: 8px;
    z-index: 5;
  }

  /* The pinned card has to leave room for the controls scrolling under it. */
  .stage canvas {
    max-height: 28vh;
    object-fit: contain;
  }

  .strip {
    grid-template-columns: 1fr;
  }

  .strip > div {
    padding: 22px 24px;
    border-right: 0;
    border-bottom: 1px solid var(--divider);
  }

  .strip > div:last-child {
    border-bottom: 0;
  }

  .prose {
    padding: 32px 24px 40px;
  }

  .prose h1 {
    font-size: 30px;
  }
}

@media (max-width: 560px) {
  .nav {
    padding: 16px 20px;
  }

  .nav-links {
    gap: 14px;
    font-size: 13px;
  }

  /* The tool sits directly below the fold here, so the CTA only crowds the nav. */
  .nav-cta {
    display: none;
  }

  .foot {
    flex-direction: column;
    gap: 6px;
  }
}

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