/* ============================================================
   Vrizen — shared responsive layer
   ------------------------------------------------------------
   Page markup is authored with inline styles, and each page's own
   <style> block is injected into <head> at runtime by the dc
   runtime (so it lands AFTER this file). Two consequences:

     1. Overriding an inline style needs !important.
     2. Overriding a page <style> rule needs higher specificity,
        not just source order — hence the doubled selectors
        ([data-navlinks][data-navlinks], .ud-field.ud-field, ...).

   Breakpoints
     <  600px   phone
     <  900px   phone + portrait tablet  -> drawer nav
     >= 900px   landscape tablet + desktop -> inline nav
   ============================================================ */

:root {
  --vz-ink: #17150f;
  --vz-cream: #ece7dd;
  --vz-rust: #b4552e;
  --vz-nav-pad-x: clamp(20px, 5vw, 48px);
}

/* ---------- universal safety ---------- */

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

img, svg, video, canvas, iframe {
  max-width: 100%;
}

img, video {
  height: auto;
}

/* Long unbroken strings (URLs, emails) must not force a sidescroll. */
p, li, h1, h2, h3, h4, blockquote, figcaption, td, th {
  overflow-wrap: break-word;
}

/* ============================================================
   1. NAVIGATION  —  drawer below 900px
   ============================================================ */

@media (max-width: 899.98px) {
  /* Beat the page's own [data-navlinks]{display:flex!important} */
  [data-navlinks][data-navlinks] {
    display: none !important;
  }

  #udnav {
    padding-top: 10px !important;
    padding-bottom: 10px !important;
  }

  /* Reserve room for the fixed burger button on the right. */
  #udnav > div:last-child {
    gap: 0 !important;
    margin-right: 46px !important;
  }

  /* Inline "Get a quote" pill — keep it, just make it compact. */
  #udnav > div:last-child > a {
    padding: 10px 16px !important;
    font-size: 13px !important;
    white-space: nowrap !important;
  }
}

/* Under ~480px the logo + CTA + burger stop fitting comfortably.
   The CTA still exists — it lives in the drawer instead. */
@media (max-width: 479.98px) {
  #udnav > div:last-child > a {
    display: none !important;
  }
  #udnav > div:last-child {
    margin-right: 40px !important;
  }
}

/* ============================================================
   2. TAP TARGETS
   ============================================================ */

@media (max-width: 899.98px) {
  /* Footer link columns: 14px links stacked 9px apart are too tight
     for a thumb. Give each row a 40px hit area while keeping the
     column's overall rhythm close to the original. */
  footer div[style*="flex-direction:column"] > a {
    min-height: 40px !important;
    display: flex !important;
    align-items: center !important;
  }

  footer div[style*="flex-direction:column"] {
    gap: 2px !important;
  }
}

/* ============================================================
   3. FORMS  (contact page)
   ============================================================ */

@media (max-width: 899.98px) {
  /* 16px is the threshold below which iOS Safari zooms the viewport
     when a field takes focus. The page uses clamp(15px,...) = 15px. */
  .ud-field.ud-field {
    font-size: 16px !important;
    padding-top: 13px !important;
    padding-bottom: 13px !important;
  }

  input.ud-field.ud-field,
  select.ud-field.ud-field {
    min-height: 48px !important;
  }

  textarea.ud-field.ud-field {
    min-height: 120px !important;
  }

  /* Selection chips: 36px tall -> 44px. */
  .ud-chip.ud-chip {
    padding: 12px 18px !important;
    font-size: 14px !important;
  }
}

/* ============================================================
   4. SMALL PHONES (<=380px)
   ============================================================ */

@media (max-width: 380px) {
  /* Buy back a little horizontal room for the logo + burger so the
     bar never feels pinched on a 320-360px screen. Body sections keep
     their clamp()-based padding. */
  #udnav {
    padding-left: 16px !important;
    padding-right: 16px !important;
  }
}

/* ============================================================
   5. MOBILE DRAWER  (markup injected by site-nav.js, lives on
      <body> so React re-renders of #dc-root never touch it)
   ============================================================ */

/* Spans the full height of the nav bar so it optically centres against
   the logo whatever the bar measures; --vz-nav-h is kept in sync by
   site-nav.js. */
