/* ============================================
   RECONCEPTUALIZED - Styles
   Exaggerated Minimalism + Editorial
   ============================================ */

/* --- RESET & BASE --- */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --black: #0a0a0a;
  --white: #fafafa;
  --gray-100: #f0f0f0;
  --gray-200: #e0e0e0;
  --gray-400: #999;
  --gray-600: #666;
  --gray-800: #333;
  --accent: #ff3d00;
  --accent-glow: rgba(255, 61, 0, 0.15);

  --font-display: 'Bebas Neue', sans-serif;
  --font-body: 'Source Sans 3', -apple-system, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in-out: cubic-bezier(0.76, 0, 0.24, 1);
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  background: var(--black);
  color: var(--white);
  font-family: var(--font-body);
  line-height: 1.6;
  overflow-x: hidden;
}

::selection {
  background: var(--accent);
  color: var(--white);
}

a {
  color: inherit;
  text-decoration: none;
}

strong {
  font-weight: 600;
}

em {
  font-style: italic;
}

/* --- PROGRESS BAR --- */
.progress-bar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  z-index: 100;
  background: rgba(255, 255, 255, 0.06);
}

.progress-fill {
  height: 100%;
  width: 0%;
  background: var(--accent);
  transition: width 0.1s linear;
}

/* --- SHIFT COUNTER (fixed) --- */
.shift-counter {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  letter-spacing: 0.1em;
  color: var(--gray-400);
  z-index: 50;
  opacity: 0;
  transition: opacity 0.4s ease;
}

.shift-counter.visible {
  opacity: 1;
}

.counter-current {
  color: var(--white);
  font-weight: 500;
}

.counter-sep {
  margin: 0 0.15em;
  color: var(--gray-600);
}

/* ============================================
   ENTRY SECTION
   ============================================ */
.entry {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  position: relative;
}

.entry-inner {
  max-width: 900px;
  width: 100%;
}

.entry-label {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.3em;
  color: var(--gray-400);
  margin-bottom: 2rem;
  opacity: 0;
  animation: fadeUp 0.8s var(--ease-out) 0.2s forwards;
}

.entry-title {
  font-family: var(--font-display);
  font-size: clamp(4rem, 14vw, 12rem);
  line-height: 0.9;
  letter-spacing: -0.02em;
  text-transform: uppercase;
  color: var(--white);
  margin-bottom: 2rem;
}

.entry-title .line {
  display: block;
  opacity: 0;
  animation: fadeUp 0.8s var(--ease-out) forwards;
}

.entry-title .line:nth-child(1) {
  animation-delay: 0.4s;
  color: var(--accent);
}

.entry-title .line:nth-child(2) {
  animation-delay: 0.6s;
}

.entry-title .dot {
  color: var(--accent);
}

.entry-sub {
  font-size: clamp(1rem, 2.5vw, 1.35rem);
  font-weight: 300;
  line-height: 1.7;
  color: var(--gray-400);
  max-width: 540px;
  opacity: 0;
  animation: fadeUp 0.8s var(--ease-out) 0.9s forwards;
}

.entry-sub strong {
  color: var(--white);
  font-weight: 500;
}

.entry-count {
  margin-top: 3rem;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent);
  opacity: 0;
  animation: fadeUp 0.8s var(--ease-out) 1.1s forwards;
}

/* Scroll Cue */
.scroll-cue {
  position: absolute;
  bottom: 2.5rem;
  left: 50%;
  transform: translateX(-50%);
  opacity: 0;
  animation: fadeIn 1s ease 1.5s forwards;
}

.scroll-line {
  display: block;
  width: 1px;
  height: 48px;
  background: linear-gradient(to bottom, var(--accent), transparent);
  animation: scrollPulse 2s ease-in-out infinite;
}

/* ============================================
   THESIS SECTION
   ============================================ */
.thesis {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 6rem 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.thesis-inner {
  max-width: 720px;
  width: 100%;
}

.thesis-number {
  font-family: var(--font-display);
  font-size: clamp(3rem, 8vw, 6rem);
  color: rgba(255, 255, 255, 0.04);
  line-height: 1;
  margin-bottom: 1rem;
}

.thesis-headline {
  font-family: var(--font-display);
  font-size: clamp(2rem, 5vw, 3.5rem);
  text-transform: uppercase;
  letter-spacing: 0.02em;
  margin-bottom: 2.5rem;
  color: var(--white);
}

.thesis-quote {
  font-size: clamp(1.2rem, 3vw, 1.8rem);
  font-weight: 300;
  line-height: 1.6;
  color: var(--gray-400);
  border-left: 3px solid var(--accent);
  padding-left: 1.5rem;
  margin-bottom: 2.5rem;
}

.thesis-quote strong {
  color: var(--white);
  font-weight: 600;
}

.thesis-body {
  font-size: 1.1rem;
  line-height: 1.75;
  color: var(--gray-400);
}

/* ============================================
   SHIFTS - THE MAIN CONTENT
   ============================================ */
.shifts {
  max-width: 100%;
}

.shift {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 6rem 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  position: relative;
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s var(--ease-out), transform 0.6s var(--ease-out);
}

.shift.in-view {
  opacity: 1;
  transform: translateY(0);
}

.shift-header {
  max-width: 900px;
  margin: 0 auto;
  width: 100%;
  margin-bottom: 3rem;
}

.shift-num {
  font-family: var(--font-display);
  font-size: clamp(4rem, 10vw, 8rem);
  color: rgba(255, 255, 255, 0.04);
  line-height: 1;
  display: block;
  margin-bottom: -0.5rem;
  user-select: none;
}

.shift-title {
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 7vw, 5rem);
  text-transform: uppercase;
  letter-spacing: 0.02em;
  color: var(--white);
  line-height: 1;
}

