/* Grawwww studio — shared system. One brand, three rooms:
   home and /marcas are dark and cinematic, /equipos is a dark engineering room, /empresas is warm paper.
   Display: Bricolage Grotesque, accents: Instrument Serif italic, body: Inter, data: JetBrains Mono. */
/* Self-hosted fonts (SIL OFL 1.1, licences in assets/fonts/OFL-*.txt). Latin subset, from fontsource 5.3.0. */
:root {
  color-scheme: dark;
  --bg: #08080a;
  --bg-2: #111114;
  --bg-3: #18181c;
  --text: #f3f1ec;
  --muted: #a19d95;
  --dim: #6d6a64;
  --line: rgba(17, 17, 17, .1);
  --line-2: rgba(17, 17, 17, .18);
  --orange: #E5007D;
  --orange-2: #E5007D;
  --cobalt: #4b5bff;
  --mint: #12A9E6;
  --display: "Anybody", "Arial Narrow", system-ui, sans-serif;
  --serif: "Anybody", Georgia, serif;
  --body: "Schibsted Grotesk", "Segoe UI", system-ui, sans-serif;
  --mono: "Spline Sans Mono", ui-monospace, Menlo, monospace;
  --gutter: clamp(16px, 4vw, 64px);
  --max: 1360px;
  --ease: cubic-bezier(.2, .7, .1, 1);
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
html, body { margin: 0; }
body { background: var(--bg); color: var(--text); font: 400 17px/1.6 var(--body); -webkit-font-smoothing: antialiased; overflow-x: hidden; }
img, video, svg, canvas { max-width: 100%; display: block; }
a { color: inherit; }
button { font: inherit; color: inherit; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--orange); outline-offset: 3px; border-radius: 6px; }
h1, h2, h3, h4 { font-family: var(--display); margin: 0; line-height: .98; letter-spacing: -.035em; font-weight: 800; text-wrap: balance; }
p { margin: 0; }
em.s, h1 em, h2 em { font-family: var(--serif); font-style: italic; font-weight: 400; letter-spacing: -.01em; }
.wrap { max-width: var(--max); margin: 0 auto; padding-inline: var(--gutter); }
.eyebrow { font: 500 12px/1.4 var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--orange); display: inline-flex; gap: 10px; align-items: center; }
.eyebrow::before { content: ""; width: 18px; height: 1px; background: currentColor; }
.muted { color: var(--muted); }
.mono { font-family: var(--mono); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* grain over everything */
.grain { position: fixed; inset: 0; pointer-events: none; z-index: 60; opacity: .05; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E"); }

/* header: clear over the hero, then a floating blurred capsule once the page scrolls */
.top { position: fixed; inset: 0 0 auto; z-index: 40; color: var(--text); padding-top: env(safe-area-inset-top, 0px); pointer-events: none; }
.top .wrap { padding-block: 14px; }
.top .topbar { pointer-events: auto; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 10px 10px 10px 4px; border: 1px solid transparent; border-radius: 999px;
  transition: background .4s var(--ease), border-color .4s, padding .4s var(--ease), box-shadow .4s; }
.top.solid .topbar { padding-left: 22px; background: color-mix(in srgb, var(--bg) 72%, transparent); border-color: var(--line);
  -webkit-backdrop-filter: blur(18px) saturate(1.5); backdrop-filter: blur(18px) saturate(1.5); box-shadow: 0 12px 40px rgba(0,0,0,.18); }
.logo { font: 800 25px/1 var(--display); letter-spacing: -.04em; text-decoration: none; white-space: nowrap; flex: none; }
.logo i { font-style: normal; color: var(--orange); }
.top nav { display: flex; align-items: center; gap: 6px; font: 500 14.5px var(--body); }
.top nav a { text-decoration: none; opacity: .78; padding: 9px 14px; border-radius: 999px; transition: opacity .2s, background .2s; }
.top nav a:hover { opacity: 1; background: color-mix(in srgb, var(--text) 8%, transparent); }
.top nav a[aria-current] { opacity: 1; background: color-mix(in srgb, var(--text) 10%, transparent); }
.top .talk { opacity: 1; background: var(--text); color: var(--bg); padding: 10px 18px; margin-left: 6px; }
.top .talk:hover { background: var(--orange); color: #fff; }
@media (max-width: 860px) { .top nav a:not(.talk) { display: none; } }

/* buttons */
.btn { display: inline-flex; align-items: center; gap: 12px; padding: 16px 26px; border-radius: 999px; font: 600 16px/1 var(--body); text-decoration: none; cursor: pointer; border: 0;
  transition: transform .3s var(--ease), background .2s, color .2s; }
.btn svg { width: 18px; height: 18px; transition: transform .3s var(--ease); }
.btn:hover svg { transform: translateX(4px); }
.btn:active { transform: scale(.97); }
.btn.hot { background: var(--orange); color: #120a06; }
.btn.hot:hover { background: var(--orange-2); }
.btn.ghost { border: 1px solid var(--line-2); color: var(--text); background: transparent; }
.btn.ghost:hover { background: rgba(17, 17, 17, .06); }
.btn.light { background: var(--text); color: var(--bg); }
.row { display: flex; flex-wrap: wrap; gap: 12px; }

/* sections */
.sec { padding-block: clamp(88px, 11vw, 168px); position: relative; }
.sec-head { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: clamp(24px, 5vw, 96px); align-items: end; margin-bottom: clamp(48px, 6vw, 96px); }
.sec-head h2 { font-size: clamp(44px, 6.4vw, 104px); margin-top: 20px; }
.sec-head p { color: var(--muted); font-size: clamp(17px, 1.4vw, 20px); max-width: 30em; }
@media (max-width: 900px) { .sec-head { grid-template-columns: minmax(0, 1fr); } }

/* capability ticker */
.ticker { border-block: 1px solid var(--line); overflow: hidden; white-space: nowrap; padding-block: 18px; }
.ticker-track { display: inline-flex; gap: 52px; animation: tick 46s linear infinite; font: 500 13px var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.ticker-track span { display: inline-flex; align-items: center; gap: 52px; }
.ticker-track span::after { content: "✦"; color: var(--orange); letter-spacing: 0; }
@keyframes tick { to { transform: translateX(-50%); } }

/* big contact block shared by all pages */
.cta { position: relative; overflow: hidden; border-top: 1px solid var(--line); }
.cta::before { content: ""; position: absolute; width: 70vw; height: 70vw; right: -20vw; bottom: -40vw; pointer-events: none;
  background: radial-gradient(closest-side, rgba(229, 0, 125, .28), transparent 70%); filter: blur(10px); }
.cta .wrap { position: relative; padding-block: clamp(96px, 13vw, 200px) clamp(56px, 7vw, 96px); }
.cta h2 { font-size: clamp(72px, 15vw, 240px); line-height: .86; letter-spacing: -.055em; }
.cta h2 i { font-style: normal; color: var(--orange); }
.cta-grid { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: clamp(28px, 5vw, 80px); margin-top: clamp(40px, 5vw, 72px); align-items: end; }
.cta-grid p { color: var(--muted); font-size: clamp(17px, 1.5vw, 21px); max-width: 28em; }
.mail { display: grid; gap: 14px; justify-items: start; }
.mail a.addr { font: 500 clamp(22px, 2.6vw, 38px)/1.1 var(--mono); letter-spacing: -.02em; text-decoration: none; border-bottom: 1px solid var(--line-2); padding-bottom: 6px; }
.mail a.addr:hover { color: var(--orange); border-color: var(--orange); }
@media (max-width: 900px) { .cta-grid { grid-template-columns: minmax(0, 1fr); } }

.foot { border-top: 1px solid var(--line); }
.foot .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 16px; padding-block: 28px 36px; font-size: 14px; color: var(--muted); }
.foot nav { display: flex; gap: 24px; flex-wrap: wrap; }
.foot a { text-decoration: none; }
.foot a:hover { color: var(--text); }

/* reveal on scroll: content is visible without JS; JS only adds motion */
.js .rv { opacity: 0; transform: translateY(28px); transition: opacity .9s var(--ease), transform .9s var(--ease); }
.js .rv.in { opacity: 1; transform: none; }
.js .rv.d1 { transition-delay: .08s; } .js .rv.d2 { transition-delay: .16s; } .js .rv.d3 { transition-delay: .24s; }
/* headline lines rise from a mask */
.lines > span { display: block; overflow: hidden; padding-bottom: .06em; margin-bottom: -.06em; }
.lines > span > span { display: block; }
.js .lines > span > span { transform: translateY(105%); transition: transform 1.1s var(--ease); }
.js .lines.in > span > span { transform: none; }
.js .lines.in > span:nth-child(2) > span { transition-delay: .08s; }
.js .lines.in > span:nth-child(3) > span { transition-delay: .16s; }
.js .lines.in > span:nth-child(4) > span { transition-delay: .24s; }
@media (prefers-reduced-motion: reduce) {
  .js .rv, .js .lines > span > span { opacity: 1; transform: none; transition: none; }
  .ticker-track { animation: none; }
  html { scroll-behavior: auto; }
}

/* legal pages: readable article */
.legal { max-width: 46rem; margin: 0 auto; padding: clamp(120px, 14vw, 180px) var(--gutter) clamp(64px, 8vw, 112px); }
.legal h1 { font-size: clamp(40px, 6vw, 72px); line-height: 1; margin-bottom: 14px; }
.legal h2 { font-size: clamp(22px, 2.4vw, 30px); line-height: 1.15; letter-spacing: -.02em; margin: 2.2em 0 .6em; }
.legal p, .legal li { color: rgba(17, 17, 17, .84); font-size: 16.5px; line-height: 1.7; }
.legal p { margin: 0 0 1em; }
.legal ul, .legal ol { margin: 0 0 1.2em; padding-left: 1.3em; display: grid; gap: .4em; }
.legal small { color: var(--muted); font-size: 14px; }
.legal a { color: var(--orange-2); text-underline-offset: 3px; }
.legal a:hover { color: var(--text); }
.legal strong { color: var(--text); font-weight: 600; }
.legal table { border-collapse: collapse; width: 100%; margin: 0 0 1.4em; font-size: 15px; }
.legal th, .legal td { border: 1px solid var(--line-2); padding: 8px 10px; text-align: left; vertical-align: top; }

/* language switch (equipos ES/EN) */
.lang { pointer-events: auto; display: inline-flex; gap: 2px; font: 500 12px/1 var(--mono); letter-spacing: .08em; margin-left: -8px; margin-right: 2px; }
.top nav { margin-left: auto; }
.lang a, .lang span { text-decoration: none; padding: 7px 9px; border-radius: 999px; opacity: .6; }
.lang a:hover { opacity: 1; background: color-mix(in srgb, var(--text) 8%, transparent); }
.lang [aria-current] { opacity: 1; background: color-mix(in srgb, var(--text) 12%, transparent); }

/* Link from the equipos hero to the published case write-up */
.hero-case{display:inline-block;margin-top:22px;font:500 13px/1.4 "Spline Sans Mono",ui-monospace,monospace;color:var(--mint);text-decoration:none;border-bottom:1px solid color-mix(in srgb,var(--mint) 40%,transparent);padding-bottom:2px}
.hero-case:hover{border-bottom-color:var(--mint)}
.hero-lang{margin-left:22px;opacity:.7}

/* Mobile menu (button added by site.js) */
.menu-btn { display: none; }
@media (max-width: 860px) {
  .top .topbar { position: relative; }
  .top .lang { margin-left: auto; }
  .top nav { display: none; }
  .menu-btn { pointer-events: auto; display: inline-flex; flex-direction: column; justify-content: center; gap: 5px; width: 42px; height: 42px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--line-2); background: transparent; color: var(--text); cursor: pointer; }
  .menu-btn span { display: block; height: 1.5px; background: currentColor; border-radius: 2px; transition: transform .2s; }
  .menu-open .menu-btn span:first-child { transform: translateY(3.25px) rotate(45deg); }
  .menu-open .menu-btn span:last-child { transform: translateY(-3.25px) rotate(-45deg); }
  .menu-open nav { display: flex; flex-direction: column; align-items: stretch; gap: 2px; position: absolute; top: calc(100% + 8px); left: 0; right: 0; padding: 8px; background: var(--bg); border: 1px solid var(--line-2); border-radius: 24px; box-shadow: 0 24px 48px rgba(0, 0, 0, .28); }
  .menu-open nav a, .menu-open nav a:not(.talk) { display: block; padding: 14px 18px; font-size: 17px; opacity: 1; }
  .menu-open nav a.talk { margin-top: 6px; text-align: center; }
}
