/* ============================================================
   "Is this art?" — an infinite scrolling canvas
   A clean, neutral, content-forward reading surface.
   The thinking is the point; the styling stays out of its way.
   ============================================================ */

:root {
  --bg:        #fcfbf9;   /* soft, near-white reading background */
  --bg-edge:   #f3f1ec;   /* faint edge tone for gentle depth */
  --text:      #1c1b19;   /* near-black, easy on the eyes */
  --muted:     #6b6862;   /* secondary text */
  --hairline:  #e3e0d8;   /* dividers / borders */
  --accent:    #355e8a;   /* one calm accent, used sparingly */
  --gold:      #b8945a;   /* warm antique gold, tuned to the bg's tones */

  /* Neutral, fast, dependency-free system stacks */
  --font-serif: Charter, "Iowan Old Style", "Palatino Linotype", Palatino,
                Georgia, "Times New Roman", serif;
  --font-sans:  ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto,
                Helvetica, Arial, sans-serif;

  --column: 660px;
}

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  background-color: var(--bg);
  background-image: radial-gradient(120% 80% at 50% 0%, #ffffff 0%, var(--bg) 45%, var(--bg-edge) 100%);
  background-attachment: fixed;
  color: var(--text);
  font-family: var(--font-serif);
  font-size: 1.22rem;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* ---------- the canvas (the growing column) ---------- */
.canvas {
  max-width: var(--column);
  margin: 0 auto;
  padding: 9vh 24px 40vh;   /* long tail so there's always "more" below */
}

/* ---------- panels: one unit of thought each ---------- */
.panel {
  margin: 0 auto 9vh;
}
.panel p { margin: 0 0 1.15em; }
.panel em { font-style: italic; }
.panel strong { font-weight: 600; }
.panel ul { margin: 0 0 1.15em; padding-left: 1.3em; }
.panel li { margin: 0 0 0.45em; }

/* ---------- title panel ---------- */
.panel--title {
  text-align: center;
  margin-bottom: 13vh;
}

.title-hand {
  font-family: var(--font-sans);
  font-weight: 800;
  letter-spacing: -0.02em;
  font-size: clamp(2.6rem, 9vw, 4.6rem);
  line-height: 1.02;
  margin: 0 0 0.5em;
}

.subtitle {
  font-family: var(--font-sans);
  font-weight: 400;
  font-size: 1.02rem;
  line-height: 1.6;
  color: var(--muted);
  margin: 0 0 2.4rem;
}

.scroll-cue {
  font-family: var(--font-sans);
  font-size: 0.82rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #aaa69d;
  margin-top: 3rem;
  animation: bob 2.6s ease-in-out infinite;
}
@keyframes bob {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(7px); }
}

/* ---------- illustrations (clean line art, optional per panel) ---------- */
.drawing {
  margin: 1.8em auto;
  text-align: center;
}
.drawing svg {
  width: 100%;
  max-width: 360px;
  height: auto;
  overflow: visible;
}
.drawing--hero svg { max-width: 300px; }

/* photographs of real, physical artifacts (e.g. a page from a sketchbook).
   Distinct from the SVG line-art: a real object, lightly framed so it reads
   as a photo of a thing that exists in the world. */
.drawing--photo img {
  display: block;
  width: 100%;
  max-width: 440px;
  height: auto;
  margin: 0 auto;
  border-radius: 2px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08),
              0 14px 32px -12px rgba(0, 0, 0, 0.28);
}

/* screenshots of software (a UI capture, not a physical object): a thin
   hairline + soft shadow so the near-white app canvas reads as a screen
   against our near-white page, without the polaroid feel of a real photo. */
.drawing--shot img {
  display: block;
  width: 100%;
  max-width: 460px;
  height: auto;
  margin: 0 auto;
  border: 1px solid var(--hairline);
  border-radius: 5px;
  box-shadow: 0 6px 22px -10px rgba(0, 0, 0, 0.2);
}

/* clean, consistent line-art vocabulary */
.line {
  fill: none;
  stroke: var(--text);
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.line--accent { stroke: var(--accent); }
.fill-soft    { fill: var(--hairline); stroke: none; }
.fill-text    { fill: var(--text); stroke: none; }
.fill-accent  { fill: var(--accent); stroke: none; }

.fig-label {
  font-family: var(--font-sans);
  font-size: 14px;
  fill: var(--muted);
}

/* ---------- math-art pieces (generative <canvas> elements) ----------
   Shared treatment for the harmonograph / attractor panels so each
   panel stays self-contained (neither depends on the other's markup). */
.el-mathart { margin: 1.8em 0 0.4em; }
.el-mathart canvas {
  width: 100%;
  height: 400px;
  display: block;
  background: var(--bg);
  border: 1px solid var(--hairline);
  border-radius: 6px;
}
.el-mathart .mathart-cap {
  font-family: var(--font-sans);
  font-size: 0.82rem;
  color: var(--muted);
  margin: 0.7em 0 0;
}
@media (max-width: 600px) { .el-mathart canvas { height: 320px; } }

/* ---------- gold section divider (a "page break" between beats) ---------- */
.page-break {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  width: min(380px, 70%);
  margin: 0 auto 9vh;
}
.page-break .pb-line {
  flex: 1;
  height: 1px;
}
.page-break .pb-line:first-child {
  background: linear-gradient(to right, transparent, var(--gold));
}
.page-break .pb-line:last-child {
  background: linear-gradient(to left, transparent, var(--gold));
}
.page-break .pb-mark {
  flex: 0 0 auto;
  width: 7px;
  height: 7px;
  transform: rotate(45deg);
  background: var(--gold);
}

/* ---------- scroll-reveal: the canvas "unfurls" ---------- */
.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.7s ease-out, transform 0.7s ease-out;
}
.reveal.is-visible {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .scroll-cue { animation: none; }
}

/* ---------- small screens ---------- */
@media (max-width: 600px) {
  body { font-size: 1.12rem; }
  .canvas { padding-top: 7vh; }
}
