/* landing.css — a quiet, paper-and-ink page for the QL-700 Label Studio guide.
   Warm off-white ground (thermal paper), near-black ink, one muted accent used
   only where it means something (the cut-line coral on cut marks and callouts). */
:root {
  --paper: oklch(96.5% 0.008 80);
  --paper-2: oklch(93.5% 0.010 80);
  --ink: oklch(22% 0.012 60);
  --ink-2: oklch(42% 0.012 60);
  --ink-3: oklch(60% 0.010 60);
  --rule: oklch(86% 0.010 80);
  --accent: oklch(58% 0.14 28);      /* cut-line coral, toned down */
  --accent-soft: oklch(94% 0.03 28);
  --sans: "IBM Plex Sans", "Segoe UI", system-ui, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, Consolas, monospace;
  --measure: 62ch;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font-family: var(--sans); font-size: 17px; line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-underline-offset: 3px; text-decoration-color: var(--ink-3); }
a:hover { text-decoration-color: var(--ink); }
b { font-weight: 600; }
i { font-style: normal; color: var(--ink); font-weight: 500; }
code, kbd { font-family: var(--mono); font-size: 0.86em; background: var(--paper-2); padding: 1px 6px; border-radius: 3px; }
img { max-width: 100%; height: auto; display: block; }
.hidden { display: none !important; }
.muted { color: var(--ink-2); }

.btn {
  display: inline-block; padding: 9px 16px; border-radius: 6px; border: 1px solid var(--ink);
  color: var(--ink); text-decoration: none; font-weight: 500; font-size: 15px; line-height: 1.2;
  transition: background .15s cubic-bezier(.22,1,.36,1), color .15s cubic-bezier(.22,1,.36,1);
}
.btn:hover { background: var(--ink); color: var(--paper); }
.btn.primary { background: var(--ink); color: var(--paper); }
.btn.primary:hover { background: oklch(32% 0.012 60); }
.quiet { color: var(--ink-2); text-decoration: none; margin-left: 18px; }
.quiet:hover { color: var(--ink); }

/* header */
.top {
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
  max-width: 1080px; margin: 0 auto; padding: 22px 28px;
}
.brand { font-weight: 600; text-decoration: none; letter-spacing: -0.01em; }
.top nav { display: flex; align-items: center; gap: 22px; font-size: 15px; }
.top nav a:not(.btn) { color: var(--ink-2); text-decoration: none; }
.top nav a:not(.btn):hover { color: var(--ink); }

/* layout */
main { max-width: 1080px; margin: 0 auto; padding: 0 28px; }
.sec { padding: clamp(40px, 7vw, 72px) 0 0; }
.sec > h2 { font-size: clamp(22px, 2.6vw, 28px); font-weight: 600; letter-spacing: -0.015em; margin: 0 0 18px; }
.sec > p { max-width: var(--measure); margin: 0 0 22px; color: var(--ink-2); }
.sec > p i, .sec > p b { color: var(--ink); }

/* hero: text on the left, the printed strip on the right */
.hero { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: clamp(32px, 6vw, 80px); align-items: center; padding: clamp(32px, 6vw, 64px) 0 12px; }
.hero p { color: var(--ink-2); margin: 0 0 22px; max-width: 46ch; }
.cta { display: flex; align-items: center; flex-wrap: wrap; }
.notice { font-size: 15px; padding: 10px 14px; background: var(--accent-soft); border-radius: 6px; color: var(--ink); }

