/* Shopicraft corporate site. One stylesheet, no build step.
   Visual language: the "deal-banner card": flat white, hairline borders,
   #111827 for emphasis, compact pill buttons, green only for achieved states. */

:root {
  --bg: #ffffff;
  --ink: #111827;
  --text: #374151;
  --muted: #6b7280;
  --line: rgba(17, 24, 39, 0.10);
  --line-soft: rgba(17, 24, 39, 0.08);
  --line-strong: rgba(17, 24, 39, 0.16);
  --chip: rgba(17, 24, 39, 0.06);
  --ok-bg: #ecfdf5;
  --ok: #10b981;
  --ok-ink: #059669;
  --err-bg: #fef2f2;
  --err-ink: #b91c1c;
  --radius: 12px;
  --radius-sm: 10px;
  --wrap: 1080px;
  --gutter: 16px;
  --font: "Instrument Sans", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color-scheme: light;
}

@media (min-width: 720px) {
  :root { --gutter: 32px; }
}

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

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

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

a { color: var(--ink); text-decoration-color: var(--line-strong); text-underline-offset: 3px; }
a:hover { text-decoration-color: var(--ink); }

:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; border-radius: 4px; }

h1, h2, h3, h4 { color: var(--ink); margin: 0; font-weight: 600; line-height: 1.2; letter-spacing: -0.01em; }
p { margin: 0; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }
.measure { max-width: 64ch; }

.skip { position: absolute; left: -9999px; top: 8px; background: var(--ink); color: #fff; padding: 8px 12px; border-radius: 999px; font-size: 13px; font-weight: 600; z-index: 10; }
.skip:focus { left: 8px; }

.visually-hidden { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* ---------- Header ---------- */

.site-header { border-bottom: 1px solid var(--line-soft); }
.site-header .wrap { display: flex; align-items: center; gap: 16px; min-height: 60px; }

.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); font-weight: 600; font-size: 16px; letter-spacing: -0.01em; }
.brand img { width: 24px; height: 24px; }

.nav { margin-left: auto; display: flex; align-items: center; gap: 4px; }
.nav a { font-size: 14px; color: var(--text); text-decoration: none; padding: 6px 10px; border-radius: 999px; }
.nav a:hover { color: var(--ink); background: var(--chip); }
.nav a[aria-current="page"] { color: var(--ink); font-weight: 600; }
.nav .lang { margin-left: 6px; border: 1px solid var(--line); font-size: 12px; font-weight: 600; color: var(--ink); padding: 4px 10px; }

@media (max-width: 560px) {
  .nav .hide-sm { display: none; }
  .nav a { padding: 6px 8px; }
}

