/* ============================================================
   Rebirth Media — Main Theme CSS  v1.1
   Matches the approved standalone build at localhost:5173
   ============================================================ */

/* ---------- Fonts ---------- */
@import url('https://db.onlinewebfonts.com/c/5ac3fe7c6abd2f62067f266d89671492?family=HelveticaNowDisplay-Medium');
@import url('https://db.onlinewebfonts.com/c/1aa3377e489837a26d019bba501e779d?family=HelveticaNowDisplayW01-Rg');

/* ---------- Custom properties ---------- */
:root {
  --font-heading: 'HelveticaNowDisplay-Medium', 'Helvetica Neue', Helvetica, Arial, sans-serif;
  --font-body:    'HelveticaNowDisplayW01-Rg', 'Helvetica Neue', Helvetica, Arial, sans-serif;
  --color-bg:     #f5f3ef;
  --color-dark:   #111214;
  --color-lime:   #c6ff31;
  --color-muted:  rgba(17,18,20,0.55);
  --max-w:        1440px;
  --px:           40px;
  --py-section:   112px;
}
@media (max-width: 768px) {
  :root { --px: 20px; --py-section: 80px; }
}
@media (max-width: 480px) {
  :root { --px: 20px; --py-section: 64px; }
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-body);
  background: var(--color-bg);
  color: var(--color-dark);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
img, video { display: block; max-width: 100%; }
a { color: inherit; }

/* ---------- WordPress defaults override ---------- */
.wp-site-blocks { padding: 0 !important; }
.wp-block-group { margin: 0 !important; }

/* ============================================================
   NAVIGATION
   ============================================================ */

/* On desktop: header lives inside the hero section (absolute).
   On mobile:  header is pulled out to a fixed top bar so it
   stays visible when the user scrolls past the hero.          */
.rb-header-wrap {
  /* Desktop: sticky wrapper so the absolute header scrolls away with hero */
  position: sticky;
  top: 0;
  z-index: 45;
}

.rb-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: var(--max-w);
  width: 100%;
  margin: 0 auto;
  padding: 20px var(--px);
}

/* Desktop: position header absolutely inside hero (no background) */
@media (min-width: 769px) {
  .rb-header-wrap {
    position: relative;
    top: auto;
    z-index: 20;
    /* absorb the header height so hero content starts below it */
  }
  .rb-header {
    position: absolute;
    top: 0; left: 0; right: 0;
    z-index: 20;
    margin: 0 auto;
  }
}

/* Mobile: fixed bar pinned to the top of the viewport.
   z-index: 45 sits above the overlay (z-index: 40). */
@media (max-width: 768px) {
  .rb-header-wrap {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    z-index: 45;
    background: transparent;
  }
}

.rb-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  /* White on mobile (over video scrim), dark on desktop */
  color: white;
}
@media (min-width: 769px) {
  .rb-logo { color: var(--color-dark); }
}

.rb-logo-mark { font-size: 30px; line-height: 1; letter-spacing: -0.14em; }
.rb-logo-name {
  font-family: var(--font-heading);
  font-size: 22px;
  line-height: 1;
  letter-spacing: -0.055em;
}
.rb-logo-name em { font-family: Georgia, 'Times New Roman', serif; font-style: italic; }

.rb-nav { display: flex; align-items: center; gap: 28px; font-size: 15px; }
.rb-nav a { text-decoration: none; transition: opacity 0.2s; }
.rb-nav a:hover { opacity: 0.55; }

.rb-cta-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border: 1px solid var(--color-dark);
  border-radius: 100px;
  font-size: 14px;
  text-decoration: none;
  transition: background 0.2s, color 0.2s;
}
.rb-cta-btn:hover { background: var(--color-dark); color: var(--color-lime); }
.rb-cta-btn .arrow { display: inline-block; transition: transform 0.2s; }
.rb-cta-btn:hover .arrow { transform: translateX(3px); }

/* Mobile hamburger
   z-index: 46 ensures it sits above the overlay (z-index: 40) even
   though it is a child of the fixed header (z-index: 45 stacking context). */
