/*
 * Data Driven by Design — styles
 *
 * Contents (same order as the page):
 *   1. Fonts
 *   2. Settings: colours, fonts, spacing and widths
 *   3. Base
 *   4. Shared pieces: text styles, buttons, links, icons, forms
 *   5. Header
 *   6. Hero (opening)
 *   7. Shared section layout, arrows and reveal
 *   8. How we do it
 *   9. Dashboard examples (tablet frame) and large view
 *  10. BI Challenges
 *  11. Our expertise
 *  12. Led by Pablo
 *  13. Contact
 *  14. Footer
 *  15. Portfolio window
 *  16. Privacy page, download page and admin
 *  17. Cookie banner
 *
 * Each section keeps its own small-screen rules right after it.
 */


/* 1. Fonts ------------------------------------------------------------------
 * Both files are served from this website (no external font services).
 * Newsreader Italic: Production Type, SIL Open Font License 1.1 (see fonts/).
 */
@font-face {
  font-family: "Montserrat";
  src: url("/assets/fonts/montserrat-latin-wght.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Newsreader";
  src: url("/assets/fonts/newsreader-latin-italic.woff2") format("woff2");
  font-weight: 200 800;
  font-style: italic;
  font-display: swap;
}


/* 2. Settings ---------------------------------------------------------------
 * Change colours, fonts, spacing and widths here; the rest of the file uses
 * these names.
 */
:root {
  /* Base colours */
  --color-black: #000000;
  --color-white: #ffffff;
  --color-text: #1d1d1d;              /* main text on light backgrounds */
  --color-text-soft: #3d3d3d;         /* secondary text on light backgrounds */
  --color-text-muted: #555555;        /* hero tagline */
  --color-text-on-dark: #cfcfcf;      /* secondary text on black */
  --color-text-on-dark-soft: #a8a8a8; /* small print on black */
  --color-line: #cfcfcf;              /* thin dividing lines on light backgrounds */
  --color-line-soft: #e6e6e6;         /* line between white sections */
  --color-accent: #f4ff5c;            /* brand yellow: hero accent and step numbers, used sparingly */
  --color-line-on-dark: #333333;      /* thin dividing lines on black */
  --color-grey: #808080;              /* inactive carousel dots */
  --color-hover: #f2f2f2;             /* hover in the share menu */
  --color-error: #ffb4b4;             /* form errors (on black) */

  /* Section backgrounds, in page order */
  --bg-header: var(--color-black);
  --bg-hero: #02050b;                  /* shown until the hero video loads; matches its dark base */
  --bg-about: #adaeb0;                 /* "Dirigido por" section: the grey the portrait cut-out was made on */
  --bg-contact: var(--color-black);

  /* Fonts */
  --font-main: "Montserrat", system-ui, sans-serif;
  --font-quote: "Newsreader", Georgia, "Times New Roman", serif;
  --letter-spacing-wide: 0.32em;      /* uppercase labels */

  /* Spacing */
  --page-edge: clamp(16px, 5vw, 80px);      /* left/right margin of every section */
  --section-space: clamp(64px, 8vw, 112px); /* top/bottom space of sections */
  --header-height: 64px;

  /* Content widths */
  --width-intro: 640px;   /* section introductions */
  --width-text: 62ch;     /* comfortable line length for paragraphs */
  --width-content: 1296px; /* every section is centred at this width */

  /* Motion: short, small and decelerating */
  --ease-out: cubic-bezier(.22, .61, .36, 1);

  color-scheme: light;
}


/* 3. Base ------------------------------------------------------------------ */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: var(--header-height); }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
body {
  margin: 0;
  background: var(--color-white);
  color: var(--color-text);
  font-family: var(--font-main);
  font-size: 17px;
  font-weight: 400;
  line-height: 1.6;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}
img, svg { display: block; max-width: 100%; }
p { margin: 0 0 1em; }
b { font-weight: 700; }
a { color: inherit; }
h1, h2, h3 { margin: 0; font-weight: inherit; }
ol, ul { list-style: none; margin: 0; padding: 0; }

/* Respect visitors who ask their system for less motion. */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
}


/* 4. Shared pieces --------------------------------------------------------- */

/* Text only for screen readers */
.sr {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap;
}
/* "Skip to content" link, visible only when focused with the keyboard */
.skip {
  position: absolute; left: 8px; top: -100px; z-index: 100;
  background: var(--color-black); color: var(--color-white); padding: 10px 14px;
}
.skip:focus { top: 8px; }
:focus-visible { outline: 2px solid currentColor; outline-offset: 3px; }
.nowrap { white-space: nowrap; }