.vz-burger {
  position: fixed;
  top: 0;
  right: clamp(10px, 3.5vw, 22px);
  z-index: 9999;
  width: 44px;
  height: var(--vz-nav-h, 46px);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: none;
  background: transparent;
  color: var(--vz-ink);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.vz-burger:focus-visible {
  outline: 2px solid var(--vz-rust);
  outline-offset: 2px;
}

.vz-burger__box {
  position: relative;
  width: 22px;
  height: 14px;
}

.vz-burger__bar {
  position: absolute;
  left: 0;
  width: 100%;
  height: 1.8px;
  border-radius: 2px;
  background: currentColor;
  transition: transform .42s cubic-bezier(.16, 1, .3, 1),
              opacity .22s ease;
}

.vz-burger__bar:nth-child(1) { top: 0; }
.vz-burger__bar:nth-child(2) { top: 6.1px; }
.vz-burger__bar:nth-child(3) { top: 12.2px; }

.vz-burger[aria-expanded="true"] {
  color: var(--vz-cream);
}

.vz-burger[aria-expanded="true"] .vz-burger__bar:nth-child(1) {
  transform: translateY(6.1px) rotate(45deg);
}

.vz-burger[aria-expanded="true"] .vz-burger__bar:nth-child(2) {
  opacity: 0;
}

.vz-burger[aria-expanded="true"] .vz-burger__bar:nth-child(3) {
  transform: translateY(-6.1px) rotate(-45deg);
}

/* ---------- the panel ---------- */

.vz-drawer {
  position: fixed;
  inset: 0;
  z-index: 9998;
  display: none;
  flex-direction: column;
  justify-content: space-between;
  padding: 84px clamp(20px, 6vw, 44px) clamp(28px, 6vw, 40px);
  background: var(--vz-ink);
  color: var(--vz-cream);
  overflow-y: auto;
  overscroll-behavior: contain;
  opacity: 0;
  visibility: hidden;
  clip-path: inset(0 0 100% 0);
  transition: clip-path .62s cubic-bezier(.76, 0, .24, 1),
              opacity .3s ease,
              visibility 0s linear .62s;
}

.vz-drawer.is-open {
  opacity: 1;
  visibility: visible;
  clip-path: inset(0 0 0 0);
  transition: clip-path .62s cubic-bezier(.76, 0, .24, 1),
              opacity .3s ease,
              visibility 0s linear 0s;
}

.vz-drawer__eyebrow {
  font-family: 'Space Mono', monospace;
  font-size: 10.5px;
  letter-spacing: .24em;
  color: rgba(236, 231, 221, .57);
  margin-bottom: clamp(20px, 5vw, 32px);
}

.vz-drawer__links {
  display: flex;
  flex-direction: column;
  gap: clamp(2px, 1vw, 6px);
}

.vz-drawer__link {
  position: relative;
  display: flex;
  align-items: baseline;
  gap: 14px;
  padding: clamp(7px, 1.6vw, 11px) 0;
  font-weight: 800;
  font-size: clamp(30px, 9vw, 46px);
  line-height: 1.04;
  letter-spacing: -.035em;
  color: var(--vz-cream);
  opacity: 0;
  transform: translateY(18px);
  transition: opacity .5s cubic-bezier(.16, 1, .3, 1),
              transform .5s cubic-bezier(.16, 1, .3, 1),
              color .25s ease;
}

.vz-drawer.is-open .vz-drawer__link {
  opacity: 1;
  transform: none;
}

.vz-drawer__link[aria-current="page"] {
  color: var(--vz-rust);
}

.vz-drawer__link:active {
  color: var(--vz-rust);
}

.vz-drawer__num {
  font-family: 'Space Mono', monospace;
  font-size: 11px;
  font-weight: 400;
  letter-spacing: .1em;
  color: rgba(236, 231, 221, .42);
}

.vz-drawer__foot {
  margin-top: clamp(28px, 7vw, 48px);
  padding-top: clamp(18px, 4vw, 26px);
  border-top: 1px solid rgba(236, 231, 221, .16);
  opacity: 0;
  transform: translateY(14px);
  transition: opacity .5s cubic-bezier(.16, 1, .3, 1) .22s,
              transform .5s cubic-bezier(.16, 1, .3, 1) .22s;
}

.vz-drawer.is-open .vz-drawer__foot {
  opacity: 1;
  transform: none;
}

.vz-drawer__cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 15px 30px;
  border-radius: 100px;
  background: var(--vz-rust);
  color: var(--vz-cream);
  font-size: 15px;
  font-weight: 600;
}

.vz-drawer__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 22px;
  margin-top: 18px;
  font-family: 'Space Mono', monospace;
  font-size: 11px;
  letter-spacing: .12em;
  color: rgba(236, 231, 221, .62);
}

.vz-drawer__meta a {
  color: inherit;
  min-height: 32px;
  display: inline-flex;
  align-items: center;
}

/* Show the drawer machinery only where the inline nav is hidden. */
@media (max-width: 899.98px) {
  .vz-burger { display: flex; }
  .vz-drawer { display: flex; }
}

/* While the drawer is open, freeze the page behind it. */
html.vz-locked,
body.vz-locked {
  overflow: hidden !important;
  touch-action: none;
}

/* ============================================================
   6. MOTION PREFERENCES
   ============================================================ */

@media (prefers-reduced-motion: reduce) {
  .vz-drawer,
  .vz-drawer__link,
  .vz-drawer__foot,
  .vz-burger__bar {
    transition-duration: .01ms !important;
  }

  /* The page's marquee and scroll cues animate indefinitely. */
  [data-marquee],
  [data-marquee] * {
    animation: none !important;
  }
}
