/* ---------------------------------------------------------------
   Basic reset — a true blank canvas, edge to edge.
--------------------------------------------------------------- */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  height: 100%;
}

body {
  background: #fdfcfb;              /* soft off-white, like the inspiration */
  font-family: "Courier New", ui-monospace, monospace;
  color: #333;
  overflow: hidden;                /* homepage is one full screen, no scroll */
}

/* ---------------------------------------------------------------
   The canvas: a full-viewport stage the items float on.
--------------------------------------------------------------- */
.canvas {
  position: relative;
  width: 100vw;
  height: 100vh;
}

/* ---------------------------------------------------------------
   "back home" link used on the inner pages
--------------------------------------------------------------- */
.back {
  position: fixed;
  top: 1.4rem;
  left: 1.4rem;
  z-index: 20;
  font-family: "Caveat", cursive;
  font-size: 1.5rem;
  color: #d63384;
  text-decoration: none;
}

.back:hover {
  text-decoration: underline;
}

/* ---------------------------------------------------------------
   Pill button (e.g. the "Privacy Policy" link)
--------------------------------------------------------------- */
.pill-btn {
  position: fixed;
  z-index: 20;
  font-family: "Caveat", cursive;
  font-size: 1.4rem;
  color: #ffffff;
  background: #d63384;
  padding: 0.35rem 1.1rem;
  border-radius: 999px;
  text-decoration: none;
  box-shadow: 0 3px 12px rgba(214, 51, 132, 0.3);
}

.pill-btn:hover {
  background: #b52a6e;
}

.pill-btn.top-right {
  top: 1.4rem;
  right: 1.4rem;
}

/* ---------------------------------------------------------------
   Document pages (privacy policy, etc.) — a readable column that
   is allowed to scroll (the homepage stays fixed/no-scroll).
--------------------------------------------------------------- */
body.page {
  overflow: auto;
}

.doc {
  max-width: 760px;
  margin: 0 auto;
  padding: 5rem 1.5rem 4rem;
  font-family: Georgia, "Times New Roman", serif;
  color: #333;
  line-height: 1.7;
}

.doc h1 {
  font-family: "Caveat", cursive;
  color: #d63384;
  font-size: clamp(2rem, 5vw, 3rem);
  line-height: 1;
  margin-bottom: 0.3rem;
}

.doc h2 {
  color: #d63384;
  font-size: 1.2rem;
  margin: 2rem 0 0.5rem;
}

.doc .updated {
  color: #999;
  font-size: 0.9rem;
  margin-bottom: 2rem;
}

.doc p,
.doc li {
  margin-bottom: 0.8rem;
}

.doc ul {
  padding-left: 1.4rem;
}

.doc a {
  color: #d63384;
}

/* ---------------------------------------------------------------
   Center title
--------------------------------------------------------------- */
.title-block {
  position: absolute;
  transform: translate(-50%, -50%);
  text-align: center;
  pointer-events: none;            /* clicks pass through to items behind */
  z-index: 5;
}

.title {
  font-family: "Caveat", cursive;
  font-weight: 700;
  font-size: clamp(2.2rem, 5vw, 4.5rem);
  color: #d63384;                  /* pink */
  line-height: 1;
  white-space: nowrap;
}

/* A stylized "!" whose top piece is a heart */
.excl-heart {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  vertical-align: middle;
  line-height: 1;
  margin-left: 0.08em;
}

.excl-heart .dot {
  font-size: 0.8em;
  color: #d63384;
  line-height: 0.7;
}

.excl-heart .stem {
  width: 0.17em;
  height: 0.17em;
  margin-top: 0.12em;
  background: #d63384;
  border-radius: 50%;              /* round dot below the heart */
}

.subtitle {
  margin-top: 0.4rem;
  font-size: clamp(0.6rem, 1vw, 0.85rem);
  letter-spacing: 0.06em;
  color: #d63384;
  text-transform: lowercase;
}

/* ---------------------------------------------------------------
   Items: each is a clickable link.
   Three nested layers so animations never fight each other:
     .item   -> position + static rotation (--rot)
     .float  -> GSAP gentle floating (translateY)
     .scaler -> hover scale
--------------------------------------------------------------- */
.item {
  position: absolute;
  display: block;
  transform: rotate(var(--rot, 0deg));
  text-decoration: none;
  z-index: 2;
}

.float {
  display: block;
}

.scaler {
  display: block;
  transition: transform 0.3s ease;
}

.item:hover {
  z-index: 10;                     /* hovered item jumps to the front */
}

