/* hipieve.com. Tokens follow the Pieve brand brief (Quiet Intelligence). */

@font-face {
  font-family: 'Manrope';
  src: url('/fonts/manrope-latin-wght-normal.woff2') format('woff2');
  font-weight: 200 800;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Inter';
  src: url('/fonts/inter-latin-wght-normal.woff2') format('woff2');
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'IBM Plex Mono';
  src: url('/fonts/ibm-plex-mono-latin-400-normal.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

:root {
  --teal: #173f3b;
  --paper: #f7f6f2;
  --ink: #192b2a;
  --coral: #ff795f;
  --mist: #dde5df;
  --surface: #ffffff;
  --soft-teal: #e8f1ed;
  --text-2: #61716d;
  --warning-bg: #fdf3dc;
  --warning-border: #e3c27a;
  --warning-text: #5c4310;

  --bg: var(--paper);
  --text: var(--ink);
  --muted: var(--text-2);
  --line: var(--mist);
  --panel: var(--surface);
  --panel-head: var(--soft-teal);
  --brand: var(--teal);
  --on-brand: var(--paper);
  --brand-surface: var(--teal);
  --on-brand-surface: var(--paper);
  --on-brand-surface-muted: #b9cdc6;
  --link: var(--teal);
  --focus: #2f7d73;

  --font-display: 'Manrope', ui-sans-serif, system-ui, sans-serif;
  --font-text: 'Inter', ui-sans-serif, system-ui, sans-serif;
  --font-mono: 'IBM Plex Mono', ui-monospace, 'SF Mono', monospace;

  --radius-s: 8px;
  --radius-m: 12px;
  --radius-l: 16px;
  --shell: 1160px;
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #101f1e;
    --text: #eef1ec;
    --muted: #a3b3ae;
    --line: #2a403c;
    --panel: #192d2a;
    --panel-head: #203833;
    --brand: var(--soft-teal);
    --on-brand: var(--teal);
    --brand-surface: #192d2a;
    --on-brand-surface: #eef1ec;
    --on-brand-surface-muted: #a3b3ae;
    --link: #9fd0c4;
    --focus: #9fd0c4;
    --warning-bg: #3a2f14;
    --warning-border: #8a6d2b;
    --warning-text: #f3dfae;
  }
}

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-top: 24px;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-text);
  font-size: 1.0625rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  font-feature-settings: 'cv11', 'ss01';
}

h1,
h2,
h3 {
  font-family: var(--font-display);
  color: var(--text);
  margin: 0;
  text-wrap: balance;
}

p {
  margin: 0;
}

a {
  color: var(--link);
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
}

a:hover {
  text-decoration-thickness: 2px;
}

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

.mono {
  font-family: var(--font-mono);
  font-size: 0.92em;
}

.shell {
  width: 100%;
  max-width: var(--shell);
  margin: 0 auto;
  padding: 0 24px;
}

.skip-link {
  position: absolute;
  left: 16px;
  top: -48px;
  padding: 8px 12px;
  background: var(--panel);
  color: var(--text);
  border-radius: var(--radius-s);
  z-index: 10;
}

.skip-link:focus {
  top: 12px;
}

/* Wordmark: logo option 3, letters as outlines (src/wordmark.svg), so it needs no font. */
.wordmark {
  display: inline-flex;
  color: var(--brand);
  text-decoration: none;
}

.wordmark-svg {
  display: block;
  height: 1.625rem;
  width: auto;
}

.wordmark-dot {
  fill: var(--coral);
}

.wordmark-small .wordmark-svg {
  height: 1.25rem;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 22px;
  border-radius: var(--radius-s);
  background: var(--brand);
  color: var(--on-brand);
  font-family: var(--font-text);
  font-weight: 600;
  font-size: 1rem;
  text-decoration: none;
  transition: background-color 150ms var(--ease), transform 150ms var(--ease);
}

.button:hover {
  background: color-mix(in srgb, var(--brand) 88%, var(--text));
}

.button:active {
  transform: translateY(1px);
}

.button-small {
  min-height: 38px;
  padding: 0 16px;
  font-size: 0.9375rem;
}

/* Header and footer */

.site-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 76px;
}

.site-footer {
  border-top: 1px solid var(--line);
  margin-top: 96px;
}

.site-footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px 32px;
  padding-top: 32px;
  padding-bottom: 40px;
}

.footer-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
  font-size: 0.9375rem;
}

