/* ReplyPilot — design system
   Palette: Ink #13202F · Mist #F4F6F8 · Star #F0A132 · Pine #177E62 · Brick #CC4B3D
   Type:    Bricolage Grotesque (display) · Instrument Sans (body)            */

:root {
  --ink: #13202f;
  --ink-soft: #44506033;
  --muted: #5b6878;
  --faint: #8b96a5;
  --mist: #f4f6f8;
  --paper: #ffffff;
  --line: #e3e8ee;
  --star: #f0a132;
  --star-soft: #fdf3e2;
  --pine: #177e62;
  --pine-soft: #e4f3ee;
  --brick: #cc4b3d;
  --brick-soft: #faeae8;
  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 1px 2px rgba(19, 32, 47, 0.05), 0 8px 24px rgba(19, 32, 47, 0.07);
  --font-display: "Bricolage Grotesque", "Instrument Sans", system-ui, sans-serif;
  --font-body: "Instrument Sans", system-ui, -apple-system, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 16.5px;
  line-height: 1.65;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
}
img, svg { display: block; }
a { color: inherit; }
:focus-visible { outline: 2.5px solid var(--star); outline-offset: 2px; border-radius: 4px; }

h1, h2, h3 { font-family: var(--font-display); line-height: 1.12; margin: 0 0 0.5em; letter-spacing: -0.015em; }
h1 { font-size: clamp(2.3rem, 5.4vw, 3.6rem); font-weight: 700; }
h2 { font-size: clamp(1.7rem, 3.4vw, 2.3rem); font-weight: 700; }
h3 { font-size: 1.15rem; font-weight: 600; }
p  { margin: 0 0 1em; }
.muted { color: var(--muted); }
.eyebrow {
  font-size: 0.8rem; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--star); margin-bottom: 0.9rem;
}

.wrap { max-width: 1080px; margin: 0 auto; padding: 0 24px; }

/* ----------------------------------------------------------- buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font: 600 1rem var(--font-body);
  padding: 13px 22px; border-radius: 10px; border: 1.5px solid transparent;
  cursor: pointer; text-decoration: none; transition: transform .08s ease, background .15s ease;
  -webkit-tap-highlight-color: transparent;
}
.btn:active { transform: scale(0.985); }
.btn-primary { background: var(--ink); color: #fff; }
.btn-primary:hover { background: #1d2e42; }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { background: var(--mist); }
.btn-star { background: var(--star); color: #3c2604; }
.btn-star:hover { background: #e2932a; }
.btn-sm { padding: 9px 14px; font-size: 0.92rem; border-radius: 8px; }
.btn[disabled] { opacity: 0.55; cursor: not-allowed; }
.btn-danger { background: transparent; color: var(--brick); border-color: var(--line); }

/* ------------------------------------------------------------ landing */
.nav {
  display: flex; align-items: center; justify-content: space-between;
  padding: 20px 0;
}
.brand { display: flex; align-items: center; gap: 10px; font: 700 1.22rem var(--font-display); text-decoration: none; letter-spacing: -0.01em; }
.brand-mark { width: 30px; height: 30px; border-radius: 9px; background: var(--ink); color: var(--star); display: grid; place-items: center; font-size: 16px; }
.nav-links { display: flex; align-items: center; gap: 26px; font-weight: 500; font-size: 0.97rem; }
.nav-links a { text-decoration: none; color: var(--muted); }
.nav-links a:hover { color: var(--ink); }
@media (max-width: 720px) { .nav-links .hide-m { display: none; } }

.hero { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 56px; align-items: center; padding: 64px 0 88px; }
@media (max-width: 900px) { .hero { grid-template-columns: 1fr; padding: 36px 0 64px; gap: 40px; } }
.hero h1 .u { box-shadow: inset 0 -0.34em var(--star-soft); }
.hero-sub { font-size: 1.16rem; color: var(--muted); max-width: 46ch; }
.hero-ctas { display: flex; flex-wrap: wrap; gap: 12px; margin: 26px 0 14px; }
.hero-note { font-size: 0.9rem; color: var(--faint); }

