/* The whole site's look, shared by every page. The tokens are the Slash
   board's own (app/frontend/src/shared/styles.css in sentifold/sleash): its
   green-grey ground and dotted surface, its three faces, the ink of each
   kind of card, and the way it moves. Change them there first, then here. */

:root {
  color-scheme: light;

  --bg: #eef1ec;
  --surface: #fafbf8;
  --fg: #181e19;
  --muted: #4b574e;
  --line: #d3d9cf;
  --accent: #2f7d5a;
  --accent-ink: #216048;
  --on-accent: #ffffff;
  --dot: rgba(24, 30, 25, 0.075);
  --shadow: 0 1px 2px rgba(20, 28, 22, 0.06), 0 8px 24px -18px rgba(20, 28, 22, 0.25);
  --shadow-lift: 0 2px 4px rgba(20, 28, 22, 0.05), 0 28px 64px -30px rgba(20, 28, 22, 0.42);

  /* Slash's mark: its amber, and the brown its glasses are drawn in. */
  --amber: #f59c03;
  --amber-rgb: 245 156 3;
  --brown: #452315;

  --risk-ink: #b02f35;
  --fact-ink: #3b6494;
  --answer-ink: #2c6b62;
  --todo-ink: #377446;
  --decision-ink: #7a3f8f;
  --ask-ink: #8f5a05;
  --ask-ground: #f8edcf;

  /* Topic hues, in the order a call's topics take them. */
  --phase-1: #2dd4bf;
  --phase-2: #8b7cf6;
  --phase-3: #f59e0b;

  --sans: "Onest", system-ui, -apple-system, "Segoe UI", sans-serif;
  --display: "Unbounded", "Onest", system-ui, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;

  --out: cubic-bezier(0.16, 1, 0.3, 1);
  --in-out: cubic-bezier(0.65, 0, 0.35, 1);
  --spring: cubic-bezier(0.34, 1.4, 0.64, 1);

  --page: 1240px;
  --gutter: clamp(20px, 4vw, 48px);
  --header-h: 76px;
}

@supports (transition-timing-function: linear(0, 1)) {
  :root {
    --spring: linear(0, 0.103 4.2%, 0.338 8.3%, 0.606 12.5%, 0.845 16.7%, 1.02 20.8%, 1.122 25%, 1.161 29.2%, 1.154 33.3%, 1.12 37.5%, 1.077 41.7%, 1.036 45.8%, 1.004 50%, 0.984 54.2%, 0.975 58.3%, 0.974 62.5%, 0.978 66.7%, 0.985 70.8%, 0.992 75%, 0.998 79.2%, 1.002 83.3%, 1.004 87.5%, 1);
  }
}

/* The dark panels are the board's dark theme, scoped to the panel. */
.ink {
  --bg: #0e120f;
  --surface: #151a16;
  --fg: #e7ece6;
  --muted: #a3ada4;
  --line: #2a322b;
  --accent: #5fbb8a;
  --accent-ink: #5fbb8a;
  --on-accent: #0e120f;
  --dot: rgba(231, 236, 230, 0.06);
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 10px 26px -18px rgba(0, 0, 0, 0.6);
  --risk-ink: #f08a8a;
  --fact-ink: #8db4e8;
  --answer-ink: #7fd0c3;
  --todo-ink: #9bd3a2;
  --decision-ink: #d4a3e3;
  --ask-ink: #e6ad49;
  --ask-ground: #332c1a;
  color: var(--fg);
  background-color: var(--bg);
}

/* ========== BASE ========== */

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-top: var(--header-h);
}
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

body {
  margin: 0;
  min-height: 100vh;
  background-color: var(--bg);
  /* The dotted ground is what makes the board read as something drawn on a
     surface, and it is what this site is drawn on too. */
  background-image: radial-gradient(var(--dot) 1px, transparent 1px);
  background-size: 24px 24px;
  color: var(--fg);
  font: 400 1rem/1.55 var(--sans);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: clip;
}