.rb-menu-btn {
  display: none;
  position: relative;
  z-index: 46;
  width: 36px; height: 36px;
  border-radius: 50%;
  /* White border when over video, dark when menu is open */
  border: 1px solid rgba(255,255,255,0.7);
  background: transparent;
  cursor: pointer;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  transition: border-color 0.3s;
}
.rb-menu-btn.is-open {
  border-color: var(--color-dark);
}
.rb-menu-btn span {
  display: block;
  width: 16px; height: 1.5px;
  background: white;
  transition: transform 0.3s, opacity 0.3s, background 0.3s;
}
.rb-menu-btn.is-open span { background: var(--color-dark); }
.rb-menu-btn.is-open span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.rb-menu-btn.is-open span:nth-child(2) { opacity: 0; }
.rb-menu-btn.is-open span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

/* Mobile nav overlay — z-index: 40 sits below the header wrapper (z-index: 45) */
.rb-mobile-nav {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 40;
  background: var(--color-lime);
  flex-direction: column;
  justify-content: center;
  gap: 28px;
  padding: 28px;
  font-size: 35px;
  letter-spacing: -0.04em;
  color: var(--color-dark);
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.3s;
}
.rb-mobile-nav.is-open { pointer-events: auto; opacity: 1; }
.rb-mobile-nav a { text-decoration: none; color: var(--color-dark); }
.rb-mobile-nav .rb-mobile-cta { font-size: 17px; text-decoration: underline; text-underline-offset: 4px; margin-top: 16px; }

@media (max-width: 768px) {
  .rb-nav, .rb-cta-btn { display: none; }
  .rb-menu-btn { display: flex; }
  .rb-mobile-nav { display: flex; }
}

/* ============================================================
   HERO SECTION
   ============================================================ */
.rb-hero {
  position: relative;
  min-height: 760px;
  overflow: hidden;
  background: var(--color-lime);
  /* Mobile: white text (over dark scrim); Desktop: dark text */
  color: white;
}
@media (min-width: 769px) {
  .rb-hero { color: var(--color-dark); }
}

.rb-hero-video {
  position: absolute;
  inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  /* Mobile: show top of image (person centred, TV monitor at top) */
  object-position: center 20%;
  pointer-events: none;
}
@media (min-width: 769px) {
  /* Desktop: pull to right so TV head is in right column */
  .rb-hero-video { object-position: 70% center; }
}

/* Full-screen tint — stronger on mobile, lighter on desktop */
.rb-hero-scrim {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.25);
  pointer-events: none;
}
@media (min-width: 769px) {
  .rb-hero-scrim { background: rgba(0,0,0,0.08); }
}

/* Mobile-only gradient scrim anchored to bottom where the text lives */
.rb-hero-scrim-mobile {
  display: none;
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.72) 0%, rgba(0,0,0,0.38) 38%, transparent 65%);
  pointer-events: none;
}
@media (max-width: 768px) {
  .rb-hero-scrim-mobile { display: block; }
}

.rb-hero-inner {
  position: relative;
  z-index: 10;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 var(--px);
  min-height: 675px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding-bottom: 80px;
}
@media (max-width: 768px) {
  .rb-hero-inner { padding-bottom: 64px; min-height: 580px; }
}

.rb-hero-grid {
  display: grid;
  gap: 36px;
  align-items: end;
}
@media (min-width: 769px) {
  .rb-hero-grid { grid-template-columns: repeat(12, 1fr); }
  .rb-hero-grid .rb-hero-left  { grid-column: span 9; }
  .rb-hero-grid .rb-hero-right { grid-column: span 3; }
}

.rb-hero-kicker {
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin-bottom: 24px;
  /* slightly dimmed on mobile for visual hierarchy */
  color: rgba(255,255,255,0.70);
}
@media (min-width: 769px) {
  .rb-hero-kicker { color: var(--color-dark); }
}

.rb-hero-h1 {
  font-family: var(--font-heading);
  font-size: clamp(54px, 8.7vw, 128px);
  line-height: 0.86;
  letter-spacing: -0.075em;
  max-width: 900px;
  /* inherits white from .rb-hero on mobile, dark on desktop */
}
.rb-hero-h1 em { font-family: Georgia, 'Times New Roman', serif; font-style: italic; letter-spacing: -0.09em; }

.rb-hero-right p {
  font-size: 17px;
  line-height: 1.25;
  letter-spacing: -0.025em;
  max-width: 300px;
  color: rgba(255,255,255,0.85);
}
@media (min-width: 769px) {
  .rb-hero-right p { color: var(--color-dark); }
}

.rb-hero-link {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  margin-top: 28px;
  border-bottom: 1px solid white;
  padding-bottom: 4px;
  font-size: 15px;
  font-weight: 500;
  text-decoration: none;
  color: white;
}
@media (min-width: 769px) {
  .rb-hero-link { border-bottom-color: var(--color-dark); color: var(--color-dark); }
}
.rb-hero-link .arrow { display: inline-block; transition: transform 0.2s; }
.rb-hero-link:hover .arrow { transform: translateX(3px); }

