/* =======================================================================
   ORCON — Global system variables
   ======================================================================= */

:root{
  /* Ink system */
  --orcon-ink-red:         #8f2a2a;
  --orcon-ink-red-strong:  rgba(143,42,42,0.95);
  --orcon-ink-red-mid:     rgba(143,42,42,0.70);
  --orcon-ink-red-soft:    rgba(143,42,42,0.18);

  /* Feature toggles */
  --orcon-paper-enabled: 0; /* 1 = ON, 0 = OFF */

  /* BG Paper tone */
  --orcon-paper-bg: #f4f1e8;
}

/* =======================================================================
   ORCON — Global paper background (no texture)
   ======================================================================= */

html,
body,
#page-container,
.et_pb_section{
  background-color: var(--orcon-paper-bg);
}

/* =======================================================================
   ORCON (Red Rabbit) — Horizontal Dossier Scroller
   Divi Child Theme — orcon.css
   ======================================================================= */

/* =======================================================================
   1) Layout: viewport wrapper, horizontal track, panels
   ======================================================================= */

.rr-leak{
  width: 100vw;
  height: 100vh;
  overflow: hidden;
}

/* Horizontal snap track */
.rr-track{
  display: flex;
  flex-direction: row;
  width: 100vw;
  height: 100vh;

  overflow-x: auto;
  overflow-y: hidden;

  scroll-snap-type: x mandatory;
  scroll-padding-inline: 0;
  scroll-behavior: auto;

  -webkit-overflow-scrolling: touch;
  overscroll-behavior-x: contain;

  /* Hide ONLY horizontal scrollbar */
  scrollbar-width: none;      /* Firefox */
  -ms-overflow-style: none;   /* legacy Edge/IE */
}
.rr-track::-webkit-scrollbar{
  height: 0;
  display: none;              /* Chrome/Safari */
}

/* Hide horizontal scrollbar while actively scrolling (optional) */
.rr-track.rr-scrolling{
  scrollbar-width: none;     /* Firefox */
  -ms-overflow-style: none;  /* legacy */
}

.rr-track.rr-scrolling::-webkit-scrollbar{
  height: 0;
  display: none;
}

/* We focus track for keyboard arrows */
.rr-track:focus{ outline: none; }

/* Each panel = one full viewport “page”; can scroll vertically for long text */
.rr-panel{
  flex: 0 0 100vw;
  height: 100vh;

  overflow-y: scroll;        /* always reserve scrollbar space */
  overflow-x: hidden;        /* disable per-panel horizontal scrollbar */

  scrollbar-gutter: stable;  /* modern browsers */

  scroll-snap-align: start;
  scroll-snap-stop: always;

  overscroll-behavior: contain;
  position: relative;
}

/* Hide V-scrollbar during horizontal panel changes (NO layout shift) */
.rr-panel.rr-vscroll-hide{
  /* Firefox: invisible but space preserved */
  scrollbar-color: transparent transparent;
}

/* WebKit: invisible but space preserved */
.rr-panel.rr-vscroll-hide::-webkit-scrollbar{
  width: 16px;               /* keep gutter width */
}

.rr-panel.rr-vscroll-hide::-webkit-scrollbar-track{
  background: transparent !important;
}

.rr-panel.rr-vscroll-hide::-webkit-scrollbar-thumb{
  background: transparent !important;
  box-shadow: none !important;
  border-color: transparent !important;
}

/* =======================================================================
   Mobile: restore horizontal swipe (hard override)
   ======================================================================= */
@media (max-width: 767px){
  .rr-track{
    touch-action: auto !important;
    -webkit-overflow-scrolling: touch;
  }

  .rr-panel,
  .rr-text,
  .rr-panel .rr-img{
    touch-action: auto !important;
    overflow-y: auto; /* prevents vertical scroller “capture” */
  }
}
/* =======================================================================
   ORCON — Scrollbar (Windows 95-ish, best-effort) (FINAL)
   ======================================================================= */

/* Firefox (limited) */
.rr-panel{
  scrollbar-width: auto;
  scrollbar-color: #808080 #c0c0c0; /* thumb / track */
}

/* WebKit (Chrome, Safari, Edge) */
.rr-panel::-webkit-scrollbar{
  width: 16px;               /* Win95 chunky */
}