img, svg, canvas, video { display: block; max-width: 100%; }
a { color: inherit; }
button { font: inherit; color: inherit; }
p { margin: 0; }
h1, h2, h3, h4 { margin: 0; font-weight: inherit; }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 6px;
}

::selection { background: color-mix(in oklab, var(--amber) 38%, transparent); }

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.skip-link {
  position: fixed;
  top: 12px; left: 12px;
  z-index: 100;
  padding: 10px 16px;
  border-radius: 999px;
  background: var(--fg);
  color: var(--bg);
  text-decoration: none;
  transform: translateY(-160%);
  transition: transform 0.3s var(--out);
}
.skip-link:focus { transform: none; }

.wrap {
  width: 100%;
  max-width: var(--page);
  margin: 0 auto;
}

/* ========== TYPE ========== */

.display {
  font-family: var(--display);
  font-weight: 600;
  letter-spacing: -0.045em;
  line-height: 0.96;
}

.h2 {
  font-family: var(--display);
  font-weight: 600;
  font-size: clamp(2.125rem, 4.9vw, 4.25rem);
  letter-spacing: -0.04em;
  line-height: 1.02;
  text-wrap: balance;
}

.h3 {
  font-family: var(--display);
  font-weight: 600;
  font-size: clamp(1.25rem, 1.7vw, 1.5rem);
  letter-spacing: -0.025em;
  line-height: 1.15;
}

.lede {
  font-size: clamp(1.125rem, 1.55vw, 1.375rem);
  line-height: 1.5;
  color: var(--muted);
  max-width: 34em;
  text-wrap: pretty;
}

.body-copy {
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--muted);
  text-wrap: pretty;
}

.kicker {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font: 500 0.75rem/1 var(--mono);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}
.kicker::before {
  content: "";
  width: 28px;
  height: 1px;
  background: currentColor;
  opacity: 0.6;
}

/* ========== HEADER ========== */

.site-header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 50;
  height: var(--header-h);
  padding: 0 var(--gutter);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  transition: transform 0.6s var(--out);
  view-transition-name: site-header;
}

.site-header::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: color-mix(in srgb, var(--bg) 80%, transparent);
  -webkit-backdrop-filter: saturate(1.5) blur(16px);
  backdrop-filter: saturate(1.5) blur(16px);
  border-bottom: 1px solid color-mix(in srgb, var(--line) 80%, transparent);
  opacity: 0;
  transition: opacity 0.35s ease;
}
.site-header.is-scrolled::before { opacity: 1; }
.site-header.is-hidden { transform: translateY(-105%); }

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--fg);
  font: 600 1.125rem/1 var(--display);
  letter-spacing: -0.03em;
  text-decoration: none;
}

.brand-mark {
  width: 24px;
  height: 24px;
  color: var(--accent);
  transition: transform 0.9s var(--out);
}
.brand:hover .brand-mark { transform: rotate(90deg) scale(1.08); }

.nav {
  position: relative;
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 5px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--surface) 82%, transparent);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.nav a {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 38px;
  padding: 0 17px;
  border-radius: 999px;
  color: var(--fg);
  font: 500 0.9375rem/1 var(--sans);
  text-decoration: none;
  white-space: nowrap;
  transition: color 0.25s ease, background-color 0.25s ease;
}

.nav a[aria-current="page"] {
  background: var(--accent);
  color: var(--on-accent);
}

/* Follows the pointer from link to link, the way the board's view switch
   answers it. Placed by the script; hidden without one. */
.nav-glider {
  position: absolute;
  z-index: 0;
  top: 5px;
  left: 0;
  height: 38px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--fg) 7%, transparent);
  opacity: 0;
  pointer-events: none;
  transition: transform 0.55s var(--out), width 0.55s var(--out), opacity 0.25s ease;
}