/* ============================================================
   SHARED SECTION UTILITIES
   ============================================================ */
.rb-section {
  padding: var(--py-section) var(--px);
}
.rb-section-inner {
  max-width: var(--max-w);
  margin: 0 auto;
}
.rb-kicker {
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.rb-section-header {
  display: grid;
  gap: 24px;
  margin-bottom: 56px;
  align-items: end;
}
@media (min-width: 769px) {
  .rb-section-header { grid-template-columns: repeat(12, 1fr); }
  .rb-section-header .rb-kicker      { grid-column: span 3; }
  .rb-section-header .rb-section-h2  { grid-column: span 9; }
}
.rb-section-h2 {
  font-family: var(--font-heading);
  font-size: clamp(38px, 5vw, 70px);
  line-height: 0.94;
  letter-spacing: -0.065em;
  max-width: 800px;
}

/* ============================================================
   SERVICES SECTION
   ============================================================ */
.rb-services { border-top: 1px solid rgba(17,18,20,0.2); }
.rb-service-item {
  display: grid;
  gap: 16px;
  padding: 28px 0;
  border-bottom: 1px solid rgba(17,18,20,0.2);
  align-items: start;
  cursor: default;
}
@media (min-width: 769px) {
  .rb-service-item {
    grid-template-columns: repeat(12, 1fr);
    padding: 36px 0;
    align-items: center;
  }
  .rb-service-num       { grid-column: span 2; }
  .rb-service-name      { grid-column: span 5; }
  .rb-service-desc-wrap { grid-column: span 5; }
}
.rb-service-num {
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.1em;
}
.rb-service-name {
  font-family: var(--font-heading);
  font-size: clamp(22px, 2.8vw, 34px);
  line-height: 1;
  letter-spacing: -0.05em;
}
.rb-service-desc-wrap {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
}
.rb-service-desc {
  font-size: 16px;
  line-height: 1.35;
  max-width: 380px;
}
.rb-service-arrow { font-size: 20px; flex-shrink: 0; transform: rotate(-45deg); }

/* ============================================================
   APPROACH SECTION
   ============================================================ */
.rb-approach {
  background: var(--color-dark);
  color: #f5f3ef;
}
.rb-approach .rb-kicker { color: rgba(245,243,239,0.6); }
.rb-approach .rb-section-h2 { color: #f5f3ef; }
.rb-approach-grid {
  display: grid;
  margin-top: 80px;
  gap: 1px;
  overflow: hidden;
  border-radius: 2px;
  background: rgba(255,255,255,0.2);
}
@media (min-width: 769px) {
  .rb-approach-grid { grid-template-columns: repeat(3, 1fr); margin-top: 96px; }
}
.rb-approach-card {
  background: var(--color-dark);
  padding: 24px 32px;
}
@media (max-width: 768px) { .rb-approach-card { padding: 20px 24px; } }
.rb-approach-card-title {
  font-size: 19px;
  letter-spacing: -0.04em;
  margin-bottom: 80px;
}
@media (max-width: 768px) { .rb-approach-card-title { margin-bottom: 56px; } }
.rb-approach-card-desc {
  font-size: 17px;
  line-height: 1.35;
  color: rgba(245,243,239,0.7);
  max-width: 280px;
}

/* ============================================================
   INSIGHTS SECTION
   ============================================================ */
.rb-insights-header {
  display: grid;
  gap: 40px;
  margin-bottom: 56px;
}
@media (min-width: 769px) {
  .rb-insights-header { grid-template-columns: repeat(12, 1fr); align-items: end; }
  .rb-insights-header .rb-section-h2    { grid-column: span 8; }
  .rb-insights-header .rb-insights-desc { grid-column: span 4; }
}
.rb-insights-desc {
  font-size: 17px;
  line-height: 1.35;
  max-width: 320px;
}
.rb-insights-cards {
  display: grid;
  gap: 16px;
}
@media (min-width: 640px) { .rb-insights-cards { grid-template-columns: repeat(3, 1fr); } }
.rb-insight-card {
  border-radius: 2px;
  padding: 24px;
}
.rb-insight-card-label {
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.rb-insight-card-text {
  font-family: var(--font-heading);
  font-size: 25px;
  line-height: 1;
  letter-spacing: -0.05em;
  margin-top: 112px;
}
@media (max-width: 768px) { .rb-insight-card-text { margin-top: 80px; } }
.rb-insight-card--search      { background: #d8d4ff; }
.rb-insight-card--creative    { background: #ffb7de; }
.rb-insight-card--performance { background: #ff7e27; }

/* ============================================================
   FAQ SECTION
   ============================================================ */
.rb-faq { border-top: 1px solid rgba(17,18,20,0.2); }
.rb-faq-grid {
  display: grid;
  gap: 40px;
}
@media (min-width: 769px) {
  .rb-faq-grid { grid-template-columns: repeat(12, 1fr); }
  .rb-faq-left  { grid-column: span 4; }
  .rb-faq-right { grid-column: span 8; }
}
.rb-faq-left .rb-kicker { margin-bottom: 20px; }
.rb-faq-left h2 {
  font-family: var(--font-heading);
  font-size: 39px;
  line-height: 0.94;
  letter-spacing: -0.06em;
  margin-top: 0;
}
.rb-faq-list { border-top: 1px solid rgba(17,18,20,0.2); }
.rb-faq-item { border-bottom: 1px solid rgba(17,18,20,0.2); }
.rb-faq-btn {
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 20px 0;
  background: none;
  border: none;
  cursor: pointer;
  text-align: left;
  font-family: var(--font-body);
  font-size: 20px;
  line-height: 1.1;
  letter-spacing: -0.035em;
  color: var(--color-dark);
}
.rb-faq-icon { font-size: 24px; font-weight: 400; flex-shrink: 0; }
.rb-faq-answer {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.3s ease;
}
.rb-faq-answer.is-open { grid-template-rows: 1fr; }
.rb-faq-answer-inner {
  overflow: hidden;
  padding-bottom: 0;
  transition: padding-bottom 0.3s ease;
}
.rb-faq-answer.is-open .rb-faq-answer-inner { padding-bottom: 20px; }
.rb-faq-answer p {
  font-size: 16px;
  line-height: 1.4;
  color: rgba(17,18,20,0.65);
}

/* ============================================================
   CONTACT / FOOTER
   ============================================================ */
.rb-footer {
  background: var(--color-lime);
  padding: 56px var(--px);
}
@media (min-width: 769px) { .rb-footer { padding: 72px var(--px); } }
.rb-footer-inner { max-width: var(--max-w); margin: 0 auto; }
.rb-footer-kicker { font-size: 12px; font-weight: 500; letter-spacing: 0.14em; text-transform: uppercase; }
.rb-footer-main {
  display: flex;
  flex-direction: column;
  gap: 48px;
  justify-content: space-between;
  margin-top: 48px;
}
@media (min-width: 769px) {
  .rb-footer-main { flex-direction: row; align-items: flex-end; margin-top: 72px; }
}
.rb-footer-h2 {
  font-family: var(--font-heading);
  font-size: clamp(47px, 7.4vw, 105px);
  line-height: 0.86;
  letter-spacing: -0.075em;
  max-width: 700px;
}
.rb-footer-contacts {
  display: grid;
  gap: 12px;
  flex-shrink: 0;
}
@media (min-width: 640px) { .rb-footer-contacts { grid-template-columns: repeat(2, 1fr); width: 480px; } }
.rb-footer-contact-card {
  border: 1px solid rgba(17,18,20,0.25);
  border-radius: 2px;
  padding: 16px;
  text-decoration: none;
  color: var(--color-dark);
  transition: background 0.2s, color 0.2s;
  display: block;
}
.rb-footer-contact-card:hover { background: var(--color-dark); color: var(--color-lime); }
.rb-footer-contact-label {
  display: block;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}
.rb-footer-contact-value {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  margin-top: 28px;
  font-size: 16px;
  letter-spacing: -0.03em;
}
.rb-footer-contact-value .arrow { display: inline-block; transition: transform 0.2s; }
.rb-footer-contact-card:hover .arrow { transform: translateX(3px); }

.rb-subfooter {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid rgba(17,18,20,0.2);
  margin-top: 80px;
  padding-top: 16px;
  font-size: 12px;
}
.rb-back-top {
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  color: var(--color-dark);
}
.rb-back-top span { text-decoration: underline; text-underline-offset: 2px; }

/* ============================================================
   ACCESSIBILITY / REDUCED MOTION
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
  html { scroll-behavior: auto; }
  /* video scrub still works but rAF will not chase mouse (no visual regression) */
}