.footer-nav a {
  color: var(--muted);
  text-decoration: none;
}

.footer-nav a:hover {
  color: var(--text);
  text-decoration: underline;
}

.footer-legal {
  margin-left: auto;
  color: var(--muted);
  font-size: 0.875rem;
}

/* Home: hero */

.hero {
  padding: 56px 0 104px;
}

.hero-inner {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: 72px;
  align-items: center;
}

.hero h1 {
  font-size: clamp(2.375rem, 1.4rem + 3.4vw, 3.75rem);
  font-weight: 600;
  line-height: 1.06;
  letter-spacing: -0.03em;
  max-width: 15ch;
}

.lede {
  margin-top: 28px;
  max-width: 34em;
  font-size: 1.1875rem;
  line-height: 1.55;
  color: var(--muted);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px 20px;
  margin-top: 36px;
}

.hero-note {
  color: var(--muted);
  font-size: 0.9375rem;
}

/* Home: the run panel. The one expressive element of the page: an execution trace. */

.run {
  margin: 0;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius-l);
  box-shadow: 0 1px 2px rgb(23 63 59 / 4%), 0 12px 32px -12px rgb(23 63 59 / 14%);
  overflow: hidden;
}

.run-request {
  padding: 22px 26px 20px;
  background: var(--panel-head);
  border-bottom: 1px solid var(--line);
}

.run-from {
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--text);
}

.run-ask {
  margin-top: 6px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.0625rem;
  line-height: 1.45;
  color: var(--text);
}

.run-steps {
  list-style: none;
  margin: 0;
  padding: 22px 26px 10px;
}

.step {
  position: relative;
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr);
  column-gap: 16px;
  padding-bottom: 18px;
}

/* The path between steps. */
.step:not(:last-child)::before {
  content: '';
  position: absolute;
  left: 9.5px;
  top: 24px;
  bottom: 2px;
  width: 1px;
  background: var(--line);
}

.step-mark {
  position: relative;
  width: 20px;
  height: 20px;
  margin-top: 1px;
  border-radius: 50%;
  background: var(--brand);
}

/* Check mark drawn with borders. */
.step-mark::after {
  content: '';
  position: absolute;
  left: 7px;
  top: 4.5px;
  width: 4.5px;
  height: 8.5px;
  border: solid var(--on-brand);
  border-width: 0 1.75px 1.75px 0;
  transform: rotate(45deg);
}

.step-ask .step-mark {
  background: var(--coral);
}

.step-ask .step-mark::after {
  border-color: var(--teal);
}

.step-next .step-mark {
  background: transparent;
  border: 1.75px solid var(--brand);
}

/* Scheduled, not run yet: an open ring. */
.step-next .step-mark::after {
  content: none;
}

.step-title {
  font-weight: 600;
  font-size: 0.9875rem;
  line-height: 1.4;
}

.step-detail {
  margin-top: 2px;
  font-size: 0.9375rem;
  line-height: 1.5;
  color: var(--muted);
}

/* One orchestrated moment: the steps resolve in order on load. */
@media (prefers-reduced-motion: no-preference) {
  .step {
    opacity: 0;
    animation: step-in 240ms var(--ease) forwards;
    animation-delay: calc(500ms + var(--i) * 420ms);
  }

  .step-mark {
    animation: mark-in 200ms var(--ease) backwards;
    animation-delay: calc(560ms + var(--i) * 420ms);
  }
}