/* Small uppercase labels, used as section headings */
.label {
  font-size: 12px;
  font-weight: 400;
  letter-spacing: var(--letter-spacing-wide);
  text-transform: uppercase;
  line-height: 1.6;
  margin: 0 0 1.5em;
}
.label--lg { font-size: 14px; }

/* Uppercase titles (download page) */
.title {
  font-size: clamp(22px, 2.4vw, 28px);
  font-weight: 400;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  line-height: 1.25;
  margin-bottom: 1.2em;
}

/* Rotated bold text: "Dirigido por" */
.tilt {
  display: inline-block;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: clamp(24px, 2.6vw, 32px);
  line-height: 1.15;
  transform: rotate(-8deg);
  transform-origin: left center;
  margin: 0 0 1.4em;
}
.tilt--small { font-size: 20px; text-transform: none; letter-spacing: 0.1em; transform: rotate(-10deg); margin-bottom: 0.8em; }

/* Buttons. .btn is black; --inverse is white; --outline is a white border on black. */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 52px; padding: 14px 28px;
  background: var(--color-black); color: var(--color-white);
  border: 1.5px solid var(--color-black);
  font: inherit; font-size: 12px; font-weight: 600;
  letter-spacing: 0.22em; text-transform: uppercase; text-decoration: none;
  text-align: center; line-height: 1.4; cursor: pointer;
  transition: background-color .2s var(--ease-out), color .2s var(--ease-out), transform .2s var(--ease-out);
}
.btn:hover { background: var(--color-white); color: var(--color-black); }
.btn:active { transform: translateY(1px); }
.btn--small { min-height: 40px; padding: 8px 16px; font-size: 11px; letter-spacing: 0.18em; white-space: nowrap; }
.btn--inverse { background: var(--color-white); color: var(--color-black); border-color: var(--color-white); }
.btn--inverse:hover { background: var(--color-black); color: var(--color-white); }
.btn--outline { background: transparent; color: var(--color-white); border-color: var(--color-white); }
.btn--outline:hover { background: var(--color-white); color: var(--color-black); }
.btn[disabled] { opacity: .6; cursor: progress; }

/* Underlined text link (also used on a <button> in the admin page) */
.link {
  background: none; border: 0; padding: 0; font: inherit; color: inherit; cursor: pointer; text-align: left;
  text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 4px;
}
.link:hover { text-decoration-thickness: 2px; }

/* Round icon buttons (LinkedIn, WhatsApp, share, email) */
.icon {
  display: inline-grid; place-items: center; width: 44px; height: 44px;
  color: inherit; text-decoration: none; cursor: pointer; list-style: none; border-radius: 50%;
  transition: opacity .15s;
}
.icon::-webkit-details-marker { display: none; }
.icon:hover { opacity: .7; }
.icon__svg { width: 22px; height: 22px; fill: currentColor; }

