@font-face {
  font-family: "Archivo";
  src: url("fonts/archivo-latin-wdth-normal.woff2") format("woff2");
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-style: normal;
  font-display: swap;
}

:root {
  color-scheme: dark;
  --bg: #11110f;
  --bg-raised: #191916;
  --fg: #f4eedf;
  --fg-soft: #cfc7b4;
  --muted: #9a9384;
  --line: rgba(244, 238, 223, 0.16);
  --line-strong: rgba(244, 238, 223, 0.34);
  --accent: #ffd426;
  --danger: #ff8f7a;
  --max: 84rem;
  --pad: 1.25rem;
  --header-h: 4rem;
  --font: "Archivo", "Helvetica Neue", Helvetica, Arial, sans-serif;
}

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

html {
  background: var(--bg);
  scroll-behavior: smooth;
  scroll-padding-top: var(--header-h);
  -webkit-text-size-adjust: 100%;
}

body {
  min-width: 320px;
  margin: 0;
  color: var(--fg);
  background: var(--bg);
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

::selection {
  color: var(--bg);
  background: var(--accent);
}

a {
  color: inherit;
}

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

h1,
h2,
h3,
p {
  margin: 0;
}

h1,
h2 {
  font-stretch: 62%;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: -0.005em;
  text-wrap: balance;
}

h2 {
  max-width: 18ch;
  font-size: clamp(2.5rem, 6.2vw, 5.25rem);
  line-height: 0.92;
}

.wrap {
  width: min(100%, var(--max));
  margin-inline: auto;
  padding-inline: var(--pad);
}

.lead {
  max-width: 60ch;
  margin-top: 1.5rem;
  color: var(--fg-soft);
  font-size: 1.2rem;
}

.skip-link {
  position: fixed;
  top: 0.75rem;
  left: 0.75rem;
  z-index: 30;
  padding: 0.6rem 0.9rem;
  color: var(--bg);
  background: var(--accent);
  font-weight: 700;
  text-decoration: none;
  transform: translateY(-200%);
}

.skip-link:focus {
  transform: none;
}

/* Capçalera */

.site-header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 20;
  height: var(--header-h);
  border-bottom: 1px solid transparent;
  transition: background-color 200ms ease, border-color 200ms ease;
}

.site-header.is-solid {
  border-bottom-color: var(--line);
  background: rgba(17, 17, 15, 0.92);
}

.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  height: 100%;
}

.brand {
  display: inline-flex;
  align-items: center;
  min-height: 2.75rem;
  font-weight: 800;
  text-decoration: none;
  white-space: nowrap;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.site-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 2.75rem;
  padding-inline: 0.7rem;
  color: var(--fg-soft);
  font-size: 0.95rem;
  text-decoration: none;
}

.site-nav a:hover {
  color: var(--fg);
}

.site-nav .lang {
  margin-left: 0.4rem;
  padding-inline: 0.6rem;
  border: 1px solid var(--line-strong);
  min-height: 2rem;
  color: var(--fg);
  font-size: 0.8rem;
  font-weight: 700;
}

.site-nav .lang:hover {
  border-color: var(--accent);
}

/* Portada */

.hero {
  position: relative;
  display: flex;
  align-items: flex-end;
  min-height: 100dvh;
  overflow: hidden;
  isolation: isolate;
}

.hero-art {
  position: absolute;
  inset: 0;
  z-index: -1;
}

.hero-art canvas {
  display: block;
  width: 100%;
  height: 100%;
}

.hero-art::after {
  position: absolute;
  inset: 0;
  content: "";
  background: linear-gradient(0deg, rgba(17, 17, 15, 1) 0%, rgba(17, 17, 15, 0.66) 34%, rgba(17, 17, 15, 0) 66%);
  pointer-events: none;
}

.hero-copy {
  padding-top: calc(var(--header-h) + 2rem);
  padding-bottom: clamp(2.5rem, 7vh, 5rem);
}

.hero h1 {
  font-size: clamp(2.9rem, 8.2vw, 7.5rem);
  line-height: 0.88;
}

.hero h1 em {
  color: var(--accent);
  font-style: normal;
}