.rr-panel::-webkit-scrollbar-track{
  background: #c0c0c0;        /* classic gray */
  border-left: 1px solid #808080;
}

.rr-panel::-webkit-scrollbar-thumb{
  background: #c0c0c0;
  border: 2px solid #c0c0c0;
  box-shadow:
    inset 1px 1px 0 #ffffff,
    inset -1px -1px 0 #404040;
}

.rr-panel::-webkit-scrollbar-thumb:hover{
  background: #bdbdbd;
}

/* =======================================================================
   Desktop: faux fade-in for vertical scrollbar (best-effort)
   ======================================================================= */
@media (min-width: 768px){

  /* Transition the colors we control */
  .rr-panel::-webkit-scrollbar-track{
    transition: background-color 160ms ease, border-color 160ms ease;
  }

  .rr-panel::-webkit-scrollbar-thumb{
    transition: background-color 160ms ease, box-shadow 160ms ease, border-color 160ms ease;
  }

  /* When hidden, render transparent (you already keep width stable) */
  .rr-panel.rr-vscroll-hide::-webkit-scrollbar-track{
    background: transparent !important;
    border-left-color: transparent !important;
  }

  .rr-panel.rr-vscroll-hide::-webkit-scrollbar-thumb{
    background: transparent !important;
    box-shadow: none !important;
    border-color: transparent !important;
  }

  /* Firefox: “fade” via color shift (limited) */
  .rr-panel{
    transition: scrollbar-color 600ms ease;
  }
}

/* =======================================================================
   2) Media: images + responsive switching (FINAL AUTHORITY)
   ======================================================================= */

.rr-panel .rr-img{
  width: 100vw;
  max-width: 100vw;
  height: auto;
  display: block;
}

/* Desktop / Tablet */
.rr-panel img.rr-img--landscape{ display: block !important; }
.rr-panel img.rr-img--portrait { display: none  !important; }

/* Mobile */
@media (max-width: 767px){
  .rr-panel img.rr-img--landscape{ display: none  !important; }
  .rr-panel img.rr-img--portrait { display: block !important; }
}

/* =======================================================================
   Dossier substrate + text block under image (FINAL)
   - Paper texture spans full panel (optional; toggle via --orcon-paper-enabled)
   ======================================================================= */

.rr-panel::before{
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;

  background-image: url("/wp-content/themes/Divi-child/orcon/assets/paper-texture.png");
  background-repeat: repeat;
  background-size: 1708px 1056px;

  /* Off by default; flip --orcon-paper-enabled to 1 when needed */
  opacity: calc(0.14 * var(--orcon-paper-enabled));
  mix-blend-mode: none;
}

/* Ensure panel contents sit above the substrate */
.rr-panel .rr-img,
.rr-text{
  position: relative;
  z-index: 1;
}

/* Text block under image
   IMPORTANT: use padding (not margins) so substrate fills the entire band */
.rr-text{
  max-width: 900px;
  margin: 0 auto;
  padding: 56px 24px 120px;
}

/* =======================================================================
   3) Navigation: SVG buttons, disabled state, mobile removal, idle fade hook
   ======================================================================= */

.rr-nav{
  position: fixed;
  top: 50%;
  transform: translateY(-50%);
  z-index: 99999;

  width: 56px;
  height: 56px;
  border-radius: 999px;
  border: 0;
  cursor: pointer;

  display: grid;
  place-items: center;

  background: rgba(0,0,0,.35);
  opacity: .35;
  backdrop-filter: blur(2px);

  transition: opacity 260ms ease, background 200ms ease;
}

.rr-nav-left{ left: 14px; }
.rr-nav-right{ right: 14px; }

.rr-nav:hover,
.rr-nav:focus{
  opacity: .95;
  background: rgba(0,0,0,.55);
  outline: none;
}

.rr-nav::before{
  content:"";
  width: 22px;
  height: 22px;
  display: block;
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
}

.rr-nav-left::before{
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='15 18 9 12 15 6'/%3E%3C/svg%3E");
}

.rr-nav-right::before{
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='9 18 15 12 9 6'/%3E%3C/svg%3E");
}

