/* Simplon Norm — pujada pel client. Substitut funcional de Simplon Mono
   (T1 Korium pendent, fem servir Anton com a display) */
@font-face{
  font-family: "Simplon Norm";
  src: url("../fonts/SimplonNorm-Light.woff") format("woff");
  font-weight: 300; font-style: normal; font-display: swap;
}
@font-face{
  font-family: "Simplon Norm";
  src: url("../fonts/SimplonNorm-Regular.woff") format("woff");
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face{
  font-family: "Simplon Norm";
  src: url("../fonts/SimplonNorm-Medium.woff") format("woff");
  font-weight: 500; font-style: normal; font-display: swap;
}
@font-face{
  font-family: "Simplon Norm";
  src: url("../fonts/SimplonNorm-Bold.woff") format("woff");
  font-weight: 700; font-style: normal; font-display: swap;
}
/* ==== Espurna identity tokens ============================== */
:root{
  --ink:        #00241B;   /* "negre" del manual, lleugerament verd */
  --ink-deep:   #001712;
  --paper:      #F4EFE8;   /* blanc trencat càlid per a estats invertits */
  --white:      #FFFFFF;
  --red:        #EC0914;
  --red-deep:   #C70812;
  --blue:       #067BC2;
  --line:       rgba(255,255,255,0.14);
  --mute:       rgba(255,255,255,0.55);

  --f-display:  "Anton", "Archivo Black", Impact, "Helvetica Neue", sans-serif; /* substitut de T1 Korium 5kg — pendent */
  --f-mono:     "Simplon Norm", ui-sans-serif, "Helvetica Neue", Helvetica, Arial, sans-serif; /* tipografia real del manual */

  --pad-x: clamp(20px, 4vw, 56px);
}

*{ box-sizing: border-box; }
html, body{ margin:0; padding:0; }
body{
  background: var(--ink);
  color: var(--white);
  font-family: var(--f-mono);
  font-weight: 400;
  font-size: 14px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

/* Subtle film grain overlay */
body::before{
  content:"";
  position: fixed; inset: 0;
  pointer-events: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='180' height='180'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0   0 0 0 0 0   0 0 0 0 0   0 0 0 0.55 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
  opacity: 0.10;
  mix-blend-mode: overlay;
  z-index: 100;
}

/* Vignette */
body::after{
  content:"";
  position: fixed; inset: 0;
  pointer-events: none;
  background: radial-gradient(ellipse at center, transparent 55%, rgba(0,0,0,0.55) 100%);
  z-index: 99;
}

/* ==== Page chrome ========================================== */
.page{
  min-height: 100vh;
  display: grid;
  grid-template-rows: auto 1fr auto auto;
  position: relative;
  z-index: 1;
}

/* Top bar */
.topbar{
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding: 22px var(--pad-x) 0;
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--mute);
}
.topbar > .left  { justify-self: start; display: flex; gap: 18px; align-items: center; }
.topbar > .right { justify-self: end;   display: flex; gap: 18px; align-items: center; }

.topbar .mark{
  display: inline-flex; align-items: center; gap: 8px;
  color: var(--white);
}
.topbar .mark .dot{
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--red);
  box-shadow: 0 0 0 0 rgba(236,9,20,0.6);
  animation: pulse 2.4s infinite;
}
@keyframes pulse{
  0%   { box-shadow: 0 0 0 0 rgba(236,9,20,0.55); }
  70%  { box-shadow: 0 0 0 12px rgba(236,9,20,0); }
  100% { box-shadow: 0 0 0 0 rgba(236,9,20,0); }
}

.topbar .reg{
  display:inline-block;
  font-size: 9px;
  transform: translateY(-6px);
  margin-left: 2px;
  color: var(--red);
}

/* ==== Hero ================================================= */
.hero{
  padding: clamp(40px, 8vh, 90px) var(--pad-x) clamp(20px, 4vh, 40px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: stretch;
  position: relative;
}

.meta-row{
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 24px;
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--mute);
  padding-bottom: clamp(20px, 4vh, 38px);
  border-bottom: 1px solid var(--line);
}
.meta-row .label{ display:block; color: rgba(255,255,255,0.35); margin-bottom: 6px; font-size: 10px; }
.meta-row .val  { color: var(--white); }
.meta-row > div:nth-child(2){ text-align: center; }
.meta-row > div:nth-child(3){ text-align: right; }

/* Logotype — massive */
.lockup{
  padding: clamp(20px, 5vh, 60px) 0 clamp(10px, 2vh, 30px);
  line-height: 0.78;
}

