/* Fonts served from this site (no request to Google: the visitor's IP never leaves us). */
@font-face { font-family: "Sora"; font-style: normal; font-weight: 600; font-display: swap; src: url("/assets/fonts/sora-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "Sora"; font-style: normal; font-weight: 700; font-display: swap; src: url("/assets/fonts/sora-latin-700-normal.woff2") format("woff2"); }
@font-face { font-family: "Sora"; font-style: normal; font-weight: 800; font-display: swap; src: url("/assets/fonts/sora-latin-800-normal.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 400; font-display: swap; src: url("/assets/fonts/inter-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 500; font-display: swap; src: url("/assets/fonts/inter-latin-500-normal.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 600; font-display: swap; src: url("/assets/fonts/inter-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "JetBrains Mono"; font-style: normal; font-weight: 500; font-display: swap; src: url("/assets/fonts/jetbrains-mono-latin-500-normal.woff2") format("woff2"); }

/* Hakiour — portfolio
   Layout: one column of wide bands. The hero puts real work on stage (a browser with El Saüc,
   a phone playing the ERP) under live-looking toasts; each project is a "case" band.
   Brand: ink tile with a violet cursor, Sora for display, mono `// labels`. */
:root {
  --ink: #0B1220;
  --ink-2: #39435A;
  --muted: #5B6577;
  --line: #E3E7EF;
  --bg: #FFFFFF;
  --soft: #F5F6FA;
  --violet: #7C3AED;
  --violet-2: #8B5CF6;
  --violet-deep: #5B21B6;
  --violet-soft: #F1ECFF;
  --lilac: #DDD6FE;
  --mint: #1F9D6E;
  --mint-soft: #E3F5EC;
  --danger: #C2410C;
  --display: "Sora", ui-sans-serif, system-ui, sans-serif;
  --body: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --wrap: 1200px;
  --radius: 32px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; scroll-padding-top: 84px; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font-family: var(--body); font-size: 17px; line-height: 1.6;
  -webkit-font-smoothing: antialiased; overflow-x: hidden;
}
img, video { max-width: 100%; display: block; }
a { color: inherit; }
h1, h2, h3 { font-family: var(--display); margin: 0; letter-spacing: -0.025em; line-height: 1.05; text-wrap: balance; }
p { margin: 0; }
.mono { font-family: var(--mono); }

.wrap {
  max-width: var(--wrap); margin: 0 auto;
  padding-left: max(24px, env(safe-area-inset-left, 0px));
  padding-right: max(24px, env(safe-area-inset-right, 0px));
}
.label { font-family: var(--mono); font-size: 13px; font-weight: 500; color: var(--violet); }
.label::before { content: "// "; opacity: 0.55; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 48px; padding: 0 22px; border: 0; border-radius: 999px; cursor: pointer;
  font: 600 16px/1 var(--body); text-decoration: none;
  transition: transform .15s ease, background-color .15s ease, box-shadow .15s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 3px solid var(--lilac); outline-offset: 2px;
}
.btn-sm { min-height: 40px; padding: 0 18px; font-size: 15px; }
.btn-lg { min-height: 56px; padding: 0 28px; font-size: 17px; }
.btn-primary { background: var(--ink); color: #FFFFFF; box-shadow: 0 10px 24px -12px rgba(11,18,32,.6); }
.btn-primary:hover { background: #1B2538; }
.btn-primary svg { transition: transform .15s ease; }
.btn-primary:hover svg { transform: translateX(3px); }
.btn-ghost { background: var(--soft); color: var(--ink); }
.btn-ghost:hover { background: #ECEEF4; }
.btn-violet { background: var(--violet); color: #FFFFFF; box-shadow: 0 12px 28px -12px rgba(124,58,237,.7); }
.btn-violet:hover { background: #6D28D9; }

/* Header (always dark, so it never turns grey over the dark sections) */
.site-header {
  position: sticky; top: env(safe-area-inset-top, 0px); z-index: 30;
  background: var(--ink);
  border-bottom: 1px solid rgba(255,255,255,.07);
}
body::before { content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px); z-index: 31; background: var(--ink); }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; height: 72px; }
.brand { display: flex; align-items: center; text-decoration: none; }
.brand svg { height: 36px; width: auto; display: block; }
.nav { display: flex; align-items: center; gap: 28px; font-size: 15px; font-weight: 500; }
.nav a:not(.btn) { text-decoration: none; color: #AEB8CB; transition: color .15s ease; }
.nav a:not(.btn):hover { color: #FFFFFF; }

/* Hero: dark band, copy left, three phones on stage right, numbers along the bottom */
.hero { position: relative; background: var(--ink); color: #F2F5FA; overflow: hidden; padding-block: 72px 0; }
.hero-bg {
  position: absolute; inset: 0; pointer-events: none;
  background-image:
    linear-gradient(rgba(255,255,255,.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.035) 1px, transparent 1px);
  background-size: 56px 56px;
  -webkit-mask-image: radial-gradient(ellipse 80% 75% at 70% 35%, #000 25%, transparent 80%);
  mask-image: radial-gradient(ellipse 80% 75% at 70% 35%, #000 25%, transparent 80%);
}
.hero-grid { position: relative; display: grid; grid-template-columns: minmax(0, 1.08fr) minmax(0, .92fr); gap: 40px; align-items: center; }
.hero-copy { display: flex; flex-direction: column; gap: 26px; min-width: 0; padding-bottom: 24px; }
.status {
  align-self: flex-start; display: inline-flex; align-items: center; gap: 10px;
  padding: 7px 14px 7px 12px; border-radius: 999px;
  background: rgba(79,211,160,.1); border: 1px solid rgba(79,211,160,.25); color: #7FE3BC;
  font-size: 14px; font-weight: 500;
}
.status .dot { position: relative; width: 8px; height: 8px; border-radius: 50%; background: #4FD3A0; }
.status .dot::after { content: ""; position: absolute; inset: -4px; border-radius: 50%; border: 2px solid #4FD3A0; opacity: 0; }
.hero h1 { font-size: clamp(38px, 4.7vw, 64px); font-weight: 700; letter-spacing: -0.04em; line-height: 1.04; color: #FFFFFF; }
.hero h1 .mark { white-space: nowrap; }
@media (min-width: 480px) { .nobr { white-space: nowrap; } }
.hero h1 .mark { color: #C4B5FD; }
.hero h1 .cursor {
  display: inline-block; width: 0.5em; height: 0.11em; margin-left: 0.08em; vertical-align: baseline;
  background: var(--violet-2); border-radius: 0.02em;
}
.hero .lead { font-size: 19px; color: #AEB8CB; max-width: 31em; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.btn-outline { background: transparent; color: #FFFFFF; box-shadow: inset 0 0 0 1.5px rgba(255,255,255,.22); }
.btn-outline:hover { box-shadow: inset 0 0 0 1.5px rgba(255,255,255,.5); }
.proof { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 10px 24px; color: #8C97AB; font-size: 15px; }
.proof li { display: inline-flex; align-items: center; gap: 8px; }
.proof svg { color: #A78BFA; }

.stage { position: relative; height: 600px; min-width: 0; }
.stage .glow {
  position: absolute; left: 50%; top: 46%; width: 520px; height: 520px; transform: translate(-50%, -50%);
  border-radius: 50%; background: radial-gradient(circle, rgba(124,58,237,.45), rgba(124,58,237,0) 65%);
}
.stage .phone { position: absolute; }
.stage .center { left: 50%; top: 0; width: 270px; margin-left: -135px; z-index: 2; }
.stage .side { top: 70px; width: 220px; opacity: .92; }
.stage .side.left { left: 50%; margin-left: -250px; transform: rotate(-8deg); }
.stage .side.right { left: 50%; margin-left: 30px; transform: rotate(8deg); }
.stage .side > img { filter: saturate(.9); }

.phone {
  position: relative; flex: none; width: 260px; aspect-ratio: 260 / 526;
  padding: 8px; border-radius: 42px; background: #050A14; overflow: hidden;
  box-shadow: 0 0 0 1px rgba(255,255,255,.08), 0 40px 80px -28px rgba(0,0,0,.6);
}
.phone > img, .phone > video { width: 100%; height: 100%; object-fit: cover; object-position: top; border-radius: 34px; background: #F2F4F8; }
.stage .center { aspect-ratio: 270 / 546; border-radius: 44px; }
.stage .center > video { border-radius: 36px; }
.stage .side { aspect-ratio: 220 / 446; border-radius: 36px; }
.stage .side > img { border-radius: 29px; }
.phone.sm { width: 220px; aspect-ratio: 220 / 446; border-radius: 36px; background: var(--ink); }
.phone.sm > img, .phone.sm > video { border-radius: 29px; }

.toast {
  position: absolute; z-index: 3; display: flex; align-items: center; gap: 12px;
  background: rgba(255,255,255,.97); color: var(--ink); border-radius: 16px; padding: 12px 16px 12px 12px;
  box-shadow: 0 24px 48px -16px rgba(0,0,0,.5);
  font-size: 14px; line-height: 1.3; white-space: nowrap;
}
.toast b { display: block; font-weight: 600; }
.toast small { display: block; color: var(--muted); font-size: 13px; }
.toast-ico { width: 34px; height: 34px; border-radius: 10px; display: flex; align-items: center; justify-content: center; flex: none; }
.toast-ico.ok { background: var(--mint-soft); color: var(--mint); }
.toast-ico.violet { background: var(--violet-soft); color: var(--violet); }
.toast-a { right: -12px; top: 150px; }
.toast-b { left: -12px; top: 420px; }

.facts {
  position: relative; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px;
  margin-top: 40px; padding-block: 36px 44px; border-top: 1px solid rgba(255,255,255,.08);
}
.fact b { display: block; font-family: var(--display); font-weight: 700; font-size: clamp(30px, 3.6vw, 42px); letter-spacing: -0.04em; line-height: 1; color: #FFFFFF; font-variant-numeric: tabular-nums; }
.fact span { display: block; margin-top: 10px; color: #8C97AB; font-size: 15px; }

/* Sections */
.section { padding-block: 112px 8px; }
.section-head {
  display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); gap: 24px 64px; align-items: end;
  margin-bottom: 48px;
}
.section-head > div { display: flex; flex-direction: column; gap: 14px; }
.section-head h2 { font-size: clamp(32px, 4.2vw, 50px); font-weight: 700; letter-spacing: -0.035em; }
.section-head > p { font-size: 18px; color: var(--muted); max-width: 30em; }

/* Cases */
.case {
  border-radius: var(--radius); padding: 64px; margin-bottom: 24px; overflow: hidden;
  display: grid; grid-template-columns: minmax(0, .95fr) minmax(0, 1.05fr); gap: 56px; align-items: center;
}
.case.erp { background: var(--violet-soft); }
.case.sauc { background: #F5EEE2; }
.case-copy { display: flex; flex-direction: column; gap: 20px; min-width: 0; }
.tag { display: flex; flex-wrap: wrap; gap: 8px; }
.tag span { font-family: var(--mono); font-size: 12px; padding: 5px 10px; border-radius: 8px; background: rgba(255,255,255,.75); color: var(--ink-2); }
.case h3 { font-size: clamp(28px, 3.2vw, 40px); font-weight: 700; letter-spacing: -0.025em; }
.case .summary { font-size: 19px; color: var(--ink-2); }
.case ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.case li { position: relative; padding-left: 28px; }
.case li::before {
  content: ""; position: absolute; left: 2px; top: .55em; width: 12px; height: 7px;
  border-left: 2.5px solid var(--mint); border-bottom: 2.5px solid var(--mint); transform: rotate(-45deg);
}
.case-numbers { display: grid; grid-template-columns: repeat(3, max-content); gap: 28px; }
.case-numbers b { display: block; font-family: var(--display); font-size: 28px; font-weight: 700; letter-spacing: -0.03em; line-height: 1.1; font-variant-numeric: tabular-nums; }
.case-numbers span { font-size: 14px; color: var(--muted); }
.case-links { display: flex; flex-wrap: wrap; gap: 12px; }
.case-media, .sauc-media { display: flex; justify-content: center; align-items: flex-start; gap: 20px; min-width: 0; }
.stagger { margin-top: 64px; }
.sauc-media .phone { width: 220px; aspect-ratio: 220 / 476; border-radius: 36px; }
.sauc-media .phone > img { border-radius: 29px; }

/* Services */
.services { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.service { border: 1px solid var(--line); border-radius: 24px; padding: 28px; display: flex; flex-direction: column; gap: 12px; transition: border-color .2s ease, transform .2s ease; }
.service:hover { border-color: var(--lilac); transform: translateY(-2px); }
.service .ico { width: 46px; height: 46px; border-radius: 13px; background: var(--violet-soft); color: var(--violet); display: flex; align-items: center; justify-content: center; }
.service h3 { font-size: 19px; letter-spacing: -0.02em; }
.service p { color: var(--muted); font-size: 15px; line-height: 1.55; }

/* Process */
.process { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; counter-reset: step; }
.step { display: flex; flex-direction: column; gap: 10px; }
.step::before { counter-increment: step; content: "0" counter(step); font-family: var(--mono); font-size: 13px; color: var(--violet); border-top: 2px solid var(--ink); padding-top: 14px; }
.step h3 { font-size: 19px; letter-spacing: -0.02em; }
.step p { color: var(--muted); font-size: 15px; }

/* Contact */
.contact { margin-top: 112px; background: var(--ink); color: #F2F5FA; padding-block: 104px; position: relative; overflow: hidden; }
.contact::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image: radial-gradient(rgba(167,139,250,.14) 1.2px, transparent 1.2px); background-size: 22px 22px;
  -webkit-mask-image: radial-gradient(ellipse 60% 70% at 15% 30%, #000 10%, transparent 70%);
  mask-image: radial-gradient(ellipse 60% 70% at 15% 30%, #000 10%, transparent 70%);
}
.contact-grid { position: relative; display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: 64px; align-items: start; }
.contact-intro { display: flex; flex-direction: column; gap: 20px; }
.contact .label { color: #C4B5FD; }
.contact h2 { font-size: clamp(34px, 4.6vw, 56px); font-weight: 700; letter-spacing: -0.04em; }
.contact-lead { color: #A9B4C8; font-size: 19px; max-width: 28em; }
.contact-lead a { color: #C4B5FD; }
.next { list-style: none; margin: 16px 0 0; padding: 0; display: flex; flex-direction: column; gap: 18px; counter-reset: n; }
.next li { position: relative; padding-left: 52px; display: flex; flex-direction: column; gap: 2px; }
.next li::before {
  counter-increment: n; content: counter(n); position: absolute; left: 0; top: 0;
  width: 34px; height: 34px; border-radius: 10px; background: rgba(139,92,246,.18); color: #C4B5FD;
  display: flex; align-items: center; justify-content: center; font: 500 14px var(--mono);
}
.next b { font-weight: 600; }
.next span { color: #A9B4C8; font-size: 15px; }

.form-card { background: #FFFFFF; color: var(--ink); border-radius: 28px; padding: 36px; box-shadow: 0 40px 80px -40px rgba(0,0,0,.6); }
#contact-form { display: flex; flex-direction: column; gap: 18px; }
#contact-form[hidden] { display: none; }
.row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; }
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; border: 0; padding: 0; margin: 0; }
.field > label, .field > legend { font-size: 14px; font-weight: 600; padding: 0; margin-bottom: 2px; }
.opt { font-weight: 400; color: var(--muted); }
.field input, .field select, .field textarea {
  width: 100%; font: 400 16px/1.4 var(--body); color: var(--ink);
  background: var(--soft); border: 1.5px solid transparent; border-radius: 14px; padding: 13px 14px;
  transition: border-color .15s ease, background-color .15s ease;
}
.field textarea { resize: vertical; min-height: 120px; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; background: #FFFFFF; border-color: var(--violet); }
.field.invalid input, .field.invalid textarea { border-color: var(--danger); background: #FFF7F3; }
.err { color: var(--danger); font-size: 13px; min-height: 0; }
.err:empty { display: none; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { position: relative; cursor: pointer; }
.chip input { position: absolute; opacity: 0; pointer-events: none; }
.chip span {
  display: inline-flex; align-items: center; min-height: 40px; padding: 0 14px; border-radius: 999px;
  border: 1.5px solid var(--line); font-size: 14px; font-weight: 500; color: var(--ink-2);
  transition: all .15s ease; user-select: none;
}
.chip:hover span { border-color: var(--lilac); }
.chip input:checked + span { background: var(--violet-soft); border-color: var(--violet); color: var(--violet-deep); }
.chip input:focus-visible + span { outline: 3px solid var(--lilac); outline-offset: 2px; }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.consent { display: flex; gap: 12px; align-items: flex-start; font-size: 14px; color: var(--ink-2); cursor: pointer; }
.consent input { width: 20px; height: 20px; margin: 1px 0 0; accent-color: var(--violet); flex: none; }
.submit { width: 100%; margin-top: 4px; }
.submit .when-busy { display: none; align-items: center; gap: 10px; }
.submit.busy { pointer-events: none; opacity: .85; }
.submit.busy .when-idle { display: none; }
.submit.busy .when-busy { display: inline-flex; }
.spinner { width: 16px; height: 16px; border-radius: 50%; border: 2.5px solid rgba(255,255,255,.35); border-top-color: #FFFFFF; animation: spin .8s linear infinite; }
.form-error { color: var(--danger); font-size: 14px; text-align: center; }
.form-error:empty { display: none; }
.form-done { text-align: center; padding: 48px 16px; display: flex; flex-direction: column; align-items: center; gap: 14px; outline: none; }
.form-done[hidden] { display: none; }
.done-ico { width: 64px; height: 64px; border-radius: 20px; background: var(--mint-soft); color: var(--mint); display: flex; align-items: center; justify-content: center; }
.form-done h3 { font-size: 28px; }
.form-done p { color: var(--muted); max-width: 26em; }

footer { background: var(--ink); color: #8C97AB; font-size: 14px; padding-block: 0 48px; }
.contact { border-bottom: 0; }
footer { border-top: 1px solid rgba(255,255,255,.08); }
footer .wrap { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; padding-top: 28px; }
.foot-logo svg { height: 32px; width: auto; display: block; }

/* Motion */
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }
@keyframes blink { 0%, 49% { opacity: 1; } 50%, 100% { opacity: 0; } }
@keyframes ping { 0% { transform: scale(.6); opacity: .8; } 100% { transform: scale(1.8); opacity: 0; } }
@keyframes pop { from { opacity: 0; transform: translateY(12px) scale(.96); } to { opacity: 1; transform: none; } }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: no-preference) {
  .hero h1 .cursor { animation: blink 1.1s steps(1) infinite; }
  .status .dot::after { animation: ping 1.8s ease-out infinite; }
  .toast { animation: pop .6s cubic-bezier(.2,.8,.2,1) both, float 7s ease-in-out infinite; }
  .toast-a { animation-delay: .6s, 1.2s; }
  .toast-b { animation-delay: 1s, 2.4s; }
  .stage .center { animation: float 8s ease-in-out infinite; }
}

/* Responsive */
@media (max-width: 1060px) {
  .hero-grid, .case, .contact-grid, .section-head { grid-template-columns: minmax(0, 1fr); }
  .services, .process { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .case { padding: 48px 32px; }
  .stage { height: 560px; width: 100%; max-width: 580px; margin-inline: auto; }
  .facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  body { font-size: 16px; }
  .nav a:not(.btn) { display: none; }
  .brand svg { height: 30px; }
  .hero { padding-top: 40px; }
  .hero .lead { font-size: 17px; }
  .hero-actions .btn { flex: 1 1 100%; }
  .stage { height: 440px; width: auto; max-width: none; margin-inline: -24px; }
  .stage .glow { width: 360px; height: 360px; }
  .stage .center { width: 200px; margin-left: -100px; border-radius: 34px; padding: 6px; }
  .stage .center > video { border-radius: 28px; }
  .stage .side { width: 160px; top: 54px; border-radius: 28px; padding: 6px; }
  .stage .side > img { border-radius: 22px; }
  .stage .side.left { margin-left: -195px; }
  .stage .side.right { margin-left: 35px; }
  .toast { font-size: 13px; padding: 9px 12px 9px 9px; gap: 9px; }
  .toast small { font-size: 12px; }
  .toast-ico { width: 28px; height: 28px; }
  .toast-a { right: 12px; top: 110px; }
  .toast-b { left: 12px; top: 300px; }
  .facts { gap: 24px 16px; padding-block: 28px 36px; margin-top: 24px; }
  .services, .process, .row { grid-template-columns: minmax(0, 1fr); }
  .case { padding: 36px 20px; border-radius: 24px; }
  .case-media .phone.sm, .sauc-media .phone { width: 150px; }
  .stagger { margin-top: 36px; }
  .case-numbers { gap: 18px; }
  .case-numbers b { font-size: 24px; }
  .case-numbers span { font-size: 13px; }
  .section { padding-block: 80px 8px; }
  .section-head { margin-bottom: 32px; }
  .contact { padding-block: 72px; margin-top: 80px; }
  .form-card { padding: 24px 18px; border-radius: 22px; }
}

/* Browser frame (Corte Final, Rootgrade) */
.browser {
  border-radius: 14px; overflow: hidden; background: #FFFFFF;
  box-shadow: 0 40px 80px -36px rgba(11,18,32,.45), 0 0 0 1px rgba(11,18,32,.08);
}
.browser-bar { display: flex; align-items: center; gap: 6px; height: 30px; padding: 0 12px; background: #F2F3F6; border-bottom: 1px solid var(--line); }
.browser-bar span { width: 9px; height: 9px; border-radius: 50%; background: #D3D7DF; flex: none; }
.browser-bar em { margin-left: 8px; font-style: normal; font-family: var(--mono); font-size: 11px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.browser img { width: 100%; height: auto; }

/* Corte Final: its own look (near-black + amber), the ad playing in a phone over the landing */
.case.cf { background: #121212; color: #EDEDED; }
.case.cf h3 { color: #FFFFFF; }
.case.cf .summary { color: #B5B5B5; }
.case.cf .tag span { background: rgba(255,255,255,.08); color: #D6D6D6; }
.case.cf li::before { border-color: #FFB547; }
.btn-amber { background: #FFB547; color: #121212; }
.btn-amber:hover { background: #FFC46B; }
.cf-media { position: relative; min-width: 0; padding-bottom: 28px; }
.cf-browser { width: 92%; border-color: #333; background: #121212; }
.cf-browser .browser-bar { background: #1E1E1E; border-bottom-color: #2A2A2A; }
.cf-browser .browser-bar span { background: #3A3A3A; }
.cf-browser .browser-bar em { color: #8A8A8A; }
.cf-phone { position: absolute; right: 0; top: 24px; width: 190px; aspect-ratio: 9 / 16.8; border-radius: 30px; padding: 6px; background: #000; }
.cf-phone > video { border-radius: 25px; background: #000; }
.cf-caption { display: block; margin-top: 14px; max-width: 52%; font-size: 12px; line-height: 1.5; color: #8A8A8A; }

/* Central Hub: the real panel, dark like the product */
.case.hub { background: #0E1117; color: #E6E8EE; }
.case.hub h3 { color: #FFFFFF; }
.case.hub .summary { color: #A7AEBD; }
.case.hub .tag span { background: rgba(255,255,255,.07); color: #CDD2DC; }
.case.hub li::before { border-color: #3DDC97; }
.hub-media { position: relative; min-width: 0; padding-bottom: 92px; }
.hub-main { width: 94%; border-color: #232832; background: #0E1117; }
.hub-sub { position: absolute; right: 0; bottom: 30px; width: 54%; background: #0E1117; }
.hub-media .browser-bar { background: #181C24; border-bottom-color: #232832; }
.hub-media .browser-bar span { background: #333A46; }
.hub-media .browser-bar em { color: #8C93A1; }
.hub-media .browser { box-shadow: 0 40px 80px -30px rgba(0,0,0,.7), 0 0 0 1px rgba(255,255,255,.06); }
.hub-caption { position: absolute; left: 0; bottom: 0; font-size: 12px; color: #7E8696; }

/* Infrastructure band */
.infra { margin-top: 112px; padding-block: 104px; background: var(--soft); }
.infra .section-head { margin-bottom: 40px; }
.infra-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.infra-item { background: #FFFFFF; border-radius: 24px; padding: 28px; display: flex; flex-direction: column; gap: 12px; }
.infra-item .ico { width: 46px; height: 46px; border-radius: 13px; background: var(--ink); color: #C4B5FD; display: flex; align-items: center; justify-content: center; }
.infra-item h3 { font-size: 19px; letter-spacing: -0.02em; }
.infra-item p { color: var(--muted); font-size: 15px; line-height: 1.55; }
.infra + .section { padding-top: 104px; }

@media (max-width: 1060px) {
  .infra-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cf-media, .hub-media { max-width: 620px; }
}
@media (max-width: 640px) {
  .infra { margin-top: 80px; padding-block: 72px; }
  .infra-grid { grid-template-columns: minmax(0, 1fr); }
  .cf-media { padding-bottom: 24px; }
  .cf-browser { width: 100%; }
  .cf-phone { width: 112px; top: 64px; right: 6px; border-radius: 19px; padding: 4px; }
  .cf-phone > video { border-radius: 16px; }
  .cf-caption { max-width: 58%; }
  .hub-main { width: 100%; }
  .hub-sub { width: 64%; right: -6px; bottom: 28px; }
  .hub-media { padding-bottom: 72px; }
  .case-links .btn { flex: 1 1 auto; }
}

/* ---- ERP project page (/erp/) ---------------------------------------------------------- */
.back { align-self: flex-start; display: inline-flex; align-items: center; gap: 8px; color: #AEB8CB; text-decoration: none; font-size: 15px; font-weight: 500; }
.back:hover { color: #FFFFFF; }
.page-erp .hero-copy { gap: 22px; }

.journey { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 12px; counter-reset: j; }
.journey li { counter-increment: j; display: flex; flex-direction: column; gap: 6px; padding: 22px; border-radius: 20px; background: var(--soft); }
.journey li::before { content: "0" counter(j); font: 500 13px var(--mono); color: var(--violet); }
.journey b { font-family: var(--display); font-size: 18px; font-weight: 700; letter-spacing: -0.02em; }
.journey span { font-size: 14px; color: var(--muted); line-height: 1.45; }

.features { display: flex; flex-direction: column; gap: 24px; }
.feature {
  border-radius: var(--radius); padding: 64px; overflow: hidden;
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 56px; align-items: center;
}
.feature.flip .feature-copy { order: 2; }
.feature-copy { display: flex; flex-direction: column; gap: 18px; min-width: 0; }
.feature h3 { font-size: clamp(30px, 3.4vw, 42px); font-weight: 700; letter-spacing: -0.03em; }
.feature .summary { font-size: 19px; color: var(--ink-2); }
.feature ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.feature li { position: relative; padding-left: 28px; }
.feature li::before {
  content: ""; position: absolute; left: 2px; top: .55em; width: 12px; height: 7px;
  border-left: 2.5px solid var(--mint); border-bottom: 2.5px solid var(--mint); transform: rotate(-45deg);
}
.feature-media { display: flex; justify-content: center; align-items: flex-start; gap: 20px; min-width: 0; }
.f-violet { background: var(--violet-soft); }
.f-mint { background: var(--mint-soft); }
.f-soft { background: var(--soft); }
.f-amber { background: #FFF1E6; }
.f-dark { background: var(--ink); color: #F2F5FA; }
.f-dark .summary { color: #AEB8CB; }
.f-dark .label { color: #C4B5FD; }
.f-dark li::before { border-color: #4FD3A0; }
.f-dark .phone { background: #2A3447; }

.modules { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.modules .service { gap: 8px; }

.cta-band { margin-top: 112px; background: var(--ink); color: #F2F5FA; padding-block: 96px; }
.cta-inner { display: flex; justify-content: space-between; align-items: flex-end; gap: 32px; flex-wrap: wrap; }
.cta-inner > div { display: flex; flex-direction: column; gap: 14px; max-width: 640px; }
.cta-inner h2 { font-size: clamp(32px, 4.4vw, 52px); font-weight: 700; letter-spacing: -0.035em; }
.cta-inner p:not(.label) { color: #AEB8CB; font-size: 19px; }
.cta-inner .label { color: #C4B5FD; }
.page-erp + footer { padding-top: 0; }

@media (max-width: 1060px) {
  .journey { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .feature { grid-template-columns: minmax(0, 1fr); padding: 48px 32px; }
  .feature.flip .feature-copy { order: 0; }
  .modules { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  .journey { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .journey li { padding: 18px; }
  .feature { padding: 36px 20px; border-radius: 24px; gap: 32px; }
  .feature .summary { font-size: 17px; }
  .feature-media .phone.sm { width: 150px; }
  .modules { grid-template-columns: minmax(0, 1fr); }
  .cta-band { margin-top: 80px; padding-block: 72px; }
  .cta-inner .btn { width: 100%; }
}

/* ERP page: code breakdown card (same as the proposal) */
.code-sec { padding-top: 64px; }
.code-card { border: 1px solid var(--line); border-radius: 28px; padding: 36px; display: flex; flex-direction: column; gap: 28px; background: #FFFFFF; }
.code-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px 24px; flex-wrap: wrap; }
.code-head h2 { font-size: 20px; font-weight: 700; letter-spacing: -0.02em; }
.code-head span { font-size: 14px; color: var(--muted); }
.code-figs { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px; }
.code-figs b { display: block; font-family: var(--display); font-weight: 700; font-size: clamp(36px, 4.4vw, 52px); letter-spacing: -0.04em; line-height: 1; font-variant-numeric: tabular-nums; }
.code-figs span { display: block; margin-top: 8px; color: var(--muted); font-size: 15px; }
.code-bar { display: flex; height: 12px; gap: 3px; border-radius: 6px; overflow: hidden; }
.code-bar i { display: block; height: 100%; }
.code-legend { list-style: none; margin: -14px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px 22px; font-size: 13px; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.code-legend li { display: inline-flex; align-items: center; gap: 7px; }
.code-legend em { width: 9px; height: 9px; border-radius: 3px; display: inline-block; }

/* ERP page: pricing */
.price-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.price-card { border: 1px solid var(--line); border-radius: 28px; padding: 40px; display: flex; flex-direction: column; gap: 14px; background: #FFFFFF; }
.price-card.main { background: var(--ink); border-color: var(--ink); color: #F2F5FA; }
.price-top { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.price-top h3 { font-size: 22px; letter-spacing: -0.02em; }
.pill { font-size: 13px; font-weight: 600; border-radius: 999px; padding: 5px 12px; background: var(--violet-soft); color: var(--violet-deep); }
.price-card.main .pill { background: rgba(196,181,253,.16); color: #DDD6FE; }
.amount { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; margin-top: 6px; }
.amount b { font-family: var(--display); font-size: clamp(48px, 5.6vw, 64px); font-weight: 700; letter-spacing: -0.04em; line-height: 1; font-variant-numeric: tabular-nums; }
.amount span { font-size: 17px; font-weight: 600; color: var(--muted); }
.price-card.main .amount span { color: #AEB8CB; }
.price-note { color: var(--muted); font-size: 15px; padding-bottom: 14px; border-bottom: 1px solid var(--line); }
.price-card.main .price-note { color: #AEB8CB; border-bottom-color: rgba(255,255,255,.1); }
.price-card ul { list-style: none; margin: 6px 0 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.price-card li { display: flex; gap: 12px; align-items: flex-start; }
.price-card li svg { flex: none; margin-top: 3px; color: var(--violet); }
.price-card.main li svg { color: #A78BFA; }
.price-extra { margin-top: 20px; color: var(--muted); font-size: 15px; max-width: 60em; }

@media (max-width: 1060px) {
  .code-figs { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .price-grid { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 640px) {
  .code-sec { padding-top: 40px; }
  .code-card { padding: 24px 20px; border-radius: 22px; }
  .code-legend { display: grid; grid-template-columns: minmax(0, 1fr); }
  .price-card { padding: 28px 22px; border-radius: 22px; }
}
.page-erp .hero { padding-bottom: 72px; }

/* ---- Hero, alive: aurora light, grain, light ring, typed word, rotating notifications ---- */
.hero { isolation: isolate; }
.aurora { position: absolute; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; }
.aurora span { position: absolute; border-radius: 50%; filter: blur(90px); opacity: .55; will-change: transform; }
.aurora .a1 { width: 640px; height: 640px; right: -120px; top: -220px; background: #7C3AED; }
.aurora .a2 { width: 520px; height: 520px; left: -180px; bottom: -260px; background: #3B5BDB; opacity: .35; }
.aurora .a3 { width: 360px; height: 360px; right: 22%; bottom: -120px; background: #10B981; opacity: .16; }
.grain {
  position: absolute; inset: 0; z-index: -1; pointer-events: none; opacity: .07; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
}
.hero-bg { z-index: -1; }
.stage .ring {
  position: absolute; left: 50%; top: 46%; width: 580px; height: 580px; transform: translate(-50%, -50%);
  border-radius: 50%; border: 1px solid rgba(196,181,253,.22);
  box-shadow: 0 0 80px rgba(124,58,237,.25) inset;
}
.stage .ring::after {
  content: ""; position: absolute; top: -5px; left: 50%; width: 10px; height: 10px; margin-left: -5px;
  border-radius: 50%; background: #C4B5FD; box-shadow: 0 0 16px 4px rgba(196,181,253,.8);
}
.stage .glow { background: radial-gradient(circle, rgba(124,58,237,.6), rgba(124,58,237,0) 65%); }

.typed { display: block; min-height: 1.04em; white-space: nowrap; }
.typed .cursor { transform: translateY(0); }

.toast .toast-ico, .toast b, .toast small { transition: opacity .25s ease, transform .25s ease; }
.toast.swap .toast-ico, .toast.swap b, .toast.swap small { opacity: 0; transform: translateY(4px); }

@keyframes drift1 { from { transform: translate(0, 0) scale(1); } to { transform: translate(-120px, 80px) scale(1.15); } }
@keyframes drift2 { from { transform: translate(0, 0) scale(1); } to { transform: translate(140px, -60px) scale(1.1); } }
@keyframes drift3 { from { transform: translate(0, 0); } to { transform: translate(-80px, -70px); } }
@keyframes orbit { to { transform: translate(-50%, -50%) rotate(360deg); } }
@media (prefers-reduced-motion: no-preference) {
  .aurora .a1 { animation: drift1 18s ease-in-out infinite alternate; }
  .aurora .a2 { animation: drift2 22s ease-in-out infinite alternate; }
  .aurora .a3 { animation: drift3 16s ease-in-out infinite alternate; }
  .stage .ring { animation: orbit 24s linear infinite; }
}
@media (max-width: 640px) {
  .aurora .a1 { width: 420px; height: 420px; right: -160px; top: -160px; }
  .aurora .a2 { width: 360px; height: 360px; }
  .stage .ring { width: 400px; height: 400px; }
}
.amount .from { width: 100%; font-size: 15px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); margin-bottom: -2px; }

/* Legal pages */
.legal { padding-block: 56px 96px; }
.legal-wrap { max-width: 760px; display: flex; flex-direction: column; gap: 16px; }
.legal h1 { font-size: clamp(34px, 5vw, 48px); font-weight: 700; letter-spacing: -0.035em; margin-top: 8px; }
.legal h2 { font-size: 21px; letter-spacing: -0.02em; margin-top: 20px; }
.legal p, .legal li { color: var(--ink-2); }
.legal ul { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 6px; }
.legal a { color: var(--violet); }
.legal .updated { color: var(--muted); font-size: 14px; }
.back-dark { color: var(--muted); }
.back-dark:hover { color: var(--ink); }
.foot-legal { display: flex; gap: 18px; flex-wrap: wrap; }
.foot-legal a { color: #AEB8CB; text-decoration: none; }
.foot-legal a:hover { color: #FFFFFF; }
.consent a { color: var(--violet); }

/* Local landing pages (/terrassa/, /ca/terrassa/) */
.local-top { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; }
.lang-switch { color: #AEB8CB; font-size: 14px; text-decoration: none; border: 1px solid rgba(255,255,255,.18); border-radius: 999px; padding: 6px 12px; }
.lang-switch:hover { color: #FFFFFF; border-color: rgba(255,255,255,.4); }
.local-proof li svg { color: #4FD3A0; }
.page-local .hero { padding-bottom: 80px; }
.page-local .case .label { color: var(--violet); }
.zone { margin-top: 48px; display: flex; flex-direction: column; gap: 16px; }
.cities { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 10px; }
.cities li { display: inline-flex; align-items: center; gap: 8px; padding: 9px 14px; border-radius: 999px; background: var(--soft); font-size: 15px; font-weight: 500; }
.cities li svg { color: var(--violet); }
.section-head.single { grid-template-columns: minmax(0, 1fr); }
.faq-wrap { max-width: 860px; }
.faq { display: flex; flex-direction: column; border-top: 1px solid var(--line); }
.faq-item { border-bottom: 1px solid var(--line); }
.faq-item summary {
  list-style: none; cursor: pointer; padding: 22px 44px 22px 0; position: relative;
  font-family: var(--display); font-size: 19px; font-weight: 700; letter-spacing: -0.02em;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: ""; position: absolute; right: 6px; top: 50%; width: 12px; height: 12px; margin-top: -8px;
  border-right: 2.5px solid var(--violet); border-bottom: 2.5px solid var(--violet); transform: rotate(45deg); transition: transform .2s ease;
}
.faq-item[open] summary::after { transform: rotate(-135deg); margin-top: -2px; }
.faq-item summary:focus-visible { outline: 3px solid var(--lilac); outline-offset: 2px; }
.faq-item p { color: var(--ink-2); padding: 0 0 22px; max-width: 46em; }
@media (max-width: 640px) {
  .faq-item summary { font-size: 17px; padding: 18px 36px 18px 0; }
}