/* Portfolio form (contact section and portfolio window, both on black) */
.form { display: grid; gap: 16px; }
.form__trap { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.form__field { display: grid; gap: 6px; font-size: 13px; letter-spacing: 0.06em; }
.form__field input {
  font: inherit; font-size: 16px; color: var(--color-white); background: transparent;
  border: 0; border-bottom: 1.5px solid #8a8a8a; padding: 10px 0; border-radius: 0;
}
.form__field input:focus { outline: none; border-bottom-color: var(--color-white); }
.form__field input:focus-visible { outline: 2px solid var(--color-white); outline-offset: 4px; }
.form__check { display: grid; grid-template-columns: 22px 1fr; gap: 10px; font-size: 13px; line-height: 1.5; color: #e0e0e0; cursor: pointer; }
.form__check input { width: 18px; height: 18px; margin: 1px 0 0; accent-color: var(--color-white); }
.form__small { font-size: 12px; color: var(--color-text-on-dark-soft); margin: 0; }
.form .btn { justify-self: start; }
.form__status { min-height: 1.6em; margin: 0; font-size: 14px; }
.form__status[data-state="error"] { color: var(--color-error); }


/* 5. Header ---------------------------------------------------------------- */
.bar {
  position: fixed; inset: 0 0 auto 0; z-index: 20;
  height: var(--header-height);
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 0 var(--page-edge);
  background: var(--bg-header); color: var(--color-white);
}
.bar__brand {
  display: inline-flex; align-items: center; gap: 14px;
  font-size: 11px; letter-spacing: var(--letter-spacing-wide); text-transform: uppercase; text-decoration: none; white-space: nowrap;
}
/* The supplied logo file is black; invert() shows it white on the black header. */
.bar__logo { width: 35px; height: auto; flex: none; filter: invert(1); }
.bar__nav { display: flex; align-items: center; gap: clamp(12px, 2vw, 24px); }
/* Language switch (ES / EN), a quiet text link before the booking button. */
.bar__lang {
  display: inline-grid; place-items: center; min-width: 44px; height: 40px; padding: 0 6px;
  font-size: 11px; font-weight: 600; letter-spacing: .18em; text-decoration: none; color: var(--color-text-on-dark);
  transition: color .2s var(--ease-out);
}
.bar__lang:hover { color: var(--color-white); text-decoration: underline; text-underline-offset: 4px; }
.bar__lang:focus-visible { outline: 2px solid var(--color-white); outline-offset: 2px; }

@media (max-width: 640px) {
  .bar__brand { font-size: 9px; letter-spacing: 0.16em; gap: 10px; }
  .bar__logo { width: 28px; }
}
@media (max-width: 420px) {
  /* Logo only: the name is read by screen readers but hidden to save space. */
  .bar__brand span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
  .bar__nav { gap: 6px; }
  .bar .btn--small { padding: 8px 10px; font-size: 10px; letter-spacing: 0.12em; }
}


/* 6. Hero ------------------------------------------------------------------ */
/* Dark opening with a looping video behind the text. The video keeps its left
 * side almost empty for the headline; the veil (::before) darkens that side a
 * little more so the white text always reads, whatever the video is showing. */
.hero {
  position: relative; isolation: isolate; overflow: hidden;
  display: flex; flex-direction: column; justify-content: center;
  min-height: 100vh; min-height: 100svh;   /* the first screen; the fixed header sits on top, inside the padding */
  background: var(--bg-hero); color: var(--color-white);
  padding: calc(var(--header-height) + clamp(32px, 7vh, 104px)) var(--page-edge) clamp(32px, 7vh, 104px);   /* vh: short screens keep it in one screen */
}
.hero__video {
  position: absolute; inset: 0; z-index: -2;
  width: 100%; height: 100%; max-width: none;
  object-fit: cover; object-position: center;   /* when cropped, keep the right side */
  pointer-events: none;
}
.hero::before {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: linear-gradient(90deg, rgba(2,4,10,.55) 0%, rgba(2,4,10,.3) 40%, rgba(2,4,10,0) 62%);
}
/* Inside the general container (same width and edges as the sections below). */
.hero__inner { width: 100%; max-width: var(--width-content); margin: 0 auto; }
.hero__kicker { color: var(--color-text-on-dark); margin-bottom: 28px; }
/* Editorial headline: uppercase sans paired with a contrasting italic serif. */
.hero__title {
  font-size: clamp(44px, 6.2vw, 96px);
  font-weight: 700;
  letter-spacing: -.04em;
  line-height: 1;
  margin: 0 0 32px;
}
.hero__opening, .hero__closing { display: block; text-transform: uppercase; }
.hero__accent {
  display: block;
  font-family: var(--font-quote);
  font-style: italic;
  font-weight: 400;
  font-size: 1.36em;
  line-height: 1.02;
  letter-spacing: -.05em;
  color: var(--color-accent);
  margin: .02em 0 .1em;
}
.hero__closing { font-size: .78em; line-height: 1.08; }
.hero__text { max-width: 46ch; margin: 0; font-size: clamp(15px, 1.05vw, 16px); line-height: 1.6; color: var(--color-text-on-dark-soft); }
/* Match the video selection in site.js. Portrait frames reserve the upper half for copy. */
.hero__poster { position: absolute; inset: 0; z-index: -2; }
.hero__poster img { width: 100%; height: 100%; object-fit: cover; object-position: center; }
.hero__video { opacity: 0; }
.hero__video.is-playing { opacity: 1; }
/* The box holding the video and its still image. Desktop (wide or landscape
   screens, the opposite of the portrait rules below): the box keeps the
   video's 16:9 shape at the hero's height and never grows wider, so on very
   wide screens the video does not blow up and crop the KPIs. It stays
   centred; on narrower screens it overflows and is cropped at both sides. */
.hero__media { position: absolute; inset: 0; z-index: -2; pointer-events: none; }
@media (min-width: 1101px), (min-width: 601px) and (orientation: landscape) {
  .hero__media { inset: 0 auto; left: 50%; transform: translateX(-50%); height: 100%; aspect-ratio: 16 / 9; }
}
/* Screens wider than the video: a gradient over its side edges, from the hero
   background colour (--bg-hero) to clear, so the video fades out softly. */
@media (min-width: 1101px) and (min-aspect-ratio: 16 / 9), (min-width: 601px) and (orientation: landscape) and (min-aspect-ratio: 16 / 9) {
  .hero__media::after {
    content: ""; position: absolute; inset: 0;
    background: linear-gradient(90deg, var(--bg-hero) 0%, rgba(2,5,11,0) 14%, rgba(2,5,11,0) 86%, var(--bg-hero) 100%);
  }
}
/* Wave texture over the whole opening (above the video and the dark overlay,
   below the text). Screen blending drops its black background, so only the
   faint lines of light show. Opacity sets how strong it is. */
.hero__texture {
  position: absolute; inset: 0; z-index: -1; width: 100%; height: 100%; max-width: none;
  object-fit: cover; object-position: left bottom;
  mix-blend-mode: screen; opacity: 0; pointer-events: none;
  -webkit-mask-image: linear-gradient(180deg, transparent 0%, #000 30%, #000 80%, transparent 100%);
          mask-image: linear-gradient(180deg, transparent 0%, #000 30%, #000 80%, transparent 100%);
  transition: opacity 1.2s ease;
}
.hero__texture.is-playing { opacity: .2; }
@media (prefers-reduced-motion: reduce) { .hero__texture { display: none; } }
.hero__pause { position: absolute; right: 20px; bottom: 20px; z-index: 1; width: 40px; height: 40px; border: 1px solid #ffffff55; border-radius: 50%; background: #05071099; color: white; cursor: pointer; }
.hero__pause[hidden] { display: none; }
.hero__pause:focus-visible { outline: 2px solid var(--color-accent); outline-offset: 4px; }
@media (max-width: 1100px) and (orientation: portrait), (max-width: 600px) {
  .hero { justify-content: flex-start; min-height: max(100svh, 125vw); padding-top: calc(var(--header-height) + 44px); padding-bottom: 65vw; }
  .hero__video, .hero__poster { top: auto; bottom: 0; height: auto; aspect-ratio: 4 / 5; mask-image: linear-gradient(to bottom, transparent, #000 18%); }
  .hero__video, .hero__poster img { object-fit: contain; object-position: center bottom; }
  .hero__inner { position: relative; }
  .hero::before { background: linear-gradient(180deg, rgba(2,4,10,.76) 0%, rgba(2,4,10,.68) 43%, rgba(2,4,10,.28) 58%, rgba(2,4,10,.20) 100%); }
  .hero__title { font-size: clamp(44px, 6.2vw, 68px); margin-bottom: 24px; }
}
@media (max-width: 600px) {
  .hero__video, .hero__poster { aspect-ratio: 9 / 16; }
  .hero { min-height: max(100svh, 177.778vw); padding-top: calc(var(--header-height) + 28px); padding-bottom: 95vw; }
  .hero__title { font-size: clamp(36px, 10vw, 54px); }
  .hero__kicker { font-size: 10px; letter-spacing: .2em; margin-bottom: 20px; }
  .hero__text { font-size: 14px; max-width: 40ch; }
}


/* 7. Shared section layout ------------------------------------------------- */
/* Every white section: one centred column, small label, title, short lead. */
.section { padding: var(--section-space) var(--page-edge); background: var(--color-white); }
.section + .section { padding-top: 0; }                    /* white after white: one gap, not two */
.container { max-width: var(--width-content); margin: 0 auto; }
.section__head { max-width: 680px; margin: 0 0 clamp(40px, 5vw, 64px); }
.section__head--center { margin-left: auto; margin-right: auto; text-align: center; }
.section__head .label { color: var(--color-text-soft); margin-bottom: 14px; }
.section__title {
  font-size: clamp(30px, 3.4vw, 44px); font-weight: 700;
  letter-spacing: -.025em; line-height: 1.1; margin: 0; text-wrap: balance;
}
.section__lead { font-size: clamp(17px, 1.35vw, 19px); line-height: 1.6; color: var(--color-text-soft); margin: 18px 0 0; max-width: 58ch; }
.section__head--center .section__lead { margin-left: auto; margin-right: auto; }
/* A thin line between sections that follow each other on white. */
.section + .section > .container { border-top: 1px solid var(--color-line-soft); padding-top: var(--section-space); }

/* Arrow buttons and position (examples and challenges) */
.pager { display: flex; align-items: center; gap: 8px; }
.pager[hidden] { display: none; }
.pager__count { margin: 0; min-width: 52px; text-align: center; font-size: 13px; letter-spacing: .14em; color: var(--color-text-soft); font-variant-numeric: tabular-nums; }
.arrow {
  display: inline-grid; place-items: center; width: 48px; height: 48px; padding: 0;
  background: var(--color-white); border: 1px solid var(--color-line); border-radius: 50%;
  color: var(--color-text); cursor: pointer;
  transition: border-color .2s var(--ease-out), background-color .2s var(--ease-out), transform .2s var(--ease-out);
}
.arrow svg { width: 20px; height: 10px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; transition: transform .2s var(--ease-out); }
.arrow:hover { border-color: var(--color-text); }
.arrow--prev:hover svg { transform: translateX(-2px); }
.arrow--next:hover svg { transform: translateX(2px); }
.arrow:active { transform: scale(.96); background: var(--color-hover); }
.arrow:focus-visible { outline: 2px solid var(--color-text); outline-offset: 3px; }

/* Appears softly when it scrolls into view (only with JavaScript, see site.js). */
.js .reveal { opacity: 0; transform: translateY(16px); }
.js .reveal.is-visible { opacity: 1; transform: none; transition: opacity .35s var(--ease-out), transform .35s var(--ease-out); }


/* 8. How we do it ---------------------------------------------------------- */
.method__steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(32px, 4vw, 64px); }
.method__step { border-top: 1px solid var(--color-text); padding-top: 24px; }
/* The number sits on a strip of the brand yellow, like a highlighter. */
.method__number {
  display: inline-block; font-size: 15px; font-weight: 700; letter-spacing: .12em;
  line-height: 1; padding: 6px 8px 5px; margin-bottom: 28px;
  background: var(--color-accent); color: var(--color-black);
}
.method__title { font-size: clamp(22px, 2vw, 26px); font-weight: 700; letter-spacing: -.01em; line-height: 1.2; margin: 0 0 12px; }
.method__step p { font-size: clamp(17px, 1.3vw, 18px); line-height: 1.6; color: var(--color-text-soft); margin: 0; max-width: 34ch; }
@media (max-width: 820px) {
  .method__steps { grid-template-columns: 1fr; gap: 40px; }
  .method__step p { max-width: 52ch; }
}


/* 9. Dashboard examples ---------------------------------------------------- */
/* One tablet frame, centred, seen from the front. The screen has a fixed
   tablet shape (1400 × 993, the shape of most screenshots); wider ones are
   shown whole and the space above and below is filled with a blurred copy of
   the same image, so nothing is cropped and the frame never moves. */
.showcase { max-width: min(1000px, max(560px, calc((100svh - 300px) * 1.38))); margin: 0 auto; }   /* frame and its text fit on one screen */

.device {
  position: relative; padding: clamp(10px, 2.1vw, 22px);
  background: #18191b; border-radius: clamp(18px, 3.2vw, 38px);
  box-shadow:
    inset 0 0 0 1px rgba(255,255,255,.07),
    0 1px 2px rgba(0,0,0,.08),
    0 24px 48px -20px rgba(0,0,0,.26),
    0 56px 96px -56px rgba(0,0,0,.24);
}
/* Front camera, centred on the long top edge. */
.device::before {
  content: ""; position: absolute; top: calc(clamp(10px, 2.1vw, 22px) / 2 - 2.5px); left: 50%;
  width: 5px; height: 5px; margin-left: -2.5px; border-radius: 50%; background: #3a3c40;
}
.device__screen { display: grid; gap: 12px; border-radius: clamp(8px, 1.3vw, 16px); overflow: hidden; background: #0c0d0f; }
.device__shot { position: relative; display: grid; place-items: center; overflow: hidden; aspect-ratio: 1400 / 993; cursor: zoom-in; isolation: isolate; }
.device__fill { position: absolute; inset: -32px; z-index: -1; width: calc(100% + 64px); height: calc(100% + 64px); max-width: none; object-fit: cover; filter: blur(24px); }
.device__image { width: 100%; height: 100%; object-fit: contain; }
.device__shot:focus-visible { outline: 3px solid var(--color-accent); outline-offset: -3px; }

.showcase__captions { display: grid; gap: 40px; max-width: 640px; margin: 32px auto 0; text-align: center; }
.tool {
  display: inline-block; margin: 0 0 12px; padding: 4px 10px;
  border: 1px solid var(--color-line); border-radius: 999px;
  font-size: 11px; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; color: var(--color-text-soft);
}
.showcase__title { font-size: clamp(20px, 1.8vw, 24px); font-weight: 700; letter-spacing: -.01em; line-height: 1.25; margin: 0 0 8px; }
.showcase__text { font-size: clamp(16px, 1.25vw, 18px); line-height: 1.6; color: var(--color-text-soft); margin: 0 auto; max-width: 56ch; }
.showcase .pager { justify-content: center; margin-top: 24px; }
.showcase .pager + .showcase__captions { margin-top: 20px; }
/* Footnote under the examples: readable, but quieter than the lead. */
.examples__note { max-width: 60ch; margin: clamp(40px, 5vw, 56px) auto 0; padding-top: 16px; border-top: 1px solid var(--color-line-soft); font-size: 13px; line-height: 1.6; color: var(--color-text-soft); text-align: center; }

/* With JavaScript: one shot and one text at a time, each set in one grid
   cell so the frame and the text block keep their size. */
.showcase.is-ready .device__screen { gap: 0; touch-action: pan-y; }
.device img { -webkit-user-drag: none; user-select: none; }
.showcase.is-ready .device__shot,
.showcase.is-ready .showcase__caption { grid-area: 1 / 1; }
.showcase.is-ready .showcase__captions { gap: 0; }
.showcase.is-ready .device__shot:not(.is-active),
.showcase.is-ready .showcase__caption:not(.is-active) { opacity: 0; visibility: hidden; }

@media (max-width: 600px) {
  .device { padding: 8px; border-radius: 18px; }
  .device::before { display: none; }
  .device__screen { border-radius: 11px; }
  .showcase__captions { text-align: left; margin-top: 24px; }
  .showcase__text { margin: 0; }
}

/* Large view of an example, at most 1200px wide. */
.viewer {
  width: min(1200px, calc(100vw - 32px)); max-height: calc(100dvh - 32px); box-sizing: border-box;
  margin: auto; padding: 52px 16px 16px; border: 0; border-radius: 12px;
  background: var(--color-black); color: var(--color-white); overflow: hidden;
}
.viewer::backdrop { background: rgba(0,0,0,.7); }
.viewer__figure { margin: 0; }
.viewer__image { display: block; width: 100%; height: auto; max-height: calc(100dvh - 150px); object-fit: contain; }
.viewer__caption { margin-top: 12px; font-size: 11px; letter-spacing: 0.2em; text-transform: uppercase; color: var(--color-text-on-dark); text-align: center; }
.viewer__close {
  position: absolute; top: 4px; right: 4px; display: grid; place-items: center; width: 44px; height: 44px; padding: 0;
  background: none; border: 0; color: var(--color-white); font: inherit; font-size: 30px; line-height: 1; cursor: pointer;
}
.viewer__close:hover { opacity: .7; }
.viewer__close:focus-visible { outline: 2px solid var(--color-white); outline-offset: -4px; }
@media (prefers-reduced-motion: no-preference) {
  .viewer[open] { animation: popup-in .25s var(--ease-out); }
}


/* 10. BI Challenges -------------------------------------------------------- */
/* Two columns on wide screens: the quote (left) and the challenge with our
   approach (right), both starting on the same line. */
.carousel { position: relative; }
.slides { display: grid; gap: 72px; }
.slide {
  display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
  gap: clamp(40px, 6vw, 96px); align-items: start;
}
.slide__quote { margin: 0; }
.slide__quote blockquote { margin: 0; }
.slide__quote p {
  font-family: var(--font-quote); font-style: italic; font-weight: 400;
  font-size: clamp(30px, 3.3vw, 44px); letter-spacing: -0.01em; line-height: 1.15;
  margin: 0 0 24px; text-wrap: balance;
}
.slide__quote figcaption { font-size: 11px; letter-spacing: 0.22em; text-transform: uppercase; color: var(--color-text-soft); line-height: 1.6; }
.slide__title { font-size: clamp(22px, 2vw, 26px); font-weight: 700; letter-spacing: -.01em; line-height: 1.2; margin: 0 0 12px; }
.slide__problem { font-size: clamp(17px, 1.35vw, 19px); line-height: 1.55; color: var(--color-text); margin: 0 0 28px; }
.slide__label { font-size: 11px; font-weight: 700; letter-spacing: 0.22em; text-transform: uppercase; margin: 0 0 10px; padding-top: 20px; border-top: 1px solid var(--color-line); }
.slide__body { max-width: 60ch; }
.slide__body > p:not(.slide__problem):not(.slide__label) { font-size: 17px; line-height: 1.65; color: var(--color-text-soft); }
.slide__body p:last-child { margin-bottom: 0; }

/* With JavaScript the slides share one grid cell, so the block is always as
   tall as the tallest slide and nothing below it moves. */
.carousel.is-ready .slides { gap: 0; touch-action: pan-y; }
.carousel.is-ready .slide { grid-area: 1 / 1; }
.carousel.is-ready .slide:not(.is-active) { visibility: hidden; opacity: 0; }
/* Arrows under the right-hand column. */
.carousel .pager { margin-top: 40px; margin-left: calc((100% - clamp(40px, 6vw, 96px)) * 5 / 11 + clamp(40px, 6vw, 96px)); }

@media (max-width: 900px) {
  /* The quote first, then the explanation. */
  .slide { grid-template-columns: 1fr; gap: 32px; }
  .carousel .pager { margin-left: 0; }
}

/* Changing slides: the old one fades out, the new one fades in moving a few
   pixels, at the same time in the frame and in the challenges. */
@media (prefers-reduced-motion: no-preference) {
  .carousel.is-ready .slide,
  .showcase.is-ready .device__shot,
  .showcase.is-ready .showcase__caption { transition: opacity .3s var(--ease-out), transform .3s var(--ease-out), visibility .3s; }
  .carousel.is-ready .slide:not(.is-active),
  .showcase.is-ready .showcase__caption:not(.is-active) { transform: translateX(var(--shift, 12px)); }
}


/* 11. Our expertise -------------------------------------------------------- */
.expertise__caption { font-size: 13px; letter-spacing: 0.02em; color: var(--color-text-soft); max-width: 60ch; margin: 0; }

/* Logos wrap onto new lines with even gaps, aligned left. */
.logos {
  display: flex; flex-wrap: wrap; justify-content: flex-start; align-items: center;
  gap: 32px 56px; margin: 0 0 48px; color: #2b2b2b;
}
.logos li { display: flex; align-items: center; height: 56px; flex: none; }

/* Logo heights are set one by one so they look the same size to the eye. */
.logo { width: auto; max-width: 100%; height: 26px; }
.logo--volkswagen, .logo--bmw { height: 44px; }
.logo--bvg { height: 38px; } /* solid heart: optically as large as the 44px roundels */
.logo--adidas { height: 36px; }
.logo--cosnova { height: 28px; }
.logo--aston-martin { height: 30px; }
.logo--airbus { height: 17px; }
.logo--coca-cola { height: 30px; }
.logo--audi { height: 24px; }

@media (max-width: 900px) {
  .logos { gap: 28px 40px; }
}
@media (max-width: 480px) {
  .logos { gap: 24px 32px; }
  .logo { height: 20px; }
  .logo--volkswagen, .logo--bmw { height: 36px; }
  .logo--bvg { height: 31px; }
  .logo--adidas { height: 30px; }
  .logo--cosnova, .logo--coca-cola, .logo--aston-martin { height: 24px; }
  .logo--airbus { height: 13px; }
  .logo--audi { height: 19px; }
}


/* 12. Led by Pablo --------------------------------------------------------- */
/* The cut-out portrait sits straight on the section grey (the same grey the
   cut-out was made on, so its edges show no halo) and stands on the bottom
   edge of the section, which therefore has no bottom padding. */
.section.about { background: var(--bg-about); padding: clamp(40px, 5vw, 72px) var(--page-edge) 0; }
.section + .section.about > .container { border-top: 0; padding-top: 0; }
.section.about + .section { padding-top: var(--section-space); }
.about__inner {
  display: grid; grid-template-columns: minmax(320px, 5fr) minmax(0, 6fr);
  gap: clamp(40px, 6vw, 96px); align-items: end;
}
.about__photo { display: block; align-self: end; }
.about__photo img { display: block; width: 100%; max-width: 560px; height: auto; margin: 0 auto; }
.about__text { align-self: center; max-width: 56ch; padding: var(--section-space) 0; }
.about__text .tilt { margin-bottom: 1.2em; }
.about__text .section__title { margin-bottom: 24px; }
.about__text p { font-size: clamp(17px, 1.3vw, 18px); line-height: 1.65; color: var(--color-text); }
.about__text b { color: var(--color-text); }

@media (max-width: 900px) {
  /* Text first, then the portrait, still standing on the bottom edge. */
  .section.about { padding-top: var(--section-space); }
  .about__inner { grid-template-columns: 1fr; gap: 40px; }
  .about__text { padding: 0; }
  .about__photo { order: 1; width: min(100%, 400px); justify-self: center; }
}


/* 13. Contact -------------------------------------------------------------- */
.contact { background: var(--bg-contact); color: var(--color-white); padding: var(--section-space) var(--page-edge) 64px; }
.contact > * { max-width: var(--width-content); margin-left: auto; margin-right: auto; }
.contact__title { font-size: clamp(32px, 3.8vw, 48px); font-weight: 700; letter-spacing: -.02em; line-height: 1.1; margin: 0 0 20px; max-width: 18ch; text-wrap: balance; }
.contact__lead { color: var(--color-text-on-dark); font-size: clamp(17px, 1.35vw, 19px); max-width: 52ch; margin: 0 0 32px; }

/* LinkedIn, WhatsApp and share icons */
.icons { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; margin: 40px 0 0 -10px; }

/* Share menu, shown when the device has no share sheet */
.sharer { position: relative; }
.sharer__menu {
  position: absolute; left: 0; top: calc(100% + 6px); z-index: 5; min-width: 180px;
  background: var(--color-white); color: var(--color-text); border: 1px solid var(--color-line); padding: 6px 0;
  box-shadow: 0 8px 24px rgba(0,0,0,.18);
}
.sharer__menu a { display: block; padding: 10px 16px; font-size: 14px; text-decoration: none; }
.sharer__menu a:hover, .sharer__menu a:focus-visible { background: var(--color-hover); }

/* Portfolio request, below a thin line */
.contact__portfolio { margin-top: 72px; padding-top: 56px; border-top: 1px solid var(--color-line-on-dark); }
.contact__portfolio > * { max-width: 440px; }
.contact__portfolio-lead { color: var(--color-text-on-dark); }


/* 14. Footer --------------------------------------------------------------- */
.footer {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px;
  padding: 32px var(--page-edge) 40px;
  background: var(--color-black); color: var(--color-text-on-dark-soft);
  font-size: 12px; letter-spacing: 0.06em;
  border-top: 1px solid #222222;
}
.footer p { margin: 0; }
.footer__links { display: flex; align-items: center; gap: 12px; }
.footer__mail { width: 40px; height: 40px; margin-left: -10px; color: var(--color-white); }
.footer__mail .icon__svg { width: 20px; height: 20px; }


/* 15. Portfolio window ------------------------------------------------------ */
/* Scrolls inside itself if the screen is short, so nothing is cut off. */
.popup {
  width: min(440px, calc(100vw - 32px)); max-height: calc(100dvh - 32px); overflow-y: auto;
  margin: auto; padding: 40px 32px 28px; border: 1px solid var(--color-line-on-dark);
  background: var(--color-black); color: var(--color-white);
  overscroll-behavior: contain;
}
.popup::backdrop { background: rgba(0,0,0,.5); }
.popup .label { margin: 0 0 12px; padding-right: 40px; }
.popup__lead { color: var(--color-text-on-dark); margin: 0 0 24px; }
.popup__close {
  position: absolute; top: 8px; right: 8px; width: 44px; height: 44px;
  display: grid; place-items: center; padding: 0; background: none; border: 0;
  color: var(--color-white); font: inherit; font-size: 30px; line-height: 1; cursor: pointer;
}
.popup__close:hover { opacity: .7; }
.popup__close:focus-visible { outline: 2px solid var(--color-white); outline-offset: -4px; }

@media (max-width: 480px) {
  .popup { padding: 36px 20px 20px; }
}
@media (prefers-reduced-motion: no-preference) {
  .popup[open] { animation: popup-in .25s ease-out; }
  @keyframes popup-in { from { opacity: 0; transform: translateY(12px); } }
}


/* 16. Privacy page, download page and admin ------------------------------- */
.doc { max-width: 720px; padding: calc(var(--header-height) + 48px) var(--page-edge) 96px; box-sizing: content-box; }
.doc h1 { font-size: 26px; letter-spacing: 0.14em; text-transform: uppercase; margin-bottom: 1.5em; }
.doc h2 { font-size: 13px; letter-spacing: var(--letter-spacing-wide); text-transform: uppercase; margin: 2.4em 0 1em; }
.doc p, .doc li { color: var(--color-text-soft); }
.doc ul { list-style: disc; padding-left: 1.2em; margin-bottom: 1em; }

/* Personal download page (/portfolio/) */
.download .label { margin-bottom: 12px; }
.download h1 { margin-bottom: 0.8em; }
.download form { margin: 32px 0; }
.download__note { font-size: 13px; }

.doc--wide { max-width: 1000px; }
.admin-login input { font: inherit; font-size: 16px; padding: 10px; border: 1.5px solid var(--color-text); width: min(360px, 100%); }
.table-wrap { overflow-x: auto; margin: 24px 0; }
.admin-table { border-collapse: collapse; width: 100%; font-size: 14px; }
.admin-table th, .admin-table td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--color-line); white-space: nowrap; }
.admin-table td.admin-table__number { text-align: right; }
.admin-table th { font-size: 11px; letter-spacing: 0.2em; text-transform: uppercase; font-weight: 600; }


/* 17. Cookie banner -------------------------------------------------------- */
/* Shown by analytics.js until the visitor accepts or rejects analytics cookies. */
.cookies {
  position: fixed; left: 16px; right: 16px; bottom: 16px; z-index: 50;
  max-width: 720px; margin: 0 auto; box-sizing: border-box;
  display: flex; flex-wrap: wrap; align-items: center; gap: 16px 24px;
  padding: 20px 24px; border: 1px solid var(--color-line-on-dark);
  background: var(--color-black); color: var(--color-white);
}
.cookies[hidden] { display: none; }
.cookies__text { flex: 1 1 320px; margin: 0; font-size: 13px; line-height: 1.6; color: var(--color-text-on-dark); }
.cookies__text a { color: var(--color-white); text-underline-offset: 3px; }
.cookies__buttons { display: flex; flex-wrap: wrap; gap: 12px; }
.cookies .btn:focus-visible { outline: 2px solid var(--color-white); outline-offset: 3px; }

@media (prefers-reduced-motion: no-preference) {
  .cookies:not([hidden]) { animation: popup-in .25s ease-out; }
}
