/* Sygnal Memory landing page. Same palette as the dashboard and setup page. */

:root {
  --ink: #1f2020;
  --muted: #525453;
  --line: #d5d7d6;
  --soft-line: #e6e7e6;
  --ground: #eef0ee;
  --panel: #fcfcfc;
  --card: #f6f6f5;
  --dark: #262828;
  --brand: #a6cf4e;
  --brand-ink: #3f6512;
  --mono: 'IBM Plex Mono', ui-monospace, monospace;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font: 16px/1.6 Montserrat, system-ui, sans-serif;
}
h1, h2, h3, p, ol, ul, figure { margin: 0; }
ul, ol { padding: 0; }
a { color: var(--brand-ink); }
a:hover { color: #2e4a0c; }
code { font-family: var(--mono); font-size: 0.88em; background: #e6e8e6; padding: 1px 6px; border-radius: 5px; overflow-wrap: anywhere; }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 3px; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.eyebrow { font-size: 12px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--brand-ink); }

/* Top bar */

.topbar {
  position: sticky; top: 0; z-index: 5;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 12px 32px; background: rgba(252, 252, 252, 0.92); backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 10px; color: var(--ink); font-weight: 700; text-decoration: none; }
.topnav { display: flex; align-items: center; gap: 22px; font-size: 14px; font-weight: 500; }
.topnav a:not(.button) { color: var(--ink); text-decoration: none; }
.topnav a:not(.button):hover { color: var(--brand-ink); }

/* Buttons */

.button {
  display: inline-flex; align-items: center; justify-content: center; height: 44px; padding: 0 22px;
  border: 1px solid var(--line); border-radius: 10px; background: #fff;
  color: var(--ink); font-size: 15px; font-weight: 600; text-decoration: none;
}
.button:hover { color: var(--ink); border-color: var(--ink); }
.button.primary { background: var(--brand); border-color: var(--brand); }
.button.primary:hover { background: #98c23f; border-color: #98c23f; }
.button.ghost { background: transparent; }
.button.small { height: 34px; padding: 0 14px; font-size: 13px; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; }
.actions.vertical { flex-direction: column; min-width: 260px; }

/* Layout */

main { max-width: 1160px; margin: 0 auto; padding: 0 32px 80px; display: flex; flex-direction: column; gap: 72px; }
.block { display: flex; flex-direction: column; gap: 28px; }
.block-head { display: flex; flex-direction: column; gap: 8px; max-width: 720px; }
.block-head h2 { font-size: 32px; line-height: 1.2; font-weight: 700; letter-spacing: -0.01em; }
.grid { display: grid; gap: 16px; }
.grid.four { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }

/* Hero */

.hero { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: 48px; align-items: center; padding-top: 72px; }
.hero-text { display: flex; flex-direction: column; gap: 22px; }
.hero h1 { font-size: 52px; line-height: 1.08; font-weight: 700; letter-spacing: -0.02em; }
.lead { font-size: 18px; color: #3b3d3c; max-width: 560px; }

.term { border-radius: 16px; background: var(--dark); box-shadow: 0 30px 60px -20px rgba(31, 32, 32, 0.45); overflow: hidden; }
.term-bar { display: flex; align-items: center; gap: 7px; padding: 12px 16px; background: #1b1c1c; }
.term-bar span { width: 11px; height: 11px; border-radius: 50%; background: #444746; }
.term-bar em { margin-left: 10px; font: 12px var(--mono); font-style: normal; color: #8d918f; }
.term pre { margin: 0; padding: 22px 24px 26px; font: 13.5px/1.7 var(--mono); color: #e6e7e6; white-space: pre-wrap; }
.term .ok { color: var(--brand); }
.term .dim { color: #8d918f; }
.term b { color: #fff; }

/* Band */

.band { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: 16px; overflow: hidden; }
.stat { display: flex; flex-direction: column; gap: 4px; padding: 22px 24px; background: var(--panel); }
.stat strong { font-size: 34px; line-height: 1; color: var(--brand-ink); }
.stat span { font-size: 14px; color: var(--muted); }

/* Features */

.feature { display: flex; flex-direction: column; gap: 10px; padding: 24px; border-radius: 14px; background: var(--panel); border: 1px solid var(--soft-line); }
.feature h3 { font-size: 17px; }
.feature p { font-size: 14.5px; color: #3b3d3c; }
.icon { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 11px; background: var(--dark); color: var(--brand); font-size: 18px; }

/* How it works */

.flow { list-style: none; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; counter-reset: step; }
.flow li { display: flex; flex-direction: column; gap: 12px; padding: 24px; border-radius: 14px; background: var(--panel); border: 1px solid var(--soft-line); }
.flow h3 { font-size: 16px; margin-bottom: 6px; }
.flow p { font-size: 14px; color: #3b3d3c; }
.step { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: var(--brand); font-weight: 700; font-size: 14px; }

/* Map */

.diagram { padding: 20px; border-radius: 16px; background: var(--panel); border: 1px solid var(--soft-line); overflow-x: auto; }
.diagram svg { display: block; width: 100%; min-width: 720px; height: auto; }
.zone { fill: #f1f3f1; stroke: var(--line); }
.zone.dark { fill: var(--dark); stroke: var(--dark); }
.zone-title { font: 600 13px Montserrat, sans-serif; letter-spacing: 0.06em; text-transform: uppercase; fill: var(--muted); }
.zone-title.light { fill: #b9bdbb; }
.node { fill: #fff; stroke: var(--line); }
.node.accent { fill: #eef5df; stroke: var(--brand); }
.node.soft { fill: #f6f6f5; stroke: var(--soft-line); stroke-dasharray: 4 3; }
.node.bots { fill: #33363a; stroke: #4a4e52; }
.node.gate { fill: #fff8e8; stroke: #e0b95a; }
.node-title { font: 600 14px Montserrat, sans-serif; fill: var(--ink); }
.node-text { font: 12px 'IBM Plex Mono', monospace; fill: var(--muted); }
.on-dark { fill: #e6e7e6; }
.node-text.on-dark { fill: #c9cccb; }
.node-text.on-dark.dim { fill: #8d918f; }
.flow-line { fill: none; stroke: var(--brand-ink); stroke-width: 2; }
.arrowhead { fill: var(--brand-ink); }
.edge { font: 11px 'IBM Plex Mono', monospace; fill: var(--brand-ink); }

.map { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.piece { display: flex; flex-direction: column; gap: 10px; padding: 22px; border-radius: 14px; background: var(--panel); border: 1px solid var(--soft-line); }
.piece header { display: flex; flex-direction: column; gap: 8px; }
.piece h3 { font-size: 16px; }
.piece p { font-size: 14px; color: #3b3d3c; }
.piece .for { margin-top: auto; padding-top: 6px; font-size: 12.5px; color: var(--muted); }
.tag { align-self: flex-start; font-size: 11px; font-weight: 600; letter-spacing: 0.05em; text-transform: uppercase; padding: 2px 9px; border-radius: 999px; background: #eef5df; color: var(--brand-ink); }

/* In practice */

.say { display: flex; flex-direction: column; gap: 8px; padding: 20px; border-radius: 14px; background: var(--dark); }
.say code { align-self: flex-start; background: #1b1c1c; color: var(--brand); font-size: 13.5px; padding: 6px 10px; }
.say p { font-size: 14px; color: #c9cccb; }

/* Discord bots */

.bots-layout { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 20px; align-items: start; }
.chat { border-radius: 16px; background: #313338; color: #dbdee1; overflow: hidden; box-shadow: 0 24px 48px -24px rgba(31, 32, 32, 0.5); }
.chat-bar { padding: 12px 18px; border-bottom: 1px solid #26282c; font-weight: 600; font-size: 14px; color: #f2f3f5; }
.chat-bar .hash { color: #80848e; margin-right: 4px; }
.msg { display: flex; gap: 14px; padding: 16px 18px; font-size: 14.5px; }
.msg p + p { margin-top: 6px; }
.msg b { color: #fff; }
.who { font-weight: 600; color: #f2f3f5; }
.who em { font-style: normal; font-weight: 400; font-size: 12px; color: #949ba4; margin-left: 6px; }
.avatar { flex-shrink: 0; display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; font-size: 13px; font-weight: 700; }
.avatar.user { background: #5865f2; color: #fff; }
.avatar.bot { background: var(--brand-ink); color: #fff; }
.mention { padding: 0 3px; border-radius: 4px; background: rgba(88, 101, 242, 0.3); color: #c9cdfb; font-weight: 500; }
.bot-tag { margin-left: 6px; padding: 1px 5px; border-radius: 4px; background: #5865f2; color: #fff; font-size: 10px; font-weight: 700; vertical-align: 2px; }
.thread-label { padding: 0 18px 0 70px; font-size: 12.5px; color: #949ba4; }
.usage { font: 12px var(--mono); color: #949ba4; }
.flow.compact { grid-template-columns: minmax(0, 1fr); gap: 10px; }
.flow.compact li { flex-direction: row; align-items: flex-start; gap: 14px; padding: 16px 18px; }
.flow.compact .step { flex-shrink: 0; }
.product { display: flex; flex-direction: column; gap: 10px; padding: 22px; border-radius: 14px; background: var(--panel); border: 1px solid var(--soft-line); }
.product header { display: flex; align-items: center; gap: 12px; }
.product h3 { font-size: 17px; }
.product p { font-size: 14px; color: #3b3d3c; }
.repos { display: flex; flex-wrap: wrap; gap: 6px; }
.checks.inline { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 28px; }

/* Boundaries */

.two-col { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 40px; align-items: start; }
.two-col > div:first-child { display: flex; flex-direction: column; gap: 24px; }
.checks { list-style: none; display: flex; flex-direction: column; gap: 14px; }
.checks li { position: relative; padding-left: 32px; font-size: 15px; }
.checks li::before {
  content: '✓'; position: absolute; left: 0; top: 1px; display: grid; place-items: center;
  width: 22px; height: 22px; border-radius: 50%; background: var(--brand); font-size: 12px; font-weight: 700;
}
.panel-card { display: flex; flex-direction: column; gap: 16px; padding: 26px; border-radius: 16px; background: var(--panel); border: 1px solid var(--soft-line); }
.workspaces { list-style: none; display: flex; flex-direction: column; gap: 10px; }
.workspaces li { display: flex; align-items: center; gap: 12px; font-weight: 600; }
.ws { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; background: var(--c); color: #fff; font-size: 12px; font-weight: 700; }

/* Call to action */

.cta {
  display: flex; flex-direction: row; justify-content: space-between; align-items: center; gap: 40px;
  padding: 40px; border-radius: 20px; background: var(--dark); color: #fff;
}
.cta h2 { font-size: 30px; margin: 6px 0 16px; }
.cta .eyebrow { color: var(--brand); }
.steps { display: flex; flex-direction: column; gap: 8px; padding-left: 20px; color: #d7dad8; }
.cta .button:not(.primary) { background: transparent; color: #fff; border-color: #4a4e52; }
.cta .button:not(.primary):hover { border-color: #fff; }

.footer {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px;
  max-width: 1160px; margin: 0 auto; padding: 24px 32px 40px; font-size: 13px;
  border-top: 1px solid var(--line);
}

/* Motion: reveal on scroll, typed prompt, drawn arrows, counters */

.reveal, .stagger > .reveal-item { opacity: 0; transform: translateY(18px); transition: opacity .6s ease, transform .6s cubic-bezier(.2,.7,.2,1); }
.reveal.in, .stagger.in > .reveal-item { opacity: 1; transform: none; }
.stagger.in > .reveal-item:nth-child(2) { transition-delay: .08s; }
.stagger.in > .reveal-item:nth-child(3) { transition-delay: .16s; }
.stagger.in > .reveal-item:nth-child(4) { transition-delay: .24s; }
.stagger.in > .reveal-item:nth-child(5) { transition-delay: .32s; }
.stagger.in > .reveal-item:nth-child(6) { transition-delay: .40s; }
.stagger.in > .reveal-item:nth-child(n+7) { transition-delay: .48s; }
.stagger > li.reveal-item { transition-property: opacity, transform; }
.piece.reveal-item:hover, .feature.reveal-item:hover, .product.reveal-item:hover { transform: translateY(-3px); border-color: var(--brand); box-shadow: 0 16px 32px -22px rgba(31, 32, 32, 0.5); transition: transform .25s ease, border-color .25s ease, box-shadow .25s ease; }
.typed::after { content: ''; display: inline-block; width: 8px; height: 15px; margin-left: 2px; vertical-align: -2px; background: var(--brand); animation: blink 1s steps(2, start) infinite; }
.typed.done::after { animation: none; opacity: .35; }
.term pre .memory-line { opacity: 0; transform: translateY(6px); transition: opacity .5s ease, transform .5s ease; }
.term pre .memory-line.in { opacity: 1; transform: none; }
.flow-line { stroke-dasharray: 260; stroke-dashoffset: 260; }
.diagram.in .flow-line { animation: draw 1.4s ease forwards; }
.diagram.in .flow-line:nth-of-type(2) { animation-delay: .2s; }
.diagram.in .flow-line:nth-of-type(3) { animation-delay: .4s; }
.diagram.in .flow-line:nth-of-type(4) { animation-delay: .5s; }
.diagram.in .flow-line:nth-of-type(5) { animation-delay: .6s; }
.diagram.in .flow-line:nth-of-type(6) { animation-delay: .8s; }
.diagram.in .flow-line:nth-of-type(7) { animation-delay: 1s; }
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes blink { to { visibility: hidden; } }
@media (prefers-reduced-motion: reduce) {
  .reveal, .stagger > .reveal-item { opacity: 1; transform: none; transition: none; }
  .flow-line { stroke-dasharray: none; stroke-dashoffset: 0; animation: none; }
  .typed::after { animation: none; }
  .term pre .memory-line { opacity: 1; transform: none; }
}

/* Narrow screens */

@media (max-width: 1000px) {
  .grid.four, .flow, .map { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .flow.compact { grid-template-columns: minmax(0, 1fr); }
  .bots-layout { grid-template-columns: minmax(0, 1fr); }
  .hero { grid-template-columns: minmax(0, 1fr); padding-top: 48px; }
  .hero h1 { font-size: 40px; }
}

@media (max-width: 640px) {
  .topbar { padding: 10px 16px; }
  .topnav a:not(.button) { display: none; }
  main { padding: 0 16px 60px; gap: 52px; }
  .hero h1 { font-size: 32px; }
  .lead { font-size: 16px; }
  .block-head h2 { font-size: 26px; }
  .grid.four, .grid.three, .grid.two, .flow, .map, .band { grid-template-columns: minmax(0, 1fr); }
  .two-col, .checks.inline { grid-template-columns: minmax(0, 1fr); }
  .cta { flex-direction: column; align-items: stretch; padding: 28px 20px; }
  .actions.vertical { min-width: 0; }
  .term pre { font-size: 12px; padding: 18px; }
  .footer { padding: 20px 16px 32px; }
}