.rr-nav.rr-nav-disabled,
.rr-nav:disabled{
  opacity: 0.12 !important;
  cursor: default !important;
  background: rgba(0,0,0,.20) !important;
}

/* JS toggles .rr-nav-idle */
.rr-nav.rr-nav-idle{
  opacity: 0;
  pointer-events: none;
}

/* No arrows on mobile (swipe/tap zones only) */
@media (max-width: 767px){
  .rr-nav{ display: none !important; }
}

/* =======================================================================
   4) Panels: END OF FILE
   ======================================================================= */

.rr-end{
  display: flex;
  align-items: center;
  justify-content: center;
}

.rr-end-text{
  text-align: center;
  opacity: 0.65;
}

.rr-end-text h2{
  letter-spacing: 0.25em;
  margin-bottom: 16px;
}

.rr-end-text p{
  font-size: 0.9rem;
}

/* =======================================================================
   6) Dossier typography + metadata
   ======================================================================= */

.rr-dossier{
  font-family: "Courier New", Courier, monospace;
  font-size: 16px;
  line-height: 1.55;
}

@media (max-width: 767px){
  .rr-dossier{ font-size: 17px; }
}

.rr-classification{
  font-weight: bold;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.rr-rule{
  border: none;
  border-top: 1px solid rgba(0,0,0,.25);
  margin: 16px 0;
}

.rr-meta{
  display: grid;
  grid-template-columns: max-content 1fr;
  column-gap: 16px;
  row-gap: 6px;
  margin: 0;
}

.rr-meta dt{ font-weight: bold; }
.rr-meta dd{ margin: 0; }

.rr-dossier h3{
  margin: 18px 0 6px;
  font-size: 17px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

/* =======================================================================
   7) Cover Sheet Panel (preferred title page)
   ======================================================================= */

.rr-panel.rr-cover{
  background: #0b0c0f;
  color: #e9e6df;
  position: relative;
}

/* grain + vignette */
.rr-panel.rr-cover::before{
  content:"";
  position:absolute;
  inset:0;
  pointer-events:none;
  background:
    radial-gradient(1200px 700px at 50% 35%, rgba(255,255,255,0.06), rgba(0,0,0,0) 60%),
    radial-gradient(900px 600px at 50% 70%, rgba(0,0,0,0.35), rgba(0,0,0,0.85) 70%),
    repeating-linear-gradient(0deg,
      rgba(255,255,255,0.02),
      rgba(255,255,255,0.02) 1px,
      rgba(0,0,0,0) 3px,
      rgba(0,0,0,0) 6px
    );
  opacity: 0.75;
}

.rr-cover__frame{
  position: relative;
  height: 100%;
  width: 100%;
  padding: clamp(18px, 3.2vw, 44px);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: clamp(14px, 2.2vw, 26px);
}

/* top bar */
.rr-cover__top{
  display: flex;
  flex-wrap: wrap;                   /* allow stamps to drop under heading */
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;

  border-bottom: 1px solid rgba(233,230,223,0.18);
  padding-bottom: clamp(10px, 1.4vw, 16px);
}

.rr-cover__agency{
  display:flex;
  align-items:center;
  gap: 14px;
  min-width: 0;
}

.rr-cover__seal{
  width: 46px;
  height: 46px;
  border-radius: 50%;
  border: 1px solid rgba(233,230,223,0.35);
  position: relative;
  opacity: 0.85;
}
.rr-cover__seal::before{
  content:"";
  position:absolute;
  inset: 6px;
  border-radius: 50%;
  border: 1px dashed rgba(233,230,223,0.28);
}
.rr-cover__seal::after{
  content:"";
  position:absolute;
  inset: 14px;
  border-radius: 50%;
  border: 1px solid rgba(233,230,223,0.22);
}

.rr-cover__agencyText{
  display:flex;
  flex-direction:column;
  gap: 2px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.rr-cover__agencyLine1{
  font-weight: 800;
  font-size: clamp(12px, 1.2vw, 14px);
  opacity: 0.95;
}
.rr-cover__agencyLine2{
  font-weight: 600;
  font-size: clamp(11px, 1.0vw, 13px);
  opacity: 0.75;
}

/* Stamps: UNDER the agency heading (desktop), left-justified, no angles */
.rr-cover__stampStack{
  display:flex;
  flex-direction:column;
  gap: 8px;

  flex: 0 0 100%;                    /* forces a new full-width row */
  margin-top: 10px;
  margin-left: 60px;                 /* seal(46) + gap(14) = 60px */

  align-items: flex-start;
  text-align: left;
}

.rr-cover__stamp{
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 8px 10px;

  border: 2px solid rgba(233,230,223,0.65);
  background: rgba(0,0,0,0.35);

  /* Digital correctness */
  transform: none;

  box-shadow: 0 10px 24px rgba(0,0,0,0.35);
  font-size: clamp(12px, 1.1vw, 14px);
  line-height: 1;
}


/* =======================================================================
   Cover sheet stamps as "secret" links (NO affordances)
   - Intentionally no hover, cursor, underline, or focus treatment.
   ======================================================================= */

.rr-cover__stampLink{
  display: inline-block;
  color: inherit;
  text-decoration: none;
  cursor: default;                 /* critical: do not show pointer */
  -webkit-tap-highlight-color: transparent;
}

.rr-cover__stampLink:hover,
.rr-cover__stampLink:focus,
.rr-cover__stampLink:active,
.rr-cover__stampLink:visited{
  color: inherit;
  text-decoration: none;
  cursor: default;
  /* Do NOT alter outline/box-shadow/border here; stamps must visually stay identical */
}
/* TOP SECRET — outlined w/ red authority (keep grit, no angles) */
.rr-stamp--class{
  border-color: rgba(255,255,255,0.9);
  color: rgba(233,230,223,0.95);

  outline: 3px solid rgba(143,42,42,0.9);
  outline-offset: -7px;

  box-shadow:
    0 14px 30px rgba(0,0,0,0.55),
    0 0 0 1px rgba(0,0,0,0.45),
    0 0 34px rgba(143,42,42,0.45),
    inset 0 0 0 2px rgba(143,42,42,0.55),
    inset 0 3px 6px rgba(0,0,0,0.55),
    inset 0 -1px 2px rgba(255,255,255,0.08);

  /* Keep “ink bite” without theatrical skew */
  filter: blur(0.20px) contrast(1.12) saturate(1.05);

  background-image:
    repeating-linear-gradient(
      0deg,
      rgba(255,255,255,0.03),
      rgba(255,255,255,0.03) 1px,
      rgba(0,0,0,0) 2px,
      rgba(0,0,0,0) 4px
    );
}

/* ORCON CONTROLLED — secondary, same system */
.rr-stamp--control{
  opacity: 0.9;
  transform: none;
}

/* body */
.rr-cover__body{
  display:flex;
  flex-direction:column;
  gap: clamp(14px, 2.2vw, 26px);
  max-width: 980px;
}

.rr-cover__titleBlock{
  display:flex;
  flex-direction:column;
  gap: 6px;
}

.rr-cover__title{
  font-weight: 950;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-size: clamp(36px, 6vw, 74px);
  line-height: 1;
}

.rr-cover__subtitle{
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  opacity: 0.75;
  font-size: clamp(12px, 1.2vw, 14px);
}

/* warning block w/ red handling mark */
.rr-cover__warning{
  position: relative;
  padding-left: 18px;
  max-width: 860px;
}

.rr-cover__warning::before{
  content:"";
  position:absolute;
  left:0;
  top:0.1em;
  bottom:0.1em;
  width: 3px;
  background: linear-gradient(to bottom, var(--orcon-ink-red-strong), var(--orcon-ink-red-mid));
  box-shadow:
    0 0 0 0.5px rgba(0,0,0,0.25),
    0 0 10px var(--orcon-ink-red-soft);
}

.rr-cover__warningHead{
  font-weight: 900;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  font-size: clamp(14px, 1.6vw, 18px);
  margin-bottom: 8px;
}

.rr-cover__warningText{
  margin: 0;
  opacity: 0.82;
  font-size: clamp(13px, 1.35vw, 16px);
  line-height: 1.45;
}

.rr-cover__meta{
  display:flex;
  flex-direction:column;
  gap: 8px;
  padding-top: 6px;
}

.rr-cover__metaRow{
  display:flex;
  gap: 10px;
  flex-wrap: wrap;
  font-size: clamp(12px, 1.2vw, 14px);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.rr-cover__label{
  font-weight: 900;
  opacity: 0.85;
}
.rr-cover__value{
  font-weight: 700;
  opacity: 0.70;
}

/* footer */
.rr-cover__footer{
  border-top: 1px solid rgba(233,230,223,0.18);
  padding-top: clamp(10px, 1.4vw, 16px);
  display:flex;
  flex-direction:column;
  gap: 10px;
  max-width: 980px;
}

.rr-cover__instruction{
  position: relative;
  padding-left: 14px;

  font-weight: 800;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  font-size: clamp(11px, 1.1vw, 13px);
  opacity: 0.8;
}

.rr-cover__instruction::before{
  content:"";
  position:absolute;
  left:0;
  top:50%;
  transform: translateY(-50%);
  height: 0.9em;
  width: 3px;
  background: var(--orcon-ink-red-mid);
  box-shadow:
    0 0 0 0.5px rgba(0,0,0,0.25),
    0 0 10px var(--orcon-ink-red-soft);
}

.rr-cover__divider{
  height: 1px;
  width: 100%;
  background: rgba(233,230,223,0.14);
}

.rr-cover__footnote{
  font-weight: 700;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  font-size: clamp(10px, 1.0vw, 12px);
  opacity: 0.55;
}

/* ===== ORCON: Cover Sheet Routing Strip ===== */

.rr-cover__route{
  margin-top: 10px;
  padding-top: 12px;
  border-top: 1px solid rgba(233,230,223,0.16);
}

.rr-cover__routeGrid{
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.rr-cover__routeCell{
  border: 1px solid rgba(233,230,223,0.22);
  background: rgba(0,0,0,0.22);
  padding: 10px 10px 9px;
}

.rr-cover__routeLabel{
  font-weight: 900;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-size: 11px;
  opacity: 0.85;
  margin-bottom: 6px;
}

.rr-cover__routeValue{
  font-weight: 800;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  font-size: 12px;
  opacity: 0.72;
  line-height: 1.1;
}

.rr-cover__routeNote{
  margin-top: 10px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-size: 11px;
  opacity: 0.55;
}

@media (max-width: 980px){
  .rr-cover__routeGrid{ grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 767px){
  .rr-cover__frame{
    padding: 18px;
    gap: 14px;
  }

  .rr-cover__top{
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }

  /* Stamps: readable on mobile, no angles, no indent */
  .rr-cover__stampStack{
    margin-left: 0;
    flex: 0 0 auto;
    width: 100%;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
  }

  .rr-cover__stamp{
    padding: 7px 9px;
    font-size: 12px;
  }

  .rr-cover__seal{
    width: 40px;
    height: 40px;
  }

  .rr-cover__body{ max-width: 100%; }

  .rr-cover__routeGrid{ grid-template-columns: 1fr; }

  .rr-cover__title{ letter-spacing: 0.16em; }
  .rr-cover__subtitle{ letter-spacing: 0.11em; }
}
@media (max-width: 767px){
  .rr-panel{
    overscroll-behavior-y: auto;
  }
}
/* === Stamp links: lock visual state (NO affordances) ===
   Important: do not touch outline/box-shadow/border so stamp styling stays intact.
*/
.rr-cover__stampLink,
.rr-cover__stampLink:hover,
.rr-cover__stampLink:focus,
.rr-cover__stampLink:active,
.rr-cover__stampLink:visited{
  color: inherit;
  text-decoration: none;
  cursor: default;
  -webkit-tap-highlight-color: transparent;
}
/* =======================================================================
   Mobile: restore native overscroll & gesture handoff
   ======================================================================= */
@media (max-width: 767px){
  html,
  body{
    overscroll-behavior: auto;
  }

  .rr-track,
  .rr-panel{
    overscroll-behavior: auto;
  }
}
/* ============================================================
   ORCON front page: suppress Divi footer/credits completely
   ============================================================ */
body.home #main-footer,
body.home #footer-bottom,
body.home .et_pb_scroll_top,
body.home .et-social-icons {
  display: none !important;
}

body.home #page-container {
  padding-bottom: 0 !important;
}
