/* Worklea — shared styles
   Palette taken from the shipping room: label paper, marker ink,
   kraft cardboard, a teal "fits" and an amber "over limit". */

:root {
  --paper: #eef1ee;
  --label: #fbfcfa;
  --ink: #1c2735;
  --ink-soft: #4b5868;
  --line: #cfd6d0;
  --kraft: #c7a26b;
  --kraft-dark: #9c7a45;
  --teal: #0b6e68;
  --teal-dark: #08534e;
  --amber: #b9810c;
  --amber-bg: #f6e7c4;

  --measure: 66ch;
  --page: 72rem;
  --gutter: clamp(1rem, 4vw, 2.5rem);

  --step--1: 0.875rem;
  --step-0: 1.0625rem;
  --step-1: 1.25rem;
  --step-2: 1.6rem;
  --step-3: 2.2rem;
  --step-4: clamp(2.4rem, 5.6vw, 4.1rem);
}

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

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: "Archivo", system-ui, sans-serif;
  font-size: var(--step-0);
  line-height: 1.55;
  font-variation-settings: "wdth" 100;
}

img, svg { display: block; max-width: 100%; }

a { color: var(--teal-dark); text-underline-offset: 0.18em; }
a:hover { color: var(--ink); }

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

.skip {
  position: absolute; left: -999px; top: 0.5rem;
  background: var(--ink); color: var(--label); padding: 0.5rem 0.8rem;
}
.skip:focus { left: 0.5rem; z-index: 10; }

.wrap {
  width: 100%;
  max-width: var(--page);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

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

.site-head {
  border-bottom: 1px solid var(--line);
  background: var(--paper);
}
.site-head .wrap {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; min-height: 4.25rem; flex-wrap: wrap;
}
.wordmark {
  font-weight: 700;
  font-variation-settings: "wdth" 112;
  font-size: 1.45rem;
  letter-spacing: -0.02em;
  color: var(--ink);
  text-decoration: none;
  display: inline-flex; align-items: center; gap: 0.55rem;
}
.wordmark svg { width: 1.6rem; height: 1.6rem; }
.site-nav { display: flex; gap: 1.4rem; flex-wrap: wrap; }
.site-nav a {
  color: var(--ink-soft); text-decoration: none; font-weight: 500;
  padding-block: 0.4rem;
}
.site-nav a:hover, .site-nav a[aria-current="page"] {
  color: var(--ink);
  text-decoration: underline; text-decoration-thickness: 2px;
}

.site-foot {
  margin-top: 5rem;
  border-top: 1px solid var(--line);
  padding-block: 2.5rem 3rem;
  color: var(--ink-soft);
  font-size: var(--step--1);
}
.site-foot .wrap {
  display: flex; flex-wrap: wrap; gap: 1rem 2rem; justify-content: space-between;
}
.site-foot nav { display: flex; gap: 1.4rem; flex-wrap: wrap; }
.site-foot a { color: var(--ink-soft); }

/* ---------- Type ---------- */

h1, h2, h3 { margin: 0; line-height: 1.08; color: var(--ink); }

.display {
  font-size: var(--step-4);
  font-weight: 800;
  font-variation-settings: "wdth" 125;
  letter-spacing: -0.02em;
  max-width: 16ch;
}
h2 {
  font-size: var(--step-3);
  font-weight: 750;
  font-variation-settings: "wdth" 118;
  letter-spacing: -0.015em;
  max-width: 22ch;
}
h3 {
  font-size: var(--step-1);
  font-weight: 700;
  font-variation-settings: "wdth" 108;
  line-height: 1.25;
}
p { margin: 0; max-width: var(--measure); }
.lede { font-size: var(--step-1); color: var(--ink-soft); line-height: 1.5; max-width: 52ch; }
.stack > * + * { margin-top: 1rem; }
.stack-lg > * + * { margin-top: 1.5rem; }

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex; align-items: center; gap: 0.5rem;
  min-height: 3rem; padding: 0.7rem 1.3rem;
  font: inherit; font-weight: 650;
  border-radius: 6px;
  border: 2px solid var(--ink);
  text-decoration: none;
  cursor: pointer;
}
.btn-primary { background: var(--ink); color: var(--label); }
.btn-primary:hover { background: var(--teal-dark); border-color: var(--teal-dark); color: var(--label); }
.btn-plain { background: transparent; color: var(--ink); }
.btn-plain:hover { background: var(--label); color: var(--ink); }
.actions { display: flex; flex-wrap: wrap; gap: 0.8rem; align-items: center; }
.note { font-size: var(--step--1); color: var(--ink-soft); }

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

