/* Coffee & Claude — ASCII post-its on System 7 desktop + iPod wheel on mobile */

:root {
  --wallpaper-start: #c8a8e9;
  --wallpaper-end: #f2b8dc;
  --window-bg: #f5f0e8;
  --window-border: #1a1a1a;
  --text: #1a1a1a;
  --text-muted: #5a5a5a;
  --accent-link: #7b3fb8;
  --accent-cta: #e8488c;
  --sticky-y: #ffe66d;
  --sticky-p: #ffb7d5;
  --sticky-c: #c8f0e0;
  --sticky-b: #c5d9ff;
  --sticky-o: #ffd4a8;
  --menubar-h: 22px;
  --ipod-h: 220px;
  --font-mono: "Monaco", "JetBrains Mono", "SF Mono", ui-monospace, monospace;
  --font-display: "ChiKareGo2", "Pixelify Sans", "Chicago", "Geneva", system-ui, sans-serif;
  --font-body: Inter, "Geneva", system-ui, sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  color-scheme: light;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-body);
  color: var(--text);
  background: var(--wallpaper-start);
}

.wallpaper {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image:
    radial-gradient(circle at 0 0, rgba(255, 255, 255, 0.5) 1px, transparent 1.5px),
    linear-gradient(180deg, var(--wallpaper-start) 0%, var(--wallpaper-end) 100%);
  background-size: 4px 4px, 100% 100%;
}

/* ---- Menubar (desktop + mobile thin) ---- */
.menubar {
  position: sticky;
  top: 0;
  z-index: 50;
  height: var(--menubar-h);
  display: flex;
  align-items: center;
  gap: 2px;
  padding: 0 6px;
  background: var(--window-bg);
  border-bottom: 1px solid var(--window-border);
  font-family: var(--font-mono);
  font-size: 11px;
}

.menubar__apple {
  width: 16px;
  text-align: center;
  user-select: none;
}

.menubar a {
  color: var(--text);
  text-decoration: none;
  padding: 1px 8px 2px;
}

.menubar a:hover,
.menubar a:focus-visible,
.menubar a[aria-current="page"] {
  background: #000;
  color: #fff;
  outline: none;
}

.menubar__spacer {
  flex: 1;
}

.menubar__clock {
  font-size: 10px;
  padding-right: 4px;
}

/* ---- Desktop: free scatter field ---- */
.board {
  position: relative;
  z-index: 1;
  min-height: calc(100vh - var(--menubar-h));
  padding: 1rem;
}

/* ASCII post-it — sticky is only a hair larger than the mono frame */
.note {
  position: absolute;
  width: max-content;
  max-width: min(96vw, 42rem);
  background: var(--sticky-y);
  /* outer CSS border removed so +---+ is the edge of the note */
  border: 0;
  box-shadow: 3px 3px 0 rgba(26, 26, 26, 0.85);
  padding: 0.2rem 0.22rem 0.22rem;
  font-family: var(--font-mono);
  font-size: 14.6px;
  line-height: 1.25;
  color: var(--text);
  text-decoration: none;
  overflow: visible;
  z-index: 2;
  cursor: default;
  transition: transform 120ms ease, box-shadow 120ms ease, z-index 0s;
}

.note__ascii {
  display: block;
  margin: 0;
  padding: 0;
  font: inherit;
  font-family: ui-monospace, "JetBrains Mono", "SF Mono", "Menlo", "Monaco", monospace;
  font-size: inherit;
  line-height: inherit;
  letter-spacing: 0;
  white-space: pre;
  color: inherit;
  background: transparent;
  border: 0;
  tab-size: 2;
}

.note:hover,
.note:focus-visible {
  z-index: 20;
  box-shadow: 4px 4px 0 var(--window-border);
  outline: none;
  transform: rotate(0deg) scale(1.03) !important;
}