.wordmark{
  color: var(--white);
  margin: 0;
  display: flex;
  align-items: flex-end;
  gap: 0.04em;
  line-height: 0;
  user-select: none;
  /* Height drives all letter sizes. Cap so the wordmark never overflows.
     Korium aspect ratio ~5.7:1, so width ~= height * 5.7.
     Available width = 100vw - (2 * pad-x). To stay within it:
     height <= (100vw - 2*pad-x) / 5.7 */
  --logo-h: min(
    clamp(60px, 14vw, 240px),
    calc((100vw - var(--pad-x) * 2) / 5.85)
  );
  height: var(--logo-h);
  max-width: 100%;
}
.wordmark .ch{
  display: inline-block;
  height: 100%;
  width: auto;
  transition: transform 0.5s cubic-bezier(.2,.8,.2,1), color 0.5s ease;
  color: inherit;
  fill: currentColor;
}
.wordmark .ch.s{
  color: var(--white);
  transform-origin: 50% 60%;
}
.wordmark:hover .ch.s{ transform: translateY(-3%) rotate(-2deg); }
.wordmark .reg{
  font-family: var(--f-mono);
  font-size: calc(var(--logo-h) * 0.09);
  color: var(--red);
  align-self: flex-start;
  margin-left: 0.3em;
  margin-top: 0.4em;
  letter-spacing: 0;
  line-height: 1;
}

.tagline-row{
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: end;
  gap: 24px;
  padding-top: clamp(20px, 4vh, 36px);
  border-top: 1px solid var(--line);
}
.tagline{
  font-family: var(--f-display);
  font-weight: 400;
  font-size: clamp(22px, 3.6vw, 56px);
  letter-spacing: -0.005em;
  line-height: 0.95;
  text-transform: uppercase;
  margin: 0;
  max-width: 18ch;
}
.tagline em{
  font-style: normal;
  color: var(--red);
}
.status{
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--mute);
  text-align: right;
  white-space: nowrap;
}
.status .live{
  display: inline-flex; align-items: center; gap: 8px;
  color: var(--white);
}
.status .live::before{
  content:"";
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--red);
  animation: blink 1.4s infinite;
}
@keyframes blink{ 50%{ opacity: 0.2; } }

/* ==== Manifest band ======================================== */
.manifest{
  background: var(--red);
  color: var(--white);
  padding: clamp(28px, 6vh, 60px) var(--pad-x);
  overflow: hidden;
  position: relative;
}
.manifest .scroller{
  display: flex;
  gap: 56px;
  font-family: var(--f-display);
  font-size: clamp(40px, 7.5vw, 110px);
  letter-spacing: -0.005em;
  text-transform: uppercase;
  line-height: 1;
  white-space: nowrap;
  animation: scroll 38s linear infinite;
  will-change: transform;
}
.manifest .scroller span{
  display: inline-flex;
  align-items: center;
  gap: 56px;
}
.manifest .scroller span::after{
  content: "";
  display: inline-block;
  width: 0.55em;
  height: 0.55em;
  background: var(--white);
  border-radius: 50%;
  flex-shrink: 0;
}
@keyframes scroll{
  from{ transform: translateX(0); }
  to  { transform: translateX(-50%); }
}

/* ==== Body content (two-column) ============================ */
.body-grid{
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.body-grid > *{ padding: clamp(36px, 6vh, 72px) var(--pad-x); }
.body-grid > *:first-child{ border-right: 1px solid var(--line); }

.col-head{
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.4);
  margin: 0 0 22px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.col-head::before{
  content:"";
  display:inline-block; width: 14px; height: 1px; background: var(--red);
}

.intro h2{
  font-family: var(--f-display);
  font-weight: 400;
  font-size: clamp(28px, 3.4vw, 48px);
  line-height: 1;
  letter-spacing: -0.005em;
  text-transform: uppercase;
  margin: 0 0 24px;
  max-width: 14ch;
}
.intro p{
  font-family: var(--f-mono);
  font-size: 13px;
  line-height: 1.65;
  color: rgba(255,255,255,0.78);
  max-width: 44ch;
  margin: 0 0 16px;
}
.intro .keywords{
  display: flex; flex-wrap: wrap; gap: 8px;
  margin-top: 28px;
}
.intro .keywords span{
  font-family: var(--f-mono);
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  padding: 6px 10px;
  border: 1px solid var(--line);
  color: rgba(255,255,255,0.78);
  transition: background 0.25s ease, color 0.25s ease, border-color 0.25s ease;
}
.intro .keywords span:hover{
  background: var(--red); color: var(--white); border-color: var(--red);
}

/* ==== Contact form ========================================= */
.contact form{
  display: grid;
  gap: 14px;
}
.contact .field{
  display: grid;
  gap: 6px;
}
.contact label{
  font-family: var(--f-mono);
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.5);
  display: flex; justify-content: space-between; align-items: center;
}
.contact label .req{ color: var(--red); }
.contact input,
.contact textarea,
.contact select{
  background: transparent;
  border: 0;
  border-bottom: 1px solid rgba(255,255,255,0.25);
  color: var(--white);
  font-family: var(--f-mono);
  font-size: 14px;
  padding: 10px 0;
  outline: none;
  transition: border-color 0.25s ease;
  width: 100%;
  border-radius: 0;
}
.contact textarea{
  resize: none;
  min-height: 90px;
  line-height: 1.5;
}
.contact input:hover,
.contact textarea:hover,
.contact select:hover{ border-bottom-color: rgba(255,255,255,0.45); }
.contact input:focus,
.contact textarea:focus,
.contact select:focus{ border-bottom-color: var(--red); }
.contact ::placeholder{ color: rgba(255,255,255,0.3); }

