/* Cafe-Vibes app preview - phone-width cream / ink */

@font-face {
  font-family: "Syne";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("/fonts/syne-latin-700-normal.woff2") format("woff2");
}
@font-face {
  font-family: "IBM Plex Sans";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/fonts/ibm-plex-sans-latin-400-normal.woff2") format("woff2");
}
@font-face {
  font-family: "IBM Plex Sans";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("/fonts/ibm-plex-sans-latin-500-normal.woff2") format("woff2");
}
@font-face {
  font-family: "IBM Plex Sans";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("/fonts/ibm-plex-sans-latin-600-normal.woff2") format("woff2");
}

:root {
  --paper: #f4efe6;
  --paper-2: #efe9dd;
  --field: #fcfaf6;
  --ink: #151411;
  --mute: #635d54;
  --rule: #d5cec1;
  --signal: #c8471c;
  --ok: #2f5d3a;
  --sans: "IBM Plex Sans", "Segoe UI", Helvetica, Arial, sans-serif;
  --display: "Syne", "Avenir Next", "Segoe UI", sans-serif;
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
  --phone-w: 390px;
  --phone-h: 844px;
}

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

html { -webkit-text-size-adjust: 100%; }

body {
  min-height: 100dvh;
  font-family: var(--sans);
  background: #e7e0d4;
  color: var(--ink);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  padding: 1rem;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; }

button, input { font: inherit; color: inherit; }
button { border: 0; background: none; cursor: pointer; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }

.phone {
  position: relative;
  width: min(100%, var(--phone-w));
  height: min(92dvh, var(--phone-h));
  background: var(--paper);
  border: 1px solid var(--rule);
  border-radius: 28px;
  overflow: hidden;
  box-shadow: 0 24px 60px rgba(21, 20, 17, 0.12);
  display: flex;
  flex-direction: column;
}

.chrome {
  flex: 0 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.55rem 1.25rem 0.25rem;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--mute);
}

.screen {
  display: none;
  flex: 1;
  flex-direction: column;
  min-height: 0;
}
.screen.active { display: flex; }

.bar {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  min-height: 48px;
  padding: 0 1rem;
  border-bottom: 1px solid var(--rule);
  background: color-mix(in srgb, var(--paper) 92%, transparent);
}
.bar-title, .bar-brand {
  font-family: var(--display);
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: -0.02em;
}
.back, .linkish {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--mute);
  min-width: 44px;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
}
.linkish { justify-content: flex-end; }

.screen-body {
  flex: 1;
  padding: 1.25rem 1.35rem 1.75rem;
  overflow: auto;
}
.screen-body.scroll { overflow: auto; }
.screen-body.center {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: stretch;
  text-align: left;
  gap: 0.75rem;
}

.splash-body {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0.85rem;
  padding-top: 2rem;
}
.mark { width: 44px; height: 44px; margin-bottom: 0.5rem; color: var(--ink); }
.mark path { fill: none; stroke: currentColor; }

.eyebrow {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--mute);
}
.eyebrow.signal { color: var(--signal); }

h1, h2, h3 {
  font-family: var(--display);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.15;
}
h1 { font-size: 2.1rem; }
h2 { font-size: 1.55rem; margin-bottom: 0.35rem; }
h3 { font-size: 1.15rem; }

.lede {
  color: var(--mute);
  font-size: 1rem;
  line-height: 1.55;
  max-width: 34ch;
}
.lede.tight { margin-bottom: 1rem; }

.meta {
  font-size: 0.85rem;
  color: var(--mute);
  margin: 0.5rem 0 1rem;
}

.stack { display: grid; gap: 0.65rem; margin-top: 1.25rem; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 0 1.25rem;
  background: var(--ink);
  color: var(--paper);
  border: 1px solid var(--ink);
  border-radius: 4px;
  font-weight: 600;
  font-size: 1rem;
  text-decoration: none;
  transition: background 0.2s var(--ease), color 0.2s var(--ease), opacity 0.2s;
}
.btn:hover { background: #2a2824; }
.btn:disabled { opacity: 0.55; cursor: default; }
.btn.wide { width: 100%; }
.btn.ghost {
  background: transparent;
  color: var(--ink);
  border-color: var(--rule);
}
.btn.ghost:hover { background: var(--paper-2); }

.form { display: grid; gap: 1rem; margin-top: 0.5rem; }
.field { display: grid; gap: 0.45rem; }
.field label, .field legend, .axes-label {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--ink);
}
.field small { color: var(--mute); font-weight: 400; }

input[type="email"],
input[type="password"],
input[type="text"] {
  width: 100%;
  min-height: 48px;
  padding: 0.7rem 0.85rem;
  background: var(--field);
  border: 1px solid var(--rule);
  border-radius: 4px;
}
input:focus { outline: 2px solid var(--ink); outline-offset: 1px; border-color: var(--ink); }

