/* Rezgit Phase 7 corporate templates and homepage visual system. */
:root {
  --p7-red: #b20d16;
  --p7-red-dark: #8f0710;
  --p7-ink: #17191c;
  --p7-muted: #586069;
  --p7-line: #dfe3e6;
  --p7-soft: #f5f3ef;
  --p7-white: #fff;
  --p7-dark: #14171a;
  --p7-section-space: clamp(4rem, 7vw, 6.75rem);
  --p7-radius: 3px;
}

/* Every icon needs an explicit box; without this, browser SVG defaults distort headers. */
.rezgit-icon { width: 1.25rem; height: 1.25rem; flex: 0 0 auto; }
.rezgit-header__cta .rezgit-icon { width: 1.1rem; height: 1.1rem; }
.rezgit-menu-toggle .rezgit-icon,.rezgit-mobile-nav__close .rezgit-icon { width: 1.5rem; height: 1.5rem; color: var(--p7-ink); }

/* Header: compact, stable and separated from page content. */
.home .rezgit-utility-bar { background: #15181b; }
.home .rezgit-header { background: rgba(255,255,255,.985); }
.home .rezgit-header__inner { min-height: 82px; }
.home .rezgit-brand img { width: clamp(128px, 11vw, 166px); max-height: 72px; }
.home .rezgit-header__cta,
.home .rezgit-header__inner > .rezgit-button { border-radius: var(--p7-radius); }
.home .rezgit-primary-nav a { transition: color .18s ease, box-shadow .18s ease; }

/* Homepage baseline: scope every rule to avoid corporate-template leakage. */
.rezgit-home { overflow: clip; background: var(--p7-white); color: var(--p7-ink); }
.rezgit-home :where(h1,h2,h3,h4,p,li,span,strong) { overflow-wrap: break-word; }
.rezgit-home .rezgit-section { padding-block: var(--p7-section-space); }
.rezgit-home .rezgit-section--light { background: var(--p7-soft); }
.rezgit-home .rezgit-section + .rezgit-section { border-top: 1px solid rgba(23,25,28,.07); }
.rezgit-home .rezgit-section__intro { max-width: 760px; margin-bottom: clamp(2rem,4vw,3.25rem); }
.rezgit-home .rezgit-section__intro > :last-child { margin-bottom: 0; }
.rezgit-home .rezgit-eyebrow { color: var(--p7-red); }
.rezgit-home .rezgit-lead { font-size: clamp(1.075rem,1.5vw,1.25rem); line-height: 1.65; }
.rezgit-home .rezgit-actions { align-items: center; margin-top: 1.75rem; }
.rezgit-home .rezgit-button { border-radius: var(--p7-radius); box-shadow: none; }
.rezgit-home .rezgit-button:hover { transform: translateY(-1px); }
.rezgit-home .rezgit-button--outline { background: transparent; border-color: currentColor; color: var(--p7-red); }
.rezgit-home .rezgit-button--outline:hover { background: var(--p7-red); border-color: var(--p7-red); color: var(--p7-white); }
.rezgit-home a:not(.rezgit-button):hover { text-decoration-thickness: 2px; }

/* Hero: explicit text colors override the global heading token. */
.rezgit-home-hero {
  position: relative;
  isolation: isolate;
  display: grid;
  align-items: center;
  min-height: clamp(600px, 73vh, 790px);
  color: var(--p7-white);
  background: var(--hero) center 42% / cover no-repeat;
}
.rezgit-home-hero::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 0;
  background: linear-gradient(90deg, rgba(9,11,13,.94) 0%, rgba(9,11,13,.84) 48%, rgba(9,11,13,.2) 100%);
}
.rezgit-home-hero__content { width: min(100%, 760px); padding-block: clamp(5rem,9vw,8rem); }
.rezgit-home-hero .rezgit-eyebrow { color: #ff7077; }
.rezgit-home-hero h1 {
  max-width: 780px;
  margin: .3em 0 .35em;
  color: var(--p7-white);
  font-size: clamp(3rem,6vw,5.6rem);
  line-height: .98;
  letter-spacing: -.045em;
  text-shadow: 0 2px 18px rgba(0,0,0,.24);
}
.rezgit-home-hero__content > p:not(.rezgit-eyebrow):not(.rezgit-hero-trust) {
  max-width: 650px;
  color: #f3f4f5;
  font-size: clamp(1.05rem,1.8vw,1.28rem);
}
.rezgit-home-hero .rezgit-button--outline { border-color: rgba(255,255,255,.8); color: var(--p7-white); }
.rezgit-home-hero .rezgit-button--outline:hover { background: var(--p7-white); border-color: var(--p7-white); color: var(--p7-ink); }
.rezgit-phone-link { color: var(--p7-white); font-weight: 800; }
.rezgit-phone-link:hover { color: #ff9a9f; }
.rezgit-hero-trust { max-width: 700px; margin-top: 1.5rem; padding-top: 1.2rem; border-top: 1px solid rgba(255,255,255,.3); color: #e8eaec; font-size: .94rem; }

/* Trust band. */
.rezgit-home > .rezgit-trust { background: var(--p7-white); border-color: var(--p7-line); }
.rezgit-home .rezgit-trust__grid { grid-template-columns: repeat(4,minmax(0,1fr)); }
.rezgit-home .rezgit-trust__grid a {
  display: grid;
  place-items: center;
  min-height: 72px;
  padding: 1rem;
  border-right: 1px solid var(--p7-line);
  color: var(--p7-ink);
  font-size: .9rem;
  font-weight: 750;
  text-align: center;
  text-decoration: none;
}
.rezgit-home .rezgit-trust__grid a:last-child { border-right: 0; }
.rezgit-home .rezgit-trust__grid a:hover { background: var(--p7-soft); color: var(--p7-red); }

/* Intro split and shared media. */
.rezgit-home .rezgit-split { grid-template-columns: minmax(0,1fr) minmax(0,1.05fr); gap: clamp(2.5rem,6vw,6rem); }
.rezgit-home .rezgit-split__media { overflow: hidden; min-height: 420px; background: #ececec; }
.rezgit-home .rezgit-split__media img { width: 100%; height: 100%; min-height: 420px; object-fit: cover; }
.rezgit-home .rezgit-checklist { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: .55rem 1.5rem; columns: auto; margin: 1.6rem 0; padding: 0; list-style: none; }
.rezgit-home .rezgit-checklist li { position: relative; padding-left: 1.45rem; }
.rezgit-home .rezgit-checklist li::before { content: "✓"; position: absolute; left: 0; color: var(--p7-red); font-weight: 900; }

/* Services: predictable four/two/one-column grid with balanced cards. */
.rezgit-home .rezgit-grid--four { grid-template-columns: repeat(4,minmax(0,1fr)); gap: 1.5rem; }
.rezgit-home .rezgit-grid--three { grid-template-columns: repeat(3,minmax(0,1fr)); gap: 1.5rem; }
.rezgit-home .rezgit-card {
  min-width: 0;
  padding: clamp(1.5rem,2.4vw,2rem);
  border: 1px solid var(--p7-line);
  border-radius: var(--p7-radius);
  box-shadow: 0 8px 24px rgba(23,25,28,.06);
}
.rezgit-home .rezgit-card:hover { transform: translateY(-4px); box-shadow: 0 14px 34px rgba(23,25,28,.11); }
.rezgit-home .rezgit-card h3 { color: var(--p7-ink); font-size: clamp(1.2rem,1.8vw,1.5rem); }
.rezgit-home .rezgit-card h3 a { color: inherit; text-decoration: none; }
.rezgit-home .rezgit-card h3 a:hover { color: var(--p7-red); }
.rezgit-home .rezgit-card p { color: #454b51; }
.rezgit-home .rezgit-text-link { margin-top: auto; color: var(--p7-red); font-weight: 750; }

/* ADU: light authority panel instead of a second full saturated color field. */
.rezgit-home .rezgit-section--adu {
  position: relative;
  background: var(--p7-white);
  color: var(--p7-ink);
  border-top: 8px solid var(--p7-red);
}
.rezgit-home .rezgit-section--adu::after {
  content: "";
  position: absolute;
  z-index: 0;
  inset: 0 0 0 auto;
  width: min(32vw,480px);
  background: linear-gradient(135deg,transparent,rgba(178,13,22,.055));
  pointer-events: none;
}
.rezgit-home .rezgit-section--adu > .rezgit-container { position: relative; z-index: 1; }
.rezgit-home .rezgit-section--adu :where(h2,h3) { color: var(--p7-ink); }
.rezgit-home .rezgit-section--adu p { color: #343a40; }
.rezgit-chip-grid { display: flex; flex-wrap: wrap; gap: .65rem; margin: 2rem 0; }
.rezgit-chip-grid span { padding: .62rem .95rem; border: 1px solid #c7cbcf; border-radius: 999px; background: var(--p7-white); color: var(--p7-ink); font-weight: 750; }
.rezgit-compact-process { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: .75rem 1.5rem; margin: 2rem 0; padding: 0; list-style: none; counter-reset: adu-step; }
.rezgit-compact-process li { counter-increment: adu-step; padding: 1rem 0 1rem 2.65rem; border-top: 2px solid var(--p7-red); color: var(--p7-ink); font-weight: 750; }
.rezgit-compact-process li::before { content: counter(adu-step,decimal-leading-zero); margin-left: -2.65rem; margin-right: .65rem; color: var(--p7-red); }
.rezgit-home .rezgit-section--adu .rezgit-disclaimer { border-color: var(--p7-red); background: var(--p7-soft); color: var(--p7-ink); }

/* Process: compact horizontal sequence without cramped text. */
.rezgit-home .rezgit-process { grid-template-columns: repeat(7,minmax(0,1fr)); gap: .75rem; }
.rezgit-home .rezgit-process li { min-width: 0; padding: 1.25rem 1rem; border: 1px solid var(--p7-line); border-top: 3px solid var(--p7-red); border-radius: 0; background: var(--p7-white); }
.rezgit-home .rezgit-process li > span { width: 2rem; height: 2rem; background: var(--p7-ink); color: var(--p7-white); }
.rezgit-home .rezgit-process h3 { margin: .8rem 0 .6rem; color: var(--p7-ink); font-size: .98rem; line-height: 1.25; }
.rezgit-home .rezgit-process p { margin: 0; color: #4b5157; font-size: .875rem; line-height: 1.55; }
.rezgit-home .rezgit-disclaimer,
.rezgit-notice { max-width: 900px; padding: 1rem 1.2rem; border-left: 4px solid var(--p7-red); background: #eff0f1; color: var(--p7-ink); }

/* Why cards. */
.rezgit-home .rezgit-card--numbered { border-top: 4px solid var(--p7-red); }

/* The single intentional dark content band. */
.rezgit-home .rezgit-section--dark { background: var(--p7-dark); color: #e9ebed; }
.rezgit-home .rezgit-section--dark :where(h2,h3,h4) { color: var(--p7-white); }
.rezgit-home .rezgit-section--dark .rezgit-eyebrow { color: #ff6970; }
.rezgit-home .rezgit-section--dark p { color: #d7dade; }
.rezgit-pillar-list { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 1px; margin: 2rem 0; padding: 1px; background: #42474c; list-style: none; }
.rezgit-pillar-list li { padding: 1rem 1.1rem; background: #181b1e; color: var(--p7-white); font-weight: 750; }

/* Leadership: one record occupies a useful editorial width. */
.rezgit-home .rezgit-section > .rezgit-container > .rezgit-grid:has(.rezgit-leader-card) { display: block; margin: 2rem 0; }
.rezgit-home .rezgit-leader-card {
  display: grid;
  grid-template-columns: minmax(240px,360px) minmax(0,1fr);
  width: min(100%,920px);
  min-height: 0;
  overflow: hidden;
  border: 1px solid var(--p7-line);
  border-radius: var(--p7-radius);
  background: var(--p7-white);
  box-shadow: 0 10px 30px rgba(23,25,28,.08);
}
.rezgit-home .rezgit-leader-card img { width: 100%; height: 100%; min-height: 390px; max-height: 480px; object-fit: cover; object-position: center top; }
.rezgit-home .rezgit-leader-card > div { display: flex; flex-direction: column; justify-content: center; padding: clamp(2rem,5vw,4rem); }
.rezgit-home .rezgit-leader-card h3 { color: var(--p7-ink); font-size: clamp(1.7rem,3vw,2.5rem); }
.rezgit-home .rezgit-leader-card p { color: #43494f; }

/* Service area. */
.rezgit-market-note { padding: clamp(1.75rem,3vw,2.5rem); border-left: 5px solid var(--p7-red); background: var(--p7-dark); color: var(--p7-white); }
.rezgit-market-note span { display: block; margin: .55rem 0; color: var(--p7-white); font-size: clamp(1.35rem,2.4vw,1.8rem); }
.rezgit-market-note p { margin-bottom: 0; color: #d8dbde; }

/* FAQ: calm dividers instead of oversized boxed fields. */
.rezgit-home .rezgit-narrow { width: min(calc(100% - (2 * var(--rezgit-gutter))),900px); margin-inline: auto; }
.rezgit-faqs { border-top: 1px solid var(--p7-line); }
.rezgit-faqs details { margin: 0; border: 0; border-bottom: 1px solid var(--p7-line); border-radius: 0; background: transparent; }
.rezgit-faqs summary { position: relative; padding: 1.25rem 2.5rem 1.25rem 0; color: var(--p7-ink); font-size: 1.05rem; font-weight: 800; cursor: pointer; list-style: none; }
.rezgit-faqs summary::-webkit-details-marker { display: none; }
.rezgit-faqs summary::after { content: "+"; position: absolute; right: .25rem; top: 50%; translate: 0 -50%; color: var(--p7-red); font-size: 1.5rem; }
.rezgit-faqs details[open] summary::after { content: "−"; }
.rezgit-faqs details p { max-width: 760px; padding: 0 2.5rem 1.3rem 0; color: #474d53; }
.rezgit-faqs summary:hover { color: var(--p7-red); }

/* Final CTA and footer transition. */
.rezgit-final-cta { padding-block: clamp(4.5rem,8vw,7rem); background: linear-gradient(110deg,var(--p7-red-dark),var(--p7-red)); color: var(--p7-white); }
.rezgit-final-cta :where(h2,h3) { max-width: 820px; color: var(--p7-white); }
.rezgit-final-cta h2 { font-size: clamp(2.6rem,5vw,4.6rem); }
.rezgit-final-cta p { max-width: 720px; color: #fff3f3; font-size: 1.15rem; }
.rezgit-final-cta .rezgit-button { background: var(--p7-white); border-color: var(--p7-white); color: var(--p7-red-dark); }
.rezgit-final-cta .rezgit-button:hover { background: var(--p7-ink); border-color: var(--p7-ink); color: var(--p7-white); }
.rezgit-final-cta a:not(.rezgit-button) { color: var(--p7-white); font-weight: 800; }
.rezgit-final-cta small { display: block; max-width: 820px; margin-top: 1rem; color: #ffe6e7; }
.home .rezgit-prefooter { display: none; }
.home .rezgit-footer { padding-top: clamp(3.5rem,6vw,5rem); }
.home .rezgit-footer__logo { padding: .45rem; background: #fff; }

/* Corporate pages. */
.rezgit-page-hero--corporate { padding-block: clamp(4rem,8vw,7rem); background: linear-gradient(135deg,#0c0e10,#2c080b); color: var(--p7-white); }
.rezgit-page-hero--corporate :where(h1,h2) { max-width: 1000px; color: var(--p7-white); }
.rezgit-page-hero--corporate h1 { font-size: clamp(2.5rem,5vw,4.8rem); }
.rezgit-page-hero--corporate p:last-child { max-width: 780px; color: #e8eaec; font-size: 1.2rem; }
.rezgit-prose { max-width: 1120px; padding-block: clamp(3.5rem,7vw,6rem); }
.rezgit-prose > :where(p,ul,ol) { max-width: 800px; }
.rezgit-prose h2 { margin-top: 2.5rem; }
.rezgit-values { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 1.25rem; }
.rezgit-values section,.rezgit-corporate-cta { padding: 2rem; border-top: 4px solid var(--p7-red); background: var(--p7-soft); }
.rezgit-corporate-cta { margin-top: 4rem; background: var(--p7-dark); color: var(--p7-white); }
.rezgit-corporate-cta :where(h2,h3) { color: var(--p7-white); }
.rezgit-process-long { padding: 0; list-style: none; }
.rezgit-process-long li { position: relative; padding: 0 0 2rem 2rem; border-left: 1px solid #bbb; }
.rezgit-process-long li::before { content: counter(list-item); position: absolute; left: -1.05rem; top: 0; display: grid; place-items: center; width: 2.1rem; height: 2.1rem; border-radius: 50%; background: var(--p7-red); color: var(--p7-white); font-weight: 800; }
.rezgit-table-wrap { overflow-x: auto; }
.rezgit-table-wrap table { width: 100%; border-collapse: collapse; }
.rezgit-table-wrap :where(th,td) { padding: 1rem; border: 1px solid #ccc; text-align: left; }
.rezgit-contact-grid { display: grid; grid-template-columns: minmax(0,.8fr) minmax(0,1.2fr); gap: 3rem; }
.rezgit-sitemap-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 2rem; }
.rezgit-legal-meta { padding: 1rem; border: 1px solid #ddd; background: var(--p7-soft); }

@media (max-width: 1100px) {
  .home .rezgit-header__inner { min-height: 70px; }
  .home .rezgit-brand img { width: 138px; max-height: 52px; }
  .home .rezgit-header__cta { display: none; }
  .home .rezgit-menu-toggle { width: 48px; height: 48px; padding: 0; color: var(--p7-ink); }
  .rezgit-home .rezgit-grid--four { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .rezgit-home .rezgit-process { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .rezgit-home .rezgit-process li:last-child { grid-column: 1 / -1; }
  .rezgit-compact-process { grid-template-columns: repeat(2,minmax(0,1fr)); }
}

@media (max-width: 767px) {
  :root { --p7-section-space: clamp(3.25rem,12vw,4.5rem); }
  .rezgit-home-hero { min-height: 650px; background-position: 58% center; }
  .rezgit-home-hero::before { background: linear-gradient(90deg,rgba(9,11,13,.95),rgba(9,11,13,.74)); }
  .rezgit-home-hero__content { padding-block: 4.5rem; }
  .rezgit-home-hero h1 { font-size: clamp(2.65rem,13vw,4.1rem); }
  .rezgit-home .rezgit-trust__grid { grid-template-columns: 1fr 1fr; }
  .rezgit-home .rezgit-trust__grid a { min-height: 64px; border-bottom: 1px solid var(--p7-line); }
  .rezgit-home .rezgit-split,
  .rezgit-home .rezgit-grid--three,
  .rezgit-values,
  .rezgit-contact-grid,
  .rezgit-sitemap-grid { grid-template-columns: 1fr; }
  .rezgit-home .rezgit-split__media,.rezgit-home .rezgit-split__media img { min-height: 300px; }
  .rezgit-home .rezgit-checklist { grid-template-columns: 1fr; }
  .rezgit-pillar-list { grid-template-columns: 1fr; }
  .rezgit-home .rezgit-leader-card { grid-template-columns: 1fr; }
  .rezgit-home .rezgit-leader-card img { min-height: 340px; max-height: 420px; }
  .rezgit-mobile-actions { grid-template-columns: repeat(3,1fr); }
  body.home { padding-bottom: calc(68px + env(safe-area-inset-bottom)); }
  .home .rezgit-header__inner { min-height: 64px; }
  .home .rezgit-brand { padding-block: 7px; }
  .home .rezgit-brand img { width: 108px; max-height: 48px; }
  .rezgit-mobile-actions button { border: 0; background: #111; color: #fff; font-weight: 800; }
  .rezgit-mobile-actions__primary { background: var(--p7-red)!important; }
}

@media (max-width: 560px) {
  .rezgit-home .rezgit-grid--four,
  .rezgit-home .rezgit-process,
  .rezgit-compact-process { grid-template-columns: 1fr; }
  .rezgit-home .rezgit-process li:last-child { grid-column: auto; }
  .rezgit-home .rezgit-process li {
    display: grid;
    grid-template-columns: 2.25rem minmax(0,1fr);
    column-gap: .9rem;
    padding: 1.2rem;
  }
  .rezgit-home .rezgit-process li > span {
    grid-column: 1;
    grid-row: 1 / span 2;
    width: 2.25rem;
    height: 2.25rem;
    border-radius: 50%;
  }
  .rezgit-home .rezgit-process h3 { grid-column: 2; margin: .1rem 0 .4rem; font-size: 1rem; }
  .rezgit-home .rezgit-process p { grid-column: 2; }
  .rezgit-home .rezgit-trust__grid { grid-template-columns: 1fr; }
  .rezgit-home .rezgit-trust__grid a { border-right: 0; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto!important; }
  *,*::before,*::after { animation-duration: .01ms!important; transition-duration: .01ms!important; }
}
