/* Direction: Reading Room — parchment paper, one deep bottle-green accent, Spectral serif display */
/* Completed by the platform from the short form: both modes, every
   palette token, each text-on-ground pair at its floor. To restyle, write the
   short form again (the decisions in one :root) and it is completed again. */

:root {
  --canvas: #f5eedd;
  --surface: #fdf8ec;
  --surface-2: #ece2cc;
  --border: #d9cbae;
  --border-strong: #acaa9d;
  --ink: #2a241b;
  --muted: #655b4c;
  --accent: #14523a;
  --accent-hover: #114631;
  --accent-ink: #ffffff;
  --accent-text: #11462f;
  --accent-strong: #0d3b29;
  --accent-soft: #dde9e0;
  --accent-border: #90a894;
  --success: #2f6b3f;
  --success-ink: #ffffff;
  --success-soft: #dddeca;
  --success-strong: #2f6b3f;
  --warning: #8a5a12;
  --warning-ink: #ffffff;
  --warning-soft: #e8dcc5;
  --warning-strong: #7f5311;
  --danger: #973227;
  --danger-ink: #ffffff;
  --danger-soft: #ead7c7;
  --danger-strong: #973227;
  --chart-1: #14523a;
  --chart-2: #076496;
  --chart-3: #5a3787;
  --chart-4: #903254;
  --chart-5: #713f08;
  --chart-6: #796e06;

  --font-display: "Spectral", Georgia, serif;
  --font-body: "Inter", system-ui, sans-serif;
  --display-weight: 600;
  --display-tracking: -0.015em;
  --radius-card: 10px;
  --radius-btn: 8px;
  --radius-input: 8px;
  --card-pad: 1.25rem;
  --shadow-card: 0 1px 0 rgba(42, 36, 27, 0.06), 0 14px 28px -22px rgba(42, 36, 27, 0.55);
  --x-cover-1: #7b2d26;
  --x-cover-2: #26405c;
  --x-cover-3: #7d5f1b;
  --x-cover-4: #5a3a52;
  --x-cover-5: #37534a;
  --x-cover-6: #8d4a24;
  --x-cover-7: #46506b;
  --x-cover-8: #6b2f44;
  --x-cover-ink: #fdf6e6;
  --x-on-photo: #fdf6e6;
  --x-rule: #c9b894;
  --gradient-grain: radial-gradient(rgba(42, 36, 27, 0.05) 1px, transparent 1px);
  --font-mono: "JetBrains Mono Variable", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --font-sans: "Inter", system-ui, sans-serif;
  --eyebrow-tracking: 0.08em;
}

html[data-theme="dark"] {
  --canvas: #030b08;
  --surface: #1c2321;
  --surface-2: #101714;
  --border: #262d2b;
  --border-strong: #4f5452;
  --ink: #f5eedd;
  --muted: #949388;
  --accent: #14523a;
  --accent-hover: #376c58;
  --accent-ink: #ffffff;
  --accent-text: #709786;
  --accent-strong: #648e7c;
  --accent-soft: #071b13;
  --accent-border: #0b2b1e;
  --success: #2f6b3f;
  --success-ink: #ffffff;
  --success-soft: #0d2014;
  --success-strong: #6a9575;
  --warning: #8a5a12;
  --warning-ink: #ffffff;
  --warning-soft: #211c0a;
  --warning-strong: #a47e46;
  --danger: #973227;
  --danger-ink: #ffffff;
  --danger-soft: #24140f;
  --danger-strong: #ba7870;
  --chart-1: #407a60;
  --chart-2: #1b95b7;
  --chart-3: #7674cb;
  --chart-4: #b55e95;
  --chart-5: #bf633b;
  --chart-6: #91861c;
}

/* Shelfmark — the reading room: parchment grain, paper covers, a quiet page entrance. */

body {
  background-image: var(--gradient-grain);
  background-size: 4px 4px;
}

/* Pages settle in from just below their resting place (they rest visible). */
@keyframes page-settle {
  from {
    opacity: 0.55;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.page-in {
  animation: page-settle 0.45s cubic-bezier(0.22, 0.61, 0.36, 1) both;
}

/* A cover card: cloth board with a darker spine down the left edge. */
.cover-face {
  position: relative;
  overflow: hidden;
  font-family: var(--font-display);
  background-image: linear-gradient(90deg, rgba(0, 0, 0, 0.26), rgba(0, 0, 0, 0) 14%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.1), rgba(0, 0, 0, 0.12));
}

.cover-face::after {
  content: "";
  position: absolute;
  left: 10px;
  top: 0;
  bottom: 0;
  width: 1px;
  background: rgba(255, 255, 255, 0.22);
}

.cover {
  transition: transform 0.3s cubic-bezier(0.22, 0.61, 0.36, 1);
}

/* Most borrowed: a bar of bottle-green cloth that leans forward when pointed at. */
.loan-bar {
  min-width: 9rem;
  transition:
    filter 0.25s ease,
    transform 0.25s ease;
}

.group:hover .loan-bar {
  filter: brightness(1.12);
  transform: translateX(3px);
}

html.reduced-motion .loan-bar,
html.reduced-motion .group:hover .loan-bar {
  transition: none;
  transform: none;
}

html.reduced-motion .page-in,
html.reduced-motion .cover {
  animation: none;
  transition: none;
}

html.reduced-motion .cover:hover {
  transform: none;
}
