/* ========================================================================
   The Note Wall — bespoke stylesheet (v2)
   Palette: muted aubergine + cream. Type: Cormorant Garamond (display),
   Lora (notes), Inter (UI). A real cork prikbord in a wooden frame,
   entered through an aubergine splash gate. Read-only.
   ======================================================================== */

:root {
  /* Aubergine + cream leads */
  --aub:        #48303f;   /* deep muted eggplant — splash, header, footer */
  --aub-2:      #5a3d50;   /* mid */
  --aub-soft:   #8a6a7c;   /* soft accent */
  --cream:      #f5edda;
  --cream-2:    #ece0c4;
  --gold:       #c8a24c;   /* small warm accent (logo pin) */

  /* paper + ink */
  --paper:      #f8f2e4;   /* note paper */
  --ink:        #3a2c34;   /* text on cream */
  --ink-soft:   #6d5c66;

  /* cork + wood */
  --cork:       #b58f57;
  --wood:       #3c2a30;   /* aubergine-stained wood frame */
  --wood-2:     #59404a;

  /* theme pin colours */
  --t-healing:    #6f9268;
  --t-thriving:   #d0a03f;
  --t-grief:      #6d8299;
  --t-boundaries: #9a6f96;
  --t-anger:      #c0392b;
  --t-heard:      #d8d1c4;

  --shadow: 0 10px 22px rgba(30, 18, 24, .30);
  --maxw: 1180px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--aub);
  min-height: 100vh;
}
a { color: inherit; }