.chips, .cafes {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.chip, .cafe {
  position: relative;
  cursor: pointer;
}
.chip input, .cafe input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.chip span, .cafe span {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 0.9rem;
  border: 1px solid var(--rule);
  border-radius: 999px;
  background: var(--field);
  font-size: 0.9rem;
}
.cafe { width: 100%; }
.cafe span {
  width: 100%;
  border-radius: 4px;
  padding: 0.75rem 0.9rem;
}
.chip:has(input:checked) span,
.cafe:has(input:checked) span {
  border-color: var(--ink);
  background: var(--ink);
  color: var(--paper);
}
.chip:has(input:focus-visible) span,
.cafe:has(input:focus-visible) span {
  outline: 2px solid var(--ink);
  outline-offset: 2px;
}

.axes {
  display: grid;
  gap: 0.85rem;
  padding: 1rem;
  background: var(--paper-2);
  border: 1px solid var(--rule);
  border-radius: 6px;
}
.axis {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.35rem 0.75rem;
  align-items: center;
  font-size: 0.9rem;
}
.axis input[type="range"] {
  grid-column: 1 / -1;
  width: 100%;
  accent-color: var(--ink);
}
.axis span[data-val] {
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  color: var(--mute);
}

.helper {
  font-size: 0.8rem;
  color: var(--mute);
  line-height: 1.45;
}
.proto-note {
  margin-top: 1.5rem;
  font-size: 0.75rem;
  color: var(--mute);
  letter-spacing: 0.02em;
}
.proto-note.tight { margin-top: 1rem; }
.proto-note a {
  color: var(--ink);
  text-decoration: underline;
  text-underline-offset: 2px;
}
.proto-note a:hover { color: var(--signal); }

.pulse {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--signal);
  margin-bottom: 0.75rem;
  box-shadow: 0 0 0 0 rgba(200, 71, 28, 0.45);
  animation: ping 1.8s var(--ease) infinite;
}
@keyframes ping {
  0% { box-shadow: 0 0 0 0 rgba(200, 71, 28, 0.4); }
  70% { box-shadow: 0 0 0 14px rgba(200, 71, 28, 0); }
  100% { box-shadow: 0 0 0 0 rgba(200, 71, 28, 0); }
}

.match-card {
  display: flex;
  gap: 0.9rem;
  padding: 1rem;
  margin: 0.75rem 0 1.25rem;
  border: 1px solid var(--rule);
  border-radius: 8px;
  background: var(--field);
}
.match-avatar {
  flex: 0 0 auto;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--ink);
  color: var(--paper);
  display: grid;
  place-items: center;
  font-family: var(--display);
  font-weight: 700;
  font-size: 1.2rem;
}
.match-copy p { color: var(--mute); font-size: 0.9rem; margin: 0.2rem 0 0.55rem; }
.match-axes {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}
.match-axes li {
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 0.25rem 0.5rem;
  border: 1px solid var(--rule);
  border-radius: 999px;
  color: var(--mute);
}

.status-row {
  display: grid;
  gap: 0.5rem;
  margin: 0.75rem 0 1rem;
}
.status-pill {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  min-height: 44px;
  padding: 0 0.85rem;
  border: 1px solid var(--rule);
  border-radius: 4px;
  background: var(--field);
  font-size: 0.9rem;
  color: var(--mute);
}
.status-pill.on {
  border-color: var(--ok);
  color: var(--ok);
  background: color-mix(in srgb, var(--ok) 8%, var(--field));
}
.status-pill span { font-size: 0.65rem; }

.timer-display {
  font-size: 4rem;
  letter-spacing: -0.04em;
  font-variant-numeric: tabular-nums;
  margin: 0.5rem 0;
}
.timer-ring {
  height: 6px;
  background: var(--rule);
  border-radius: 999px;
  overflow: hidden;
  margin: 0.5rem 0 1rem;
}
.timer-fill {
  height: 100%;
  width: 100%;
  background: var(--signal);
  transform-origin: left center;
  transition: transform 0.2s linear;
}

.decision-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
  margin: 1.25rem 0 0.75rem;
}
.btn.decide { min-height: 64px; font-size: 1.15rem; }
.btn.decide.no {
  background: transparent;
  color: var(--ink);
  border-color: var(--rule);
}
.btn.decide.yes {
  background: var(--ink);
  color: var(--paper);
}

.desk-hint {
  font-size: 0.8rem;
  color: var(--mute);
}
.desk-hint a { text-decoration: underline; text-underline-offset: 2px; }

@media (max-width: 480px) {
  body {
    padding: 0;
    background: var(--paper);
    justify-content: flex-start;
  }
  .phone {
    width: 100%;
    height: 100dvh;
    border: 0;
    border-radius: 0;
    box-shadow: none;
  }
  .desk-hint { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .pulse { animation: none; }
  .btn, .timer-fill { transition: none; }
}

/* --- invite-only honesty gate (v0.5a) --- */
.gate-banner {
  flex: 0 0 auto;
  display: grid;
  gap: 0.2rem;
  padding: 0.55rem 1.1rem 0.65rem;
  background: color-mix(in srgb, var(--signal) 12%, var(--paper));
  border-bottom: 1px solid color-mix(in srgb, var(--signal) 35%, var(--rule));
  font-size: 0.72rem;
  line-height: 1.35;
  color: var(--ink);
}
.gate-banner strong {
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--signal);
}
.gate-banner span { color: var(--mute); }

.demo-pill {
  display: inline-flex;
  align-items: center;
  align-self: flex-start;
  gap: 0.35rem;
  margin-bottom: 0.35rem;
  padding: 0.28rem 0.65rem;
  border: 1px solid color-mix(in srgb, var(--signal) 40%, var(--rule));
  border-radius: 999px;
  background: color-mix(in srgb, var(--signal) 10%, var(--field));
  color: var(--signal);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.helper.honesty {
  margin-top: 0.25rem;
  max-width: 36ch;
}

.hp {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

#invite-status.ok { color: var(--ok); }
#invite-status.err { color: var(--signal); }

.linkish.inline {
  display: inline;
  min-width: 0;
  min-height: 0;
  padding: 0;
  color: var(--ink);
  text-decoration: underline;
  text-underline-offset: 2px;
  font-size: inherit;
  font-weight: 500;
}
.linkish.inline:hover { color: var(--signal); }

.phone { position: relative; }


/* subtle Add to Home Screen tip on invite/demo gate */
.a2hs-hint {
  margin: 0.85rem auto 0;
  max-width: 34ch;
  font-size: 0.78rem;
  line-height: 1.4;
  color: var(--mute);
  text-align: center;
}
.a2hs-hint[hidden] { display: none; }
