/* ═══════════════════════════════════════════════════════════
   PAPIK · BASE
   Reset, body, html, container, typography utilities.
   Must be imported AFTER tokens.css and BEFORE any other CSS.
═══════════════════════════════════════════════════════════ */

*, *::before, *::after { box-sizing: border-box; }

body, html {
  margin: 0;
  padding: 0;
  font-family: var(--ff-sans);
  color: var(--text);
  overflow-x: hidden;
  /* Render TT Firs Neue with grayscale antialiasing site-wide — the same the
     configurador already used. Without it the webfont renders noticeably
     HEAVIER, and inconsistently across devices/browsers (Mac vs Windows/Android).
     This is what makes the weight match the design. */
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  opacity: 0;
  animation: pageIn .5s ease .1s forwards;
}
@keyframes pageIn { to { opacity: 1; } }
html { scroll-padding-top: 120px; }

/* ─── Skip-link · a11y · hidden off-screen until keyboard focus ─── */
.skip-link {
  position: absolute;
  top: 0;
  left: 0;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  padding: 0;
  margin: -1px;
}
.skip-link:focus,
.skip-link:focus-visible {
  position: fixed;
  top: 14px;
  left: 14px;
  width: auto;
  height: auto;
  clip: auto;
  clip-path: none;
  padding: 10px 16px;
  margin: 0;
  background: var(--green);
  color: #fff;
  font-size: 13px;
  font-weight: var(--fw-medium);
  letter-spacing: .01em;
  border-radius: var(--r-md);
  z-index: 9999;
  box-shadow: 0 8px 24px rgba(0,40,25,.18);
}

h1, h2, h3, h4, h5, h6, p {
  margin: 0; padding: 0;
  font-weight: var(--fw-light);
}
ul { list-style: none; margin: 0; padding: 0; }
a  { text-decoration: none; color: inherit; }
button, input, select, textarea { font-family: var(--ff-sans); }
img { max-width: 100%; height: auto; display: block; }

/* ─── Typography scale ─── */
.t12  { font-size: 12px; line-height: 1.6; }
.t14  { font-size: 14px; line-height: 1.6; }
.t16  { font-size: 16px; line-height: 1.6; }
.t18  { font-size: 18px; line-height: 1.4; }
.t24  { font-size: clamp(20px, 1.8vw, 26px); line-height: 1.3; }
.t42  { font-size: clamp(24px, 2.4vw, 34px); line-height: 1.2; }
.t70  { font-size: clamp(36px, 4.5vw, 56px); line-height: 1.08; }
.upper { text-transform: uppercase; letter-spacing: 0.04em; }
.center { text-align: center; }

.color-green       { color: var(--green); }
.color-muted       { color: var(--muted); }
.color-muted-light { color: var(--muted-light); }
.color-accent      { color: var(--accent); }
.color-white       { color: #fff; }

/* ─── Layout ─── */
.container { width: 90.625vw; max-width: 1400px; margin: 0 auto; }
.container--narrow { max-width: 760px; }

/* ─── Sections ─── */
.section       { padding: 56px 0; background: #fff; }
.section--light { padding: 56px 0; background: var(--bg-light); }
.section--dark  { padding: 56px 0; background: var(--green); color: #fff; }
.section--tight { padding: 32px 0; }

/* ─── Placeholder util ─── */
.ph { display: block; width: 100%; height: 100%; }

/* ─── Utility classes (extracted from repeated inline styles) ─── */
.body-copy      { color: var(--muted); line-height: 1.65; }
.lead-18        { font-size: 18px; font-weight: var(--fw-regular); margin-bottom: 20px; }
.link-strong    { color: var(--green); font-weight: var(--fw-medium); }
.link-soft      { color: var(--green-light); font-weight: var(--fw-medium); }
.cta-inline     { margin-top: 20px; display: inline-flex; color: var(--green); }

.row-20         { display: flex; gap: 20px; }
.flex-center    { display: flex; align-items: center; justify-content: center; }

.bg-hero-deep   { background: linear-gradient(160deg, var(--green-dark) 0%, var(--green) 100%); }

.fineprint      { font-size: 12px; color: rgba(255,255,255,.35); }
.fineprint--gap { margin-right: 20px; }

.progress-bar             { height: 100%; border-radius: 4px; }
.progress-bar--soft       { background: linear-gradient(160deg, #d9e4e0 0%, #002819 100%); }
.progress-bar--mid        { background: linear-gradient(160deg, #002819 0%, #002819 100%); }
.progress-bar--deep       { background: linear-gradient(160deg, #002819 0%, #002819 100%); }
.progress-bar--soft-h     { background: linear-gradient(135deg, #d9e4e0 0%, #d9e4e0 100%); }
.progress-bar--mid-h      { background: linear-gradient(135deg, #d9e4e0 0%, #002819 100%); }
.progress-bar--deep-h     { background: linear-gradient(135deg, #d9e4e0 0%, #002819 100%); }

/* ─── Body scroll lock when overlay open ─── */
body.submenu-open { overflow: hidden; }

/* ─── Responsive overrides ─── */
@media (max-width: 900px) {
  .t70 { font-size: 32px; }
  .t42 { font-size: 22px; }
  .t24 { font-size: 19px; }
  .container { width: 100%; padding: 0 4.8vw; }
  .section, .section--light, .section--dark { padding: 40px 0; }
}

/* <picture> wrappers (WebP) must not add a box — keep parent>img selectors working */
picture { display: contents; }

/* ─── Text selection · brand ink ───
   Selecting text paints it corporate green with white type. On dark
   surfaces (header, footer, dark hero/CTA boxes, hero blog card, pillar
   visual) the pair inverts to mint on green for contrast. */
::selection { background: #002819; color: #ffffff; }

/* ─── Scrollbar · brand ink (thin, mint track, green thumb) ─── */
html { scrollbar-width: thin; scrollbar-color: #002819 rgba(217,228,224,0.55); }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: rgba(217,228,224,0.45); }
::-webkit-scrollbar-thumb {
  background: #002819;
  border-radius: 8px;
  border: 2px solid rgba(217,228,224,0.45);
}
::-webkit-scrollbar-thumb:hover { background: rgba(0,40,25,0.82); }

/* ─── Page-to-page cross-fade · native View Transitions (progressive) ─── */
@view-transition { navigation: auto; }
::view-transition-old(root),
::view-transition-new(root) { animation-duration: 220ms; }
@media (prefers-reduced-motion: reduce) {
  @view-transition { navigation: none; }
}

/* ─── Keyboard focus · brand ring (zero specificity: component rules win) ─── */
:where(a, button, input, select, textarea, summary, [tabindex]):focus-visible {
  outline: 2px solid #002819;
  outline-offset: 3px;
}
:where(.rl-header, .rl-footer, .hero--dark, .rl-cta__box--main, .rl-combo__box--main, .block-cta)
  :where(a, button, input, select, textarea, summary, [tabindex]):focus-visible {
  outline-color: #d9e4e0;
}
.rl-header ::selection,
.rl-footer ::selection,
.hero--dark ::selection,
.rl-cta__box--main ::selection,
.rl-combo__box--main ::selection,
.hp-posts-hero .rl-featured__card-body ::selection,
.rl-pillar-modal__visual ::selection,
.block-cta ::selection {
  background: #d9e4e0;
  color: #002819;
}
