/* ===========================================================
   PromptGuess — "The Daily Prompt Exhibition"
   Gallery / catalogue aesthetic. Two-pane: fixed wall-label
   rail (left) + scrolling exhibition hall (right).
   =========================================================== */

:root {
  --paper:   #f3efe6;   /* gallery ivory */
  --paper-2: #ece6d8;   /* deeper paper for cards */
  --ink:     #1c1a16;   /* near-black ink */
  --ink-2:   #4a463d;   /* secondary ink */
  --faint:   #8c8678;   /* captions / fine print */
  --line:    #d8d0bf;   /* hairline rules */
  --line-2:  #c7bda8;
  --cobalt:  #28409a;   /* exhibition accent */
  --cobalt-d:#1d2f74;
  --green:   #3f7d52;
  --amber:   #b07d1e;
  --rail-w:  320px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  font-family: "Work Sans", system-ui, sans-serif;
  background: var(--paper);
  color: var(--ink);
  line-height: 1.62;
  -webkit-font-smoothing: antialiased;
  /* faint paper grain */
  background-image:
    radial-gradient(circle at 18% 22%, rgba(0,0,0,.018) 0 1px, transparent 1px),
    radial-gradient(circle at 72% 64%, rgba(0,0,0,.014) 0 1px, transparent 1px);
  background-size: 7px 7px, 11px 11px;
}

em { font-style: italic; }

/* ---------------- LEFT RAIL ---------------- */
.rail {
  position: fixed;
  top: 0; left: 0; bottom: 0;
  width: var(--rail-w);
  padding: 40px 34px;
  border-right: 1px solid var(--line);
  background: linear-gradient(180deg, var(--paper), var(--paper-2));
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  z-index: 5;
}

.ident { display: block; text-decoration: none; color: var(--ink); }
.ident-mark {
  display: inline-grid; place-items: center;
  width: 46px; height: 46px;
  border: 1.5px solid var(--ink);
  font-family: "Playfair Display", serif; font-weight: 900; font-size: 1.1rem;
  letter-spacing: .02em;
  margin-bottom: 16px;
}
.ident-name {
  display: block;
  font-family: "Playfair Display", serif; font-weight: 700;
  font-size: 1.7rem; line-height: 1; letter-spacing: -.01em;
}
.ident-sub {
  display: block; margin-top: 8px;
  font-family: "IBM Plex Mono", monospace; font-size: .68rem;
  text-transform: uppercase; letter-spacing: .26em; color: var(--faint);
}

.rail-lede {
  margin: 26px 0 30px;
  font-size: .96rem; color: var(--ink-2);
  padding-top: 22px; border-top: 1px solid var(--line);
}

.index { display: flex; flex-direction: column; }
.index a {
  display: flex; align-items: baseline; gap: 14px;
  padding: 9px 0;
  text-decoration: none; color: var(--ink-2);
  border-bottom: 1px solid var(--line);
  font-size: .94rem;
  transition: color .15s, padding-left .15s;
}
.index a:first-child { border-top: 1px solid var(--line); }
.index a:hover { color: var(--cobalt); padding-left: 6px; }
.index .rn {
  font-family: "IBM Plex Mono", monospace; font-size: .7rem;
  color: var(--faint); min-width: 26px; letter-spacing: .05em;
}

/* founder placard (also the streak badge) */
.placard {
  display: flex; gap: 14px; align-items: flex-start;
  margin-top: 30px; padding-top: 22px;
  border-top: 1px solid var(--line);
}
.stamp {
  flex: none;
  width: 50px; height: 50px;
  display: grid; place-items: center; text-align: center;
  border: 1.5px solid var(--cobalt); color: var(--cobalt);
  border-radius: 50%;
  font-family: "IBM Plex Mono", monospace; font-size: .56rem; font-weight: 600;
  line-height: 1.15; letter-spacing: .06em;
  transform: rotate(-9deg);
}
.placard-role { font-family: "IBM Plex Mono", monospace; font-size: .6rem; text-transform: uppercase; letter-spacing: .22em; color: var(--faint); }
.placard-name { font-family: "Playfair Display", serif; font-weight: 700; font-size: 1.05rem; line-height: 1.2; }
.placard-meta { font-size: .74rem; color: var(--faint); }
.placard-streak { margin-top: 6px; font-family: "IBM Plex Mono", monospace; font-size: .72rem; color: var(--ink-2); }
.placard-streak .flame, .placard-streak span { color: var(--cobalt); font-weight: 600; }