/* --- THE TRANSFORM BLOCK --- */
.shift-transform {
  max-width: 900px;
  margin: 0 auto 3rem;
  width: 100%;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 1.5rem;
  padding: 2rem 0;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.old {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  line-height: 1.6;
  color: var(--gray-600);
  text-decoration: line-through;
  text-decoration-color: rgba(255, 255, 255, 0.15);
}

.arrow {
  width: 40px;
  height: 1px;
  background: var(--accent);
  position: relative;
  flex-shrink: 0;
}

.arrow::after {
  content: '';
  position: absolute;
  right: 0;
  top: -3px;
  width: 7px;
  height: 7px;
  border-right: 1px solid var(--accent);
  border-bottom: 1px solid var(--accent);
  transform: rotate(-45deg);
}

.new {
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 600;
  color: var(--white);
  line-height: 1.5;
}

/* --- SHIFT BODY --- */
.shift-body {
  max-width: 620px;
  margin: 0 auto;
  width: 100%;
}

.shift-body p {
  font-size: 1.1rem;
  line-height: 1.75;
  color: var(--gray-400);
  margin-bottom: 1.25rem;
}

.shift-body p:last-child {
  margin-bottom: 0;
}

.shift-body em {
  color: var(--white);
  font-style: italic;
}

.shift-punchline {
  font-weight: 500;
  color: var(--white) !important;
  border-left: 2px solid var(--accent);
  padding-left: 1rem;
  margin-top: 1.5rem !important;
}

/* ============================================
   CODA - THE CONCLUSION
   ============================================ */
.coda {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 6rem 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  background: linear-gradient(to bottom, var(--black), #0f0f0f);
}

.coda-inner {
  max-width: 720px;
  width: 100%;
}

.coda-number {
  font-family: var(--font-display);
  font-size: clamp(3rem, 8vw, 6rem);
  color: rgba(255, 255, 255, 0.04);
  line-height: 1;
  margin-bottom: 1rem;
}

.coda-headline {
  font-family: var(--font-display);
  font-size: clamp(2rem, 5vw, 3.5rem);
  text-transform: uppercase;
  letter-spacing: 0.02em;
  margin-bottom: 2.5rem;
  color: var(--white);
}

.coda-quote {
  font-size: clamp(1.3rem, 3vw, 2rem);
  font-weight: 300;
  line-height: 1.5;
  color: var(--white);
  border-left: 3px solid var(--accent);
  padding-left: 1.5rem;
  margin-bottom: 3rem;
}

.coda-body {
  font-size: 1.15rem;
  line-height: 1.75;
  color: var(--gray-400);
  margin-bottom: 1.5rem;
}

.coda-body strong {
  color: var(--accent);
}

.coda-final {
  font-size: 1.25rem;
  font-weight: 500;
  color: var(--white);
  margin-top: 2rem;
}

/* ============================================
   FOOTER
   ============================================ */
.site-footer {
  padding: 4rem 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.footer-inner {
  max-width: 900px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1.5rem;
}

.footer-line {
  font-family: var(--font-display);
  font-size: 1.5rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--gray-600);
}

.footer-actions {
  display: flex;
  gap: 0.75rem;
}

.share-btn {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 0.6rem 1.2rem;
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: var(--gray-400);
  cursor: pointer;
  transition: color 0.2s ease, border-color 0.2s ease;
}

.share-btn:hover {
  color: var(--white);
  border-color: var(--accent);
}

.share-btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* ============================================
   WHY DRAWER
   ============================================ */

/* Trigger button - fixed right edge */
.why-trigger {
  position: fixed;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  z-index: 80;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-right: none;
  padding: 1rem 0.6rem;
  cursor: pointer;
  writing-mode: vertical-rl;
  text-orientation: mixed;
  transition: background 0.2s ease, border-color 0.2s ease;
}

.why-trigger:hover {
  background: rgba(255, 255, 255, 0.04);
  border-color: var(--accent);
}

.why-trigger:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: -2px;
}

.why-trigger-text {
  font-family: var(--font-display);
  font-size: 0.9rem;
  letter-spacing: 0.2em;
  color: var(--gray-400);
  text-transform: uppercase;
}

.why-trigger:hover .why-trigger-text {
  color: var(--accent);
}

/* Overlay */
.why-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  z-index: 89;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

.why-overlay.open {
  opacity: 1;
  pointer-events: auto;
}

/* Drawer */
.why-drawer {
  position: fixed;
  top: 0;
  right: 0;
  width: min(520px, 90vw);
  height: 100vh;
  background: #0e0e0e;
  border-left: 1px solid rgba(255, 255, 255, 0.08);
  z-index: 90;
  overflow-y: auto;
  transform: translateX(100%);
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.why-drawer.open {
  transform: translateX(0);
}

.why-drawer-inner {
  padding: 3rem 2.5rem 4rem;
}

/* Close button */
.why-close {
  position: absolute;
  top: 1.5rem;
  right: 1.5rem;
  background: none;
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--gray-400);
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: color 0.2s ease, border-color 0.2s ease;
}

.why-close:hover {
  color: var(--white);
  border-color: var(--accent);
}

.why-close:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* Drawer content */
.why-label {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.3em;
  color: var(--accent);
  margin-bottom: 1.5rem;
}

.why-headline {
  font-family: var(--font-display);
  font-size: clamp(2rem, 5vw, 3rem);
  text-transform: uppercase;
  line-height: 1;
  color: var(--white);
  margin-bottom: 2rem;
}

.why-intro {
  font-size: 1rem;
  line-height: 1.7;
  color: var(--gray-400);
  margin-bottom: 1rem;
}

.why-intro em {
  color: var(--white);
  font-style: italic;
}

.why-intro strong {
  color: var(--white);
}

/* Primitives list */
.primitives {
  margin-top: 2.5rem;
  display: flex;
  flex-direction: column;
  gap: 0;
}

.primitive {
  padding: 1.5rem 0;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.primitive:last-child {
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.primitive-old {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--gray-600);
  text-decoration: line-through;
  text-decoration-color: rgba(255, 255, 255, 0.12);
  margin-bottom: 0.4rem;
}

.primitive-arrow {
  width: 20px;
  height: 1px;
  background: var(--accent);
  margin: 0.5rem 0;
  position: relative;
}

.primitive-arrow::after {
  content: '';
  position: absolute;
  right: 0;
  top: -2.5px;
  width: 5px;
  height: 5px;
  border-right: 1px solid var(--accent);
  border-bottom: 1px solid var(--accent);
  transform: rotate(-45deg);
}

.primitive-new {
  font-size: 1rem;
  font-weight: 600;
  color: var(--white);
  margin-bottom: 0.5rem;
}

.primitive-effect {
  font-size: 0.85rem;
  line-height: 1.6;
  color: var(--gray-400);
}

/* Footer note */
.why-footer-note {
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.why-footer-note p {
  font-size: 0.9rem;
  line-height: 1.7;
  color: var(--gray-400);
  font-style: italic;
}

.why-footer-note em {
  color: var(--white);
  font-style: italic;
}

/* Hide trigger when drawer is open */
body.drawer-open .why-trigger {
  opacity: 0;
  pointer-events: none;
}

/* ============================================
   ANIMATIONS
   ============================================ */
@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes scrollPulse {
  0%, 100% {
    opacity: 0.3;
    transform: scaleY(1);
  }
  50% {
    opacity: 1;
    transform: scaleY(1.3);
    transform-origin: top;
  }
}

/* --- REDUCED MOTION --- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }

  .shift {
    opacity: 1;
    transform: none;
  }

  html {
    scroll-behavior: auto;
  }
}

/* ============================================
   RESPONSIVE
   ============================================ */

/* Mobile */
@media (max-width: 640px) {
  .entry {
    padding: 2rem 1.25rem;
  }

  .shift {
    padding: 4rem 1.25rem;
    min-height: auto;
  }

  .shift-transform {
    grid-template-columns: 1fr;
    gap: 0.75rem;
  }

  .arrow {
    width: 1px;
    height: 24px;
    margin: 0 auto;
  }

  .arrow::after {
    right: -3px;
    top: auto;
    bottom: 0;
    transform: rotate(45deg);
  }

  .old {
    text-align: center;
  }

  .new {
    text-align: center;
  }

  .shift-counter {
    bottom: 1rem;
    right: 1rem;
  }

  .thesis {
    padding: 4rem 1.25rem;
  }

  .coda {
    padding: 4rem 1.25rem;
  }

  .footer-inner {
    flex-direction: column;
    text-align: center;
  }

  .footer-actions {
    flex-direction: column;
    width: 100%;
  }

  .share-btn {
    width: 100%;
    text-align: center;
  }

  .why-trigger {
    padding: 0.75rem 0.45rem;
  }

  .why-trigger-text {
    font-size: 0.75rem;
  }

  .why-drawer-inner {
    padding: 2.5rem 1.5rem 3rem;
  }
}

/* Tablet */
@media (min-width: 641px) and (max-width: 1024px) {
  .shift {
    padding: 5rem 2rem;
  }

  .entry-title {
    font-size: clamp(4rem, 12vw, 8rem);
  }
}

/* Large */
@media (min-width: 1440px) {
  .shift-body {
    max-width: 680px;
  }

  .shift-header {
    max-width: 1000px;
  }

  .shift-transform {
    max-width: 1000px;
  }
}