section { padding-block: clamp(3rem, 7vw, 5.5rem); }
section + section { border-top: 1px solid var(--line); }

.hero { padding-block: clamp(3rem, 8vw, 6rem) clamp(3rem, 6vw, 4.5rem); }

.split {
  display: grid; gap: clamp(2rem, 5vw, 4rem);
  grid-template-columns: 1fr;
  align-items: start;
}
@media (min-width: 60rem) {
  .split { grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr); }
  .split-even { grid-template-columns: 1fr 1fr; }
}

/* ---------- Home: app entry ---------- */

.app-entry {
  display: grid; gap: 2rem; grid-template-columns: 1fr;
  background: var(--label);
  border: 1px solid var(--line);
  border-left: 6px solid var(--kraft);
  border-radius: 4px;
  padding: clamp(1.4rem, 4vw, 2.5rem);
}
@media (min-width: 52rem) {
  .app-entry { grid-template-columns: 1.2fr 1fr; align-items: center; }
}
.app-entry .status { color: var(--teal-dark); font-weight: 600; font-size: var(--step--1); }

/* ---------- Steps (a real sequence) ---------- */

.steps {
  list-style: none; margin: 2.5rem 0 0; padding: 0;
  display: grid; gap: 2rem; grid-template-columns: 1fr;
  counter-reset: step;
}
@media (min-width: 52rem) { .steps { grid-template-columns: repeat(3, 1fr); } }
.steps li { counter-increment: step; border-top: 3px solid var(--ink); padding-top: 1rem; }
.steps li::before {
  content: counter(step);
  display: block;
  font-weight: 800; font-variation-settings: "wdth" 125;
  font-size: 2.4rem; line-height: 1; margin-bottom: 0.8rem;
  color: var(--kraft-dark);
}
.steps p { margin-top: 0.5rem; color: var(--ink-soft); }

/* ---------- Plans table ---------- */