/* the signature element: a review whose reply writes itself */
.demo-card {
  background: var(--paper); border: 1px solid var(--line); border-radius: 16px;
  box-shadow: var(--shadow); padding: 22px 22px 18px; max-width: 460px; margin-left: auto;
}
@media (max-width: 900px) { .demo-card { margin: 0 auto; } }
.review-head { display: flex; align-items: center; gap: 11px; }
.avatar {
  width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center;
  font-weight: 600; font-size: 0.85rem; flex: none;
  background: var(--brick-soft); color: var(--brick);
}
.avatar.good { background: var(--pine-soft); color: var(--pine); }
.review-meta { line-height: 1.3; }
.review-name { font-weight: 600; font-size: 0.98rem; }
.review-time { font-size: 0.82rem; color: var(--faint); }
.stars { color: var(--star); font-size: 0.95rem; letter-spacing: 2px; white-space: nowrap; }
.stars .off { color: #d9dee5; }
.review-body { margin: 12px 0 0; font-size: 0.98rem; }
.reply-zone { border-top: 1px solid var(--line); margin-top: 16px; padding-top: 14px; }
.reply-label { display: flex; align-items: center; gap: 8px; font-size: 0.82rem; font-weight: 600; color: var(--muted); margin-bottom: 8px; }
.dot { width: 7px; height: 7px; border-radius: 50%; background: var(--star); }
.reply-text { font-size: 0.96rem; min-height: 7.6em; color: var(--ink); }
.caret { display: inline-block; width: 2px; height: 1em; background: var(--star); vertical-align: -2px; animation: blink 0.9s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }
.stamp {
  display: inline-flex; align-items: center; gap: 7px; margin-top: 12px;
  background: var(--pine-soft); color: var(--pine); font-weight: 600; font-size: 0.85rem;
  padding: 6px 12px; border-radius: 999px; opacity: 0; transform: translateY(4px);
  transition: opacity .4s ease, transform .4s ease;
}
.stamp.on { opacity: 1; transform: none; }

.strip { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); background: var(--mist); }
.strip-inner { display: flex; flex-wrap: wrap; gap: 10px 28px; justify-content: center; padding: 18px 0; font-weight: 500; color: var(--muted); font-size: 0.95rem; }

section.block { padding: 88px 0; }
@media (max-width: 720px) { section.block { padding: 60px 0; } }

.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; margin-top: 40px; }
@media (max-width: 820px) { .steps { grid-template-columns: 1fr; } }
.step { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px 24px; }
.step-n { font: 700 0.95rem var(--font-display); color: var(--star); margin-bottom: 10px; }
.step p { margin: 0; color: var(--muted); font-size: 0.98rem; }

.safety { background: var(--ink); color: #eef2f6; border-radius: 20px; padding: 56px 48px; display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 48px; align-items: center; }
@media (max-width: 880px) { .safety { grid-template-columns: 1fr; padding: 40px 28px; } }
.safety h2 { color: #fff; }
.safety p { color: #b9c3cf; }
.notif {
  background: #fff; color: var(--ink); border-radius: 14px; padding: 16px 18px; box-shadow: var(--shadow);
  max-width: 400px;
}
.notif-head { display: flex; justify-content: space-between; font-size: 0.84rem; color: var(--faint); margin-bottom: 8px; }
.notif-title { font-weight: 600; color: var(--ink); }
.notif-body { font-size: 0.94rem; margin: 0 0 12px; }
.notif-actions { display: flex; gap: 8px; }

.why-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; margin-top: 40px; }
@media (max-width: 820px) { .why-grid { grid-template-columns: 1fr; } }
.why { border-top: 3px solid var(--star); padding-top: 18px; }
.why p { color: var(--muted); font-size: 0.98rem; margin: 0; }

.price-card {
  max-width: 480px; margin: 44px auto 0; background: var(--paper); border: 1px solid var(--line);
  border-radius: 18px; box-shadow: var(--shadow); padding: 38px 36px; text-align: left;
}
.price-row { display: flex; align-items: baseline; gap: 8px; }
.price { font: 700 3rem var(--font-display); letter-spacing: -0.02em; }
.price-per { color: var(--muted); }
.tick-list { list-style: none; padding: 0; margin: 22px 0 26px; }
.tick-list li { padding: 7px 0 7px 30px; position: relative; color: var(--ink); }
.tick-list li::before {
  content: ""; position: absolute; left: 0; top: 13px; width: 16px; height: 16px; border-radius: 50%;
  background: var(--pine-soft);
}
.tick-list li::after {
  content: ""; position: absolute; left: 4.5px; top: 16.5px; width: 7px; height: 4.5px;
  border-left: 2px solid var(--pine); border-bottom: 2px solid var(--pine); transform: rotate(-45deg);
}

.faq { max-width: 720px; margin: 40px auto 0; }
.faq details { border-bottom: 1px solid var(--line); padding: 4px 0; }
.faq summary { cursor: pointer; font-weight: 600; padding: 14px 0; list-style: none; display: flex; justify-content: space-between; gap: 16px; }
.faq summary::after { content: "+"; color: var(--star); font: 700 1.2rem var(--font-display); }
.faq details[open] summary::after { content: "–"; }
.faq details p { color: var(--muted); margin: 0 0 16px; }

.footer { border-top: 1px solid var(--line); padding: 36px 0 48px; color: var(--faint); font-size: 0.92rem; }
.footer-inner { display: flex; flex-wrap: wrap; gap: 16px 32px; justify-content: space-between; align-items: center; }
.footer a { color: var(--muted); text-decoration: none; }

.reveal { opacity: 0; transform: translateY(14px); transition: opacity .55s ease, transform .55s ease; }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .caret { animation: none; }
}

/* ---------------------------------------------------------------- app */
body.app { background: var(--mist); }
.topbar { background: var(--paper); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 20; }
.topbar-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 12px 0; }
.tabs { display: flex; gap: 4px; overflow-x: auto; }
.tab {
  padding: 8px 14px; border-radius: 8px; font-weight: 500; font-size: 0.95rem;
  color: var(--muted); text-decoration: none; white-space: nowrap;
}
.tab:hover { background: var(--mist); }
.tab.active { background: var(--ink); color: #fff; }
.main { max-width: 880px; margin: 0 auto; padding: 28px 20px 80px; }

.card { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px 22px; }
.card + .card { margin-top: 14px; }
.metric-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 22px; }
@media (max-width: 720px) { .metric-grid { grid-template-columns: repeat(2, 1fr); } }
.metric { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; }
.metric .label { font-size: 0.82rem; color: var(--muted); margin-bottom: 4px; }
.metric .value { font: 600 1.7rem var(--font-display); letter-spacing: -0.01em; }
.metric .value .warn { color: var(--star); }

