/* Editorial Ars Ludaxis — Architectural Editorial Stylesheet
   Adapted from Archidex index-06 architectural rhythm + Ars Ludaxis brand tokens */

:root {
  --ludaxis-dark: #111827;
  --ludaxis-surface: #1E293B;
  --ludaxis-ivory: #F5F1E8;
  --ludaxis-ivory-deep: #EAE4D7;
  --ludaxis-copper: #D96B27;
  --ludaxis-teal: #2A7B88;
  --ludaxis-brass: #C9A25B;
  --ludaxis-muted: #94A3B8;
  --ludaxis-hairline: rgba(17, 24, 39, 0.12);
  --ludaxis-hairline-dark: rgba(245, 241, 232, 0.12);
}

html {
  scroll-behavior: smooth;
}

body {
  background-color: var(--ludaxis-ivory);
  color: var(--ludaxis-dark);
  font-family: 'IBM Plex Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* Archidex index-06 vertical drafting grid lines */
.arch-v-lines {
  position: absolute;
  inset: 0;
  pointer-events: none;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  z-index: 0;
}

.arch-v-lines span {
  border-right: 1px solid rgba(17, 24, 39, 0.06);
  height: 100%;
}

.arch-v-lines span:first-child {
  border-left: 1px solid rgba(17, 24, 39, 0.06);
}

.arch-v-lines-dark span {
  border-right: 1px solid rgba(245, 241, 232, 0.06);
}
.arch-v-lines-dark span:first-child {
  border-left: 1px solid rgba(245, 241, 232, 0.06);
}

/* Subtle technical blueprint grid for dark showcase panels */
.blueprint-grid {
  background-image:
    linear-gradient(to right, rgba(245, 241, 232, 0.045) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(245, 241, 232, 0.045) 1px, transparent 1px);
  background-size: 36px 36px;
}

/* Editorial button with Archidex directional arrow micro-interaction */
.ludaxis-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.8125rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0.9rem 1.5rem;
  transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.ludaxis-btn svg {
  transition: transform 0.22s ease;
}

.ludaxis-btn:hover svg {
  transform: translateX(4px);
}

/* Archidex service-6 style numbered editorial rows */
.collection-row {
  position: relative;
  border-bottom: 1px solid var(--ludaxis-hairline);
  transition: background-color 0.25s ease;
}

.collection-row:hover {
  background-color: rgba(255, 255, 255, 0.65);
}

.collection-row .row-arrow {
  transition: transform 0.25s ease, background-color 0.25s ease, color 0.25s ease, border-color 0.25s ease;
}

.collection-row:hover .row-arrow {
  transform: translateX(4px);
  background-color: var(--ludaxis-dark);
  color: var(--ludaxis-ivory);
  border-color: var(--ludaxis-dark);
}

/* Architectural underline link */
.arch-underline {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding-bottom: 3px;
}

.arch-underline::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 1px;
  background-color: currentColor;
  transform-origin: right;
  transition: transform 0.25s ease;
}

.arch-underline:hover::after {
  transform: scaleX(0.65);
}

/* Book cover realistic studio shadow */
.book-cover-frame {
  box-shadow:
    -12px 20px 38px rgba(0, 0, 0, 0.45),
    0 2px 6px rgba(0, 0, 0, 0.25),
    inset 2px 0 0 rgba(255, 255, 255, 0.12);
}

/* Scroll-to-top progress ring (adapted from Archidex .progress-wrap) */
.progress-top-btn {
  position: fixed;
  right: 24px;
  bottom: 24px;
  width: 44px;
  height: 44px;
  border-radius: 9999px;
  background: var(--ludaxis-dark);
  color: var(--ludaxis-ivory);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transform: translateY(12px);
  transition: all 0.25s ease;
  z-index: 40;
  border: 1px solid rgba(201, 162, 91, 0.35);
  box-shadow: 0 10px 24px rgba(17, 24, 39, 0.28);
}

.progress-top-btn.is-visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.progress-top-btn:hover {
  background: var(--ludaxis-copper);
  border-color: var(--ludaxis-copper);
}

/* Offcanvas mobile drawer (adapted from Archidex .side-info) */
.mobile-drawer {
  transform: translateX(100%);
  transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}

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

.drawer-backdrop {
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.drawer-backdrop.is-open {
  opacity: 1;
  pointer-events: auto;
}

/* Prompt code block custom scrollbar */
.prompt-code-box {
  scrollbar-width: thin;
  scrollbar-color: #475569 #0F172A;
}

.prompt-code-box::-webkit-scrollbar {
  width: 7px;
  height: 7px;
}
.prompt-code-box::-webkit-scrollbar-track {
  background: #0F172A;
}
.prompt-code-box::-webkit-scrollbar-thumb {
  background: #475569;
  border-radius: 3px;
}

/* Toast notification */
.ludaxis-toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  opacity: 0;
  pointer-events: none;
  transition: all 0.25s ease;
  z-index: 60;
}

.ludaxis-toast.is-visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}
