/* ==========================================================================
   QUORIT — TIME Framework Stylesheet (time-framework.css)
   Colors: Primary Orange (#F78545), Primary Red (#D3171D), Deep Red (#A91F24),
           DNA Blue (#292D76), Scientific Green (#10974A), Soft Orange (#FDE5D5),
           Soft Red (#FBE4E5), Warm Off White (#FCFAF8), White (#FFFFFF),
           Primary Text (#252525), Secondary Text (#667085), Border (#E8E1DC)
   ========================================================================== */

/* Custom Micro-interactions & Borders */
.custom-border {
  border: 1px solid #E8E1DC;
}

.custom-border-orange {
  border: 1px solid rgba(247, 133, 69, 0.28);
}

.custom-border-red {
  border: 1px solid rgba(211, 23, 29, 0.28);
}

.custom-border-green {
  border: 1px solid rgba(16, 151, 74, 0.28);
}

.custom-border-blue {
  border: 1px solid rgba(41, 45, 118, 0.28);
}

.elevation-soft {
  box-shadow: 0 4px 20px -4px rgba(37, 37, 37, 0.05), 0 2px 6px -1px rgba(37, 37, 37, 0.02);
}

.elevation-hover {
  transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.28s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.28s ease, background-color 0.28s ease;
}

.elevation-hover:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 32px -8px rgba(37, 37, 37, 0.08), 0 6px 12px -2px rgba(37, 37, 37, 0.03);
  border-color: rgba(247, 133, 69, 0.4);
}

/* Sticky TIME Sub-Navigation Bar */
#time-sticky-nav {
  transition: all 0.3s ease;
}

.time-nav-item.active {
  background-color: #252525 !important;
  color: #ffffff !important;
  border-color: #F78545 !important;
  box-shadow: 0 4px 12px -2px rgba(37, 37, 37, 0.18);
}

.time-nav-item.active .time-nav-letter {
  background-color: #F78545 !important;
  color: #ffffff !important;
}

/* Scroll Reveal */
.reveal-init {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.65s cubic-bezier(0.16, 1, 0.3, 1), transform 0.65s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: opacity, transform;
}

.reveal-init.is-revealed {
  opacity: 1;
  transform: translateY(0);
}

.delay-100 { transition-delay: 100ms; }
.delay-150 { transition-delay: 150ms; }
.delay-200 { transition-delay: 200ms; }
.delay-300 { transition-delay: 300ms; }

/* Animated Pathway Lines */
@keyframes flowDash {
  0% { stroke-dashoffset: 140; }
  100% { stroke-dashoffset: 0; }
}

.path-animated-line {
  stroke-dasharray: 8, 6;
  animation: flowDash 14s linear infinite;
}

/* Moisture Slider Interactive Track (Green #10974A is optimal moisture) */
.moisture-track {
  background: linear-gradient(90deg, #FDE5D5 0%, #10974A 50%, #292D76 100%);
}

#moisture-pointer {
  transition: left 0.35s cubic-bezier(0.16, 1, 0.3, 1), transform 0.35s ease;
}

/* Edge Comparison Interactive Tabs (Edge is Blue #292D76) */
.edge-tab-btn.active {
  background-color: #D3171D;
  color: #ffffff;
  border-color: #D3171D;
}

/* Scrolled state for Header */
header.header-scrolled {
  background-color: rgba(255, 255, 255, 0.98) !important;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 4px 20px -2px rgba(37, 37, 37, 0.05);
  border-bottom: 1px solid #E8E1DC;
}

/* Mobile Drawer */
#mobile-drawer {
  transition: transform 0.32s cubic-bezier(0.16, 1, 0.3, 1);
}

#mobile-drawer.drawer-closed {
  transform: translateX(100%);
  pointer-events: none;
}

#mobile-drawer.drawer-open {
  transform: translateX(0);
  pointer-events: auto;
}

/* Accessible focus visible */
a:focus-visible, button:focus-visible {
  outline: 2px solid #D3171D;
  outline-offset: 3px;
}

/* Interactive affordances */
.tissue-label-btn, .signal-card, .moisture-state-trigger, .edge-tab-btn { cursor: pointer; }
.moisture-state-trigger.is-active {
  border-color: #D3171D !important;
  box-shadow: 0 0 0 2px rgba(211, 23, 29, 0.18);
}
#moisture-pointer { transform: translateX(-50%); }
.signal-card:focus-visible { outline: 2px solid #D3171D; outline-offset: 3px; }

/* T — Tissue vertical flow chart (1 -> 2 -> 3) */
.tissue-flow {
  list-style: none;
  margin: 0;
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  border-radius: 0.75rem;
  background: #F6F1EE;
  border: 1px solid #E8E1DC;
}
.tissue-flow-step {
  display: flex;
  align-items: center;
  gap: 0.875rem;
  padding: 0.875rem 1rem;
  border-radius: 0.625rem;
  background: #FFFFFF;
  border: 1px solid #E8E1DC;
  box-shadow: 0 2px 6px -1px rgba(37, 37, 37, 0.04);
}
.tissue-flow-step.is-goal { border-color: rgba(211, 23, 29, 0.45); background: #FBE4E5; }
.tissue-flow-num {
  flex: 0 0 auto;
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  background: #D3171D;
  color: #FFFFFF;
  font-weight: 700;
  font-size: 0.875rem;
  display: flex;
  align-items: center;
  justify-content: center;
}
.tissue-flow-label {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #252525;
  line-height: 1.35;
}
.tissue-flow-step.is-goal .tissue-flow-label { color: #D3171D; }
.tissue-flow-arrow {
  position: relative;
  display: flex;
  justify-content: flex-start;
  padding-left: calc(1rem + 0.25rem);
  height: 2.25rem;
  color: #D3171D;
}
.tissue-flow-arrow::before {
  content: "";
  position: absolute;
  left: calc(1rem + 1rem);
  top: 0;
  bottom: 0.6rem;
  border-left: 2px dashed rgba(211, 23, 29, 0.45);
}
.tissue-flow-arrow .material-symbols-outlined {
  position: absolute;
  left: calc(2rem - 0.75rem);
  bottom: -0.35rem;
  font-size: 1.5rem;
  background: #F6F1EE;
  line-height: 1;
}

@media (prefers-reduced-motion: reduce) {
  .reveal-init { opacity: 1; transform: none; transition: none; }
  .path-animated-line { animation: none; }
}

.tissue-label-btn.active,
.tissue-label-btn.active:hover {
  background-color: #D3171D !important;
  color: #FFFFFF !important;
  border-color: #D3171D !important;
}