.hero-sub {
  max-width: 44ch;
  text-shadow: 0 0 1.25rem var(--bg), 0 0 0.4rem var(--bg);
  margin-top: 1.75rem;
  color: var(--fg-soft);
  font-size: 1.2rem;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 2rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 3.1rem;
  padding: 0 1.5rem;
  border: 1px solid var(--accent);
  border-radius: 0;
  color: var(--bg);
  background: var(--accent);
  font: inherit;
  font-weight: 800;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: transform 120ms ease, background-color 160ms ease, color 160ms ease;
}

.btn:hover {
  background: #ffe066;
}

.btn:active {
  transform: translateY(1px);
}

.btn-ghost {
  border-color: var(--line-strong);
  color: var(--fg);
  background: rgba(17, 17, 15, 0.6);
}

.btn-ghost:hover {
  border-color: var(--fg);
  background: rgba(17, 17, 15, 0.85);
}

.btn[disabled] {
  opacity: 0.55;
  cursor: progress;
}

/* Seccions */

.section {
  padding-block: clamp(4.5rem, 11vw, 8.5rem);
}

/* Serveis: files de dues columnes */

.rows {
  margin: 3rem 0 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--line-strong);
}

.rows li {
  display: grid;
  gap: 0.4rem 2rem;
  padding-block: 1.5rem;
}

.rows li + li {
  border-top: 1px solid var(--line);
}

.rows h3 {
  font-size: 1.5rem;
  font-weight: 700;
  line-height: 1.15;
}

.rows p {
  max-width: 58ch;
  color: var(--fg-soft);
}

/* Seguretat: banda amb graella de dotze columnes */

.security {
  background: var(--bg-raised);
}

.kicker {
  margin-bottom: 1.1rem;
  color: var(--accent);
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.sec-grid {
  display: grid;
  gap: 2.5rem 2.5rem;
  margin: 3.5rem 0 0;
  padding: 0;
  list-style: none;
}

.sec-grid li {
  padding-top: 1.25rem;
  border-top: 1px solid var(--line-strong);
}

.sec-grid li:first-child {
  border-top: 3px solid var(--accent);
}

.sec-grid h3 {
  font-size: 1.35rem;
  font-weight: 700;
  line-height: 1.15;
}

.sec-grid li:first-child h3 {
  font-size: clamp(1.6rem, 2.6vw, 2.2rem);
}

.sec-grid p {
  max-width: 52ch;
  margin-top: 0.6rem;
  color: var(--fg-soft);
}

.scope {
  max-width: 62rem;
  margin-top: 4.5rem;
  padding-left: 1.5rem;
  border-left: 3px solid var(--accent);
}

.scope p {
  font-size: clamp(1.3rem, 2.3vw, 1.85rem);
  font-weight: 600;
  line-height: 1.3;
  text-wrap: pretty;
}

/* Mètode: quatre passos en línia */

.steps {
  display: grid;
  gap: 2rem;
  margin: 3rem 0 0;
  padding: 0;
  list-style: none;
  counter-reset: step;
}

.steps li {
  counter-increment: step;
}

.steps li::before {
  display: block;
  margin-bottom: 0.9rem;
  content: counter(step);
  color: var(--accent);
  font-stretch: 62%;
  font-size: 3.5rem;
  font-weight: 800;
  line-height: 1;
}

.steps h3 {
  font-size: 1.3rem;
  font-weight: 700;
}

.steps p {
  margin-top: 0.4rem;
  color: var(--fg-soft);
}

/* Contacte */

.contact-direct {
  margin-top: 3.5rem;
}

.direct {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 2.5rem;
  font-size: 1.35rem;
  font-weight: 700;
}

.direct a {
  width: fit-content;
  text-decoration-color: var(--accent);
  text-decoration-thickness: 2px;
  text-underline-offset: 0.25em;
}

.direct a:hover {
  color: var(--accent);
}

.note {
  max-width: 60ch;
  margin-top: 1.25rem;
  color: var(--muted);
  font-size: 0.95rem;
}

.form {
  display: grid;
  gap: 1rem;
  margin-top: 3rem;
}

/* Com al formulari antic: nom i correu, missatge i botó, de costat. */
.form-row,
.form-col {
  display: grid;
  gap: 0.75rem 1.5rem;
  align-content: start;
}

.form-col-message,
.form-col-message .field {
  grid-template-rows: auto 1fr auto;
  height: 100%;
}

.form-col-message {
  grid-template-rows: 1fr;
}

.form-col-send .btn {
  width: 100%;
}

.field {
  display: grid;
  gap: 0.5rem;
}

.field label {
  font-size: 0.95rem;
  font-weight: 700;
}

.field input,
.field textarea {
  width: 100%;
  padding: 0.85rem 0.95rem;
  border: 1px solid var(--line-strong);
  border-radius: 0;
  color: var(--fg);
  background: var(--bg-raised);
  font: inherit;
}

.field textarea {
  height: 100%;
  min-height: 9.5rem;
  resize: vertical;
}

.field input:focus-visible,
.field textarea:focus-visible {
  border-color: var(--accent);
  outline-offset: 0;
}

.field input[aria-invalid="true"],
.field textarea[aria-invalid="true"] {
  border-color: var(--danger);
}

.field .error {
  min-height: 1.2em;
  color: var(--danger);
  font-size: 0.9rem;
}

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

.captcha {
  min-height: 65px;
}

.form-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem 1.5rem;
}

