/*
  DB Impulso — recruitment landing design tokens.

  Fonts are self-hosted, not loaded from a CDN: the production Nginx CSP forbids
  third-party origins, so a Google Fonts link would be blocked at runtime. Mosk
  and Open Sans are Dealbrand's own licensed faces, taken from the files the
  corporate site already serves.
*/

@font-face {
  font-family: "Mosk";
  src: url("../fonts/mosk-medium.woff2") format("woff2"),
       url("../fonts/mosk-medium.woff") format("woff");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Mosk";
  src: url("../fonts/mosk-semibold.ttf") format("truetype");
  font-weight: 600 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Open Sans";
  src: url("../fonts/opensans-regular.woff") format("woff");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Open Sans";
  src: url("../fonts/opensans-semibold.woff") format("woff");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Open Sans";
  src: url("../fonts/opensans-bold.woff") format("woff");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

:root {
  color-scheme: light;

  /* Brand palette sampled from the official DB Impulso logo. */
  --navy: #18324a;
  --mint: #5dbeb4;
  --coral: #ee3f48;
  /* Coral is a background colour. As text on white it reaches only 3.86:1, so
     anything readable uses this darker cousin instead: 7.23:1. */
  --coral-ink: #a3222a;

  /*
    --mint reaches only 2.2:1 on white, so it is reserved for dark surfaces.
    --mint-ink is the same hue darkened to clear WCAG AA on light surfaces.
  */
  --mint-ink: #1a7268;

  /* Per-role tint applied over the photography, mirroring dealbrandperu.com. */
  --tint-promotor: 24, 50, 74;
  --tint-impulso: 26, 114, 104;
  --tint-mercaderista: 128, 60, 82;
  --tint-supervisor: 42, 74, 107;

  /* Surfaces and text. */
  --paper: #ffffff;
  --paper-soft: #f3f7f9;
  --ink: var(--navy);
  --ink-muted: #4c5f72;
  --on-dark: #ffffff;
  --on-dark-muted: rgba(255, 255, 255, 0.84);

  --line: rgba(24, 50, 74, 0.14);
  --shadow-card: 0 18px 40px rgba(24, 50, 74, 0.13);
  --shadow-raised: 0 26px 60px rgba(24, 50, 74, 0.24);

  --font-display: "Mosk", "Open Sans", sans-serif;
  --font-body: "Open Sans", sans-serif;

  /* Fluid type scale. */
  --step-hero: clamp(2.1rem, 1.3rem + 3.4vw, 3.7rem);
  --step-h2: clamp(1.55rem, 1.2rem + 1.7vw, 2.35rem);
  --step-h3: clamp(1.12rem, 1rem + 0.55vw, 1.38rem);
  --step-body: clamp(1rem, 0.96rem + 0.2vw, 1.07rem);
  --step-small: 0.9375rem;

  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  --space-12: 3rem;
  --space-16: 4rem;

  /* Logo 40px plus the masthead's own padding. The hero subtracts it to fill
     exactly one screen, and anchors clear it. */
  --masthead-h: 70px;

  --radius: 14px;
  --radius-button: 10px;
  --radius-lg: 22px;
  --shell: 1140px;

  /* Motion: ease-out entering, ease-in-out moving. */
  --motion-fast: 140ms cubic-bezier(0.22, 0.61, 0.36, 1);
  --motion-base: 240ms cubic-bezier(0.22, 0.61, 0.36, 1);
  --motion-slow: 420ms cubic-bezier(0.22, 0.61, 0.36, 1);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: var(--step-body);
  line-height: 1.6;
  color: var(--ink);
  background: var(--paper);
  /* An unbroken token must never widen the viewport at 320px. */
  overflow-wrap: anywhere;
}

h1,
h2,
h3 {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.13;
  letter-spacing: -0.015em;
  overflow-wrap: anywhere;
}

h1 { font-size: var(--step-hero); }
h2 { font-size: var(--step-h2); }
h3 { font-size: var(--step-h3); }

p { margin: 0; }

img {
  display: block;
  max-width: 100%;
}

a { color: inherit; }

:focus-visible {
  outline: 3px solid var(--coral);
  outline-offset: 3px;
  border-radius: 4px;
}

.shell {
  width: min(100% - 2.5rem, var(--shell));
  margin-inline: auto;
}

.eyebrow {
  margin: 0;
  font-family: var(--font-display);
  font-size: var(--step-small);
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--mint-ink);
}

/* On navy surfaces the lighter mint is the accessible choice. */
.hero .eyebrow,
.site-footer .eyebrow {
  color: var(--mint);
}

.lead {
  max-width: 52ch;
  color: var(--ink-muted);
}

.section {
  padding-block: clamp(var(--space-12), 8vw, var(--space-16));
}

.section--soft {
  background: var(--paper-soft);
}

.skip-link {
  position: absolute;
  left: var(--space-4);
  top: var(--space-4);
  transform: translateY(-160%);
  background: var(--navy);
  color: var(--on-dark);
  padding: 0.7rem 1rem;
  border-radius: var(--radius);
  text-decoration: none;
  z-index: 20;
  transition: transform var(--motion-fast);
}

.skip-link:focus {
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }

  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    transition-duration: 0.001ms !important;
  }
}