.contact .row2{
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}
.contact select{
  appearance: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'><path d='M1 1l4 4 4-4' stroke='%23EC0914' stroke-width='1.4' fill='none'/></svg>");
  background-repeat: no-repeat;
  background-position: right 4px center;
  padding-right: 24px;
}
.contact select option{ background: var(--ink); color: var(--white); }

.submit-row{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-top: 14px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}
.contact button{
  background: var(--red);
  color: var(--white);
  border: 0;
  padding: 16px 28px;
  font-family: var(--f-display);
  font-size: 22px;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition: background 0.25s ease, transform 0.25s ease;
  display: inline-flex;
  align-items: center;
  gap: 14px;
}
.contact button:hover{ background: var(--red-deep); transform: translateX(2px); }
.contact button .arrow{
  width: 20px; height: 1px; background: var(--white);
  position: relative;
}
.contact button .arrow::after{
  content:"";
  position: absolute; right: 0; top: 50%;
  width: 8px; height: 1px; background: var(--white);
  transform-origin: right center;
  transform: translateY(-50%) rotate(45deg);
}
.contact .priv{
  font-family: var(--f-mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.4);
  max-width: 22ch;
  text-align: right;
  line-height: 1.5;
}

.contact .success{
  display: none;
  padding: 24px;
  border: 1px solid var(--red);
  color: var(--white);
  font-family: var(--f-mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  line-height: 1.6;
}
.contact.sent form{ display: none; }
.contact.sent .success{ display: block; }
.contact .success strong{
  display: block;
  font-family: var(--f-display);
  font-size: 32px;
  letter-spacing: -0.005em;
  color: var(--red);
  margin-bottom: 10px;
  text-transform: uppercase;
}

/* ==== Footer =============================================== */
.footer{
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: end;
  gap: 24px;
  padding: 28px var(--pad-x) 24px;
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--mute);
}
.footer .socials{
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
}
.footer .socials a{
  color: var(--white);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  position: relative;
  padding-bottom: 4px;
}
.footer .socials a::after{
  content:"";
  position: absolute; left:0; bottom: 0;
  width: 100%; height: 1px;
  background: var(--red);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform .3s cubic-bezier(.2,.8,.2,1);
}
.footer .socials a:hover::after{ transform: scaleX(1); }
.footer .socials a .placeholder{
  color: rgba(255,255,255,0.4);
  margin-left: 2px;
}

.footer .center{
  text-align: center;
  color: rgba(255,255,255,0.4);
  font-size: 10px;
}
.footer .right{
  justify-self: end;
  text-align: right;
  color: rgba(255,255,255,0.4);
}
.footer .right strong{
  color: var(--white);
  font-weight: 400;
}

/* ==== Mobile =============================================== */
@media (max-width: 820px){
  .meta-row{ grid-template-columns: 1fr; gap: 10px; }
  .meta-row > div:nth-child(2),
  .meta-row > div:nth-child(3){ text-align: left; }
  .tagline-row{ grid-template-columns: 1fr; }
  .status{ text-align: left; }
  .body-grid{ grid-template-columns: 1fr; }
  .body-grid > *:first-child{ border-right: 0; border-bottom: 1px solid var(--line); }
  .footer{ grid-template-columns: 1fr; text-align: left; }
  .footer .center, .footer .right{ text-align: left; justify-self: start; }
  .topbar > .left { gap: 12px; }
  .topbar > .right{ display: none; }
  .contact .row2{ grid-template-columns: 1fr; }
}