.soon-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--amber);
  box-shadow: 0 0 0 0 rgb(var(--amber-rgb) / 0.55);
  animation: soon-pulse 2.4s var(--out) infinite;
}
.nav a[aria-current="page"] .soon-dot { background: #ffd27a; }

@keyframes soon-pulse {
  0% { box-shadow: 0 0 0 0 rgb(var(--amber-rgb) / 0.55); }
  70%, 100% { box-shadow: 0 0 0 9px rgb(var(--amber-rgb) / 0); }
}

/* ========== BUTTONS & PILLS ========== */

.actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}

.btn {
  --mx: 0px;
  --my: 0px;
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 54px;
  padding: 0 26px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--fg);
  box-shadow: var(--shadow);
  font: 500 1rem/1 var(--sans);
  text-decoration: none;
  cursor: pointer;
  transform: translate3d(var(--mx), var(--my), 0);
  transition: transform 0.6s var(--out), background-color 0.25s ease, border-color 0.25s ease, box-shadow 0.35s ease, color 0.25s ease;
}
.btn:hover {
  border-color: color-mix(in oklab, var(--fg) 28%, var(--line));
  box-shadow: var(--shadow-lift);
}
.btn:active { transform: translate3d(var(--mx), calc(var(--my) + 1px), 0) scale(0.985); }

.btn-primary {
  background: var(--accent);
  border-color: transparent;
  color: var(--on-accent);
}
.btn-primary:hover {
  background: var(--accent-ink);
  border-color: transparent;
}
.ink .btn-primary:hover { background: #79c9a0; }

.btn-amber {
  background: var(--amber);
  border-color: transparent;
  color: #241303;
}
.btn-amber:hover {
  background: #ffae26;
  border-color: transparent;
}

.btn .arrow {
  width: 18px;
  height: 18px;
  transition: transform 0.5s var(--out);
}
.btn:hover .arrow { transform: translateX(4px); }
.btn:hover .arrow.down { transform: translateY(3px); }

.pill {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 36px;
  padding: 0 16px 0 14px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: color-mix(in srgb, var(--surface) 85%, transparent);
  box-shadow: var(--shadow);
  font: 500 0.75rem/1 var(--mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--fg);
}
.pill .sep { opacity: 0.4; }

/* ========== CARDS, AS THE BOARD DRAWS THEM ========== */

.card {
  position: relative;
  background: var(--surface);
  border: 1.5px solid var(--line);
  border-radius: 14px;
  padding: 14px 16px 15px;
  box-shadow: var(--shadow);
  text-align: left;
}

.card-dashed { border-style: dashed; }

.card-kind {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
  font: 600 0.75rem/1 var(--mono);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.card-text {
  font-size: 1rem;
  line-height: 1.45;
  color: var(--fg);
}

.card-meta {
  margin-top: 10px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  font-size: 0.8125rem;
  color: var(--muted);
}

.card-fact .card-kind { color: var(--fact-ink); }
.card-todo .card-kind { color: var(--todo-ink); }

.verdict {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--risk-ink);
  letter-spacing: 0.04em;
}
.verdict svg { width: 12px; height: 12px; }

.todo-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}
.todo-box {
  flex: none;
  width: 18px;
  height: 18px;
  margin-top: 2px;
  border-radius: 4px;
  border: 1.5px solid color-mix(in oklab, var(--fg) 45%, var(--line));
  background: var(--surface);
}

/* The three buttons in a folded card's corner, as the board draws them:
   hide for everyone, and the two votes. Drawn only, never pressed here. */