.plans {
  width: 100%; margin-top: 2.5rem;
  border-collapse: collapse;
  background: var(--label);
  border: 1px solid var(--line);
  font-size: var(--step-0);
}
.plans th, .plans td {
  text-align: left; vertical-align: top;
  padding: 1rem 1.2rem;
  border-bottom: 1px solid var(--line);
}
.plans thead th { font-weight: 700; font-variation-settings: "wdth" 110; font-size: var(--step-1); }
.plans thead .price { display: block; font-size: var(--step-0); font-weight: 500; color: var(--ink-soft); margin-top: 0.2rem; }
.plans tbody th { font-weight: 500; color: var(--ink-soft); width: 40%; }
.plans .yes { color: var(--teal-dark); font-weight: 600; }
.plans .no { color: var(--ink-soft); }
.plans tr:last-child th, .plans tr:last-child td { border-bottom: 0; }
.plans .col-pro { background: #f1f6f4; }
@media (max-width: 34rem) {
  .plans th, .plans td { padding: 0.8rem 0.7rem; }
  .plans tbody th { width: 46%; }
}

/* ---------- FAQ ---------- */

.faq { margin-top: 2rem; border-top: 1px solid var(--line); max-width: 48rem; }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary {
  cursor: pointer; list-style: none;
  padding: 1.1rem 2.2rem 1.1rem 0;
  font-weight: 650; position: relative;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+"; position: absolute; right: 0.3rem; top: 0.9rem;
  font-size: 1.5rem; font-weight: 400; line-height: 1;
}
.faq details[open] summary::after { content: "–"; }
.faq details > div { padding: 0 0 1.2rem; color: var(--ink-soft); }
.faq details > div > * + * { margin-top: 0.7rem; }

/* ---------- Packing demo (the one loud thing) ---------- */

.packer {
  background: var(--label);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: clamp(1rem, 3vw, 1.6rem);
  box-shadow: 0 1px 0 var(--line), 0 18px 40px -28px rgba(28, 39, 53, 0.45);
}
.packer-order { font-size: var(--step--1); color: var(--ink-soft); }
.packer-order strong { color: var(--ink); }
.packer-control {
  display: grid; grid-template-columns: 1fr auto; gap: 0.3rem 1rem;
  align-items: center; margin-block: 1rem 1.2rem;
}
.packer-control label { font-weight: 650; }
.packer-control output {
  font-weight: 800; font-variation-settings: "wdth" 125;
  font-size: var(--step-2); font-variant-numeric: tabular-nums;
  grid-row: span 2; align-self: center;
}
.packer input[type="range"] {
  width: 100%; accent-color: var(--ink); height: 2rem; margin: 0;
}
.parcels {
  display: flex; flex-wrap: wrap; gap: 0.8rem; align-items: flex-end;
  min-height: 15rem;
}
.parcel {
  flex: 0 0 auto;
  width: 7.4rem;
  display: flex; flex-direction: column;
}
.parcel-box {
  position: relative;
  background: var(--kraft);
  border: 2px solid var(--kraft-dark);
  border-radius: 3px;
  padding: 0.45rem 0.4rem 0.4rem;
  display: flex; flex-direction: column-reverse; gap: 3px;
  min-height: 2.4rem;
}
/* packing tape across the lid */
.parcel-box::before {
  content: ""; position: absolute; left: 50%; top: -2px; bottom: -2px;
  width: 0.7rem; transform: translateX(-50%);
  background: rgba(240, 222, 184, 0.55);
}
.item {
  position: relative;
  z-index: 1;
  background: #ecd9b0;
  border: 1px solid var(--kraft-dark);
  color: var(--ink);
  font-weight: 600;
  border-radius: 2px;
  font-size: 0.72rem; line-height: 1.15;
  padding: 0.2rem 0.3rem;
  overflow: hidden; white-space: nowrap; text-overflow: ellipsis;
}
.parcel-tag {
  margin-top: 0.4rem;
  font-size: var(--step--1); font-weight: 650;
  font-variant-numeric: tabular-nums;
}
.parcel-tag .fit { color: var(--teal-dark); }
.parcel.over .parcel-box { border-color: var(--amber); outline: 3px solid var(--amber-bg); }
.parcel.over .parcel-tag { color: var(--amber); }
.packer-summary {
  margin-top: 1.2rem; padding-top: 1rem; border-top: 1px dashed var(--line);
  font-weight: 600;
}

@media (prefers-reduced-motion: no-preference) {
  .parcel { animation: drop 260ms ease-out both; }
  @keyframes drop { from { transform: translateY(-8px); opacity: 0; } to { transform: none; opacity: 1; } }
}

/* ---------- Legal / long text ---------- */

.prose { max-width: 44rem; }
.prose h2 { font-size: var(--step-2); margin-top: 2.6rem; max-width: none; }
.prose h2:first-of-type { margin-top: 2rem; }
.prose p, .prose ul { margin-top: 0.9rem; }
.prose ul { padding-left: 1.2rem; max-width: var(--measure); }
.prose li + li { margin-top: 0.4rem; }
.prose .updated { color: var(--ink-soft); font-size: var(--step--1); margin-top: 0.8rem; }

.contact-card {
  background: var(--label); border: 1px solid var(--line); border-left: 6px solid var(--teal);
  border-radius: 4px; padding: 1.4rem 1.6rem; max-width: 36rem;
}
.contact-card .email { font-size: var(--step-2); font-weight: 750; font-variation-settings: "wdth" 112; word-break: break-word; }

/* ---------- Contact form ---------- */

.form {
  max-width: 40rem;
  display: grid; gap: 1.25rem;
  margin-top: 2rem;
}
.field { display: grid; gap: 0.4rem; }
.field label { font-weight: 650; }
.field .hint { font-size: var(--step--1); color: var(--ink-soft); }
.field input, .field select, .field textarea {
  font: inherit; color: var(--ink);
  background: var(--label);
  border: 1.5px solid #9aa59d;
  border-radius: 4px;
  padding: 0.7rem 0.8rem;
  width: 100%;
}
.field textarea { min-height: 10rem; resize: vertical; line-height: 1.5; }
.field input:focus-visible, .field select:focus-visible, .field textarea:focus-visible {
  outline: 3px solid var(--teal); outline-offset: 1px; border-color: var(--teal);
}
.field-row { display: grid; gap: 1.25rem; grid-template-columns: 1fr; }
@media (min-width: 40rem) { .field-row { grid-template-columns: 1fr 1fr; } }
.trap { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.form-error {
  max-width: 40rem;
  border-left: 6px solid var(--amber);
  background: var(--amber-bg);
  padding: 0.9rem 1.1rem;
  border-radius: 4px;
  margin-top: 1.5rem;
}
.form-error[hidden] { display: none; }

/* ---------- Home: app catalogue ---------- */

.app-list { list-style: none; margin: 2rem 0 0; padding: 0; display: grid; gap: 1.2rem; }
.app-row {
  display: grid; gap: 1.5rem; grid-template-columns: 1fr;
  background: var(--label);
  border: 1px solid var(--line);
  border-left: 6px solid var(--kraft);
  border-radius: 4px;
  padding: clamp(1.4rem, 4vw, 2.2rem);
}
@media (min-width: 52rem) {
  .app-row { grid-template-columns: 1.3fr 1fr; align-items: center; }
}
.app-row h3 { font-size: var(--step-2); font-variation-settings: "wdth" 118; }
.app-row h3 a { color: var(--ink); text-decoration-thickness: 2px; }
.app-row .status { color: var(--teal-dark); font-weight: 600; font-size: var(--step--1); }
.app-art { margin: 0; max-width: 22rem; justify-self: center; width: 100%; }
.app-row-next { background: transparent; border-style: dashed; border-color: var(--kraft-dark); border-left-width: 6px; }

.traits { margin: 0; display: grid; gap: 1.6rem 2.2rem; grid-template-columns: 1fr; }
@media (min-width: 40rem) { .traits { grid-template-columns: 1fr 1fr; } }
.traits dt { font-weight: 700; font-variation-settings: "wdth" 108; }
.traits dd { margin: 0.35rem 0 0; color: var(--ink-soft); }

/* Smaller cards for the rest of the app family */
.app-more { list-style: none; }
.app-grid { list-style: none; margin: 0; padding: 0; display: grid; gap: 1rem; grid-template-columns: repeat(auto-fill, minmax(min(100%, 16rem), 1fr)); }
.app-card { background: var(--label); border: 1px solid var(--line); border-left: 6px solid var(--kraft); border-radius: 4px; padding: 1.1rem 1.2rem; display: grid; gap: .45rem; align-content: start; }
.app-card h3 { font-size: var(--step-1); margin: 0; }
.app-card h3 a { color: var(--ink); text-decoration-thickness: 2px; }
.app-card p { margin: 0; }
.app-card .price { font-size: var(--step--1); font-weight: 600; }
.app-card .status { color: var(--teal-dark); font-weight: 600; font-size: var(--step--1); }

/* ---------- Platform tags (Shopify, BigCommerce, …) ---------- */
.platforms { margin: 0; display: flex; flex-wrap: wrap; gap: .35rem; }
.tag { display: inline-block; font-size: .78rem; font-weight: 600; letter-spacing: .02em; line-height: 1; padding: .3rem .55rem; border-radius: 999px; background: #e3eee6; color: #2f5d3a; border: 1px solid #c4d9c9; }
.tag-bc { background: #e6e9f4; color: #2c3a73; border-color: #c9cfe6; }
.app-row .platforms { margin-top: .1rem; }