.form-foot small {
  color: var(--muted);
  font-size: 0.9rem;
}

.form-status {
  min-height: 1.5em;
  font-weight: 700;
}

.form-status[data-state="ok"] {
  color: var(--accent);
}

.form-status[data-state="error"] {
  color: var(--danger);
}

/* Peu */

.site-footer {
  padding-block: 2.5rem 3rem;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.95rem;
}

.site-footer .wrap {
  display: grid;
  gap: 1.5rem;
}

.site-footer address {
  font-style: normal;
}

.foot-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
}

.foot-links a:hover {
  color: var(--fg);
}

/* Aparició en entrar a pantalla: només CSS, i només si el navegador ho admet */

@media (prefers-reduced-motion: no-preference) {
  @supports (animation-timeline: view()) {
    .reveal {
      animation: reveal linear both;
      animation-timeline: view();
      animation-range: entry 0% entry 55%;
    }
  }

  .hero-copy > * {
    animation: rise 700ms cubic-bezier(0.16, 1, 0.3, 1) both;
  }

  .hero-copy > :nth-child(2) {
    animation-delay: 90ms;
  }

  .hero-copy > :nth-child(3) {
    animation-delay: 180ms;
  }
}

@keyframes reveal {
  from {
    opacity: 0;
    transform: translateY(1.5rem);
  }
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(1.25rem);
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}

@media (min-width: 48rem) {
  :root {
    --pad: 2.5rem;
  }

  .hero-art::after {
    background:
      linear-gradient(90deg, rgba(17, 17, 15, 0.6) 0%, rgba(17, 17, 15, 0.2) 38%, rgba(17, 17, 15, 0) 60%),
      linear-gradient(0deg, rgba(17, 17, 15, 1) 0%, rgba(17, 17, 15, 0.72) 30%, rgba(17, 17, 15, 0.5) 50%, rgba(17, 17, 15, 0) 66%);
  }

  .rows li {
    grid-template-columns: minmax(14rem, 0.42fr) 1fr;
    align-items: baseline;
  }

  .sec-grid {
    grid-template-columns: repeat(12, 1fr);
  }

  .sec-grid li {
    grid-column: span 5;
  }

  .sec-grid li:nth-child(4n + 1),
  .sec-grid li:nth-child(4n) {
    grid-column: span 7;
  }

  .steps {
    grid-template-columns: repeat(4, 1fr);
  }

  .site-footer .wrap {
    grid-template-columns: 1fr auto;
    align-items: end;
  }
}

@media (min-width: 56rem) {
  .form-row {
    grid-template-columns: 4fr 6fr 2fr;
    align-items: stretch;
  }

  /* El botó queda a l'altura del quadre de missatge, sota la línia de l'etiqueta. */
  .form-col-send {
    padding-top: calc(0.95rem * 1.55 + 0.5rem);
  }
}

@media (max-width: 30rem) {
  .site-nav a:not(.lang):not(.keep) {
    display: none;
  }
}

/* Marca invisible: mentre és a pantalla, la capçalera és transparent. */
[data-header-sentinel] {
  position: absolute;
  top: 0;
  left: 0;
  width: 1px;
  height: 55dvh;
  pointer-events: none;
}
