/* Catnex — un sol full d'estils per a la portada, /preview/ i el 404.
   Traduït del disseny (bundle de Claude Design) sense estils en línia,
   perquè la CSP pugui prescindir d'unsafe-inline. */

@font-face {
  font-family: "Onest";
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url("../fonts/onest-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Onest";
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url("../fonts/onest-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Geist Mono";
  font-style: normal;
  font-weight: 400 500;
  font-display: swap;
  src: url("../fonts/geist-mono-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Geist Mono";
  font-style: normal;
  font-weight: 400 500;
  font-display: swap;
  src: url("../fonts/geist-mono-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --ink: #16161A;
  --paper: #F3F0E8;
  --white: #FFFFFF;
  --accent: #E8551E;
  --text: #3F3C36;
  --muted: #6B675E;
  --line: #DDD8CC;
  --slot: #E6E2D8;
  --dark-dots: #2A2A30;
  --dark-line: #2F2F36;
  --dark-muted: #A8A397;
  --dark-text: #C9C4B8;
  --mono: "Geist Mono", ui-monospace, monospace;
  --gutter: 32px;
}

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

body {
  margin: 0;
  background: var(--paper);
  font-family: "Onest", system-ui, sans-serif;
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--ink); }
a:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }

h1, h2, h3, p { margin: 0; }
img { display: block; }

.page { min-height: 100vh; display: flex; flex-direction: column; }

.wrap {
  max-width: 1200px;
  width: 100%;
  margin: 0 auto;
  padding-left: var(--gutter);
  padding-right: var(--gutter);
}

.eyebrow {
  font-family: var(--mono);
  font-size: 13px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}

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

/* --- Capçalera --- */
/* Fixa a dalt. La franja ocupa tot l'ample perquè el fons tapi el que
   passa per sota; el contingut continua limitat a 1200 px. */
.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(243, 240, 232, 0.94);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
/* Les àncores del menú no han de quedar sota la barra. */
html { scroll-padding-top: 96px; }

.site-header {
  padding-top: 20px;
  padding-bottom: 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
}
.site-header .brand { display: flex; }
.site-header .brand img { height: 56px; width: auto; }

.nav { display: flex; align-items: center; gap: 28px; font-size: 15px; flex-wrap: wrap; }
.nav a { color: var(--ink); }
.nav a:hover { color: var(--accent); }

/* --- Botons --- */
.nav a.pill,
.btn {
  display: inline-block;
  border-radius: 999px;
}
.nav a.pill {
  background: var(--ink);
  color: var(--paper);
  padding: 10px 18px;
  font-weight: 500;
}
.nav a.pill:hover { background: var(--accent); color: var(--ink); }

.btn { font-size: 16px; }
.btn-primary { background: var(--accent); color: var(--ink); padding: 14px 22px; font-weight: 600; }
.btn-primary:hover { background: var(--ink); color: var(--paper); }
.btn-outline { border: 1.5px solid var(--ink); color: var(--ink); padding: 13px 22px; font-weight: 500; }
.btn-outline:hover { background: var(--ink); color: var(--paper); }

/* --- Portada --- */
.hero {
  padding-top: 72px;
  padding-bottom: 96px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 440px), 1fr));
  gap: 56px;
  align-items: center;
}
.hero-copy { display: flex; flex-direction: column; gap: 28px; }
.hero h1 {
  font-size: clamp(40px, 6vw, 68px);
  font-weight: 600;
  letter-spacing: -0.04em;
  line-height: 1;
  text-wrap: balance;
}
.lead {
  font-size: 19px;
  line-height: 1.55;
  color: var(--text);
  max-width: 540px;
  text-wrap: pretty;
}
.actions { display: flex; gap: 12px; flex-wrap: wrap; }

/* Targeta fosca: les cinc àrees unides per la línia del logotip */
.flow {
  background: var(--ink);
  color: var(--paper);
  border-radius: 20px;
  padding: 36px 36px 32px;
  background-image: radial-gradient(var(--dark-dots) 1px, transparent 1px);
  background-size: 18px 18px;
  display: grid;
  grid-template-columns: 20px 1fr;
  column-gap: 18px;
}
.flow .rail { display: flex; flex-direction: column; align-items: center; }
.flow .rail.first { padding-top: 22px; }
.flow .rail.last { padding-bottom: 22px; }
.flow .stem { width: 2px; flex: 1; background: var(--paper); }
.flow .ring {
  width: 12px; height: 12px; flex: none;
  border: 2.5px solid var(--paper); border-radius: 50%;
}
.flow .dot { width: 12px; height: 12px; flex: none; border-radius: 50%; background: var(--accent); }
.flow .row {
  padding: 14px 0;
  border-bottom: 1px solid var(--dark-line);
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: baseline;
}
.flow .row:last-child { border-bottom: 0; }
.flow .row-name { font-size: 20px; font-weight: 500; }
.flow .row-num { font-family: var(--mono); font-size: 11px; color: var(--dark-muted); }

