/*
 * zestroot.ai: the stylesheet of every page.
 *
 * Lemon zest and beetroot on a pith-white page. One root runs from the
 * wordmark down to the apps: a solid branch for an app that exists, a
 * dashed branch for apps still to come. Sora and Manrope are shared with
 * leapsteps.ai so the company and its first app read as one family.
 */

@font-face {
  font-family: "Sora";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("/assets/fonts/sora-latin-700-normal.woff2") format("woff2");
}

@font-face {
  font-family: "Manrope";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/assets/fonts/manrope-latin-400-normal.woff2") format("woff2");
}

@font-face {
  font-family: "Manrope";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("/assets/fonts/manrope-latin-600-normal.woff2") format("woff2");
}

@font-face {
  font-family: "Manrope";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("/assets/fonts/manrope-latin-700-normal.woff2") format("woff2");
}

:root {
  color-scheme: light dark;

  --page: #FAFAF5;
  --surface: #FFFFFF;
  --ink: #2A211B;
  --ink-secondary: #584A40;
  --rule: #E2DDD0;
  --root: #8C1F48;
  --link: #8C1F48;
  --zest: #F2CF1D;
  --zest-edge: #8A6D00;
  --on-zest: #2A211B;
  --focus: #2A211B;

  --shadow-lifted: 0 1px 2px rgba(42, 33, 27, 0.06),
    0 10px 28px rgba(42, 33, 27, 0.08), 0 28px 64px rgba(42, 33, 27, 0.08);
  --zest-glow: 0 1px 2px rgba(42, 33, 27, 0.18),
    0 6px 18px rgba(242, 207, 29, 0.45);
  --zest-glow-hover: 0 1px 2px rgba(42, 33, 27, 0.2),
    0 10px 28px rgba(242, 207, 29, 0.6);

  --font-display: "Sora", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-ui: "Manrope", system-ui, -apple-system, "Segoe UI", Roboto,
    "Helvetica Neue", Arial, sans-serif;

  --gutter: 16px;
  --content: 1080px;
  --root-width: 3px;
  --indent: 28px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --page: #1C1713;
    --surface: #28211B;
    --ink: #F4EFE6;
    --ink-secondary: #CFC2B4;
    --rule: #3E342C;
    --root: #F2A2C0;
    --link: #F2A2C0;
    --zest-edge: #F2CF1D;
    --focus: #F4EFE6;

    --shadow-lifted: 0 1px 2px rgba(0, 0, 0, 0.4),
      0 12px 32px rgba(0, 0, 0, 0.35), 0 32px 64px rgba(0, 0, 0, 0.25);
    --zest-glow: 0 1px 2px rgba(0, 0, 0, 0.4),
      0 4px 16px rgba(242, 207, 29, 0.22);
    --zest-glow-hover: 0 1px 2px rgba(0, 0, 0, 0.4),
      0 8px 26px rgba(242, 207, 29, 0.36);
  }
}

@media (min-width: 768px) {
  :root {
    --gutter: 32px;
    --indent: 48px;
  }
}

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--page);
  color: var(--ink);
  font-family: var(--font-ui);
  font-size: 1.125rem;
  line-height: 1.6;
}

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

h2 {
  font-size: clamp(1.75rem, 1.2rem + 2vw, 2.25rem);
  line-height: 1.2;
  letter-spacing: -0.02em;
}

h3 {
  font-size: 1.5rem;
  line-height: 1.25;
  letter-spacing: -0.01em;
}

p,
ul,
dl,
dd {
  margin: 0;
}

a {
  color: var(--link);
  text-decoration-thickness: 1.5px;
  text-underline-offset: 0.18em;
}

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

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

.skip-link {
  position: absolute;
  top: 8px;
  left: 8px;
  z-index: 10;
  padding: 10px 16px;
  border-radius: 12px;
  background: var(--ink);
  color: var(--page);
  font-weight: 700;
  transform: translateY(-200%);
}

.skip-link:focus-visible {
  transform: none;
}