@keyframes step-in {
  from {
    opacity: 0;
    transform: translateY(4px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes mark-in {
  from {
    transform: scale(0.6);
  }
  to {
    transform: none;
  }
}

/* Home: sections */

.section {
  padding: 88px 0;
}

.section h2 {
  font-size: clamp(1.75rem, 1.25rem + 1.6vw, 2.5rem);
  font-weight: 600;
  line-height: 1.12;
  letter-spacing: -0.025em;
  max-width: 22ch;
}

.facts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 40px;
  margin-top: 56px;
}

.fact {
  padding-top: 22px;
  border-top: 1px solid var(--line);
}

.fact h3 {
  font-size: 1.1875rem;
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: -0.01em;
}

.fact p {
  margin-top: 12px;
  color: var(--muted);
  max-width: 34em;
}

.section-control {
  background: var(--brand-surface);
  color: var(--on-brand-surface);
}

.section-control h2 {
  color: var(--on-brand-surface);
}

.control {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: 48px 72px;
  align-items: start;
}

.control-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.control-list li {
  position: relative;
  padding: 18px 0 18px 32px;
  border-top: 1px solid rgb(247 246 242 / 16%);
  font-size: 1.0625rem;
  line-height: 1.5;
}

.control-list li:last-child {
  border-bottom: 1px solid rgb(247 246 242 / 16%);
}

.control-list li::before {
  content: '';
  position: absolute;
  left: 4px;
  top: 26px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  border: 1.75px solid var(--on-brand-surface-muted);
}

.section-close {
  padding-bottom: 24px;
}

.close p {
  margin-top: 16px;
  max-width: 34em;
  color: var(--muted);
}

.close .button {
  margin-top: 12px;
}

/* Legal pages */

.legal {
  padding-top: 32px;
}

.draft-notice {
  padding: 12px 16px;
  border: 1px solid var(--warning-border);
  border-radius: var(--radius-s);
  background: var(--warning-bg);
  color: var(--warning-text);
  font-weight: 600;
  font-size: 0.9375rem;
}

.legal-header {
  margin-top: 40px;
  padding-bottom: 28px;
  border-bottom: 1px solid var(--line);
}

.legal-header h1 {
  font-size: clamp(2rem, 1.5rem + 1.8vw, 2.875rem);
  font-weight: 600;
  letter-spacing: -0.025em;
  line-height: 1.1;
}

.legal-updated {
  margin-top: 12px;
  color: var(--muted);
  font-size: 0.9375rem;
}

.legal-layout {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 64px;
  margin-top: 40px;
}

.legal-toc {
  position: sticky;
  top: 24px;
  align-self: start;
  font-size: 0.875rem;
}

.legal-toc-title {
  font-weight: 600;
  color: var(--text);
}

.legal-toc ul {
  list-style: none;
  margin: 12px 0 0;
  padding: 0 0 0 12px;
  border-left: 1px solid var(--line);
}

.legal-toc li + li {
  margin-top: 8px;
}

.legal-toc a {
  color: var(--muted);
  text-decoration: none;
}

.legal-toc a:hover {
  color: var(--text);
}

.legal-body {
  max-width: 68ch;
}

.legal-body h2 {
  margin-top: 48px;
  font-size: 1.375rem;
  font-weight: 600;
  letter-spacing: -0.015em;
  line-height: 1.25;
}

.legal-body h3 {
  margin-top: 28px;
  font-size: 1.0625rem;
  font-weight: 600;
}

.legal-body > :first-child {
  margin-top: 0;
}

.legal-body p,
.legal-body ul {
  margin-top: 14px;
}

.legal-body h2 + p,
.legal-body h3 + p {
  margin-top: 10px;
}

.legal-body ul {
  padding-left: 1.25em;
}

.legal-body li + li {
  margin-top: 8px;
}

.legal-body li::marker {
  color: var(--muted);
}

.placeholder {
  padding: 10px 14px;
  border: 1px dashed var(--warning-border);
  border-radius: var(--radius-s);
  background: var(--warning-bg);
  color: var(--warning-text);
  font-weight: 500;
}

/* 404 */

.not-found {
  padding-top: 96px;
  padding-bottom: 48px;
}

.not-found h1 {
  font-size: clamp(2rem, 1.5rem + 1.8vw, 2.875rem);
  font-weight: 600;
  letter-spacing: -0.025em;
}

.not-found p {
  margin-top: 16px;
  color: var(--muted);
}

/* Narrow screens */

@media (max-width: 960px) {
  .hero-inner,
  .control {
    grid-template-columns: minmax(0, 1fr);
  }

  .hero-inner {
    gap: 56px;
  }

  .facts {
    grid-template-columns: minmax(0, 1fr);
    gap: 32px;
  }

  .legal-layout {
    grid-template-columns: minmax(0, 1fr);
    gap: 32px;
  }

  .legal-toc {
    position: static;
  }
}

@media (max-width: 560px) {
  .shell {
    padding: 0 16px;
  }

  .site-header-inner {
    min-height: 64px;
  }

  .hero {
    padding: 32px 0 72px;
  }

  .lede {
    font-size: 1.0625rem;
  }

  .section {
    padding: 64px 0;
  }

  .run-request,
  .run-steps {
    padding-left: 18px;
    padding-right: 18px;
  }

  .footer-legal {
    margin-left: 0;
    width: 100%;
  }
}
