/* ==========================================================================
   R Media — base styles
   Design tokens, reset, typography, buttons, header, footer, shared blocks.
   Brand colours are sampled from the R Media logo (magenta -> purple -> blue).
   ========================================================================== */

:root {
  --c-magenta: #e4007c;
  --c-magenta-600: #c3006a;
  --c-pink: #cf3896;
  --c-purple: #7a4b9f;
  --c-indigo: #4e4fa2;
  --c-blue: #0255a6;
  --c-blue-700: #0a4488;
  --c-ink: #15122d;
  --c-ink-2: #221e42;
  --c-text: #2e2a45;
  --c-muted: #5f5b76;
  --c-line: #e7e3ef;
  --c-surface: #f6f4fb;
  --c-bg: #ffffff;
  --c-wa: #1faa55;
  --c-wa-deep: #0e8544;
  --c-wa-deeper: #0b6c37;

  --grad: linear-gradient(100deg, #d6168a 0%, #8a47a0 50%, #0255a6 100%);
  --grad-rev: linear-gradient(100deg, #0255a6 0%, #8a47a0 50%, #d6168a 100%);

  --font: "Archivo", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

  --radius-lg: 28px;
  --radius: 20px;
  --radius-sm: 12px;
  --shadow-sm: 0 1px 2px rgba(21, 18, 45, 0.06), 0 2px 8px rgba(21, 18, 45, 0.05);
  --shadow: 0 12px 30px -12px rgba(21, 18, 45, 0.2), 0 4px 12px -6px rgba(21, 18, 45, 0.08);
  --shadow-lg: 0 32px 64px -24px rgba(21, 18, 45, 0.32);

  --container: 1200px;
  --gutter: clamp(16px, 4vw, 32px);
  --header-h: 72px;
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
}

@media (min-width: 1100px) {
  :root { --header-h: 84px; }
}

/* ---------- Reset ---------- */

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 12px);
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.65;
  color: var(--c-text);
  background: var(--c-bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

body.nav-open { overflow: hidden; }

img, svg, video, iframe { display: block; max-width: 100%; }
img { height: auto; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, h4 { margin: 0; color: var(--c-ink); line-height: 1.12; font-weight: 800; }
p, figure, blockquote { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
address { font-style: normal; }
[hidden] { display: none !important; }

:focus-visible {
  outline: 3px solid var(--c-blue);
  outline-offset: 3px;
}

::selection { background: var(--c-magenta); color: #fff; }

.skip-link {
  position: absolute;
  left: 16px;
  top: -100px;
  z-index: 100;
  padding: 12px 18px;
  border-radius: var(--radius-sm);
  background: var(--c-ink);
  color: #fff;
  font-weight: 700;
}
.skip-link:focus { top: 12px; }

.sr-only {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.container {
  width: min(100% - 2 * var(--gutter), var(--container));
  margin-inline: auto;
}

.icon { width: 24px; height: 24px; flex: none; }

/* ---------- Typography helpers ---------- */

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--c-magenta-600);
}
.eyebrow::before {
  content: "";
  width: 28px;
  height: 3px;
  border-radius: 3px;
  background: var(--grad);
}

.text-grad {
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

@media (forced-colors: active) {
  .text-grad { background: none; color: CanvasText; }
}

.section { padding-block: clamp(64px, 9vw, 112px); }
.section--tint { background: var(--c-surface); }

.section-head {
  max-width: 760px;
  margin-bottom: clamp(36px, 5vw, 56px);
}
.section-head--center { margin-inline: auto; text-align: center; }
.section-head--center .eyebrow { justify-content: center; }

.section-title {
  margin-top: 14px;
  font-size: clamp(1.9rem, 1.15rem + 2.7vw, 3.1rem);
  font-stretch: 118%;
  font-weight: 850;
  letter-spacing: -0.015em;
  text-wrap: balance;
}

.section-lead {
  margin-top: 16px;
  font-size: clamp(1.02rem, 0.95rem + 0.3vw, 1.15rem);
  color: var(--c-muted);
  text-wrap: pretty;
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 48px;
  padding: 12px 22px;
  border: 2px solid transparent;
  border-radius: 999px;
  background: var(--c-ink);
  color: #fff;
  font-size: 0.98rem;
  font-weight: 700;
  line-height: 1.2;
  text-align: center;
  white-space: nowrap;
  transition: transform 0.2s var(--ease), box-shadow 0.2s var(--ease),
    background-color 0.2s, background-position 0.4s var(--ease), color 0.2s, border-color 0.2s;
}
.btn svg { width: 20px; height: 20px; flex: none; }
.btn:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.btn:active { transform: translateY(0); box-shadow: none; }

.btn--primary {
  background-image: var(--grad);
  background-size: 160% 100%;
  background-position: 0 0;
  color: #fff;
}
.btn--primary:hover { background-position: 100% 0; }

.btn--outline { background: transparent; color: var(--c-ink); border-color: var(--c-ink); }
.btn--outline:hover { background: var(--c-ink); color: #fff; }

.btn--wa { background: var(--c-wa-deep); color: #fff; }
.btn--wa:hover { background: var(--c-wa-deeper); }

.btn--light { background: #fff; color: var(--c-ink); }
.btn--light:hover { background: #fff; color: var(--c-magenta-600); }

.btn--ghost-light { background: transparent; color: #fff; border-color: rgba(255, 255, 255, 0.65); }
.btn--ghost-light:hover { background: #fff; color: var(--c-ink); border-color: #fff; }

.btn--lg { min-height: 56px; padding: 14px 28px; font-size: 1.04rem; }
.btn--sm { min-height: 44px; padding: 8px 16px; font-size: 0.92rem; }
.btn--block { width: 100%; }

.btn-row { display: flex; flex-wrap: wrap; gap: 12px; }

.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  font-weight: 700;
  color: var(--c-magenta-600);
}
.link-arrow svg { width: 18px; height: 18px; transition: transform 0.2s var(--ease); }
.link-arrow:hover svg { transform: translateX(4px); }

.icon-btn {
  display: inline-grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid var(--c-line);
  background: #fff;
  color: var(--c-ink);
  transition: background-color 0.2s, color 0.2s, border-color 0.2s;
}
.icon-btn svg { width: 20px; height: 20px; }
.icon-btn:hover { background: var(--c-ink); border-color: var(--c-ink); color: #fff; }

/* ---------- Header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s, box-shadow 0.3s;
}
/* Blur lives on a pseudo-element so the fixed mobile menu is not clipped by the header. */
.site-header::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: rgba(255, 255, 255, 0.9);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  backdrop-filter: saturate(180%) blur(14px);
}
.site-header.is-scrolled {
  border-bottom-color: var(--c-line);
  box-shadow: 0 8px 24px -20px rgba(21, 18, 45, 0.45);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 12px;
  height: var(--header-h);
}

.brand { display: inline-flex; align-items: center; flex: none; margin-right: auto; }
.brand img { width: auto; height: 46px; }

.nav-list { display: flex; }

.nav-link {
  position: relative;
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 14px;
  border-radius: 999px;
  font-size: 0.97rem;
  font-weight: 600;
  color: var(--c-text);
  transition: color 0.2s, background-color 0.2s;
}
.nav-link:hover { color: var(--c-ink); background: var(--c-surface); }
.nav-link.is-active { color: var(--c-ink); }
.nav-link.is-active::after {
  content: "";
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 5px;
  height: 3px;
  border-radius: 3px;
  background: var(--grad);
}

.header-actions { display: none; gap: 10px; }

.nav-toggle {
  display: inline-grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid var(--c-line);
  border-radius: 50%;
  background: #fff;
}
.nav-toggle-bars,
.nav-toggle-bars::before,
.nav-toggle-bars::after {
  display: block;
  width: 18px;
  height: 2px;
  border-radius: 2px;
  background: var(--c-ink);
  transition: transform 0.3s var(--ease), background-color 0.2s;
}
.nav-toggle-bars { position: relative; }
.nav-toggle-bars::before,
.nav-toggle-bars::after { content: ""; position: absolute; left: 0; }
.nav-toggle-bars::before { transform: translateY(-6px); }
.nav-toggle-bars::after { transform: translateY(6px); }
.nav-toggle[aria-expanded="true"] .nav-toggle-bars { background: transparent; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bars::before { transform: rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle-bars::after { transform: rotate(-45deg); }

.nav-cta { display: grid; gap: 12px; margin-top: 28px; }

/* Mobile / tablet menu panel */
@media (max-width: 1099.98px) {
  .nav {
    position: fixed;
    top: var(--header-h);
    left: 0;
    right: 0;
    bottom: 0;
    overflow-y: auto;
    padding: 20px var(--gutter) calc(32px + env(safe-area-inset-bottom));
    background: #fff;
    border-top: 1px solid var(--c-line);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: opacity 0.25s var(--ease), transform 0.25s var(--ease), visibility 0s linear 0.25s;
  }
  .site-header.menu-open .nav {
    opacity: 1;
    visibility: visible;
    transform: none;
    transition: opacity 0.25s var(--ease), transform 0.25s var(--ease), visibility 0s;
  }
  .site-header.menu-open::before { background: #fff; }
  .nav-list { flex-direction: column; }
  .nav-link {
    width: 100%;
    min-height: 56px;
    padding: 0 4px;
    border-bottom: 1px solid var(--c-line);
    border-radius: 0;
    font-size: 1.2rem;
    font-weight: 700;
    font-stretch: 110%;
  }
  .nav-link:hover { background: transparent; color: var(--c-magenta-600); }
  .nav-link.is-active::after { left: auto; right: 4px; bottom: 50%; width: 10px; height: 10px; border-radius: 50%; transform: translateY(50%); }
}

@media (min-width: 1100px) {
  .brand img { height: 54px; }
  .nav-list { gap: 2px; }
  .header-actions { display: flex; }
  .nav-toggle, .header-call, .nav-cta { display: none; }
}

/* ---------- Shared: CTA band ---------- */

.cta-band {
  position: relative;
  overflow: hidden;
  padding-block: clamp(64px, 8vw, 104px);
  background: var(--c-ink);
  color: rgba(255, 255, 255, 0.84);
  isolation: isolate;
}
.cta-band::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(60% 90% at 0% 100%, rgba(228, 0, 124, 0.55), transparent 70%),
    radial-gradient(55% 90% at 100% 0%, rgba(2, 85, 166, 0.6), transparent 70%);
}
.cta-band::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background-image: radial-gradient(rgba(255, 255, 255, 0.14) 1.2px, transparent 1.3px);
  background-size: 18px 18px;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 30%, #000 70%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 30%, #000 70%, transparent);
}
.cta-inner { max-width: 820px; margin-inline: auto; text-align: center; }
.cta-band h2 {
  color: #fff;
  font-size: clamp(2rem, 1.2rem + 3vw, 3.4rem);
  font-stretch: 120%;
  font-weight: 850;
  letter-spacing: -0.015em;
  text-wrap: balance;
}
.cta-band p { margin-top: 18px; font-size: clamp(1.02rem, 0.95rem + 0.35vw, 1.18rem); text-wrap: pretty; }
.cta-band .btn-row { justify-content: center; margin-top: 34px; }

/* ---------- Footer ---------- */

.site-footer {
  position: relative;
  padding-top: clamp(56px, 7vw, 88px);
  background: var(--c-ink);
  color: rgba(255, 255, 255, 0.72);
}
.site-footer::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--grad);
}
.footer-grid { display: grid; gap: 40px; }
.footer-brand img { width: auto; height: 104px; }
.footer-tagline {
  max-width: 320px;
  margin-top: 20px;
  color: #fff;
  font-size: 1.08rem;
  font-weight: 700;
  font-stretch: 112%;
  line-height: 1.4;
}
.footer-title {
  margin-bottom: 14px;
  color: #fff;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.footer-links a,
.footer-contact a {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 40px;
  transition: color 0.2s;
}
.footer-links a:hover,
.footer-contact a:hover { color: #fff; }
.footer-contact svg { width: 18px; height: 18px; color: var(--c-pink); }
.footer-contact li + li { margin-top: 4px; }
.footer-contact .footer-phone { color: #fff; font-size: 1.15rem; font-weight: 800; font-stretch: 112%; }

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 56px;
  padding-block: 22px calc(22px + env(safe-area-inset-bottom));
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  font-size: 0.9rem;
}
.footer-bottom a { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; }
.footer-bottom a:hover { color: #fff; }
.footer-bottom svg { width: 16px; height: 16px; }

/* Keep "Back to top" clear of the floating WhatsApp button on phones. */
@media (max-width: 767.98px) {
  .footer-bottom { padding-bottom: calc(92px + env(safe-area-inset-bottom)); }
}

@media (min-width: 640px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (min-width: 1024px) {
  .footer-grid { grid-template-columns: 1.5fr 0.9fr 1fr 1.2fr; gap: 48px; }
}

/* ---------- Floating WhatsApp ---------- */

.wa-float {
  position: fixed;
  right: max(16px, env(safe-area-inset-right));
  bottom: max(16px, env(safe-area-inset-bottom));
  z-index: 60;
  display: grid;
  place-items: center;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: var(--c-wa);
  color: #fff;
  box-shadow: 0 14px 30px -10px rgba(14, 133, 68, 0.75);
  transition: transform 0.2s var(--ease), background-color 0.2s;
}
.wa-float svg { width: 32px; height: 32px; }
.wa-float:hover { transform: scale(1.06); background: var(--c-wa-deep); }
.wa-float::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 2px solid var(--c-wa);
  animation: wa-pulse 2.6s var(--ease) infinite;
  pointer-events: none;
}
.wa-float-label {
  position: absolute;
  right: calc(100% + 12px);
  padding: 8px 14px;
  border-radius: 999px;
  background: var(--c-ink);
  color: #fff;
  font-size: 0.88rem;
  font-weight: 600;
  white-space: nowrap;
  opacity: 0;
  transform: translateX(6px);
  transition: opacity 0.2s, transform 0.2s var(--ease);
  pointer-events: none;
}
.wa-float:hover .wa-float-label,
.wa-float:focus-visible .wa-float-label { opacity: 1; transform: none; }

@keyframes wa-pulse {
  0% { transform: scale(1); opacity: 0.7; }
  70%, 100% { transform: scale(1.45); opacity: 0; }
}

@media (min-width: 768px) {
  .wa-float { right: 28px; bottom: 28px; width: 64px; height: 64px; }
}

/* ---------- Reveal on scroll ---------- */

.js .reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}
.js .reveal.is-visible { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .js .reveal { opacity: 1; transform: none; }
}