/* ---------------- RIGHT HALL ---------------- */
.hall {
  margin-left: var(--rail-w);
  padding: 56px 64px 80px;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.hall > * { width: 100%; max-width: 880px; }

/* masthead */
.masthead { padding-bottom: 30px; border-bottom: 2px solid var(--ink); margin-bottom: 8px; }
.mast-row {
  display: flex; justify-content: space-between; align-items: center;
  font-family: "IBM Plex Mono", monospace; font-size: .68rem;
  text-transform: uppercase; letter-spacing: .2em; color: var(--faint);
  padding-bottom: 22px;
}
.masthead h1 {
  font-family: "Playfair Display", serif; font-weight: 900;
  font-size: clamp(2.8rem, 6vw, 4.6rem); line-height: .98; letter-spacing: -.02em;
}
.masthead h1 em { color: var(--cobalt); }
.mast-sub { margin-top: 22px; max-width: 56ch; font-size: 1.08rem; color: var(--ink-2); }

/* exhibit shell */
.exhibit { padding: 52px 0; border-bottom: 1px solid var(--line); }
.ex-head { display: flex; align-items: center; gap: 18px; margin-bottom: 22px; }
.ex-no {
  font-family: "IBM Plex Mono", monospace; font-size: .8rem; font-weight: 600;
  color: var(--paper); background: var(--ink);
  width: 30px; height: 30px; display: grid; place-items: center; flex: none;
}
.ex-head h2 {
  font-family: "Playfair Display", serif; font-weight: 700;
  font-size: clamp(1.7rem, 3.4vw, 2.4rem); letter-spacing: -.01em; flex: 1;
}
.ex-lede { font-size: 1.05rem; color: var(--ink-2); max-width: 60ch; margin-bottom: 30px; }

/* buttons */
.solid {
  font-family: "Work Sans", sans-serif; font-weight: 600; font-size: .95rem;
  color: var(--paper); background: var(--ink);
  border: none; cursor: pointer;
  padding: 13px 22px;
  box-shadow: 4px 4px 0 var(--cobalt);
  transition: transform .12s, box-shadow .12s;
}
.solid:hover { transform: translate(-1px,-1px); box-shadow: 5px 5px 0 var(--cobalt); }
.solid:active { transform: translate(2px,2px); box-shadow: 1px 1px 0 var(--cobalt); }
.solid:disabled { opacity: .5; cursor: not-allowed; box-shadow: 4px 4px 0 var(--line-2); }
.ghost {
  background: none; border: 1px solid var(--line-2); color: var(--ink-2);
  font-family: "IBM Plex Mono", monospace; font-size: .72rem;
  text-transform: uppercase; letter-spacing: .12em;
  padding: 8px 14px; cursor: pointer; transition: border-color .15s, color .15s;
}
.ghost:hover { border-color: var(--cobalt); color: var(--cobalt); }

/* ===== I — the piece ===== */
.piece { display: grid; grid-template-columns: 1fr 1fr; gap: 36px; align-items: start; }
.artwork { margin: 0; }
.img-shell {
  position: relative; aspect-ratio: 1/1; width: 100%;
  background: #e4ddcd; border: 1px solid var(--line-2);
  /* matte / frame effect */
  padding: 14px;
  box-shadow: 0 2px 0 var(--line-2), 0 24px 50px -28px rgba(28,26,22,.55);
  display: grid; place-items: center; overflow: hidden;
}
.img-shell img { width: 100%; height: 100%; object-fit: cover; display: none; }
.img-shell img.ready { display: block; animation: fade .5s ease; }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
.loader { display: grid; place-items: center; gap: 12px; color: var(--faint); }
.loader span { display: none; }
.loader::before {
  content: ""; width: 34px; height: 34px; border-radius: 50%;
  border: 2px solid var(--line-2); border-top-color: var(--cobalt);
  animation: spin .8s linear infinite;
}
.loader p { font-family: "IBM Plex Mono", monospace; font-size: .76rem; }
@keyframes spin { to { transform: rotate(360deg); } }
.frame-cap {
  text-align: center; margin-top: 12px;
  font-family: "Playfair Display", serif; font-style: italic;
  font-size: .9rem; color: var(--faint);
}

/* wall label */
.label { padding-top: 4px; }
.label-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.puzzle-no { font-family: "IBM Plex Mono", monospace; font-weight: 600; font-size: .9rem; }
.chip {
  font-family: "IBM Plex Mono", monospace; font-size: .62rem; font-weight: 600;
  text-transform: uppercase; letter-spacing: .12em;
  padding: 4px 9px; border: 1px solid var(--cobalt); color: var(--cobalt);
}
.label-q { font-family: "Playfair Display", serif; font-size: 1.32rem; font-weight: 700; margin: 16px 0 8px; line-height: 1.25; }
.label-note { font-size: .9rem; color: var(--ink-2); margin-bottom: 18px; }

.tiles { display: flex; gap: 7px; margin-bottom: 16px; min-height: 34px; }
.tile {
  width: 34px; height: 34px; border: 1px solid var(--line-2);
  background: var(--paper-2); display: grid; place-items: center; font-size: 1rem;
}
.tile.filled { animation: drop .35s ease; }
@keyframes drop { from { transform: translateY(-6px); opacity: 0; } to { transform: none; opacity: 1; } }

.guess-row { display: flex; gap: 9px; }
#guessInput {
  flex: 1; background: var(--paper); border: 1px solid var(--line-2);
  color: var(--ink); padding: 13px 14px; font-size: .98rem; font-family: inherit;
}
#guessInput:focus { outline: none; border-color: var(--cobalt); box-shadow: 0 0 0 3px rgba(40,64,154,.14); }