.card-actions {
  display: flex;
  justify-content: flex-end;
  gap: 6px;
  margin-top: 10px;
}
.card-actions i {
  display: grid;
  place-items: center;
  width: 30px;
  height: 22px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--surface);
}
.card-actions svg {
  width: 13px;
  height: 13px;
  fill: none;
  stroke: var(--fg);
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* A line of the transcript: a speaker, a time, and the words. */
.line {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--line);
  border-top: 3px solid color-mix(in oklab, var(--hue, var(--phase-1)) 65%, var(--line));
  border-radius: 14px;
  padding: 11px 14px 13px;
  box-shadow: var(--shadow);
  text-align: left;
}
.line-head {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 6px;
}
.avatar {
  flex: none;
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: color-mix(in oklab, var(--hue, var(--phase-1)) 18%, var(--surface));
  font: 600 0.625rem/1 var(--mono);
  color: var(--fg);
}
.speaker { font-weight: 600; font-size: 0.9375rem; }
.time { margin-left: auto; font: 500 0.75rem/1 var(--mono); color: var(--muted); }
.line-text { font-size: 0.9375rem; line-height: 1.45; }
.wake { color: var(--ask-ink); font-weight: 600; }

/* ========== SECTIONS ========== */

.section {
  position: relative;
  padding: clamp(96px, 13vw, 184px) var(--gutter);
}

.section-head {
  display: grid;
  gap: 22px;
  max-width: 880px;
  margin-bottom: clamp(48px, 7vw, 88px);
}

/* ========== CONTACT ========== */

.contact {
  position: relative;
  padding: clamp(110px, 15vw, 210px) var(--gutter) clamp(90px, 11vw, 150px);
  overflow: clip;
}

.contact-title {
  font-size: clamp(3.25rem, 12.5vw, 11.5rem);
  margin: 26px 0 30px;
}

.contact-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 18px 22px;
  margin-top: clamp(36px, 5vw, 56px);
}

.contact-email {
  font: 500 clamp(1.5rem, 5.4vw, 4.25rem)/1.05 var(--sans);
  letter-spacing: -0.035em;
  color: var(--fg);
  text-decoration: none;
  background: linear-gradient(var(--accent), var(--accent)) 0 100% / 0 3px no-repeat;
  padding-bottom: 6px;
  transition: background-size 0.7s var(--out), color 0.3s ease;
  overflow-wrap: anywhere;
}
.contact-email:hover { background-size: 100% 3px; color: var(--accent-ink); }

.copy-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 16px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--surface);
  box-shadow: var(--shadow);
  font: 500 0.8125rem/1 var(--mono);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  cursor: pointer;
  transition: border-color 0.25s ease, color 0.25s ease;
}
.copy-btn:hover { border-color: color-mix(in oklab, var(--fg) 30%, var(--line)); }
.copy-btn svg { width: 15px; height: 15px; }
.copy-btn .done { display: none; }
.copy-btn.is-done { color: var(--accent-ink); border-color: var(--accent); }
.copy-btn.is-done .idle { display: none; }
.copy-btn.is-done .done { display: inline; }

/* ========== FOOTER ========== */

.site-footer {
  position: relative;
  padding: 64px var(--gutter) 0;
  border-top: 1px solid var(--line);
  overflow: clip;
}

.footer-grid {
  display: grid;
  gap: 40px;
  grid-template-columns: 1fr;
}
@media (min-width: 720px) {
  .footer-grid { grid-template-columns: 1.4fr 1fr 1fr; }
}

.footer-tagline {
  margin-top: 14px;
  max-width: 22em;
  color: var(--muted);
}

.footer-col h3 {
  margin-bottom: 14px;
  font: 500 0.75rem/1 var(--mono);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}
.footer-col ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.footer-col a {
  color: var(--fg);
  text-decoration: none;
  background: linear-gradient(currentColor, currentColor) 0 100% / 0 1px no-repeat;
  transition: background-size 0.5s var(--out);
}
.footer-col a:hover { background-size: 100% 1px; }

.footer-base {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
  margin-top: 56px;
  font: 500 0.75rem/1 var(--mono);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}