.strip { margin: 0; }
.paper { position: relative; background: #fbfaf7; border: 1px solid var(--rule); box-shadow: 0 1px 0 var(--rule), 0 24px 48px -32px oklch(30% 0.02 60 / 0.5); }
.paper img { image-rendering: auto; }
.cutmark { position: absolute; top: -1px; bottom: -1px; border-left: 2px dashed var(--accent); }
.cutmark::before { content: "✂"; position: absolute; top: -22px; left: -8px; color: var(--accent); font-size: 14px; background: var(--paper); padding: 0 3px; }
.strip figcaption { font-size: 14px; color: var(--ink-3); margin-top: 14px; }

/* annotated editor screenshot: numbered pins with hover / focus / tap tooltips */
.annot { position: relative; margin: 0; }
.annot > img { border: 1px solid var(--rule); border-radius: 6px; }
.pin {
  position: absolute; transform: translate(-50%, -50%); width: 26px; height: 26px; border-radius: 50%; border: 0; padding: 0;
  background: var(--accent); color: #fff; font: 600 14px/1 var(--sans); display: grid; place-items: center; cursor: pointer;
  box-shadow: 0 0 0 3px var(--paper); transition: box-shadow .15s cubic-bezier(.22,1,.36,1);
}
.pin:hover, .pin:focus-visible, .pin.open { box-shadow: 0 0 0 3px var(--paper), 0 0 0 5px var(--accent); z-index: 3; }
.pin:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }
.tip {
  position: absolute; top: calc(100% + 10px); left: 50%; transform: translateX(-50%);
  width: max-content; max-width: min(280px, 78vw); padding: 10px 13px; border-radius: 8px; text-align: left;
  background: var(--ink); color: var(--paper); font: 400 14px/1.45 var(--sans); cursor: default;
  box-shadow: 0 10px 30px -10px oklch(20% 0.02 60 / 0.6);
  opacity: 0; visibility: hidden; transition: opacity .12s ease-out, visibility .12s;
}
.tip b { display: block; color: #fff; font-weight: 600; margin-bottom: 3px; }
.tip i { color: #fff; }
.tip kbd { background: oklch(35% 0.012 60); color: #fff; border: 0; }
.tip::before { content: ""; position: absolute; bottom: 100%; left: 50%; margin-left: -6px; border: 6px solid transparent; border-bottom-color: var(--ink); }
.pin:hover .tip, .pin:focus-visible .tip, .pin.open .tip { opacity: 1; visibility: visible; }
/* anchor the bubble to the pin's edge near the screenshot's sides, or open upward near the bottom */
.pin.tip-left .tip { left: -8px; transform: none; }
.pin.tip-left .tip::before { left: 14px; margin-left: 0; }
.pin.tip-right .tip { left: auto; right: -8px; transform: none; }
.pin.tip-right .tip::before { left: auto; right: 14px; margin-left: 0; }
.pin.tip-up .tip { top: auto; bottom: calc(100% + 10px); }
.pin.tip-up .tip::before { bottom: auto; top: 100%; border-bottom-color: transparent; border-top-color: var(--ink); }

/* numbered steps with inline crops */
.steps { list-style: none; padding: 0; margin: 0; counter-reset: s; max-width: 760px; }
.steps li { counter-increment: s; position: relative; padding: 0 0 26px 44px; }
.steps li::before { content: counter(s); position: absolute; left: 0; top: 0; font-family: var(--mono); color: var(--ink-3); font-size: 15px; line-height: 1.55; }
.steps p { margin: 0 0 12px; color: var(--ink-2); }
.steps p b, .steps p i { color: var(--ink); }
.steps img { border: 1px solid var(--rule); border-radius: 6px; }
.steps img[src$="toolbar.png"] { max-width: 640px; }
.steps img[src$="connect.png"] { max-width: 220px; }
.steps img[src$="canvas.png"] { max-width: 640px; }
.sec > img.shadow { max-width: 820px; }
.shadow { border: 1px solid var(--rule); border-radius: 6px; }
.pair { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; align-items: start; }

/* setup */
.setup { max-width: 760px; padding-left: 22px; margin: 0 0 8px; }
.setup > li { margin: 0 0 18px; color: var(--ink-2); }
.setup > li b, .setup > li i { color: var(--ink); }
.setup ol { margin: 8px 0; padding-left: 20px; }
.setup ol li { margin: 4px 0; }
.setup .note { display: block; margin-top: 8px; padding: 8px 12px; background: var(--accent-soft); border-radius: 6px; font-size: 15px; color: var(--ink); }

/* reset */
#revert ol { max-width: var(--measure); padding-left: 22px; margin: 0 0 18px; color: var(--ink-2); }
#revert li { margin: 4px 0; }
#revert li b, #revert li i { color: var(--ink); }

/* problems */
dl { display: grid; grid-template-columns: max-content 1fr; gap: 14px 32px; max-width: 860px; margin: 0; }
dt { font-weight: 600; }
dd { margin: 0; color: var(--ink-2); }
dd i, dd em { color: var(--ink); }
dd em { font-style: italic; }
dd ol { margin: 0; padding-left: 20px; }
dd li { margin: 2px 0; }

.foot {
  display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  max-width: 1080px; margin: clamp(56px, 8vw, 96px) auto 0; padding: 24px 28px 48px; border-top: 1px solid var(--rule);
  font-size: 15px; color: var(--ink-2);
}

@media (max-width: 860px) {
  .hero { grid-template-columns: 1fr; }
  .pair { grid-template-columns: 1fr; }
  dl { grid-template-columns: 1fr; gap: 4px 0; }
  dd { margin-bottom: 12px; }
  .top nav a:not(.btn) { display: none; }
  .pin { width: 22px; height: 22px; font-size: 12px; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } .btn { transition: none; } }
