/* ============================================================
   VELOZ — veloz.dev
   Palette, type and geometry follow "Guía de uso veloz".
   The one repeated geometry is the Z-cut: 47.74°, measured off
   the diagonal of the z in the wordmark. Nothing else is angled.
   ============================================================ */

/* ---------- Fonts (licensed OFL, self-hosted) ---------- */
@font-face {
  font-family: 'Poppins';
  src: url('../fonts/poppins-300.woff2') format('woff2');
  font-weight: 300; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Poppins';
  src: url('../fonts/poppins-400.woff2') format('woff2');
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Poppins';
  src: url('../fonts/poppins-700.woff2') format('woff2');
  font-weight: 700; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Titillium Web';
  src: url('../fonts/titillium-400-italic.woff2') format('woff2');
  font-weight: 400; font-style: italic; font-display: swap;
}

/* ---------- Tokens ---------- */
:root {
  --ink:        #070028;
  --ink-deep:   #011E35;
  --teal:       #53999A;
  --lime:       #D2E664;
  --paper:      #FFFFFF;

  --flow: linear-gradient(115deg, var(--ink-deep) 0%, var(--teal) 100%);

  --surface:      rgba(255, 255, 255, 0.035);
  --surface-lift: rgba(255, 255, 255, 0.06);
  --line:         rgba(83, 153, 154, 0.22);
  --line-strong:  rgba(83, 153, 154, 0.45);

  --text:      #FFFFFF;
  --text-dim:  rgba(255, 255, 255, 0.68);
  --text-mute: rgba(255, 255, 255, 0.50);

  /* The Z-cut. 90 − 47.74 = 42.26 is the skew that yields a 47.74° edge. */
  --z-skew: -42.26deg;

  --sans:    'Poppins', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif;
  --voice:   'Titillium Web', Georgia, serif;

  --shell:   min(1180px, 100% - 3rem);
  --radius:  18px;

  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--ink);
  color: var(--text);
  font-family: var(--sans);
  font-weight: 300;
  font-size: clamp(1rem, 0.96rem + 0.2vw, 1.0625rem);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; }
h1, h2, h3 { font-weight: 700; line-height: 1.05; letter-spacing: -0.035em; margin: 0; }
p { margin: 0; }
ul { margin: 0; padding: 0; list-style: none; }

/* ---------- Shared ---------- */
.shell { width: var(--shell); margin-inline: auto; }

.skip {
  position: absolute; left: 0.75rem; top: -100vh; z-index: 100;
  background: var(--lime); color: var(--ink);
  padding: 0.7rem 1.1rem; border-radius: 10px;
  font-weight: 700; font-size: 0.9rem; text-decoration: none;
}
.skip:focus { top: 0.75rem; }

:where(a, button, summary, [tabindex]):focus-visible {
  outline: 2px solid var(--lime);
  outline-offset: 3px;
  border-radius: 6px;
}

/* The signature: a lime parallelogram cut to the wordmark's z angle. */
.slash {
  display: inline-block;
  width: 30px; height: 5px;
  background: var(--lime);
  transform: skewX(var(--z-skew));
  flex: none;
}
.slash--sm { width: 16px; height: 3px; }

.eyebrow {
  display: flex; align-items: center; gap: 0.7rem;
  font-family: var(--voice); font-style: italic;
  font-size: 0.9rem; letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--teal);
  margin-bottom: 1.1rem;
}

/* Present for assistive tech and crawlers, absent visually. */
.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%);
  white-space: nowrap; border: 0;
}

.section { padding-block: clamp(4.5rem, 9vw, 7.5rem); }
.section__title { font-size: clamp(1.85rem, 1.2rem + 2.6vw, 3rem); }
.section__head { max-width: 46rem; margin-bottom: clamp(2.5rem, 5vw, 3.5rem); }
.section__head h2 { font-size: clamp(1.85rem, 1.2rem + 2.6vw, 3rem); }
.section__head p {
  color: var(--text-dim); margin-top: 1.1rem;
  font-size: clamp(1rem, 0.95rem + 0.3vw, 1.13rem); max-width: 40rem;
}