.container {
  width: 100%;
  max-width: var(--content);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

/* Header */

.site-header {
  padding-block: 20px;
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.mark-link {
  display: block;
  line-height: 0;
}

.mark-link img {
  border-radius: 9px;
}

.nav-links {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 20px;
  padding: 0;
  list-style: none;
  font-weight: 600;
}

.nav-links a {
  color: var(--ink);
  text-decoration: none;
}

.nav-links a:hover {
  text-decoration: underline;
}

/* Hero: the wordmark takes root */

.hero {
  padding-top: clamp(40px, 8vw, 96px);
}

.hero-wordmark {
  margin-left: -0.04em;
  font-size: clamp(3.5rem, 19vw, 12rem);
  line-height: 0.86;
  letter-spacing: -0.05em;
}

.roots {
  display: block;
  width: 100%;
  max-width: 560px;
  height: 120px;
  overflow: hidden;
}

.root {
  fill: none;
  stroke: var(--root);
  stroke-linecap: round;
}

.root-tap {
  stroke-width: var(--root-width);
}

.root-side,
.root-hair {
  stroke-dasharray: 1;
  animation: root-grow 900ms cubic-bezier(0.2, 0.7, 0.3, 1) both;
}

.root-side {
  stroke-width: 2;
}

.root-hair {
  stroke-width: 1.25;
  animation-duration: 500ms;
}

.root-1 { animation-delay: 150ms; }
.root-2 { animation-delay: 250ms; }
.root-3 { animation-delay: 350ms; }
.root-4 { animation-delay: 450ms; }
.hair-1 { animation-delay: 700ms; }
.hair-2 { animation-delay: 800ms; }
.hair-3 { animation-delay: 900ms; }

.root-tip {
  fill: var(--zest);
  stroke: var(--root);
  stroke-width: 2;
  transform-box: fill-box;
  transform-origin: center;
  animation: tip-pop 360ms cubic-bezier(0.3, 1.6, 0.5, 1) both;
}

.tip-1 { animation-delay: 1000ms; }
.tip-2 { animation-delay: 1100ms; }
.tip-3 { animation-delay: 1200ms; }
.tip-4 { animation-delay: 1300ms; }

@keyframes root-grow {
  from { stroke-dashoffset: 1; }
  to { stroke-dashoffset: 0; }
}

@keyframes tip-pop {
  from { opacity: 0; transform: scale(0.2); }
  to { opacity: 1; transform: scale(1); }
}

@media (prefers-reduced-motion: reduce) {
  .root-side,
  .root-hair,
  .root-tip {
    animation: none;
  }
}

/*
 * The root keeps running beside everything in `.rooted`. Each railed
 * element draws its own segment, so spacing inside `.rooted` is padding,
 * never margin: a margin would break the line.
 */

.hero-lead,
.apps-title,
.app {
  position: relative;
  padding-left: var(--indent);
}

.hero-lead::before,
.apps-title::before,
.app::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: var(--root-width);
  background: var(--root);
}

.hero-lead {
  max-width: calc(34em + var(--indent));
  padding-top: 8px;
  padding-bottom: clamp(48px, 7vw, 72px);
  font-size: clamp(1.25rem, 1.05rem + 0.8vw, 1.5rem);
  line-height: 1.5;
}

.apps-title {
  padding-bottom: 24px;
}

.app-list {
  padding: 0;
  list-style: none;
}

.app {
  --branch-y: 52px;
  padding-bottom: 24px;
}

.app:last-child {
  padding-bottom: 0;
}

.app:last-child::before {
  bottom: auto;
  height: var(--branch-y);
}

.app::after {
  content: "";
  position: absolute;
  top: calc(var(--branch-y) - var(--root-width) / 2);
  left: 0;
  width: var(--indent);
  height: var(--root-width);
  background: var(--root);
}

.app-next {
  --branch-y: 40px;
}

.app-next::after {
  height: 0;
  border-top: var(--root-width) dashed var(--root);
  background: none;
}

.app-card,
.app-card-next {
  position: relative;
  max-width: 640px;
  border-radius: 20px;
  padding: 24px;
}

.app-card::before,
.app-card-next::before {
  content: "";
  position: absolute;
  top: calc(var(--branch-y) - 7px);
  left: -7px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  box-shadow: 0 0 0 2px var(--root);
}

.app-card {
  background: var(--surface);
  box-shadow: var(--shadow-lifted);
}

.app-card::before {
  background: var(--zest);
}

.app-card-next {
  border: 2px dashed var(--root);
}

.app-card-next::before {
  left: -9px;
  top: calc(var(--branch-y) - 9px);
  background: var(--page);
}

.app-head {
  display: flex;
  align-items: center;
  gap: 16px;
}

.app-icon {
  flex: none;
  border-radius: 14px;
}

.app-tagline {
  margin-top: 2px;
  font-weight: 600;
}

.app-body {
  margin-top: 16px;
  color: var(--ink-secondary);
}

.app-card-next .app-body {
  margin-top: 8px;
}

.app-status {
  margin-top: 12px;
  color: var(--ink-secondary);
  font-size: 1rem;
}

.button {
  display: inline-flex;
  align-items: center;
  min-height: 48px;
  margin-top: 24px;
  padding: 12px 24px;
  border: 1px solid var(--zest-edge);
  border-radius: 999px;
  background: var(--zest);
  box-shadow: var(--zest-glow);
  color: var(--on-zest);
  font-weight: 700;
  text-decoration: none;
  transition: box-shadow 160ms ease;
}

.button:hover {
  box-shadow: var(--zest-glow-hover);
}

.button:focus-visible {
  border-radius: 999px;
}

@media (min-width: 768px) {
  .app-card,
  .app-card-next {
    padding: 28px 32px;
  }

  .app {
    --branch-y: 56px;
  }

  .app-next {
    --branch-y: 44px;
  }
}

/* Company details */

.company {
  padding-block: clamp(80px, 12vw, 128px) clamp(64px, 8vw, 96px);
}

.facts {
  max-width: 820px;
  margin-top: 24px;
  border-bottom: 1px solid var(--rule);
}

.fact {
  display: grid;
  gap: 2px 32px;
  padding-block: 16px;
  border-top: 1px solid var(--rule);
}

.fact dt {
  color: var(--ink-secondary);
  font-weight: 600;
}

.fact address {
  font-style: normal;
}

@media (min-width: 640px) {
  .fact {
    grid-template-columns: 12rem 1fr;
  }
}

/* Text pages: privacy and 404 */

.page-main {
  padding-block: clamp(40px, 8vw, 80px) clamp(64px, 8vw, 96px);
}

.prose {
  max-width: 42rem;
}

.prose h1 {
  font-size: clamp(2.5rem, 1.6rem + 4vw, 3.5rem);
  line-height: 1.05;
  letter-spacing: -0.03em;
}

.prose h2 {
  margin-top: 48px;
  font-size: 1.5rem;
}

.prose p {
  margin-top: 16px;
}

.prose .lead {
  margin-top: 20px;
  font-size: 1.25rem;
  line-height: 1.5;
}

.updated {
  color: var(--ink-secondary);
  font-size: 1rem;
}

/* Footer */

.site-footer {
  border-top: 1px solid var(--rule);
  padding-block: 28px 40px;
}

.site-footer .container {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 32px;
}

.footer-note {
  color: var(--ink-secondary);
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
  padding: 0;
  list-style: none;
}
