/* ============================================================
   Mai Solsona · Workspace — portal styles
   ============================================================ */
:root {
  --paper:   #f0eee9;
  --paper-2: #f5f3ee;
  --ink:     #1a1a1a;
  --ink-bar: #161512;
  --soft:    #6b6862;
  --faint:   #a29c92;
  --acc:     #c44a2f;
  --acc-dk:  #a03c25;
  --line:    rgba(0,0,0,.14);
  --note:    #ffe6a1;
  --serif: 'Cormorant Garamond', Georgia, serif;
  --sans:  'Space Grotesk', -apple-system, BlinkMacSystemFont, sans-serif;
  --mono:  ui-monospace, Menlo, Consolas, monospace;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html, body { height: 100%; }
body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow: hidden;
}
a { color: var(--acc); text-decoration: none; }
a:hover { color: var(--acc-dk); }
textarea::placeholder, input::placeholder { color: var(--faint); }
[hidden] { display: none !important; }

.eyebrow {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--soft);
}
.eyebrow.acc { color: var(--acc); }

/* ===================== PASSWORD GATE ===================== */
.gate {
  position: fixed; inset: 0; z-index: 1000;
  background: var(--ink-bar);
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
}
.gate-card {
  width: 380px; max-width: 88vw;
  background: var(--paper);
  border-radius: 12px;
  padding: 42px 36px;
  text-align: center;
  box-shadow: 0 40px 100px -30px rgba(0,0,0,.7);
  animation: rise .5s cubic-bezier(.2,.7,.2,1);
}
@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
.gate .eyebrow { color: var(--acc); margin-bottom: 14px; }
.gate-title {
  font-family: var(--serif); font-weight: 300; font-size: 40px; line-height: 1;
  color: var(--ink); margin-bottom: 12px;
}
.gate-sub { font-size: 13px; line-height: 1.6; color: var(--soft); margin-bottom: 22px; }
.gate input {
  width: 100%; padding: 13px 15px;
  border: 1px solid rgba(0,0,0,.2); border-radius: 6px;
  background: #fff; font-family: var(--sans); font-size: 14px; color: var(--ink);
  outline: none; text-align: center; letter-spacing: .05em;
  transition: border-color .15s, box-shadow .15s;
}
.gate input:focus { border-color: var(--acc); box-shadow: 0 0 0 3px rgba(196,74,47,.15); }
.gate-err { color: var(--acc); font-size: 12px; margin-top: 10px; }
.gate-btn {
  width: 100%; margin-top: 18px;
  background: var(--acc); color: #fff; border: 0;
  padding: 14px; border-radius: 6px; cursor: pointer;
  font-family: var(--sans); font-size: 12px; letter-spacing: .08em; text-transform: uppercase;
  transition: background .15s, transform .06s;
}
.gate-btn:hover { background: var(--acc-dk); }
.gate-btn:active { transform: translateY(1px); }

/* ===================== APP SHELL ===================== */
.app { height: 100%; display: flex; flex-direction: column; }

