/* developer.cat — concepte: programari de quilòmetre zero (etiqueta d'enviament tèrmica) */
:root {
  --mar: #1b3fd0;        /* camp del hero */
  --mar-deep: #142f9e;
  --paper: #ffffff;      /* paper tèrmic */
  --ink: #000000;        /* tinta */
  --groc: #ffd21f;
  --segell: #d42a20;
  --gris: #eef0f3;
  --text: #16181d;
  --muted: #555c6b;
  --rule: #d3d7de;

  --font: "Archivo", "Helvetica Neue", Arial, sans-serif;
  --maxw: 1160px;
  --gutter: clamp(16px, 4vw, 40px);
}

@media (prefers-color-scheme: dark) {
  :root {
    --gris: #12151c;
    --text: #e8eaef;
    --muted: #a2a9b8;
    --rule: #2a303c;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--gris);
  color: var(--text);
  font-family: var(--font);
  font-size: 18px;
  line-height: 1.55;
  font-variation-settings: "wdth" 100;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; }
a:focus-visible { outline: 3px solid var(--groc); outline-offset: 3px; border-radius: 2px; }

.skip {
  position: absolute; left: 16px; top: -60px;
  background: var(--groc); color: var(--ink);
  padding: 10px 14px; font-weight: 700; z-index: 10;
}
.skip:focus { top: 16px; }

/* ---------- Hero ---------- */
.hero {
  background: var(--mar);
  color: #fff;
  padding: 0 var(--gutter) clamp(56px, 9vw, 112px);
  overflow: hidden;
}
.nav {
  max-width: var(--maxw);
  margin: 0 auto;
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
  padding: 22px 0;
}
.brand {
  font-weight: 800;
  font-size: 20px;
  font-variation-settings: "wdth" 125;
  text-decoration: none;
  letter-spacing: -0.01em;
}
.nav-links { display: flex; gap: 28px; }
.nav-links a { text-decoration: none; opacity: .85; font-size: 16px; }
.nav-links a:hover { opacity: 1; text-decoration: underline; text-underline-offset: 5px; }
@media (max-width: 640px) { .nav-links a:not(:last-child) { display: none; } }

.hero-grid {
  max-width: var(--maxw);
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  gap: clamp(40px, 6vw, 80px);
  align-items: center;
  padding-top: clamp(32px, 6vw, 72px);
}
@media (max-width: 960px) {
  .hero-grid { grid-template-columns: minmax(0, 1fr); }
  .label-slot { justify-content: flex-start; padding-right: 14px; }
}

h1 {
  margin: 0 0 28px;
  font-size: clamp(44px, 7.4vw, 96px);
  line-height: 0.95;
  font-weight: 900;
  font-variation-settings: "wdth" 125;
  letter-spacing: -0.03em;
  text-wrap: balance;
}
.lead { font-size: clamp(18px, 1.8vw, 21px); max-width: 34em; margin: 0 0 36px; color: #dfe5ff; }

.actions { display: flex; flex-wrap: wrap; gap: 12px; }
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 50px; padding: 0 26px;
  font-weight: 700; font-size: 17px;
  text-decoration: none;
  border-radius: 4px;
  transition: background-color .15s, color .15s, transform .1s;
}
.btn:active { transform: translateY(1px); }
.btn-solid { background: var(--groc); color: var(--ink); }
.btn-solid:hover { background: #fff; }
.btn-line { border: 2px solid rgba(255,255,255,.7); color: #fff; }
.btn-line:hover { border-color: #fff; background: rgba(255,255,255,.08); }

/* ---------- Etiqueta tèrmica ---------- */
.label-slot { display: flex; justify-content: center; }
.label {
  width: min(100%, 400px);
  background: var(--paper);
  color: var(--ink);
  border: 3px solid var(--ink);
  transform: rotate(-2.5deg);
  box-shadow: 14px 18px 0 var(--mar-deep);
  font-variation-settings: "wdth" 75;
  animation: print 1.1s cubic-bezier(.2,.7,.2,1) .2s both;
}
@keyframes print {
  from { clip-path: inset(0 0 100% 0); transform: rotate(-2.5deg) translateY(-24px); }
  to   { clip-path: inset(0 0 0 0);    transform: rotate(-2.5deg) translateY(0); }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .label { animation: none; }
}

.label-row { padding: 14px 18px; border-bottom: 3px solid var(--ink); }
.label-row:last-child { border-bottom: 0; }
.label-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.label-split { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.label-split .field + .field { border-left: 2px solid var(--ink); padding-left: 16px; }

.field { display: flex; flex-direction: column; }
/* Les etiquetes d'enviament van en majúscules: és el vocabulari del suport */
.k { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; }
.k-gap { margin-top: 10px; }
.v { font-size: 17px; font-weight: 600; line-height: 1.25; }
.v-big { font-size: 28px; font-weight: 900; line-height: 1.05; margin-top: 2px; letter-spacing: -0.01em; }

.stamp {
  flex: none;
  width: 84px; height: 84px;
  border: 4px solid var(--segell);
  border-radius: 50%;
  color: var(--segell);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  font-weight: 800; font-size: 14px; text-transform: uppercase; letter-spacing: .08em;
  line-height: 1;
  transform: rotate(12deg);
  font-variation-settings: "wdth" 100;
}
.stamp span { font-size: 40px; font-weight: 900; letter-spacing: 0; font-variation-settings: "wdth" 125; }

.barcode-row { text-align: center; padding-bottom: 10px; }
.barcode {
  display: block;
  font-family: "Libre Barcode 39", monospace;
  font-size: 64px;
  line-height: 1;
  white-space: nowrap;
  overflow: hidden;
}
.barcode-text { display: block; font-size: 13px; font-weight: 600; letter-spacing: .3em; margin-top: 2px; }

/* ---------- Seccions ---------- */
main { max-width: var(--maxw); margin: 0 auto; padding: 0 var(--gutter); }
.block { padding: clamp(64px, 9vw, 120px) 0 0; }
.block-head { margin-bottom: 36px; max-width: 40em; }
h2 {
  margin: 0 0 10px;
  font-size: clamp(32px, 4.6vw, 56px);
  line-height: 1;
  font-weight: 900;
  font-variation-settings: "wdth" 115;
  letter-spacing: -0.025em;
}
.block-head p { margin: 0; color: var(--muted); font-size: 19px; }

/* Albarà */
.albara {
  width: 100%;
  border-collapse: collapse;
  background: var(--paper);
  color: #16181d;
  border: 2px solid var(--ink);
}
.albara thead th {
  text-align: left;
  font-size: 13px; font-weight: 700;
  font-variation-settings: "wdth" 75;
  text-transform: uppercase; letter-spacing: .06em;
  background: var(--ink); color: var(--paper);
  padding: 10px 20px;
}
.albara tbody tr + tr { border-top: 1px solid #c9ced8; }
.albara tbody th, .albara td { padding: 22px 20px; vertical-align: top; text-align: left; }
.albara tbody th {
  font-size: 22px; font-weight: 800; line-height: 1.15;
  font-variation-settings: "wdth" 110;
  width: 28%;
}
.albara td { color: #3c4250; }
.albara td:last-child { width: 22%; font-weight: 600; color: #16181d; font-variation-settings: "wdth" 80; }

@media (max-width: 760px) {
  .albara thead { display: none; }
  .albara, .albara tbody, .albara tr, .albara th, .albara td { display: block; width: auto !important; }
  .albara tbody th { padding-bottom: 6px; }
  .albara td { padding-top: 0; padding-bottom: 8px; }
  .albara td:last-child { padding-bottom: 22px; }
}

/* Seguiment */
.track {
  list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: repeat(4, 1fr);
  counter-reset: pas;
}
.track li {
  position: relative;
  padding: 40px 24px 0 0;
  counter-increment: pas;
}
.track li::before {
  content: counter(pas);
  position: absolute; top: 0; left: 0;
  width: 26px; height: 26px; border-radius: 50%;
  background: var(--mar); color: #fff;
  font-size: 14px; font-weight: 800;
  display: grid; place-items: center;
  z-index: 1;
}
.track li::after {
  content: "";
  position: absolute; top: 12px; left: 26px; right: 0;
  height: 2px; background: var(--mar);
}
.track li:last-child::after { background: repeating-linear-gradient(90deg, var(--mar) 0 6px, transparent 6px 12px); }
.track h3 { margin: 0 0 8px; font-size: 22px; font-weight: 800; font-variation-settings: "wdth" 110; }
.track p { margin: 0; color: var(--muted); font-size: 17px; }

@media (max-width: 860px) {
  .track { grid-template-columns: 1fr; }
  .track li { padding: 0 0 32px 48px; }
  .track li::after { top: 26px; bottom: 0; left: 12px; right: auto; width: 2px; height: auto; }
  .track li:last-child::after { display: none; }
}

@media (prefers-color-scheme: dark) {
  .track li::before { background: #5b7cff; }
  .track li::after { background: #5b7cff; }
  .track li:last-child::after { background: repeating-linear-gradient(90deg, #5b7cff 0 6px, transparent 6px 12px); }
}

/* Contacte */
.contact { padding-bottom: clamp(72px, 10vw, 128px); }
.contact p { color: var(--muted); font-size: 19px; margin: 0 0 24px; }
.mail {
  display: inline-block;
  font-size: clamp(28px, 6vw, 72px);
  font-weight: 900;
  font-variation-settings: "wdth" 110;
  letter-spacing: -0.03em;
  line-height: 1.05;
  text-decoration: underline;
  text-decoration-thickness: 4px;
  text-underline-offset: 10px;
  text-decoration-color: var(--groc);
  overflow-wrap: anywhere;
}
.mail:hover { text-decoration-color: currentColor; }

.footer {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 28px var(--gutter) 44px;
  border-top: 1px solid var(--rule);
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px 24px;
  color: var(--muted); font-size: 15px;
}