.note a {
  color: var(--accent-link);
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.note--p {
  background: var(--sticky-p);
}
.note--c {
  background: var(--sticky-c);
}
.note--b {
  background: var(--sticky-b);
}
.note--o {
  background: var(--sticky-o);
}
.note--cream {
  background: var(--window-bg);
}

.note__tape {
  display: block;
  width: 2.2rem;
  height: 0.4rem;
  margin: 0 auto 0.2rem;
  background: rgba(255, 255, 255, 0.45);
  border: 1px solid rgba(0, 0, 0, 0.12);
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.06);
}

/* scatter map — desktop absolute positions + rotations */
.note[data-id="hero"] {
  top: 6%;
  left: 26%;
  transform: rotate(-2.5deg);
  z-index: 5;
  font-size: 15.3px;
}
.note[data-id="day"] {
  top: 38%;
  left: 6%;
  transform: rotate(3deg);
  background: var(--sticky-c);
}
.note[data-id="night"] {
  top: 16%;
  right: 4%;
  left: auto;
  transform: rotate(5deg);
  background: var(--sticky-p);
}
.note[data-id="who"] {
  top: 56%;
  left: 34%;
  transform: rotate(-4deg);
  background: var(--sticky-b);
}
.note[data-id="ari"] {
  top: 46%;
  right: 8%;
  left: auto;
  transform: rotate(2deg);
  background: var(--sticky-o);
}
.note[data-id="join"] {
  bottom: 8%;
  left: 10%;
  top: auto;
  transform: rotate(-1deg);
  background: var(--window-bg);
}
.note[data-id="readme"] {
  bottom: 10%;
  right: 6%;
  left: auto;
  top: auto;
  transform: rotate(3.5deg);
  font-size: 14.3px;
}
.note[data-id="cafe"] {
  top: 8%;
  left: 3%;
  transform: rotate(-6deg);
  background: var(--window-bg);
  /* hard cap — served asset is 768px; CSS keeps display ~15.7rem */
  width: 16.9rem;
  max-width: 16.9rem;
  padding-left: 0.2rem;
  padding-right: 0.2rem;
  font-size: 13.3px;
}
.note[data-id="cafe"] .note__ascii {
  white-space: pre;
  overflow: hidden;
}
.note[data-id="cafe"] picture,
.note[data-id="cafe"] img {
  display: block;
  width: 15.7rem;
  max-width: 15.7rem;
  height: auto;
  margin: 0 auto;
  border: 0;
  box-sizing: border-box;
}
.note[data-id="cafe"] img {
  border-left: 1px solid var(--text);
  border-right: 1px solid var(--text);
  image-rendering: pixelated;
}

/* about page scatter */
.note[data-id="meaning"] {
  top: 34%;
  left: 5%;
  transform: rotate(2.5deg);
  background: var(--sticky-c);
}
.note[data-id="host"] {
  top: 20%;
  right: 4%;
  left: auto;
  transform: rotate(-3deg);
  background: var(--sticky-p);
}
.note[data-id="method"] {
  top: 55%;
  left: 32%;
  transform: rotate(4deg);
  background: var(--sticky-b);
}
.note[data-id="about-join"] {
  bottom: 10%;
  left: 10%;
  top: auto;
  transform: rotate(-2deg);
}

/* ---- Mobile: single scrolling column + iPod wheel ---- */
.ipod-shell {
  display: none;
}