/* ---------- Header ---------- */
.masthead {
  position: sticky; top: 0; z-index: 50;
  background: rgba(7, 0, 40, 0.78);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.masthead__inner {
  display: flex; align-items: center; gap: 1.5rem;
  min-height: 70px;
}
/* The mark reads as VZ at rest and unfolds to the full wordmark on hover,
   focus or press. Both marks share a left edge and cap height, and the box
   animates between their two intrinsic widths, so the swap reads as one
   movement rather than a cut. Widths come from the measured aspect ratios:
   monogram 1.6365, wordmark 3.3276, both at 26px tall. */
.brand {
  display: flex; align-items: center;
  text-decoration: none; margin-right: auto;
  --mark-h: 26px;
}
.brand__swap {
  position: relative; display: block;
  height: var(--mark-h);
  width: calc(var(--mark-h) * 1.6365);
  /* Clipping makes the wider wordmark unfold left to right as the box grows,
     instead of overflowing and colliding with the nav mid-transition. */
  overflow: hidden;
  transition: width 0.42s var(--ease);
}
.brand__swap svg {
  position: absolute; inset: 0 auto 0 0;
  height: 100%; width: auto;
}
/* VZ clears before the wordmark arrives, so the two never sit half-visible on
   top of each other; the box keeps easing after, which carries the reveal. */
.brand__vz   { opacity: 1; transition: opacity 0.14s var(--ease); }
.brand__word { opacity: 0; transition: opacity 0.26s var(--ease) 0.13s; }

.brand:hover .brand__swap,
.brand:focus-visible .brand__swap,
.brand:active .brand__swap { width: calc(var(--mark-h) * 3.3276); }

.brand:hover .brand__vz,
.brand:focus-visible .brand__vz,
.brand:active .brand__vz { opacity: 0; }

.brand:hover .brand__word,
.brand:focus-visible .brand__word,
.brand:active .brand__word { opacity: 1; }

/* Links to VELOZ's own developer page on each store. */
.storelinks { display: flex; align-items: center; gap: 0.15rem; }
.storelink {
  display: grid; place-items: center;
  width: 34px; height: 34px; border-radius: 50%;
  color: var(--text-mute);
  transition: color 0.2s var(--ease), background 0.2s var(--ease);
}
.storelink svg { height: 17px; width: auto; }
.storelink:hover { color: var(--lime); background: var(--surface-lift); }

.mainnav { display: flex; align-items: center; gap: 1.6rem; }
.mainnav a {
  text-decoration: none; font-size: 0.94rem; color: var(--text-dim);
  transition: color 0.2s var(--ease);
}
.mainnav a:hover { color: var(--lime); }

.langswitch {
  display: flex; align-items: center; gap: 0.4rem;
  font-size: 0.82rem; letter-spacing: 0.05em;
  border: 1px solid var(--line); border-radius: 999px;
  padding: 0.3rem 0.35rem;
}
.langswitch a, .langswitch span {
  text-decoration: none; padding: 0.15rem 0.55rem; border-radius: 999px;
  color: var(--text-mute); text-transform: uppercase;
}
.langswitch [aria-current='true'] { background: var(--lime); color: var(--ink); font-weight: 700; }

/* ---------- Hero ---------- */
.hero { position: relative; padding-top: clamp(2.5rem, 4vw, 4rem); overflow: hidden; }
.hero::before {
  content: ''; position: absolute; inset: -30% -10% auto -10%; height: 120%;
  background: var(--flow); opacity: 0.4;
  transform: skewY(-8deg); transform-origin: top left;
  pointer-events: none; z-index: -1;
  mask-image: linear-gradient(to bottom, #000 0%, transparent 82%);
  -webkit-mask-image: linear-gradient(to bottom, #000 0%, transparent 82%);
}
.hero h1 {
  font-size: clamp(2.4rem, 1.15rem + 4.4vw, 4.3rem);
  letter-spacing: -0.045em;
  text-wrap: balance;
  max-width: 17ch;
}
.hero h1 em {
  font-style: normal;
  background: linear-gradient(100deg, var(--lime) 20%, var(--teal) 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero__lede {
  margin-top: 1.25rem; max-width: 46ch;
  font-size: clamp(1.05rem, 1rem + 0.4vw, 1.2rem);
  color: var(--text-dim);
}
.hero__actions { display: flex; flex-wrap: wrap; gap: 0.9rem; margin-top: 1.9rem; }

.btn {
  display: inline-flex; align-items: center; gap: 0.6rem;
  padding: 0.85rem 1.6rem; border-radius: 999px;
  font-weight: 700; font-size: 0.97rem; text-decoration: none;
  transition: transform 0.25s var(--ease), background 0.25s var(--ease);
}
.btn--primary { background: var(--lime); color: var(--ink); }
.btn--ghost { border: 1px solid var(--line-strong); color: var(--text); }
.btn:hover { transform: translate(2.7px, -3px); }   /* along the Z vector */
.btn--ghost:hover { background: var(--surface-lift); }

.facts {
  display: flex; flex-wrap: wrap; gap: 2.4rem;
  margin-top: 2.4rem; padding-top: 1.7rem;
  border-top: 1px solid var(--line);
}
.facts div strong {
  display: block; font-size: 1.9rem; font-weight: 700;
  letter-spacing: -0.04em; color: var(--lime);
}
.facts div span {
  font-family: var(--voice); font-style: italic;
  font-size: 0.9rem; color: var(--text-mute);
}

/* ---------- Icon marquee ---------- */
/* Full-bleed: sits outside .shell so the icons run edge to edge. */
.marquee {
  margin-top: clamp(2.5rem, 4vw, 3.5rem);
  padding-bottom: clamp(1rem, 2vw, 2rem);
  position: relative;
}
.marquee::before, .marquee::after {
  content: ''; position: absolute; top: 0; bottom: 0;
  width: clamp(60px, 14%, 220px); z-index: 2;
  pointer-events: none;
}
.marquee::before {
  left: 0;
  background: linear-gradient(to right, var(--ink) 15%, rgba(7, 0, 40, 0) 100%);
}
.marquee::after {
  right: 0;
  background: linear-gradient(to left, var(--ink) 15%, rgba(7, 0, 40, 0) 100%);
}

.marquee__row { overflow: hidden; padding-block: 0.55rem; }
.marquee__track {
  display: flex; gap: 1.1rem; width: max-content;
  animation: slide 52s linear infinite;
}
.marquee__row--rev .marquee__track { animation-direction: reverse; animation-duration: 64s; }
.marquee:hover .marquee__track { animation-play-state: paused; }
@keyframes slide { to { transform: translateX(-50%); } }

.chip-app {
  display: block; border: 0; padding: 0; background: none; cursor: pointer;
  border-radius: 15px; line-height: 0;
  transition: transform 0.3s var(--ease), filter 0.3s var(--ease);
  filter: saturate(0.85);
}
.chip-app img { width: 62px; height: 62px; border-radius: 15px; }
.chip-app:hover { transform: translate(2.7px, -3px); filter: saturate(1.15); }

/* ---------- Acronym band ---------- */
.acronym { border-block: 1px solid var(--line); }
.acronym__list {
  display: grid; grid-template-columns: repeat(5, 1fr);
  gap: 1px; background: var(--line);
}
.acronym__list li { background: var(--ink); padding: clamp(1.5rem, 3vw, 2.4rem) 1.3rem; }
.acronym__list b {
  display: block; font-size: clamp(2rem, 1.4rem + 2vw, 3.1rem);
  font-weight: 700; letter-spacing: -0.05em; color: var(--lime); line-height: 1;
}
.acronym__list span {
  display: block; margin-top: 0.7rem;
  font-family: var(--voice); font-style: italic; font-size: 1.02rem; color: var(--teal);
}
.acronym__list p { margin-top: 0.45rem; font-size: 0.88rem; color: var(--text-mute); line-height: 1.5; }

/* ---------- Filters ---------- */
.filters {
  display: flex; flex-wrap: wrap; gap: 0.6rem;
  margin-bottom: 2.5rem;
}
.filter {
  display: inline-flex; align-items: center; gap: 0.55rem;
  border: 1px solid var(--line); background: none; color: var(--text-dim);
  font-family: var(--sans); font-size: 0.9rem; font-weight: 400;
  padding: 0.5rem 1.05rem; border-radius: 999px; cursor: pointer;
  transition: color 0.2s var(--ease), border-color 0.2s var(--ease), background 0.2s var(--ease);
}
.filter::before {
  content: ''; width: 0; height: 3px; background: var(--lime);
  transform: skewX(var(--z-skew));
  transition: width 0.25s var(--ease);
}
.filter:hover { color: var(--text); border-color: var(--line-strong); }
.filter[aria-pressed='true'] {
  color: var(--text); border-color: var(--line-strong); background: var(--surface-lift);
}
.filter[aria-pressed='true']::before { width: 15px; }
.filter em { font-style: normal; color: var(--text-mute); font-size: 0.82rem; }

/* ---------- App grid ---------- */
.appgrid {
  display: grid; gap: 1.1rem;
  grid-template-columns: repeat(auto-fill, minmax(325px, 1fr));
}
.app {
  display: flex; flex-direction: column;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 1.5rem;
  transition: transform 0.3s var(--ease), border-color 0.3s var(--ease), background 0.3s var(--ease);
}
.app:hover {
  transform: translate(2.7px, -3px);          /* along the Z vector */
  border-color: var(--line-strong);
  background: var(--surface-lift);
}
.app.is-hit { border-color: var(--lime); }
.app[hidden] { display: none; }

.app__top { display: flex; gap: 1.1rem; align-items: flex-start; }
.app__icon {
  width: 74px; height: 74px; border-radius: 17px; flex: none;
  border: 1px solid rgba(255, 255, 255, 0.08);
}
.app__name { font-size: 1.13rem; letter-spacing: -0.025em; }
.app__tag {
  font-family: var(--voice); font-style: italic;
  color: var(--teal); font-size: 0.97rem; margin-top: 0.25rem;
}
.app__blurb {
  margin-top: 1.1rem; font-size: 0.93rem; line-height: 1.62; color: var(--text-dim);
}

.app__meta {
  display: flex; flex-wrap: wrap; gap: 0.5rem;
  margin-top: 1.1rem; font-size: 0.78rem;
}
.app__meta span {
  border: 1px solid var(--line); border-radius: 999px;
  padding: 0.2rem 0.7rem; color: var(--text-mute);
}
.app__meta .is-price { color: var(--lime); border-color: rgba(210, 230, 100, 0.35); }

.app__foot { margin-top: auto; padding-top: 1.4rem; }
.app__get {
  display: flex; flex-wrap: wrap; align-items: center; gap: 0.75rem;
}
.weblink + .app__get { margin-top: 0.9rem; }

/* Nine of the eleven apps have a browser version; this points at it. */
.weblink {
  display: inline-flex; align-items: center; gap: 0.45rem;
  font-size: 0.87rem; color: var(--lime); text-decoration: none;
  border-bottom: 1px solid rgba(210, 230, 100, 0.28);
  padding-bottom: 2px;
  transition: border-color 0.2s var(--ease);
}
.weblink:hover { border-bottom-color: var(--lime); }
.weblink__arrow {
  font-size: 0.95em; line-height: 1;
  transition: transform 0.25s var(--ease);
}
.weblink:hover .weblink__arrow { transform: translate(2.7px, -3px); }  /* Z vector */

/* Inline prose link, e.g. the developer's name in the studio section. */
.inlink {
  color: var(--text); text-decoration: none;
  border-bottom: 1px solid var(--line-strong);
  transition: color 0.2s var(--ease), border-color 0.2s var(--ease);
}
.inlink:hover { color: var(--lime); border-bottom-color: var(--lime); }
/* Official badges: rendered at their true aspect, with the clear space each
   vendor's guidelines require (¼ of badge height) preserved as margin. */
.badge { display: inline-block; line-height: 0; transition: opacity 0.2s var(--ease); }
.badge:hover { opacity: 0.82; }
.badge img { height: 42px; width: auto; }
.badge--gp img { height: 42px; }

.app__solo {
  font-family: var(--voice); font-style: italic;
  font-size: 0.84rem; color: var(--text-mute);
}

/* ---------- Studio ---------- */
.studio__grid {
  display: grid; gap: clamp(2rem, 5vw, 4rem);
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  align-items: start;
}
.studio__prose { margin-top: 1.4rem; }
.studio__body p + p { margin-top: 1.1rem; }
.studio__body p { color: var(--text-dim); }
.studio__body em { font-family: var(--voice); font-style: italic; color: var(--teal); }
/* The brand gradient reaches #53999A, where white text would land at 3.3:1.
   An ink scrim keeps the gradient readable and holds white above 8:1. */
.studio__card {
  background:
    linear-gradient(rgba(7, 0, 40, 0.45), rgba(7, 0, 40, 0.45)),
    var(--flow);
  border-radius: var(--radius);
  padding: clamp(1.8rem, 3vw, 2.4rem);
}
.studio__card h3 { font-size: 1.2rem; margin-bottom: 1.2rem; }
.studio__card li {
  display: flex; gap: 0.8rem; align-items: baseline;
  padding-block: 0.6rem; border-top: 1px solid rgba(255, 255, 255, 0.16);
  font-size: 0.94rem;
}
.studio__card li:first-of-type { border-top: 0; }
.studio__card li b { font-weight: 700; }

/* ---------- FAQ ---------- */
.faq__list { display: grid; gap: 1px; background: var(--line); border-block: 1px solid var(--line); }
.faq__list > div { background: var(--ink); padding: clamp(1.4rem, 3vw, 2rem) 0; }
.faq h3 { font-size: 1.08rem; letter-spacing: -0.02em; }
.faq h3 + p { margin-top: 0.7rem; color: var(--text-dim); max-width: 62ch; font-size: 0.96rem; }

/* ---------- Footer ---------- */
.foot { border-top: 1px solid var(--line); padding-block: 3.5rem 2.5rem; margin-top: 2rem; }
.foot__grid {
  display: flex; flex-wrap: wrap; gap: 2.5rem; justify-content: space-between;
  align-items: flex-start;
}
.foot__mark { height: 30px; width: auto; margin-bottom: 1rem; }
.foot__brand p { font-family: var(--voice); font-style: italic; color: var(--text-mute); font-size: 0.9rem; }
.foot__cols { display: flex; flex-wrap: wrap; gap: 3rem; }
.foot h4 {
  font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.1em;
  color: var(--text-mute); margin: 0 0 0.9rem; font-weight: 400;
}
.foot li { margin-bottom: 0.55rem; }
.foot a { text-decoration: none; color: var(--text-dim); font-size: 0.92rem; }
.foot a:hover { color: var(--lime); }
.foot__legal {
  margin-top: 3rem; padding-top: 1.6rem; border-top: 1px solid var(--line);
  display: flex; flex-wrap: wrap; gap: 1rem 2rem; justify-content: space-between;
  font-size: 0.8rem; color: var(--text-mute); line-height: 1.6;
}
.foot__legal p { max-width: 62ch; }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  :root { --shell: min(1180px, 100% - 2.2rem); }
  .studio__grid { grid-template-columns: 1fr; }
  .acronym__list { grid-template-columns: repeat(2, 1fr); }
  .acronym__list li:last-child { grid-column: span 2; }
}
@media (max-width: 640px) {
  :root { --shell: min(1180px, 100% - 1.75rem); }
  /* Keep the nav — the brand is already compact at VZ, so just tighten. */
  .brand { --mark-h: 24px; }
  .masthead__inner { gap: 0.75rem; min-height: 62px; }
  .mainnav { gap: 0.95rem; }
  .mainnav a { font-size: 0.86rem; }
  .storelink { width: 30px; height: 30px; }
  .storelink svg { height: 15px; }
  .langswitch { font-size: 0.75rem; padding: 0.25rem 0.3rem; }
  .langswitch a, .langswitch span { padding: 0.12rem 0.42rem; }
  .appgrid { grid-template-columns: 1fr; }
  .facts { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.4rem 1.5rem; }
  .app__icon { width: 62px; height: 62px; }
  .chip-app img { width: 52px; height: 52px; }
  .badge img, .badge--gp img { height: 38px; }
}
@media (max-width: 420px) {
  .acronym__list { grid-template-columns: 1fr; }
  .acronym__list li:last-child { grid-column: auto; }
}
/* Below this the three nav links and the language switch cannot both fit;
   the page is a single scroll, so the links go and the switch stays. */
@media (max-width: 379px) {
  .mainnav { display: none; }
}

/* ---------- Motion preference ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
  .marquee__track { animation: none; width: auto; }
  .marquee__row { overflow-x: auto; }
  .marquee::before, .marquee::after { display: none; }
  .btn:hover, .app:hover, .chip-app:hover { transform: none; }
}
