/* totm — app + public styles. Embedded in the binary via include_str!. */
:root {
  --bg: #f5f5fa;
  --card: #ffffff;
  --ink: #16161d;
  --muted: #6b6b7b;
  --line: #e4e4ee;
  --accent: #6d5efc;
  --accent-ink: #ffffff;
  --danger: #e5484d;
  --ok: #2e9e6b;
  --radius: 12px;
  --shadow: 0 1px 2px rgba(20, 20, 40, .06), 0 8px 24px rgba(20, 20, 40, .06);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  line-height: 1.5;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ---- App shell ---- */
.topbar {
  background: var(--card);
  border-bottom: 1px solid var(--line);
}
.topbar-inner {
  max-width: 760px;
  margin: 0 auto;
  padding: 14px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.brand {
  font-weight: 800;
  font-size: 20px;
  letter-spacing: -.02em;
  color: var(--ink);
}
.brand span { color: var(--accent); }
.nav { display: flex; gap: 14px; align-items: center; }
.nav .who { color: var(--muted); font-size: 14px; }

main.container {
  max-width: 760px;
  margin: 0 auto;
  padding: 28px 20px 64px;
}

h1 { font-size: 26px; letter-spacing: -.02em; margin: 0 0 4px; }
h2 { font-size: 18px; margin: 28px 0 12px; }
.sub { color: var(--muted); margin: 0 0 24px; }

/* ---- Cards ---- */
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 18px;
  margin-bottom: 16px;
}

/* ---- Forms ---- */
label { display: block; font-size: 13px; font-weight: 600; color: var(--muted); margin: 12px 0 4px; }
input, select, textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  font: inherit;
  background: #fff;
  color: var(--ink);
}
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(109, 94, 252, .15);
}
textarea { resize: vertical; min-height: 70px; }
.row { display: flex; gap: 12px; flex-wrap: wrap; }
.row > * { flex: 1; min-width: 140px; }