@media (max-width: 768px) {
  .board {
    min-height: auto;
    padding: 0.75rem 0.75rem calc(var(--ipod-h) + 1.5rem);
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
  }

  .note {
    position: relative !important;
    top: auto !important;
    left: auto !important;
    right: auto !important;
    bottom: auto !important;
    width: max-content !important;
    max-width: min(96vw, 28rem) !important;
    margin: 0 auto;
    transform: none !important;
  }

  .note__ascii {
    white-space: pre;
    overflow-x: auto;
  }

  .note:nth-child(odd) {
    transform: rotate(-1deg) !important;
  }
  .note:nth-child(even) {
    transform: rotate(1.2deg) !important;
  }

  .note:hover,
  .note:focus-visible {
    transform: rotate(0deg) scale(1.01) !important;
  }

  /* Metallic pink iPod (mini / special-edition energy) */
  .ipod-shell {
    display: block;
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 60;
    /* anodized pink metal body */
    background:
      linear-gradient(
        125deg,
        rgba(255, 255, 255, 0.45) 0%,
        rgba(255, 255, 255, 0) 28%,
        rgba(255, 255, 255, 0) 62%,
        rgba(255, 255, 255, 0.2) 100%
      ),
      linear-gradient(180deg, #ffb6d5 0%, #f48fb1 38%, #e85a9b 72%, #c93a7a 100%);
    border-top: 1px solid #8a2a55;
    border-radius: 18px 18px 0 0;
    padding: 0.65rem 0.85rem calc(0.9rem + env(safe-area-inset-bottom, 0px));
    box-shadow:
      0 -10px 28px rgba(180, 40, 100, 0.28),
      inset 0 1px 0 rgba(255, 255, 255, 0.55),
      inset 0 -1px 0 rgba(80, 10, 40, 0.25);
    touch-action: none;
  }

  .ipod-shell__screen {
    max-width: 16rem;
    margin: 0 auto 0.45rem;
    background: linear-gradient(180deg, #d8e2c8 0%, #b8c8a8 100%);
    border: 2px solid #4a2040;
    border-radius: 8px;
    padding: 0.4rem 0.55rem;
    font-family: var(--font-mono);
    font-size: 10px;
    color: #1a1a1a;
    text-align: center;
    min-height: 2.1rem;
    box-shadow:
      inset 0 1px 3px rgba(0, 0, 0, 0.25),
      0 1px 0 rgba(255, 255, 255, 0.35);
  }

  .ipod-shell__hint {
    text-align: center;
    font-family: var(--font-mono);
    font-size: 9px;
    color: rgba(80, 20, 50, 0.75);
    margin: 0 0 0.4rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    text-shadow: 0 1px 0 rgba(255, 255, 255, 0.35);
  }

  /* White / silver metallic click wheel on pink body */
  .wheel {
    position: relative;
    width: 11.5rem;
    height: 11.5rem;
    margin: 0 auto;
    border-radius: 50%;
    background:
      radial-gradient(circle at 32% 28%, rgba(255, 255, 255, 0.95) 0%, transparent 42%),
      radial-gradient(circle at 70% 75%, rgba(180, 180, 190, 0.35) 0%, transparent 45%),
      linear-gradient(145deg, #ffffff 0%, #f0f0f4 35%, #d0d0d8 70%, #b8b8c0 100%);
    border: 1px solid #6a3050;
    box-shadow:
      inset 0 2px 3px rgba(255, 255, 255, 0.9),
      inset 0 -2px 4px rgba(80, 80, 100, 0.25),
      0 3px 10px rgba(100, 20, 60, 0.35);
    touch-action: none;
    user-select: none;
  }

  .wheel__ring {
    position: absolute;
    inset: 0;
    border-radius: 50%;
  }

  .wheel__label {
    position: absolute;
    font-family: var(--font-display), var(--font-mono);
    font-size: 10px;
    letter-spacing: 0.06em;
    color: #6a3050;
    background: transparent;
    border: 0;
    padding: 0.25rem;
    cursor: pointer;
    font-weight: 700;
    text-shadow: 0 1px 0 rgba(255, 255, 255, 0.7);
  }

  .wheel__label--menu {
    top: 0.55rem;
    left: 50%;
    transform: translateX(-50%);
  }
  .wheel__label--prev {
    left: 0.55rem;
    top: 50%;
    transform: translateY(-50%);
  }
  .wheel__label--next {
    right: 0.55rem;
    top: 50%;
    transform: translateY(-50%);
  }

  .wheel__center {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 3.6rem;
    height: 3.6rem;
    transform: translate(-50%, -50%);
    border-radius: 50%;
    background:
      radial-gradient(circle at 35% 30%, #ffe0ef 0%, #ffb6d5 45%, #e85a9b 100%);
    border: 1px solid #a04070;
    box-shadow:
      inset 0 1px 2px rgba(255, 255, 255, 0.55),
      inset 0 -1px 2px rgba(100, 20, 50, 0.2),
      0 1px 3px rgba(0, 0, 0, 0.15);
    cursor: pointer;
  }

  body.ipod-active {
    overscroll-behavior: contain;
  }
}

@media (min-width: 769px) {
  .ipod-shell {
    display: none !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  .note {
    transition: none;
  }
}

/* ---- System 7 window + intake form (join + admin) ---- */
.form-page {
  position: relative;
  z-index: 1;
  max-width: 34rem;
  margin: 0 auto;
  padding: 1.25rem 1rem 4rem;
}

.s7-window {
  background: var(--window-bg);
  border: 1px solid var(--text);
  box-shadow: 3px 3px 0 #000;
  font-family: var(--font-mono);
}

.s7-window__title {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  justify-content: center;
  padding: 0.25rem 0.4rem;
  border-bottom: 1px solid var(--text);
  background: repeating-linear-gradient(
    0deg,
    #d8c4f0 0 1px,
    #ebe0f8 1px 2px
  );
  font-size: 11px;
  text-transform: lowercase;
  position: relative;
}

.s7-window__close {
  position: absolute;
  left: 6px;
  width: 11px;
  height: 11px;
  border: 1px solid var(--text);
  background: var(--window-bg);
}

.s7-window__body {
  padding: 0.85rem 0.9rem 1rem;
}

.form-lead {
  margin: 0 0 0.85rem;
  font-size: 12px;
  line-height: 1.4;
  color: var(--text);
}

.plan-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.plan-card {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  padding: 0.55rem 0.5rem;
  border: 1px solid var(--text);
  background: #fffef9;
  cursor: pointer;
  box-shadow: 2px 2px 0 #000;
  font-size: 11px;
}

.plan-card:has(input:checked) {
  background: #f3ebff;
  outline: 2px solid var(--accent-link);
}

.plan-card input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.plan-card__price {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--accent-cta);
}

.plan-card__name {
  font-weight: 700;
}

.plan-card__detail {
  color: var(--text-muted);
  font-size: 10px;
}

.intake-form {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  font-size: 11px;
}

.field span {
  line-height: 1.35;
}

.field em {
  font-style: normal;
  color: var(--text-muted);
}

.field input[type="text"],
.field input[type="email"],
.field input[type="password"],
.field input[type="number"],
.field input[type="datetime-local"],
.field select,
.field textarea {
  font: inherit;
  font-size: 12px;
  padding: 0.4rem 0.45rem;
  border: 1px solid var(--text);
  background: #fffef9;
  color: var(--text);
  width: 100%;
}

.field textarea {
  resize: vertical;
  min-height: 3.5rem;
}

.field--check {
  flex-direction: row;
  align-items: flex-start;
  gap: 0.45rem;
}

.field--check input {
  margin-top: 0.15rem;
  flex-shrink: 0;
}

.form-note {
  margin: 0.15rem 0 0;
  font-size: 10px;
  color: var(--text-muted);
  line-height: 1.35;
}

.btn-cta {
  font-family: var(--font-mono);
  font-size: 13px;
  padding: 0.55rem 0.85rem;
  border: 1px solid var(--text);
  background: var(--accent-cta);
  color: #fff;
  cursor: pointer;
  box-shadow: 2px 2px 0 #000;
  align-self: flex-start;
}

.btn-cta:hover:not(:disabled) {
  filter: brightness(1.05);
}

.btn-cta:disabled {
  opacity: 0.65;
  cursor: wait;
}

.form-status {
  margin: 0.25rem 0 0;
  font-size: 11px;
  min-height: 1.2em;
}

.form-status--ok {
  color: #1a6b4a;
}

.form-status--err {
  color: #a12040;
}

@media (max-width: 480px) {
  .plan-grid {
    grid-template-columns: 1fr;
  }
}