.topbar {
  flex: none;
  display: flex; align-items: center; gap: 20px;
  padding: 0 24px; height: 62px;
  background: var(--ink-bar);
  position: relative; z-index: 40;
}
.brand { display: flex; align-items: baseline; gap: 10px; }
.brand-name { font-family: var(--serif); font-size: 22px; color: var(--paper); font-weight: 400; }
.brand-tag { font-family: var(--mono); font-size: 9px; letter-spacing: .2em; text-transform: uppercase; color: #8a8478; }

.tabs { flex: 1; display: flex; justify-content: center; gap: 6px; }
.tab {
  border: 0; background: transparent; cursor: pointer;
  font-family: var(--sans); font-size: 12.5px; letter-spacing: .02em;
  padding: 9px 18px; border-radius: 30px; color: #c9c3b6;
  transition: color .15s, background .15s;
}
.tab:hover { color: var(--paper); }
.tab.active { color: var(--ink-bar); background: var(--paper); }

.save-badge {
  min-width: 150px; text-align: right;
  font-size: 11px; color: #8a8478; opacity: 0; transition: opacity .3s;
}
.save-badge.show { opacity: 1; }

.content { flex: 1; position: relative; overflow: hidden; }

/* only the active panel shows */
.tab-panel { position: absolute; inset: 0; display: none; }
.tab-panel.active { display: flex; flex-direction: column; }
#tab-inspo.active, #tab-offer.active { display: block; overflow: auto; }

/* ===================== MAP TAB ===================== */
.map-intro { flex: none; padding: 26px 40px 18px; max-width: 900px; }
.map-h1 {
  font-family: var(--serif); font-weight: 300; font-size: 38px; line-height: 1.02;
  color: var(--ink); margin: 10px 0 10px;
}
.map-lead { font-size: 14px; line-height: 1.7; color: var(--soft); max-width: 640px; }
.map-lead b { color: var(--ink); font-weight: 500; }

.viewport {
  flex: 1; position: relative; overflow: hidden;
  background:
    radial-gradient(circle at 1px 1px, rgba(0,0,0,.05) 1px, transparent 0) 0 0 / 26px 26px,
    var(--paper-2);
  cursor: grab;
  touch-action: none;
  /* the map is a canvas you drag around — don't let clicks select its text */
  user-select: none;
  -webkit-user-select: none;
}
.viewport.grabbing { cursor: grabbing; }
/* …but sticky notes stay fully editable/selectable */
.note, .note textarea { user-select: text; -webkit-user-select: text; }

.stage {
  position: absolute; top: 0; left: 0;
  transform-origin: 0 0;
  transform: translate(0px, 0px) scale(1);
}
.map-mount { position: relative; }
.map-loading { padding: 60px; font-size: 14px; color: var(--faint); }

.note-layer { position: absolute; top: 0; left: 0; width: 0; height: 0; }

/* sticky notes */
.note {
  position: absolute; width: 214px;
  background: var(--note); border-radius: 3px;
  box-shadow: 0 10px 26px -8px rgba(0,0,0,.45);
}
.note-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 6px 9px; cursor: grab;
  background: rgba(122,106,47,.16); border-radius: 3px 3px 0 0;
}
.note-head:active { cursor: grabbing; }
.note-tag { font-family: var(--mono); font-weight: 600; font-size: 9px; letter-spacing: .14em; color: #7a6a2f; }
.note-del { cursor: pointer; color: #8a7434; font-size: 15px; line-height: 1; padding: 0 3px; user-select: none; }
.note-del:hover { color: var(--acc); }
.note textarea {
  width: 100%; border: 0; background: transparent; resize: none;
  min-height: 82px; padding: 9px 11px 11px;
  font-family: var(--sans); font-size: 12.5px; line-height: 1.5; color: #453c18; outline: none;
}

/* zoom bar */
.zoom-bar {
  position: absolute; right: 20px; bottom: 20px; z-index: 20;
  display: flex; align-items: center; gap: 2px;
  background: var(--ink-bar); border-radius: 10px; padding: 5px;
  box-shadow: 0 10px 30px rgba(0,0,0,.34);
}
.zoom-btn, .zoom-val {
  border: 0; background: transparent; color: var(--paper);
  cursor: pointer; border-radius: 7px; font-family: var(--sans);
  display: flex; align-items: center; justify-content: center;
  transition: background .12s;
}
.zoom-btn { min-width: 34px; height: 34px; font-size: 18px; }
.zoom-val { min-width: 52px; height: 34px; font-size: 12px; letter-spacing: .03em; }
.zoom-btn:hover, .zoom-val:hover { background: rgba(255,255,255,.12); }
.zoom-sep { width: 1px; height: 20px; background: rgba(255,255,255,.18); margin: 0 3px; }

/* add-note button */
.add-note {
  position: absolute; left: 22px; bottom: 22px; z-index: 20;
  display: inline-flex; align-items: center; gap: 9px;
  background: var(--acc); color: #fff; border: 0;
  padding: 12px 20px; border-radius: 30px; cursor: pointer;
  font-family: var(--sans); font-size: 12px; letter-spacing: .03em;
  box-shadow: 0 12px 30px -6px rgba(196,74,47,.6);
  transition: background .15s, transform .06s;
}
.add-note:hover { background: var(--acc-dk); }
.add-note:active { transform: translateY(1px); }
.add-note-plus { font-size: 15px; }

.pan-hint {
  position: absolute; left: 50%; bottom: 22px; transform: translateX(-50%);
  z-index: 15; pointer-events: none;
  font-family: var(--mono); font-size: 10px; letter-spacing: .08em;
  color: var(--soft); background: rgba(240,238,233,.82);
  padding: 6px 12px; border-radius: 20px; backdrop-filter: blur(4px);
  transition: opacity .5s; white-space: nowrap;
}

/* ===================== INSPIRATION / OFFER PAGES ===================== */
.page { max-width: 880px; margin: 0 auto; padding: 48px 40px 110px; }
.page-narrow { max-width: 820px; }
.page-h1 { font-family: var(--serif); font-weight: 300; font-size: 44px; line-height: 1; color: var(--ink); margin: 12px 0 14px; }
.page-lead { font-size: 14px; line-height: 1.7; color: var(--soft); max-width: 600px; margin-bottom: 40px; }

.q-group { margin-bottom: 38px; }
.q-group-label {
  font-family: var(--mono); font-size: 11px; letter-spacing: .12em; text-transform: uppercase;
  color: var(--acc); margin-bottom: 18px; padding-bottom: 9px; border-bottom: 1px solid var(--line);
}
.q-item { margin-bottom: 20px; }
.q-text { font-size: 13.5px; line-height: 1.5; color: var(--ink); margin-bottom: 8px; }
.q-item textarea, .offer-textarea {
  width: 100%; resize: vertical; border: 1px solid rgba(0,0,0,.16); border-radius: 6px;
  background: #fff; padding: 11px 13px; font-family: var(--sans); font-size: 13.5px; line-height: 1.55; color: var(--ink);
  outline: none; transition: border-color .15s, box-shadow .15s;
}
.q-item textarea { min-height: 58px; }
.q-item textarea:focus, .offer-textarea:focus { border-color: var(--acc); box-shadow: 0 0 0 3px rgba(196,74,47,.12); }

/* uploads */
.upload-slot { margin-bottom: 34px; }
.upload-label { font-family: var(--mono); font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--acc); margin-bottom: 6px; }
.upload-hint { font-size: 12.5px; line-height: 1.55; color: var(--soft); margin-bottom: 14px; max-width: 560px; }
.upload-grid { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-start; }
.thumb { position: relative; width: 130px; height: 130px; border-radius: 6px; overflow: hidden; border: 1px solid var(--line); background: #fff; }
.thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.thumb-del {
  position: absolute; top: 5px; right: 5px; width: 22px; height: 22px; border-radius: 50%;
  background: rgba(22,21,18,.72); color: #fff; font-size: 13px; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
}
.thumb-del:hover { background: var(--acc); }
.upload-add {
  width: 130px; height: 130px; border-radius: 6px; border: 1px dashed rgba(0,0,0,.3);
  background: var(--paper-2); display: flex; flex-direction: column; align-items: center; justify-content: center;
  cursor: pointer; color: var(--faint); gap: 6px; transition: border-color .15s, color .15s;
}
.upload-add:hover { border-color: var(--acc); color: var(--acc); }
.upload-add .plus { font-size: 22px; }
.upload-add .cap { font-size: 10px; letter-spacing: .06em; text-transform: uppercase; }
.upload-add input { display: none; }

/* offer */
.offer-h1 { font-family: var(--serif); font-weight: 300; font-size: 48px; line-height: .98; color: var(--ink); margin-bottom: 16px; }
.rule { height: 1px; background: var(--line); margin: 0 0 30px; }
.offer-head { font-family: var(--serif); font-size: 26px; color: var(--ink); margin: 4px 0 14px; }
.offer-list { list-style: none; display: flex; flex-direction: column; gap: 10px; margin-bottom: 16px; }
.offer-list li { display: flex; gap: 11px; align-items: flex-start; font-size: 14px; line-height: 1.55; color: var(--ink); }
.offer-list .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--acc); margin-top: 7px; flex: none; }
.offer-p { font-size: 14px; line-height: 1.7; color: #4a463f; margin-bottom: 32px; max-width: 640px; }
.offer-p b { color: var(--ink); font-weight: 500; }
.offer-textarea { min-height: 150px; background: var(--paper-2); border: 1px dashed rgba(0,0,0,.28); margin-bottom: 32px; padding: 16px 18px; font-size: 14px; line-height: 1.6; }
.offer-actions { display: flex; gap: 12px; flex-wrap: wrap; }

.btn {
  display: inline-flex; align-items: center; gap: 8px; cursor: pointer;
  padding: 13px 24px; border-radius: 6px; border: 1px solid transparent;
  font-family: var(--sans); font-size: 12px; letter-spacing: .06em; text-transform: uppercase;
  transition: background .15s, transform .06s, color .15s;
}
.btn:active { transform: translateY(1px); }
.btn-dark { background: var(--ink); color: var(--paper); }
.btn-dark:hover { background: #000; }
.btn-outline { background: transparent; color: var(--acc); border-color: var(--acc); }
.btn-outline:hover { background: var(--acc); color: #fff; }

/* ===================== RESPONSIVE ===================== */
@media (max-width: 720px) {
  .topbar { flex-wrap: wrap; height: auto; padding: 10px 16px; gap: 10px; }
  .tabs { order: 3; width: 100%; flex-basis: 100%; }
  .save-badge { min-width: 0; }
  .map-intro { padding: 18px 20px 12px; }
  .map-h1 { font-size: 30px; }
  .page { padding: 32px 20px 90px; }
  .pan-hint { display: none; }
}