.section-title { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 26px 0 12px; }
.section-title h3 { margin: 0; }

.review-item { display: block; text-decoration: none; }
.review-item + .review-item { margin-top: 12px; }
.review-top { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.review-top .stars { font-size: 0.88rem; }
.pill { font-size: 0.78rem; font-weight: 600; padding: 4px 11px; border-radius: 999px; margin-left: auto; white-space: nowrap; }
.pill.pending { background: var(--star-soft); color: #8a5a10; }
.pill.answered { background: var(--pine-soft); color: var(--pine); }
.pill.skipped { background: var(--mist); color: var(--muted); }
.review-snippet { color: var(--muted); font-size: 0.95rem; margin: 8px 0 0; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

.chips { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 16px; }
.chip { border: 1px solid var(--line); background: var(--paper); border-radius: 999px; padding: 7px 15px; font: 500 0.9rem var(--font-body); cursor: pointer; color: var(--muted); }
.chip.active { background: var(--ink); color: #fff; border-color: var(--ink); }

label.field { display: block; font-weight: 600; font-size: 0.92rem; margin: 18px 0 6px; }
input[type="text"], textarea, select {
  width: 100%; font: 400 1rem var(--font-body); color: var(--ink);
  border: 1.5px solid var(--line); border-radius: 10px; padding: 11px 13px; background: var(--paper);
}
input[type="text"]:focus, textarea:focus { border-color: var(--star); outline: none; box-shadow: 0 0 0 3px var(--star-soft); }
textarea { resize: vertical; min-height: 110px; }
.hint { font-size: 0.85rem; color: var(--faint); margin-top: 5px; }

.tone-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
@media (max-width: 560px) { .tone-grid { grid-template-columns: 1fr; } }
.tone-opt { border: 1.5px solid var(--line); border-radius: 10px; padding: 13px 14px; cursor: pointer; background: var(--paper); text-align: left; font-family: var(--font-body); }
.tone-opt .t { font-weight: 600; }
.tone-opt .d { font-size: 0.84rem; color: var(--muted); }
.tone-opt.active { border-color: var(--ink); box-shadow: 0 0 0 1.5px var(--ink); }

.switch-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 13px 0; }
.switch { position: relative; width: 42px; height: 24px; flex: none; }
.switch input { position: absolute; opacity: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.switch .track { position: absolute; inset: 0; border-radius: 999px; background: #cfd6de; transition: background .15s; }
.switch input:checked + .track { background: var(--pine); }
.switch .knob { position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; transition: transform .15s; }
.switch input:checked ~ .knob { transform: translateX(18px); }
.switch input:focus-visible + .track { outline: 2.5px solid var(--star); outline-offset: 2px; }

.draft-box { background: var(--mist); border-radius: 10px; padding: 4px; }
.draft-box textarea { border: none; background: transparent; box-shadow: none; min-height: 150px; }
.actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 14px; }

.toast {
  position: fixed; left: 50%; bottom: 26px; transform: translateX(-50%) translateY(8px);
  background: var(--ink); color: #fff; padding: 12px 20px; border-radius: 10px;
  font-weight: 500; font-size: 0.95rem; opacity: 0; pointer-events: none;
  transition: opacity .25s ease, transform .25s ease; z-index: 50; max-width: 90vw; text-align: center;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

.login-wrap { min-height: 100dvh; display: grid; place-items: center; padding: 24px; }
.login-card { background: var(--paper); border: 1px solid var(--line); border-radius: 18px; box-shadow: var(--shadow); padding: 40px 36px; max-width: 420px; width: 100%; text-align: center; }
.login-card .brand { justify-content: center; margin-bottom: 18px; }
.login-card .btn { width: 100%; margin-top: 10px; }
.divider { display: flex; align-items: center; gap: 12px; color: var(--faint); font-size: 0.85rem; margin: 18px 0 8px; }
.divider::before, .divider::after { content: ""; flex: 1; height: 1px; background: var(--line); }

.empty { text-align: center; color: var(--muted); padding: 40px 16px; }
.banner { background: var(--star-soft); border: 1px solid #f3ddb5; color: #6e4a0e; border-radius: 10px; padding: 12px 16px; font-size: 0.93rem; margin-bottom: 18px; }
.back { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); text-decoration: none; font-weight: 500; font-size: 0.93rem; margin-bottom: 14px; }