/* ---------- Buttons and chips ---------- */

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 999px; padding: 8px 14px;
  font: 600 13px/1.2 var(--font);
  text-decoration: none; white-space: nowrap; cursor: pointer;
  border: 1px solid transparent;
  transition: background-color .15s ease, border-color .15s ease;
}
.btn-primary { background: var(--ink); color: #fff; }
.btn-primary:hover { background: #1f2937; }
.btn-secondary { background: #fff; color: var(--ink); border-color: var(--line-strong); }
.btn-secondary:hover { border-color: var(--ink); }
.btn[disabled] { opacity: .55; cursor: default; }

.actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 20px; }

.chip { display: inline-block; font-size: 12px; font-weight: 500; color: var(--text); background: var(--chip); border: 1px solid var(--line-soft); border-radius: 999px; padding: 3px 10px; line-height: 1.5; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 16px; padding: 0; list-style: none; }

/* ---------- Sections ---------- */

main { display: block; }
.section { padding: 56px 0; }
.section + .section { border-top: 1px solid var(--line-soft); }
@media (min-width: 720px) { .section { padding: 80px 0; } }

.section-head { margin-bottom: 28px; max-width: 60ch; }
.section-head h2 { font-size: 26px; }
.section-head p { margin-top: 8px; color: var(--text); }

.lede { font-size: 19px; color: var(--text); max-width: 56ch; }

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

.hero { padding: 56px 0 48px; }
@media (min-width: 720px) { .hero { padding: 96px 0 72px; } }

.hero h1 {
  font-size: clamp(34px, 6.2vw, 60px);
  line-height: 1.06;
  letter-spacing: -0.03em;
  max-width: 17ch;
  text-wrap: balance;
}
.hero .lede { margin-top: 22px; }

/* The shelf: every published app icon in one row. The only colour on the page
   comes from the apps themselves. */
.shelf { margin-top: 44px; display: flex; flex-wrap: wrap; gap: 10px; padding: 0; list-style: none; }
.shelf a { display: block; border-radius: 12px; transition: transform .2s ease; }
.shelf a:hover { transform: translateY(-3px); }
.shelf img { width: 48px; height: 48px; border-radius: 11px; box-shadow: 0 0 0 1px var(--line-soft); }
@media (min-width: 720px) { .shelf img { width: 56px; height: 56px; border-radius: 13px; } }
.shelf-note { margin-top: 12px; font-size: 13px; color: var(--muted); }

@media (prefers-reduced-motion: no-preference) {
  .shelf li { animation: shelf-in .5s cubic-bezier(.2,.7,.2,1) both; }
  .shelf li:nth-child(2) { animation-delay: .03s; } .shelf li:nth-child(3) { animation-delay: .06s; }
  .shelf li:nth-child(4) { animation-delay: .09s; } .shelf li:nth-child(5) { animation-delay: .12s; }
  .shelf li:nth-child(6) { animation-delay: .15s; } .shelf li:nth-child(7) { animation-delay: .18s; }
  .shelf li:nth-child(8) { animation-delay: .21s; } .shelf li:nth-child(9) { animation-delay: .24s; }
  .shelf li:nth-child(10) { animation-delay: .27s; } .shelf li:nth-child(11) { animation-delay: .30s; }
  .shelf li:nth-child(12) { animation-delay: .33s; } .shelf li:nth-child(13) { animation-delay: .36s; }
  .shelf li:nth-child(14) { animation-delay: .39s; }
  @keyframes shelf-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
}
@media (prefers-reduced-motion: reduce) { .shelf a { transition: none; } .shelf a:hover { transform: none; } }

/* ---------- Featured apps ---------- */

.featured { display: grid; gap: 16px; }
@media (min-width: 860px) { .featured { grid-template-columns: 1fr 1fr; } }

.card { border: 1px solid var(--line); border-radius: var(--radius); background: #fff; padding: 24px; }
@media (min-width: 720px) { .card { padding: 32px; } }

.feature-card { display: flex; flex-direction: column; }
.feature-card .app-icon { width: 64px; height: 64px; border-radius: 15px; box-shadow: 0 0 0 1px var(--line-soft); }
.feature-card h3 { font-size: 22px; margin-top: 20px; }
.feature-card p { margin-top: 10px; }
.feature-card .actions { margin-top: auto; padding-top: 24px; }

/* ---------- App index (grouped rows) ---------- */

.groups { display: grid; gap: 0; }
.group { display: grid; gap: 8px; padding: 24px 0 28px; border-top: 1px solid var(--line); }
.group:last-child { border-bottom: 1px solid var(--line); }
@media (min-width: 860px) { .group { grid-template-columns: 240px 1fr; gap: 40px; padding: 28px 0 32px; } }

.group h3 { font-size: 17px; font-weight: 600; }
.group p.group-note { font-size: 14px; color: var(--text); margin-top: 6px; max-width: 30ch; }

.rows { list-style: none; margin: 0; padding: 0; display: grid; column-gap: 32px; }
@media (min-width: 640px) { .rows { grid-template-columns: 1fr 1fr; } }
.rows li { border-bottom: 1px solid var(--line-soft); }
.row { display: grid; grid-template-columns: 40px 1fr; gap: 14px; align-items: start; padding: 14px 0; text-decoration: none; color: inherit; }
.row img { width: 40px; height: 40px; border-radius: 10px; box-shadow: 0 0 0 1px var(--line-soft); }
.row strong { display: block; color: var(--ink); font-weight: 600; font-size: 15px; line-height: 1.35; }
.row span { display: block; font-size: 14px; color: var(--text); line-height: 1.5; margin-top: 2px; }
.row:hover strong { text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--line-strong); }
.row .out { font-size: 12px; color: var(--muted); margin-top: 6px; }

.also { font-size: 13px; color: var(--muted); padding: 12px 0 0; }
.also a { color: var(--text); }

/* ---------- Founder / split ---------- */

.split { display: grid; gap: 24px; align-items: start; }
@media (min-width: 860px) { .split { grid-template-columns: 200px 1fr; gap: 48px; } }

.portrait { width: 96px; height: 96px; border-radius: 50%; border: 1px solid var(--line); display: grid; place-items: center; font-weight: 600; font-size: 26px; color: var(--ink); background: #fff; letter-spacing: -0.02em; }
.split h2 { font-size: 26px; }
.split .body p + p { margin-top: 14px; }
.split .body p:first-of-type { margin-top: 14px; }
.sig { margin-top: 18px; font-size: 14px; color: var(--muted); }

/* ---------- Partner teaser ---------- */

.teaser { display: grid; gap: 16px; align-items: center; }
@media (min-width: 860px) { .teaser { grid-template-columns: 1fr auto; gap: 32px; } }
.teaser h2 { font-size: 22px; }
.teaser p { margin-top: 8px; max-width: 60ch; }
.teaser .actions { margin-top: 0; }

/* ---------- Page header (inner pages) ---------- */

.page-head { padding: 48px 0 8px; }
@media (min-width: 720px) { .page-head { padding: 72px 0 16px; } }
.page-head h1 { font-size: clamp(30px, 4.6vw, 44px); letter-spacing: -0.025em; line-height: 1.1; max-width: 22ch; text-wrap: balance; }
.page-head .lede { margin-top: 16px; }
.crumb { font-size: 13px; margin-bottom: 18px; }
.crumb a { color: var(--muted); }

/* ---------- App page ---------- */

.app-head { display: grid; grid-template-columns: 72px 1fr; gap: 20px; align-items: center; }
.app-head img { width: 72px; height: 72px; border-radius: 17px; box-shadow: 0 0 0 1px var(--line-soft); }
.app-head h1 { font-size: clamp(26px, 4vw, 38px); max-width: none; }
.app-head .tagline { margin-top: 4px; color: var(--text); font-size: 16px; }
@media (max-width: 480px) { .app-head { grid-template-columns: 56px 1fr; gap: 14px; } .app-head img { width: 56px; height: 56px; border-radius: 13px; } }

.app-body { display: grid; gap: 32px; }
@media (min-width: 860px) { .app-body { grid-template-columns: 1.3fr 1fr; gap: 56px; } }
.app-body h2 { font-size: 15px; font-weight: 600; margin-bottom: 10px; }

.ticks { list-style: none; margin: 0; padding: 0; }
.ticks li { position: relative; padding: 12px 0 12px 26px; border-bottom: 1px solid var(--line-soft); font-size: 16px; color: var(--ink); }
.ticks li:first-child { border-top: 1px solid var(--line-soft); }
.ticks li::before { content: ""; position: absolute; left: 2px; top: 20px; width: 12px; height: 7px; border-left: 2px solid var(--ink); border-bottom: 2px solid var(--ink); transform: rotate(-45deg); }

.side { display: grid; gap: 16px; align-content: start; }
.side .card { padding: 20px 22px; }
.side .card p { font-size: 15px; }
.side .card h2 { margin-bottom: 6px; }

.small-list { list-style: none; margin: 0; padding: 0; font-size: 15px; }
.small-list li + li { margin-top: 6px; }

/* ---------- Partners ---------- */

.offer { display: grid; gap: 16px; }
@media (min-width: 860px) { .offer { grid-template-columns: repeat(3, 1fr); } }
.offer .card h3 { font-size: 17px; }
.offer .card p { margin-top: 8px; font-size: 15px; }
.big-figure { display: block; font-size: 34px; font-weight: 600; color: var(--ink); letter-spacing: -0.03em; line-height: 1.1; margin-bottom: 8px; }

.two { display: grid; gap: 16px; }
@media (min-width: 860px) { .two { grid-template-columns: 1fr 1fr; } }
.two .card h3 { font-size: 17px; }
.two .card p { margin-top: 8px; font-size: 15px; }

.steps { list-style: none; counter-reset: step; margin: 0; padding: 0; display: grid; gap: 0; max-width: 68ch; }
.steps li { counter-increment: step; position: relative; padding: 16px 0 16px 44px; border-bottom: 1px solid var(--line-soft); }
.steps li:first-child { border-top: 1px solid var(--line-soft); }
.steps li::before { content: counter(step); position: absolute; left: 0; top: 15px; width: 26px; height: 26px; border-radius: 50%; border: 1px solid var(--line-strong); font-size: 13px; font-weight: 600; color: var(--ink); display: grid; place-items: center; }
.steps strong { color: var(--ink); font-weight: 600; }

.rules { list-style: none; margin: 0; padding: 0; max-width: 68ch; }
.rules li { padding: 12px 0; border-bottom: 1px solid var(--line-soft); }
.rules li:first-child { border-top: 1px solid var(--line-soft); }
.rules strong { color: var(--ink); }

code, .mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .9em; background: var(--chip); border-radius: 6px; padding: 1px 6px; overflow-wrap: anywhere; }

/* ---------- Form ---------- */

.form-card { max-width: 640px; }
.form { display: grid; gap: 18px; }
.field { display: grid; gap: 6px; }
.field label, .field legend { font-size: 14px; font-weight: 600; color: var(--ink); }
.field .hint { font-size: 13px; color: var(--muted); font-weight: 400; }
.field input[type="text"], .field input[type="email"], .field textarea {
  width: 100%; font: 400 16px/1.4 var(--font); color: var(--ink);
  background: #fff; border: 1px solid var(--line-strong); border-radius: var(--radius-sm);
  padding: 10px 12px;
}
.field textarea { min-height: 120px; resize: vertical; }
.field input:focus, .field textarea:focus { outline: none; border-color: var(--ink); box-shadow: 0 0 0 3px var(--chip); }
.field[data-invalid] input, .field[data-invalid] textarea { border-color: var(--err-ink); }
.field .error { font-size: 13px; color: var(--err-ink); }
.field .error:empty { display: none; }

fieldset.field { border: 0; padding: 0; margin: 0; }
.types { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 2px; }
.types label { font-weight: 500; font-size: 13px; color: var(--text); }
.types input { position: absolute; opacity: 0; pointer-events: none; }
.types span { display: inline-block; border: 1px solid var(--line-strong); border-radius: 999px; padding: 7px 14px; cursor: pointer; background: #fff; }
.types input:checked + span { background: var(--ink); color: #fff; border-color: var(--ink); }
.types input:focus-visible + span { outline: 2px solid var(--ink); outline-offset: 2px; }

.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

.form-status { font-size: 14px; border-radius: var(--radius-sm); padding: 12px 14px; }
.form-status:empty { display: none; }
.form-status.is-error { background: var(--err-bg); color: var(--err-ink); border: 1px solid rgba(185, 28, 28, .15); }

.success { border: 1px solid rgba(16, 185, 129, .35); background: var(--ok-bg); border-radius: var(--radius); padding: 24px; }
.success h3 { color: var(--ok-ink); font-size: 18px; }
.success p { margin-top: 6px; color: var(--text); }

/* ---------- Kit ---------- */

.demo { display: grid; gap: 12px; }
.demo dl { display: grid; grid-template-columns: max-content 1fr; gap: 6px 16px; margin: 0; font-size: 15px; }
.demo dt { color: var(--muted); }
.demo dd { margin: 0; color: var(--ink); font-weight: 500; overflow-wrap: anywhere; }

.gallery { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
.shot { border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: #fff; display: flex; flex-direction: column; }
.shot .frame { background: #f9fafb; border-bottom: 1px solid var(--line-soft); aspect-ratio: 4 / 5; display: grid; place-items: center; padding: 14px; }
.shot .frame img { max-height: 100%; width: auto; object-fit: contain; border-radius: 6px; }
.shot figcaption { padding: 14px 16px 16px; display: grid; gap: 4px; flex: 1; }
.shot strong { color: var(--ink); font-size: 15px; }
.shot span { font-size: 14px; color: var(--text); }
.shot a.dl { margin-top: 10px; justify-self: start; }

.placeholder { border: 1px dashed var(--line-strong); border-radius: var(--radius); padding: 28px; color: var(--muted); font-size: 15px; }

/* ---------- Footer ---------- */

.site-footer { border-top: 1px solid var(--line-soft); padding: 48px 0 40px; font-size: 14px; }
.foot-grid { display: grid; gap: 28px; grid-template-columns: 1fr 1fr; }
@media (min-width: 860px) { .foot-grid { grid-template-columns: 1.4fr 1fr 1fr 1fr; } }
.foot-grid h2 { font-size: 13px; font-weight: 600; color: var(--ink); margin-bottom: 10px; }
.foot-grid ul { list-style: none; margin: 0; padding: 0; }
.foot-grid li + li { margin-top: 6px; }
.foot-grid a { color: var(--text); text-decoration: none; }
.foot-grid a:hover { color: var(--ink); text-decoration: underline; }
.foot-brand p { margin-top: 10px; color: var(--muted); max-width: 32ch; }
@media (max-width: 859px) { .foot-brand { grid-column: 1 / -1; } }
.foot-base { margin-top: 36px; padding-top: 20px; border-top: 1px solid var(--line-soft); color: var(--muted); font-size: 13px; display: flex; flex-wrap: wrap; gap: 8px 20px; justify-content: space-between; }

/* ---------- 404 ---------- */
.notfound { padding: 96px 0; }
.notfound h1 { font-size: clamp(30px, 5vw, 44px); letter-spacing: -0.025em; }
.notfound p { margin-top: 12px; }

/* ---------- Rhythm fixes ---------- */
.hero + .section, .page-head + .section { padding-top: 24px; }
@media (min-width: 720px) { .hero + .section, .page-head + .section { padding-top: 40px; } }
.field label .hint { display: block; margin-top: 2px; }
@media (max-width: 480px) {
  .shelf { gap: 8px; }
  .shelf img { width: 44px; height: 44px; border-radius: 10px; }
}

[hidden] { display: none !important; }

/* Kit gallery: figures carry a UA margin; the caption is a column with the download at its foot. */
.shot { margin: 0; }
.shot figcaption { display: flex; flex-direction: column; gap: 4px; }
.shot a.dl { margin-top: auto; align-self: flex-start; }
.shot figcaption span { margin-bottom: 12px; }