/* ---- Buttons ---- */
.btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 9px 14px;
  border-radius: 8px;
  border: 1px solid transparent;
  background: var(--accent);
  color: var(--accent-ink);
  font: inherit; font-weight: 600;
  cursor: pointer;
  text-decoration: none;
}
.btn:hover { filter: brightness(1.05); text-decoration: none; }
.btn.secondary { background: #fff; color: var(--ink); border-color: var(--line); }
.btn.ghost { background: transparent; color: var(--muted); padding: 6px 8px; }
.btn.danger { background: #fff; color: var(--danger); border-color: var(--line); }
.btn.danger:hover { background: var(--danger); color: #fff; }
.btn.small { padding: 6px 10px; font-size: 13px; }
.btn-row { display: flex; gap: 8px; align-items: center; margin-top: 16px; flex-wrap: wrap; }

/* ---- Flash / pills ---- */
.flash { padding: 10px 14px; border-radius: 8px; margin-bottom: 16px; font-size: 14px; }
.flash.err { background: #fdecec; color: var(--danger); }
.flash.ok { background: #e7f6ee; color: var(--ok); }
.pill { font-size: 12px; font-weight: 700; padding: 2px 8px; border-radius: 999px; }
.pill.live { background: #e7f6ee; color: var(--ok); }
.pill.draft { background: #f0f0f4; color: var(--muted); }
.saved { color: var(--ok); font-size: 13px; font-weight: 600; }

/* ---- Totem list (dashboard) ---- */
.totem-list { list-style: none; padding: 0; margin: 0; }
.totem-item {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 16px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  margin-bottom: 10px;
}
.totem-item .grow { flex: 1; min-width: 0; }
.totem-item .t-title { font-weight: 700; }
.totem-item .t-slug { color: var(--muted); font-size: 13px; }
.move { display: flex; flex-direction: column; gap: 2px; }
.move .btn { padding: 1px 7px; line-height: 1.2; }

/* ---- Block editor ---- */
.block {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--card);
  padding: 16px;
  margin-bottom: 12px;
}
.block-head { display: flex; align-items: center; justify-content: space-between; }
.block-type { font-weight: 700; text-transform: capitalize; }
.empty { color: var(--muted); text-align: center; padding: 24px; }

/* ---- Auth screens ---- */
.auth-wrap { max-width: 380px; margin: 8vh auto 0; padding: 0 20px; }
.auth-wrap .brand { font-size: 28px; display: block; text-align: center; margin-bottom: 6px; }
.auth-wrap .sub { text-align: center; }

/* ============ Public totem page ============ */
.totem-page {
  max-width: 540px;
  margin: 0 auto;
  padding: 48px 20px 64px;
}
.totem-page .bio { text-align: center; margin-bottom: 28px; }
.totem-page .bio img {
  width: 112px; height: 112px; border-radius: 50%; object-fit: cover;
  box-shadow: var(--shadow);
}
.totem-page .bio h1 { font-size: 24px; margin: 14px 0 2px; }
.totem-page .bio p { color: var(--muted); margin: 0; }
.totem-page .message { text-align: center; color: var(--ink); margin: 0 auto 20px; max-width: 38ch; }
.totem-page .link-card {
  display: block; text-align: center;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 15px;
  margin-bottom: 12px;
  font-weight: 600;
  color: var(--ink);
  box-shadow: var(--shadow);
  transition: transform .06s ease;
}
.totem-page .link-card:hover { transform: translateY(-2px); text-decoration: none; }
.totem-page .link-card img { width: 22px; height: 22px; vertical-align: middle; margin-right: 8px; }
.totem-page form.block-form { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; margin-bottom: 12px; }
.totem-page .footer { text-align: center; color: var(--muted); font-size: 13px; margin-top: 36px; }
.totem-page .footer a { color: var(--muted); }

/* ============ Landing (brochure) page ============ */
.landing {
  --pad: 20px;
  max-width: 760px;
  margin: 0 auto;
  padding: 0 var(--pad) 64px;
  overflow-x: hidden; /* keep the marquee from adding page scroll */
}

/* ---- Hero ---- */
.landing-hero { padding: 40px 0 8px; text-align: center; }
.landing-brand { display: inline-block; font-size: 20px; margin-bottom: 40px; }

.acro {
  font-size: clamp(30px, 11vw, 56px);
  font-weight: 800;
  letter-spacing: -.02em;
  line-height: 1.05;
  margin: 0 0 18px;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0 .34em;
}
.la-col { display: inline-flex; align-items: baseline; white-space: nowrap; }
.la-cap { color: var(--accent); animation: la-drop .5s ease both; }
.la-rest {
  display: inline-block;
  overflow: hidden;
  max-width: 0;
  opacity: 0;
  transform: translateY(.06em);
  color: var(--ink);
  animation: la-bloom .6s ease forwards;
}
.la-col:nth-child(1) .la-cap { animation-delay: 0s; }
.la-col:nth-child(2) .la-cap { animation-delay: .1s; }
.la-col:nth-child(3) .la-cap { animation-delay: .2s; }
.la-col:nth-child(4) .la-cap { animation-delay: .3s; }
.la-col:nth-child(1) .la-rest { animation-delay: .35s; }
.la-col:nth-child(2) .la-rest { animation-delay: .75s; }
.la-col:nth-child(3) .la-rest { animation-delay: 1.15s; }
.la-col:nth-child(4) .la-rest { animation-delay: 1.55s; }

@keyframes la-bloom {
  from { max-width: 0;   opacity: 0; transform: translateY(.06em); }
  to   { max-width: 3em; opacity: 1; transform: translateY(0); }
}
@keyframes la-drop {
  from { opacity: 0; transform: translateY(-.18em); }
  to   { opacity: 1; transform: translateY(0); }
}

.landing-lede { color: var(--muted); font-size: 17px; max-width: 34ch; margin: 0 auto 26px; }
.landing-cta { display: flex; flex-direction: column; align-items: center; gap: 10px; }
.landing-cta-btn { font-size: 16px; padding: 13px 26px; border-radius: 999px; box-shadow: var(--shadow); }
.landing-cta-note { color: var(--muted); font-size: 13px; }

/* ---- Carousel ---- */
.landing-carousel { margin: 48px 0 8px; }
.landing-strip-label {
  text-align: center; color: var(--muted); font-size: 13px; font-weight: 600;
  text-transform: uppercase; letter-spacing: .06em; margin: 0 0 14px;
}
.marquee {
  margin: 0 calc(var(--pad) * -1);
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  scroll-snap-type: x proximity;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
          mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}
.marquee::-webkit-scrollbar { display: none; }
.marquee-track {
  display: flex; width: max-content; gap: 12px; padding: 6px var(--pad);
  animation: marquee-scroll 26s linear infinite;
  will-change: transform;
}
.marquee:hover .marquee-track,
.marquee:focus-within .marquee-track,
.marquee.is-held .marquee-track { animation-play-state: paused; }

@keyframes marquee-scroll {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

.chip {
  scroll-snap-align: center;
  display: inline-flex; align-items: center; gap: 8px; flex: 0 0 auto;
  padding: 10px 16px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 999px;
  box-shadow: var(--shadow);
  font-weight: 600; color: var(--ink); white-space: nowrap;
}
.chip-ico { font-size: 18px; line-height: 1; }
.chip-name { font-size: 14px; }

/* ---- Value props ---- */
.landing-values { display: grid; grid-template-columns: 1fr; gap: 14px; margin: 44px 0; }
.value {
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 20px; text-align: center;
}
.value-emo { font-size: 26px; }
.value h2 { font-size: 17px; margin: 8px 0 4px; }
.value p { color: var(--muted); margin: 0; font-size: 15px; }

/* ---- Final CTA + footer ---- */
.landing-final { text-align: center; padding: 8px 0 12px; }
.landing-final h2 { font-size: 22px; margin: 0 0 16px; }
.landing-footer { border-top: 1px solid var(--line); margin-top: 40px; padding-top: 24px; text-align: center; }
.landing-footer .brand { font-size: 18px; }
.landing-foot-links { display: flex; justify-content: center; gap: 18px; margin: 12px 0; }
.landing-foot-links a { color: var(--muted); font-size: 14px; }
.landing-copy { color: var(--muted); font-size: 12px; margin: 4px 0 0; }

@media (min-width: 620px) {
  .landing-values { grid-template-columns: repeat(3, 1fr); }
  .landing-lede { font-size: 18px; }
}

@media (prefers-reduced-motion: reduce) {
  .la-rest { animation: none; max-width: 3em; opacity: 1; transform: none; }
  .la-cap { animation: none; opacity: 1; transform: none; }
  .marquee-track { animation: none; }
}