/* --- Seccions --- */
.band { background: var(--white); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section {
  padding-top: 96px;
  padding-bottom: 96px;
  display: flex;
  flex-direction: column;
  gap: 48px;
}
.section-head { display: flex; flex-direction: column; gap: 12px; max-width: 640px; }
.section-head h2 {
  font-size: clamp(32px, 4vw, 44px);
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.05;
  text-wrap: balance;
}

/* Serveis */
.services {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr));
  gap: 40px 28px;
}
.service { border-top: 2px solid var(--ink); padding-top: 22px; display: flex; flex-direction: column; gap: 12px; }
.service .num { font-family: var(--mono); font-size: 12px; color: var(--accent); }
.service h3 { font-size: 23px; font-weight: 600; letter-spacing: -0.02em; }
.service p { font-size: 16px; line-height: 1.55; color: var(--text); text-wrap: pretty; }

/* Treballs */
.section-top { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; flex-wrap: wrap; }
.underline-link {
  font-size: 15px;
  font-weight: 500;
  color: var(--ink);
  border-bottom: 2px solid var(--accent);
  padding-bottom: 2px;
}
.underline-link:hover { color: var(--accent); }

.works {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr));
  gap: 40px 28px;
}
.work { display: flex; flex-direction: column; gap: 16px; color: var(--ink); }
.work:hover { color: var(--accent); }
.work-media {
  aspect-ratio: 4 / 3;
  border-radius: 12px;
  overflow: hidden;
  background: var(--slot);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--muted);
}
.work-body { display: flex; flex-direction: column; gap: 6px; }
.work-meta { display: flex; gap: 10px; font-family: var(--mono); font-size: 12px; color: var(--muted); }
.work h3 { font-size: 22px; font-weight: 600; letter-spacing: -0.02em; }
.work p { font-size: 15px; line-height: 1.5; color: var(--text); text-wrap: pretty; }

/* Procés */
.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); gap: 0; }
.step { display: flex; flex-direction: column; gap: 14px; padding: 0 20px 24px 0; }
.step .track { display: flex; align-items: center; }
.step .track .ring { width: 12px; height: 12px; flex: none; border: 2.5px solid var(--ink); border-radius: 50%; }
.step .track .dot { width: 12px; height: 12px; flex: none; border-radius: 50%; background: var(--ink); }
.step .track .dot.end { background: var(--accent); }
.step .track .line { flex: 1; height: 2px; background: var(--ink); }
.step h3 { font-size: 20px; font-weight: 600; }
.step p { font-size: 15px; line-height: 1.55; color: var(--text); text-wrap: pretty; }

/* Contacte */
.contact { padding: 96px 32px; }
.contact-box {
  max-width: 1136px;
  margin: 0 auto;
  background: var(--ink);
  color: var(--paper);
  border-radius: 24px;
  padding: clamp(40px, 6vw, 80px);
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 360px), 1fr));
  gap: 40px;
  align-items: end;
}
.contact-copy { display: flex; flex-direction: column; gap: 18px; }
.contact-copy h2 {
  font-size: clamp(34px, 4.5vw, 52px);
  font-weight: 600;
  letter-spacing: -0.035em;
  line-height: 1.02;
  text-wrap: balance;
}
.contact-copy p { font-size: 18px; line-height: 1.55; color: var(--dark-text); max-width: 460px; text-wrap: pretty; }
.contact-mail { display: flex; flex-direction: column; gap: 14px; align-items: flex-start; }
.contact-mail a {
  font-size: clamp(24px, 3vw, 34px);
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--paper);
  border-bottom: 3px solid var(--accent);
  padding-bottom: 4px;
  overflow-wrap: anywhere;
}
.contact-mail a:hover { color: var(--accent); }
.contact-mail span { font-family: var(--mono); font-size: 13px; color: var(--dark-muted); }

/* Peu */
.site-footer {
  padding-bottom: 40px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}
.site-footer img { height: 32px; width: auto; }
.site-footer span { font-family: var(--mono); font-size: 12px; color: var(--muted); }

/* --- Portada pública i 404: una sola pantalla --- */
.soon { flex: 1; display: flex; flex-direction: column; justify-content: center; gap: 28px; padding-top: 48px; padding-bottom: 72px; }
.soon h1 {
  font-size: clamp(40px, 6vw, 68px);
  font-weight: 600;
  letter-spacing: -0.04em;
  line-height: 1;
  text-wrap: balance;
  max-width: 900px;
}
.soon .contact-box { margin: 24px 0 0; max-width: none; }

/* --- Mòbil --- */
/* Mòbil: la barra fixa en dues files en comptes de tres, perquè no es
   mengi la pantalla. «Hablemos» puja a la fila del logo; els enllaços
   queden a sota. */
@media (max-width: 600px) {
  .site-header { position: relative; padding-top: 12px; padding-bottom: 12px; row-gap: 10px; }
  .site-header .brand img { height: 44px; }
  .nav { flex-basis: 100%; gap: 20px; font-size: 14px; }
  .nav a.pill {
    position: absolute;
    top: 16px; /* centrat amb el logo: 12 + (44 - 36) / 2 */
    right: var(--gutter);
    height: 36px;
    display: flex;
    align-items: center;
    padding: 0 16px;
  }
}

@media (max-width: 480px) {
  :root { --gutter: 20px; }
  .contact { padding: 72px 20px; }
  .flow { padding: 28px 22px 24px; column-gap: 14px; }
  .flow .row-name { font-size: 18px; }
  .hero { padding-top: 40px; padding-bottom: 72px; }
  .section { padding-top: 72px; padding-bottom: 72px; }
}