.feedback { min-height: 22px; margin-top: 14px; font-size: .92rem; color: var(--ink-2); font-family: "IBM Plex Mono", monospace; }
.feedback.warm { color: var(--amber); }
.feedback.cold { color: var(--cobalt); }
.feedback.hot  { color: var(--green); font-weight: 600; }

/* result */
.result { margin-top: 22px; border-top: 1px solid var(--line); padding-top: 20px; }
.result-top { display: flex; align-items: center; gap: 13px; margin-bottom: 16px; }
.result-emoji { font-size: 2rem; }
.result-title { font-family: "Playfair Display", serif; font-weight: 700; font-size: 1.3rem; }
.result-score { color: var(--faint); font-family: "IBM Plex Mono", monospace; font-size: .82rem; }
.reveal { background: var(--paper-2); border: 1px solid var(--line); padding: 13px 15px; margin-bottom: 14px; }
.reveal-label { font-family: "IBM Plex Mono", monospace; text-transform: uppercase; letter-spacing: .16em; font-size: .62rem; color: var(--faint); }
.reveal-text { margin-top: 5px; font-family: "Playfair Display", serif; font-style: italic; font-size: 1.06rem; }
.grid-share { font-family: "IBM Plex Mono", monospace; font-size: 1.4rem; letter-spacing: 3px; margin-bottom: 12px; }
.global { color: var(--ink-2); font-size: .82rem; font-family: "IBM Plex Mono", monospace; margin-bottom: 16px; min-height: 18px; }
.result-actions { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.next { font-family: "IBM Plex Mono", monospace; font-size: .78rem; color: var(--faint); }

/* how-to */
.how { margin-top: 30px; background: var(--paper-2); border: 1px solid var(--line); padding: 22px 26px; }
.how h3 { font-family: "Playfair Display", serif; font-size: 1.2rem; margin-bottom: 12px; }
.how ol { padding-left: 20px; color: var(--ink-2); display: grid; gap: 7px; font-size: .94rem; }
.how li b { color: var(--ink); }

/* newsletter */
.remind { padding: 30px 0 0; }
.remind-inner {
  display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap;
  background: var(--ink); color: var(--paper); padding: 26px 30px;
}
.remind h2 { font-family: "Playfair Display", serif; font-weight: 700; font-size: 1.4rem; }
.remind p { color: #c9c3b4; font-size: .92rem; margin-top: 4px; }
.remind-form { display: flex; gap: 9px; }
#subEmail { background: var(--paper); border: 1px solid var(--ink); color: var(--ink); padding: 12px 14px; font-size: .94rem; font-family: inherit; min-width: 210px; }
#subEmail:focus { outline: none; box-shadow: 0 0 0 3px rgba(243,239,230,.25); }
.remind .solid { box-shadow: 4px 4px 0 var(--cobalt); }
.sub-msg { margin-top: 12px; font-size: .88rem; color: var(--green); min-height: 18px; font-family: "IBM Plex Mono", monospace; }
.sub-msg.err { color: #b4452f; }

/* ===== II — method steps ===== */
.steps { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); }
.step { background: var(--paper); padding: 26px 24px; }
.step-rn { font-family: "IBM Plex Mono", monospace; font-size: .8rem; color: var(--cobalt); font-weight: 600; }
.step h3 { font-family: "Playfair Display", serif; font-weight: 700; font-size: 1.3rem; margin: 10px 0 8px; }
.step p { color: var(--ink-2); font-size: .94rem; }

/* ===== III — why ===== */
.why-grid { display: grid; grid-template-columns: 1.1fr 1fr; gap: 40px; align-items: start; }
.why-statement { font-family: "Playfair Display", serif; font-size: 1.5rem; line-height: 1.4; font-weight: 500; }
.why-statement em { color: var(--cobalt); font-style: italic; }
.why-list { list-style: none; display: grid; gap: 16px; }
.why-list li { padding-left: 20px; position: relative; color: var(--ink-2); font-size: .96rem; }
.why-list li::before { content: "—"; position: absolute; left: 0; color: var(--cobalt); }
.why-list b { color: var(--ink); }

/* ===== IV — cards ===== */
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.card { border: 1px solid var(--line-2); padding: 24px 22px; background: var(--paper); position: relative; }
.card-idx {
  font-family: "Playfair Display", serif; font-weight: 900; font-size: 1.1rem;
  color: var(--cobalt); border: 1.5px solid var(--cobalt); width: 34px; height: 34px;
  display: grid; place-items: center; border-radius: 50%; margin-bottom: 14px;
}
.card h3 { font-family: "Playfair Display", serif; font-weight: 700; font-size: 1.25rem; margin-bottom: 8px; }
.card p { color: var(--ink-2); font-size: .92rem; }

/* ===== V — tiers ===== */
.tiers { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; align-items: start; }
.tier { border: 1px solid var(--line-2); background: var(--paper); padding: 28px 24px; position: relative; }
.tier.feat { border: 1.5px solid var(--ink); box-shadow: 6px 6px 0 var(--cobalt); }
.tier-flag {
  position: absolute; top: -11px; left: 24px;
  background: var(--cobalt); color: var(--paper);
  font-family: "IBM Plex Mono", monospace; font-size: .6rem; text-transform: uppercase; letter-spacing: .14em;
  padding: 4px 10px;
}
.tier-name { font-family: "IBM Plex Mono", monospace; font-size: .72rem; text-transform: uppercase; letter-spacing: .2em; color: var(--faint); }
.tier-price { font-family: "Playfair Display", serif; font-weight: 900; font-size: 2.6rem; line-height: 1; margin: 8px 0 2px; }
.tier-price span { font-family: "Work Sans", sans-serif; font-weight: 500; font-size: .9rem; color: var(--faint); }
.tier-fine { font-size: .82rem; color: var(--faint); margin-bottom: 18px; }
.tier ul { list-style: none; display: grid; gap: 9px; margin-bottom: 22px; }
.tier li { font-size: .9rem; color: var(--ink-2); padding-left: 18px; position: relative; }
.tier li::before { content: "·"; position: absolute; left: 4px; color: var(--cobalt); font-weight: 700; }
.tier-cta { display: block; text-align: center; text-decoration: none; }
a.solid.tier-cta { color: var(--paper); }
.ghost-cta {
  border: 1px solid var(--line-2); color: var(--ink-2);
  padding: 12px; font-family: "IBM Plex Mono", monospace; font-size: .76rem;
  text-transform: uppercase; letter-spacing: .1em;
}
a.ghost-cta:hover { border-color: var(--cobalt); color: var(--cobalt); }

/* ===== VI — about ===== */
.about { max-width: 64ch; }
.about-body { font-size: 1.06rem; color: var(--ink-2); margin-bottom: 18px; }
.dropcap {
  float: left; font-family: "Playfair Display", serif; font-weight: 900;
  font-size: 3.4rem; line-height: .8; padding: 6px 10px 0 0; color: var(--cobalt);
}
.signature { margin-top: 26px; padding-top: 22px; border-top: 1px solid var(--line); }
.sig-name { font-family: "Playfair Display", serif; font-style: italic; font-weight: 700; font-size: 1.6rem; }
.sig-role { font-size: .85rem; color: var(--faint); margin-top: 2px; }
.sig-mail { display: inline-block; margin-top: 8px; color: var(--cobalt); text-decoration: none; font-family: "IBM Plex Mono", monospace; font-size: .82rem; }
.sig-mail:hover { text-decoration: underline; }

/* ===== VII — faq ===== */
.faq { display: grid; gap: 0; border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary {
  cursor: pointer; list-style: none; padding: 18px 0;
  font-family: "Playfair Display", serif; font-weight: 700; font-size: 1.12rem;
  display: flex; justify-content: space-between; align-items: center;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--cobalt); font-family: "Work Sans", sans-serif; font-weight: 500; font-size: 1.4rem; }
.faq details[open] summary::after { content: "–"; }
.faq details p { padding: 0 0 20px; color: var(--ink-2); font-size: .96rem; max-width: 64ch; }

/* footer */
.foot { padding-top: 50px; }
.foot-cols { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 30px; padding-bottom: 34px; border-bottom: 1px solid var(--line); }
.foot-brand .ident-mark { width: 40px; height: 40px; font-size: .95rem; margin-bottom: 12px; }
.foot-name { font-family: "Playfair Display", serif; font-weight: 700; font-size: 1.2rem; }
.foot-tag { color: var(--faint); font-size: .85rem; }
.foot-h { font-family: "IBM Plex Mono", monospace; font-size: .66rem; text-transform: uppercase; letter-spacing: .18em; color: var(--faint); margin-bottom: 12px; }
.foot-col a { display: block; color: var(--ink-2); text-decoration: none; font-size: .9rem; padding: 4px 0; }
.foot-col a:hover { color: var(--cobalt); }
.foot-fine { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding-top: 22px; font-size: .8rem; color: var(--faint); }
.foot-fine a { color: var(--cobalt); text-decoration: none; font-family: "IBM Plex Mono", monospace; }

/* legal docs */
.doc { max-width: 720px; margin: 0 auto; padding: 64px 28px 90px; }
.doc-back { font-family: "IBM Plex Mono", monospace; font-size: .78rem; color: var(--cobalt); text-decoration: none; }
.doc-back:hover { text-decoration: underline; }
.doc-kicker { margin-top: 30px; font-family: "IBM Plex Mono", monospace; font-size: .66rem; text-transform: uppercase; letter-spacing: .24em; color: var(--faint); }
.doc h1 { font-family: "Playfair Display", serif; font-weight: 900; font-size: clamp(2.2rem, 5vw, 3rem); margin: 8px 0 4px; letter-spacing: -.01em; }
.doc-date { color: var(--faint); font-family: "IBM Plex Mono", monospace; font-size: .8rem; margin-bottom: 26px; padding-bottom: 22px; border-bottom: 2px solid var(--ink); }
.doc h2 { font-family: "Playfair Display", serif; font-weight: 700; font-size: 1.4rem; margin: 30px 0 10px; }
.doc p, .doc li { color: var(--ink-2); margin-bottom: 12px; }
.doc ul { padding-left: 22px; }
.doc a { color: var(--cobalt); }
.doc-sig { margin-top: 40px; padding-top: 22px; border-top: 1px solid var(--line); font-family: "Playfair Display", serif; font-style: italic; color: var(--faint); }

/* toast */
.toast {
  position: fixed; left: 50%; bottom: 28px; transform: translateX(-50%) translateY(20px);
  background: var(--ink); color: var(--paper); font-weight: 500; font-size: .9rem;
  padding: 12px 20px; opacity: 0; pointer-events: none;
  box-shadow: 4px 4px 0 var(--cobalt);
  transition: opacity .2s, transform .2s; z-index: 50;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ---------------- RESPONSIVE ---------------- */
@media (max-width: 1080px) {
  .rail {
    position: static; width: auto; flex-direction: row; align-items: center;
    justify-content: space-between; padding: 20px 28px; border-right: none; border-bottom: 1px solid var(--line);
    flex-wrap: wrap; gap: 16px;
  }
  .rail-top { display: flex; align-items: center; gap: 28px; flex-wrap: wrap; }
  .ident-mark { margin-bottom: 0; }
  .ident-name { display: inline; font-size: 1.3rem; }
  .ident-sub, .rail-lede { display: none; }
  .index { flex-direction: row; flex-wrap: wrap; gap: 4px 18px; }
  .index a { border: none !important; padding: 2px 0; }
  .index a:hover { padding-left: 0; }
  .index span:not(.rn) { font-size: .85rem; }
  .placard { margin: 0; padding: 0; border: none; }
  .hall { margin-left: 0; padding: 36px 36px 70px; max-width: 100%; }
}

@media (max-width: 760px) {
  .hall { padding: 28px 22px 60px; }
  .piece { grid-template-columns: 1fr; gap: 26px; }
  .steps, .cards, .tiers, .why-grid, .foot-cols { grid-template-columns: 1fr; }
  .index { display: none; }
  .rail-top { gap: 16px; }
  .masthead h1 { font-size: clamp(2.4rem, 11vw, 3.2rem); }
  .remind-inner { flex-direction: column; align-items: stretch; }
  .remind-form { flex-direction: column; }
  #subEmail { min-width: 0; }
  .foot-fine { flex-direction: column; gap: 8px; }
}