.skip { position: absolute; left: -999px; top: 0; background: var(--aub); color: #fff; padding: .6rem 1rem; z-index: 200; border-radius: 0 0 6px 0; }
.skip:focus { left: 0; top: 0; }

/* ============================================================
   HERO (in-flow; the first full screen you see, then you scroll)
   ============================================================ */
.hero {
  position: relative; width: 100%; min-height: calc(100svh - 62px);
  background:
    radial-gradient(120% 90% at 50% 0%, var(--aub-2) 0%, var(--aub) 55%, #3a2632 100%);
  display: flex; align-items: center; justify-content: center;
  text-align: center; padding: 3rem 1.4rem; color: var(--cream);
}
.hero-inner { max-width: 640px; }
.gate-eyebrow {
  font-family: "Inter", sans-serif; text-transform: uppercase; letter-spacing: .42em;
  font-size: .72rem; font-weight: 500; color: var(--aub-soft);
  margin: 0 0 1.6rem; padding-left: .42em;
}
.gate-pinmark { display: inline-block; margin-bottom: 1.4rem; }
.hero h1 {
  font-family: "Cormorant Garamond", Georgia, serif; font-weight: 500;
  font-size: clamp(2.6rem, 7vw, 4.6rem); line-height: 1.04; letter-spacing: .5px;
  margin: 0 0 1.2rem; color: var(--cream);
}
.hero p {
  font-size: 1.08rem; line-height: 1.65; color: #e8dcc7;
  max-width: 34em; margin: 0 auto 2.1rem; opacity: .92;
}
.hero .enter {
  font-family: "Inter", sans-serif; font-weight: 600; font-size: 1rem;
  background: var(--cream); color: var(--aub); border: 0; cursor: pointer;
  padding: .95rem 2.1rem; border-radius: 999px; letter-spacing: .01em;
  box-shadow: 0 10px 30px rgba(0,0,0,.3); transition: transform .15s, box-shadow .15s;
}
.hero .enter::after { content: "  ↓"; opacity: .55; }
.hero .enter:hover { transform: translateY(-2px); box-shadow: 0 14px 36px rgba(0,0,0,.38); }
.hero .enter:active { transform: translateY(0); }
.hero .gate-note { font-size: .84rem; color: var(--aub-soft); margin: 1.9rem auto 0; max-width: 30em; opacity: .9; }

/* ============================================================
   HEADER
   ============================================================ */
.site-head {
  position: sticky; top: 0; z-index: 40;
  background: var(--cream);
  border-bottom: 1px solid rgba(72,48,63,.14);
}
.head-inner { max-width: var(--maxw); margin: 0 auto; padding: .85rem 1.4rem; display: flex; align-items: center; gap: 1rem; }

/* logo — Cormorant wordmark + minimal pin mark, no emoji */
.brand { display: inline-flex; align-items: center; gap: .6rem; text-decoration: none; color: var(--aub); }
.brand .pinmark { flex: none; }
.brand .word { font-family: "Cormorant Garamond", Georgia, serif; line-height: 1; letter-spacing: .3px; }
.brand .word .the { font-style: italic; font-weight: 500; font-size: 1.15rem; opacity: .82; margin-right: .18em; }
.brand .word .nw { font-weight: 600; font-size: 1.7rem; }

.head-nav { margin-left: auto; display: flex; align-items: center; gap: .1rem; }
.head-nav .navlink {
  background: transparent; border: 0; cursor: pointer; color: var(--aub); font-family: "Inter", sans-serif;
  font-size: .92rem; padding: .5rem .8rem; border-radius: 7px; text-decoration: none; opacity: .82;
}
.head-nav .navlink:hover { opacity: 1; background: rgba(72,48,63,.07); }

/* base lang switch = light (used on the aubergine splash gate) */
.lang-switch { display: inline-flex; border: 1px solid rgba(245,237,218,.35); border-radius: 999px; overflow: hidden; margin: 0 .35rem; }
.lang-switch button { padding: .28rem .62rem; opacity: .65; border: 0; background: transparent; color: var(--cream); font: 600 .82rem "Inter", sans-serif; cursor: pointer; }
.lang-switch button[aria-pressed="true"] { background: var(--cream); color: var(--aub); opacity: 1; }
/* header lang switch = dark (on cream header) */
.site-head .lang-switch { border-color: rgba(72,48,63,.3); }
.site-head .lang-switch button { color: var(--aub); }
.site-head .lang-switch button[aria-pressed="true"] { background: var(--aub); color: var(--cream); }

.btn-write {
  font-family: "Inter", sans-serif; font-weight: 600; font-size: .9rem;
  background: var(--aub); color: var(--cream); border: 0; border-radius: 999px;
  padding: .5rem 1.05rem; cursor: pointer; margin-left: .4rem;
}
.btn-write:hover { background: var(--aub-2); }

/* ============================================================
   BOARD AREA — cork prikbord in a wooden frame
   ============================================================ */
/* full-bleed: the wall runs edge-to-edge, not a centered box */
.board-shell { width: 100%; margin: 0; padding: 0; }

/* compact filter bar (small, on the aubergine band above the wall) */
.filterbar { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; margin: 0; padding: 1.1rem 1.4rem; }
.filterbar .fb-label { font-size: .72rem; text-transform: uppercase; letter-spacing: .16em; color: var(--cream); opacity: .6; margin-right: .1rem; }
.fchip {
  display: inline-flex; align-items: center; gap: .4rem; cursor: pointer;
  background: rgba(245,237,218,.1); border: 1px solid rgba(245,237,218,.18);
  color: #ece0c8; border-radius: 999px; padding: .28rem .62rem; font-size: .8rem; font-weight: 500;
  font-family: "Inter", sans-serif; transition: background .12s, border-color .12s, opacity .12s;
}
.fchip:hover { background: rgba(245,237,218,.2); }
.fchip .dot { width: 10px; height: 10px; border-radius: 50%; box-shadow: inset 0 0 0 1px rgba(0,0,0,.15); }
.fchip[aria-pressed="true"] { background: var(--cream); color: var(--aub); border-color: var(--cream); font-weight: 600; }
.fchip.is-dim { opacity: .42; }
.fchip .count { opacity: .6; font-variant-numeric: tabular-nums; }

.dot-healing{background:var(--t-healing)} .dot-thriving{background:var(--t-thriving)}
.dot-grief{background:var(--t-grief)} .dot-boundaries{background:var(--t-boundaries)}
.dot-anger{background:var(--t-anger)} .dot-heard{background:var(--t-heard)}
.dot-all{background:conic-gradient(var(--t-healing),var(--t-thriving),var(--t-anger),var(--t-boundaries),var(--t-grief),var(--t-heard),var(--t-healing))}

/* board = soft woven linen, full-bleed wall (no frame, no rounding at the edges) */
.board-frame { position: relative; }

.board {
  position: relative; border-radius: 0; padding: 2.2rem clamp(1.4rem, 4vw, 3.5rem) 1.6rem;
  overflow: hidden; min-height: 62vh;
  background-color: #e7dbc2;
  background-image:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='lv'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.012 0.55' numOctaves='2' seed='3' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3CfeComponentTransfer%3E%3CfeFuncA type='linear' slope='0.11'/%3E%3C/feComponentTransfer%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23lv)'/%3E%3C/svg%3E"),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='lh'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.55 0.012' numOctaves='2' seed='7' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3CfeComponentTransfer%3E%3CfeFuncA type='linear' slope='0.11'/%3E%3C/feComponentTransfer%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23lh)'/%3E%3C/svg%3E");
  background-blend-mode: multiply, multiply;
  box-shadow: inset 0 8px 20px -8px rgba(30,18,26,.5), inset 0 -8px 20px -8px rgba(30,18,26,.35);
  columns: 240px; column-gap: 1.5rem;
}

.count-line { text-align: right; margin: 0; padding: .9rem 1.4rem; color: var(--cream); opacity: .55; font-size: .82rem; }
.count-line span { opacity: 1; font-weight: 600; }

/* a note = cream paper post-it, read-only */
.note {
  break-inside: avoid; -webkit-column-break-inside: avoid;
  position: relative; margin: 0 0 1.6rem; background: var(--paper);
  padding: 1.6rem 1.2rem 1.05rem; border-radius: 3px;
  box-shadow: 0 5px 16px rgba(72,48,63,.16);
  transition: transform .16s ease, box-shadow .16s ease;
  animation: drop .35s ease both;
}
.note:hover { transform: scale(1.025) rotate(0deg) !important; box-shadow: 0 12px 26px rgba(72,48,63,.24); z-index: 5; }

/* faint theme wash + per-theme colour variable (--pc drives the tape) */
.note.t-healing{background:linear-gradient(180deg,#f2f5ec,var(--paper) 55%);--pc:#6f9268}
.note.t-thriving{background:linear-gradient(180deg,#faf1da,var(--paper) 55%);--pc:#d0a03f}
.note.t-grief{background:linear-gradient(180deg,#eef2f5,var(--paper) 55%);--pc:#6d8299}
.note.t-boundaries{background:linear-gradient(180deg,#f4edf3,var(--paper) 55%);--pc:#9a6f96}
.note.t-anger{background:linear-gradient(180deg,#f9ebe8,var(--paper) 55%);--pc:#c0392b}
.note.t-heard{background:linear-gradient(180deg,#f6f3ec,var(--paper) 55%);--pc:#b7ad97}

/* washi tape (replaces the pushpin) */
.tape {
  position: absolute; top: -9px; left: 50%; z-index: 3;
  width: 82px; height: 24px; transform: translateX(-50%) rotate(-2.5deg);
  background: color-mix(in srgb, var(--pc) 42%, transparent);
  border-left: 1px dashed rgba(255,255,255,.45); border-right: 1px dashed rgba(255,255,255,.45);
  box-shadow: 0 1px 3px rgba(72,48,63,.14);
}
.tape::after { /* subtle sheen down the tape */
  content:""; position:absolute; inset:0;
  background: linear-gradient(180deg, rgba(255,255,255,.28), transparent 45%, rgba(0,0,0,.05));
}
.note:nth-child(3n) .tape { transform: translateX(-58%) rotate(3deg); }
.note:nth-child(4n) .tape { transform: translateX(-46%) rotate(-4deg); }

.note .note-text { font-family: "Lora", Georgia, serif; font-size: 1.02rem; line-height: 1.56; white-space: pre-wrap; word-break: break-word; margin: 0 0 .8rem; color: #40323a; }
.note .note-meta { display: flex; align-items: center; justify-content: space-between; gap: .5rem; font-family: "Inter", sans-serif; font-size: .76rem; color: var(--ink-soft); border-top: 1px solid rgba(90,60,74,.16); padding-top: .55rem; }
.note .note-name { font-weight: 600; }
.note .note-theme { display: inline-flex; align-items: center; gap: .35rem; }
.note .note-theme .mini { width: 8px; height: 8px; border-radius: 50%; }

@keyframes drop { from { opacity:0; transform: translateY(-8px) scale(.98); } to { opacity:1; } }
.empty-state { color: var(--cream); text-align: center; padding: 2.5rem 1rem; font-family: "Lora", serif; font-size: 1.1rem; opacity: .85; }

/* ============================================================
   MODALS
   ============================================================ */
.modal-back { position: fixed; inset: 0; background: rgba(24,12,18,.6); backdrop-filter: blur(3px); display: none; align-items: flex-start; justify-content: center; z-index: 130; padding: 4vh 1rem; overflow-y: auto; }
.modal-back.open { display: flex; }
.modal { background: var(--paper); color: var(--ink); border-radius: 12px; max-width: 560px; width: 100%; padding: 1.7rem 1.6rem; box-shadow: 0 24px 60px rgba(0,0,0,.45); animation: drop .3s ease both; position: relative; }
.modal h2 { font-family: "Cormorant Garamond", serif; font-weight: 600; margin: .1rem 0 .5rem; font-size: 2rem; letter-spacing: .3px; }
.modal p.sub { color: var(--ink-soft); margin: 0 0 1.1rem; font-size: .95rem; line-height: 1.55; }
.modal label { display: block; font-weight: 600; font-size: .88rem; margin: 1rem 0 .35rem; font-family: "Inter", sans-serif; }
.modal textarea, .modal input[type=text] { width: 100%; font-family: "Lora", serif; font-size: 1.02rem; padding: .7rem .8rem; border: 1.5px solid #d8cbb4; border-radius: 8px; background: #fffdf7; color: var(--ink); resize: vertical; }
.modal textarea { min-height: 120px; }
.modal input[type=text] { font-family: "Inter", sans-serif; font-size: .95rem; }
.theme-picker { display: flex; flex-wrap: wrap; gap: .5rem; }
label.theme-opt { display: inline-flex; align-items: center; gap: .45rem; cursor: pointer; border: 1.5px solid #d8cbb4; border-radius: 999px; padding: .35rem .75rem; font-size: .86rem; font-weight: 500; font-family: "Inter", sans-serif; }
.theme-opt input { position: absolute; opacity: 0; width: 0; height: 0; }
.theme-opt .dot { width: 13px; height: 13px; border-radius: 50%; box-shadow: inset 0 0 0 1.5px rgba(0,0,0,.12); }
.theme-opt:has(input:checked) { border-color: var(--aub); box-shadow: 0 0 0 2px rgba(72,48,63,.16); }
.modal-actions { display: flex; gap: .6rem; justify-content: flex-end; margin-top: 1.3rem; }
.btn { border: 0; border-radius: 999px; padding: .62rem 1.2rem; font: 600 .95rem "Inter", sans-serif; cursor: pointer; }
.btn-primary { background: var(--aub); color: var(--cream); }
.btn-primary:hover { background: var(--aub-2); }
.btn-ghost { background: transparent; color: var(--ink-soft); }
.modal-close { position: absolute; top: .7rem; right: .9rem; background: none; border: 0; font-size: 1.6rem; cursor: pointer; color: var(--ink-soft); line-height: 1; }
.hint { font-size: .8rem; color: var(--ink-soft); margin-top: .35rem; }
.charcount { float: right; font-weight: 400; color: var(--ink-soft); font-size: .8rem; font-family: "Inter", sans-serif; }
.thanks { text-align: center; padding: 1.4rem .5rem; }
.thanks .big { font-size: 2.4rem; }

/* prose (about / rules / faq) */
.prose { max-width: 620px; }
.prose h3 { font-family: "Cormorant Garamond", serif; font-weight: 600; font-size: 1.35rem; margin: 1.3rem 0 .3rem; color: var(--aub); }
.prose p { line-height: 1.65; margin: .3rem 0 .7rem; }
.prose ul { padding-left: 1.1rem; line-height: 1.6; margin: .3rem 0 .7rem; }
.prose li { margin: .35rem 0; }

/* ============================================================
   FOOTER
   ============================================================ */
.site-foot { background: var(--cream); color: var(--aub); margin-top: 2rem; padding: 2.4rem 1.4rem 2.8rem; border-top: 1px solid rgba(72,48,63,.14); }
.foot-inner { max-width: var(--maxw); margin: 0 auto; display: grid; grid-template-columns: 1.3fr 1fr; gap: 2.4rem; }
.help-block h3 { font-family: "Cormorant Garamond", serif; font-weight: 600; font-size: 1.5rem; margin: 0 0 .4rem; }
.help-block .help-intro { font-size: .9rem; opacity: .75; margin: 0 0 .8rem; line-height: 1.55; max-width: 42ch; }
.help-lines { list-style: none; padding: 0; margin: 0; }
.help-lines li { padding: .5rem 0; border-bottom: 1px solid rgba(72,48,63,.14); font-size: .92rem; line-height: 1.5; opacity: .92; }
.help-lines li:last-child { border-bottom: 0; }
.help-lines strong { color: #35232e; font-weight: 700; }
.foot-side { display: flex; flex-direction: column; gap: 1.1rem; }
.foot-brand { font-family: "Cormorant Garamond", serif; font-size: 1.5rem; }
.foot-brand .the { font-style: italic; opacity: .8; margin-right: .18em; }
.foot-nav { display: flex; flex-direction: column; gap: .5rem; }
.foot-nav a { cursor: pointer; font-size: .92rem; opacity: .82; width: fit-content; }
.foot-nav a:hover { opacity: 1; text-decoration: underline; }
.foot-fine { max-width: var(--maxw); margin: 2rem auto 0; font-size: .78rem; opacity: .55; line-height: 1.5; border-top: 1px solid rgba(72,48,63,.12); padding-top: 1.2rem; }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 900px) { .board { columns: 220px; } .foot-inner { grid-template-columns: 1fr; gap: 1.6rem; } }
@media (max-width: 640px) {
  .board { columns: 180px; column-gap: 1rem; padding: 1.4rem 1.1rem .6rem; }
  .head-nav .navlink.hide-sm { display: none; }
  .brand .word .nw { font-size: 1.45rem; }
  .hero p { font-size: 1rem; }
}
@media (max-width: 430px) { .board { columns: 1; } }

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