/* The name, as big as the page is wide, rising into view at the very end. */
.footer-word {
  margin: 28px 0 0;
  font: 600 clamp(3.5rem, 15.6vw, 15rem)/0.8 var(--display);
  letter-spacing: -0.06em;
  white-space: nowrap;
  color: color-mix(in oklab, var(--fg) 7%, var(--bg));
  user-select: none;
  transform: translateY(14%);
}

/* ========== SLASH, DRAWN ==========
   The mark redrawn from slash/brand/logo.png so it can look at the reader:
   the drawing is in the logo's own 1254-unit square, cropped to the figure. */

.mascot { overflow: visible; }
.mascot .m-body { fill: var(--amber); }
.mascot .m-eye { fill: #fdfcfa; stroke: var(--brown); stroke-width: 24; }
.mascot .m-wave { fill: none; stroke: var(--brown); stroke-width: 34; }
.ink .mascot .m-wave { stroke: var(--amber); }
.mascot .m-bridge,
.mascot .m-smile { fill: none; stroke: var(--brown); stroke-linecap: round; }
.mascot .m-bridge { stroke-width: 22; }
.mascot .m-smile { stroke-width: 25; }
.mascot .m-pupils { fill: var(--brown); transition: transform 0.35s var(--out); }
.mascot .m-pupils circle {
  transform-box: fill-box;
  transform-origin: center;
  transition: transform 0.09s ease;
}
.mascot.blink .m-pupils circle { transform: scaleY(0.12); }
.mascot .m-wave {
  transform-box: fill-box;
  animation: listen 2.6s var(--in-out) infinite;
}
.mascot .m-wave-l { transform-origin: 100% 50%; }
.mascot .m-wave-r { transform-origin: 0 50%; animation-delay: 0.35s; }
@keyframes listen {
  0%, 100% { opacity: 1; transform: none; }
  50% { opacity: 0.45; transform: scale(0.9); }
}

/* ========== RECORDING ========== */

/* The red light and the running clock of a call being recorded. */
.rec { display: inline-flex; align-items: center; gap: 8px; font-weight: 500; }
.rec i {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #e5484d;
  animation: rec 1.6s ease-in-out infinite;
}
@keyframes rec { 50% { opacity: 0.35; } }
.bw-clock { font: 600 0.9375rem/1 var(--mono); }

/* ========== PAGE TRANSITIONS ========== */

@view-transition { navigation: auto; }
::view-transition-group(*) { animation-duration: 0.6s; animation-timing-function: cubic-bezier(0.16, 1, 0.3, 1); }

/* ========== MOTION ========== */

/* Everything below waits for the script, which marks the page with .js: a
   page without it shows every element where it rests. */
.js [data-reveal] {
  opacity: 0;
  transform: translate3d(0, 34px, 0);
  transition: opacity 1s var(--out), transform 1.2s var(--out);
  transition-delay: calc(var(--d, 0) * 1ms);
}
.js [data-reveal="fade"] { transform: none; }
.js [data-reveal="scale"] { transform: scale(0.94); }
.js [data-reveal].is-in { opacity: 1; transform: none; }

/* Words that rise one after another from below their own baseline. */
.split .w {
  display: inline-block;
  overflow: clip;
  vertical-align: top;
  padding: 0 0.04em 0.12em;
  margin: 0 -0.04em -0.12em;
}
.js .split .w > span {
  display: inline-block;
  transform: translate3d(0, 108%, 0) rotate(4deg);
  transform-origin: 0 100%;
  transition: transform 1.25s var(--out);
  transition-delay: calc(var(--wd, 0) * 1ms);
}
.js .split.is-in .w > span { transform: none; }

@media (prefers-reduced-motion: reduce) {
  .js [data-reveal],
  .js .split .w > span {
    opacity: 1;
    transform: none;
    transition: none;
  }
  .soon-dot, .rec i, .mascot .m-wave { animation: none; }
}

@media (prefers-reduced-motion: reduce) {
  @view-transition { navigation: none; }
}