.item:hover .scaler {
  transform: scale(1.07);
}

.item img {
  display: block;
  width: 100%;
  height: auto;
  -webkit-user-drag: none;
  user-select: none;
}

/* The photostrip is sized by height (viewport units) instead of width,
   so the whole strip fits on screen top-to-bottom. */
.item--strip img {
  width: auto;
  height: 92vh;                    /* a touch under full height so it (and its label) fit */
}

/* ---------------------------------------------------------------
   Notes: the handwritten captions. Each is its own element, placed
   anywhere, connected to its picture by a hand-drawn arrow.
--------------------------------------------------------------- */
.note {
  position: absolute;
  width: 12rem;
  text-align: center;
  font-family: "Caveat", cursive;
  font-weight: 600;
  font-size: clamp(1.05rem, 1.5vw, 1.5rem);
  line-height: 1.05;
  color: #d63384;
  pointer-events: none;            /* clicks pass through in normal mode */
  z-index: 6;
}

/* ---------------------------------------------------------------
   Connector arrows (SVG overlay across the whole canvas)
--------------------------------------------------------------- */
.connectors {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;            /* never blocks clicks */
  z-index: 1;                      /* behind pictures and notes */
  overflow: visible;
}

.connector {
  fill: none;
  stroke: #d63384;
  stroke-width: 2.2;
  stroke-linecap: round;
}

/* ---------------------------------------------------------------
   Placeholder shown when an image file is missing.
   (Disappears automatically once you add the real image.)
--------------------------------------------------------------- */
.item.missing img {
  display: none;
}

.item.missing .scaler {
  min-width: 90px;
  min-height: 90px;
  border: 2px dashed #e6a7bd;
  border-radius: 10px;
  background: #fff6fa;
}

/* ---------------------------------------------------------------
   Smaller screens: scale the whole collage down a little and
   let it scroll if needed, so nothing gets clipped.
--------------------------------------------------------------- */
@media (max-width: 700px) {
  body {
    overflow: auto;
  }
  .title {
    white-space: normal;
  }
}

/* ---------------------------------------------------------------
   Drag mode (only active when the URL ends with #edit).
--------------------------------------------------------------- */
.edit-mode .item {
  outline: 2px dashed rgba(214, 51, 132, 0.55);
  outline-offset: 4px;
  cursor: grab;
}

.edit-mode .item:active,
.edit-mode .note:active {
  cursor: grabbing;
}

/* In edit mode the notes become grabbable too */
.edit-mode .note {
  outline: 2px dashed rgba(214, 51, 132, 0.55);
  outline-offset: 3px;
  pointer-events: auto;
  cursor: grab;
}

/* The middle title is grabbable in edit mode as well */
.edit-mode .title-block {
  pointer-events: auto;
  cursor: grab;
  outline: 2px dashed rgba(214, 51, 132, 0.55);
  outline-offset: 8px;
}

.edit-mode .title-block:active {
  cursor: grabbing;
}

/* A note being edited (after double-click) */
.note.editing {
  outline: 2px solid #d63384;
  background: #ffffff;
  cursor: text;
  padding: 2px 4px;
}

.edit-panel {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 9999;
  background: #ffffff;
  border: 2px solid #d63384;
  border-radius: 12px;
  padding: 12px 14px;
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.18);
  font-family: "Courier New", monospace;
  max-width: 340px;
}

.edit-panel-title {
  font-weight: bold;
  color: #d63384;
  margin-bottom: 8px;
  font-size: 13px;
  cursor: move;                    /* drag the panel by its title bar */
  user-select: none;
}

.edit-hint {
  font-size: 11px;
  color: #b5657f;
  margin: -2px 0 8px;
}

.edit-readout {
  white-space: pre;
  overflow: auto;
  max-height: 52vh;
  margin: 0 0 10px;
  font-size: 12px;
  line-height: 1.5;
  color: #444;
}

.edit-copy {
  font-family: inherit;
  font-size: 12px;
  background: #d63384;
  color: #fff;
  border: none;
  border-radius: 7px;
  padding: 7px 12px;
  cursor: pointer;
}

.edit-copy:hover {
  background: #b52a6e;
}

.edit-exit {
  margin-left: 10px;
  font-size: 12px;
  color: #b5657f;
}

/* ---------------------------------------------------------------
   Accessibility: respect users who prefer less motion.
   (script.js also skips the floating animation when this is set.)
--------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  .scaler {
    transition: none;
  }
}
