/* mogura.ai. Tokens mirror packages/shared/src/theme.css in the mogura repo
   and packages/design in mogura-rec; keep them in step when the theme moves.
   The theme is resolved to data-theme="light|dark" on <html> by a script in
   the head; the prefers-color-scheme block below is the no-script fallback. */

:root {
  --theme: light;
  color-scheme: light;
  --background: #f7f7f4;
  --foreground: #1d1c1a;
  --muted-foreground: rgb(29 28 26 / 0.62);
  --faint-foreground: rgb(29 28 26 / 0.45);
  --border: rgb(29 28 26 / 0.14);
  --surface: #fbfbf8;
  --primary: #c7e5cd;
  --primary-foreground: #14291d;
  --brand: #5faa9e;
  --ring: var(--brand);
  --pastel-green: #c7e5cd;
  --pastel-pink: #ffd7e6;
  --pastel-blue: #d8e7ff;
  /* The frosted glass mark's body colours, read off the document by
     hero.js so this is the only place they are written. */
  --mark-glass-a: #5faa9e;
  --mark-glass-b: #c7e5cd;
  --font-sans:
    "Space Grotesk", "Avenir Next", ui-sans-serif, system-ui, sans-serif;
  --container: 74rem;
  --gutter: clamp(1.25rem, 5vw, 4rem);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --theme: dark;
    color-scheme: dark;
    --background: #161615;
    --foreground: #f4f2ee;
    --muted-foreground: rgb(244 242 238 / 0.66);
    --faint-foreground: rgb(244 242 238 / 0.46);
    --border: rgb(244 242 238 / 0.14);
    --surface: #1d1c1a;
    --primary: #b6e3c4;
    --primary-foreground: #102017;
    --brand: #a7e3d4;
    --pastel-green: #b6e3c4;
    --pastel-pink: #ffb6cf;
    --pastel-blue: #abc9ff;
    --mark-glass-a: #3c8a7d;
    --mark-glass-b: #a7e3d4;
  }
}

:root[data-theme="dark"] {
  --theme: dark;
  color-scheme: dark;
  --background: #161615;
  --foreground: #f4f2ee;
  --muted-foreground: rgb(244 242 238 / 0.66);
  --faint-foreground: rgb(244 242 238 / 0.46);
  --border: rgb(244 242 238 / 0.14);
  --surface: #1d1c1a;
  --primary: #b6e3c4;
  --primary-foreground: #102017;
  --brand: #a7e3d4;
  --pastel-green: #b6e3c4;
  --pastel-pink: #ffb6cf;
  --pastel-blue: #abc9ff;
  --mark-glass-a: #3c8a7d;
  --mark-glass-b: #a7e3d4;
}

* {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  background: var(--background);
  color: var(--foreground);
  font-family: var(--font-sans);
  font-size: 1.0625rem;
  line-height: 1.6;
  letter-spacing: -0.008em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1,
h2,
p {
  margin: 0;
}

a {
  color: inherit;
}

button {
  font: inherit;
  color: inherit;
}

:focus-visible {
  outline: 0.125rem solid var(--ring);
  outline-offset: 0.25rem;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

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

.skip-link {
  position: absolute;
  left: 1rem;
  top: -100%;
  padding: 0.5rem 0.75rem;
  background: var(--foreground);
  color: var(--background);
  text-decoration: none;
  z-index: 100;
}

.skip-link:focus {
  top: 1rem;
}

/* Brand. The mark is a mask over the current colour rather than an <img>,
   so it paints itself from the theme like the rest of the page. */
.brand-mark {
  display: inline-block;
  width: 1em;
  height: 1em;
  flex: none;
  background: currentColor;
  -webkit-mask: url("/logo.svg") center / contain no-repeat;
  mask: url("/logo.svg") center / contain no-repeat;
}

.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 0.6em;
  font-size: 1.375rem;
  font-weight: 500;
  letter-spacing: -0.03em;
  line-height: 1;
  text-decoration: none;
}

.wordmark .brand-mark {
  width: 1.15em;
  height: 1.15em;
}

.wordmark-small {
  font-size: 1.125rem;
}

/* Hero: copy on the left, the mark as a glass object on the right. */
.hero {
  position: relative;
  display: flex;
  flex-direction: column;
  /* Fills a laptop screen; on a tall monitor it stops at a comfortable
     height rather than stranding the strip and footer below the fold. */
  min-height: min(100svh, 58rem);
  overflow: hidden;
}

.site-header {
  padding-block: clamp(1.25rem, 3vw, 2rem);
}

.site-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
}

.site-nav-cta {
  font-size: 0.9375rem;
  padding-bottom: 0.125rem;
  border-bottom: 0.0625rem solid var(--border);
  text-decoration: none;
  transition: border-color 160ms ease;
}

.site-nav-cta:hover {
  border-color: var(--foreground);
}

.hero-grid {
  display: grid;
  flex: 1;
  align-content: center;
  gap: clamp(2.5rem, 6vw, 5rem);
  padding-block: clamp(2.5rem, 6vw, 5rem) clamp(3rem, 7vw, 6rem);
}

@media (min-width: 64rem) {
  .hero-grid {
    grid-template-columns: minmax(0, 1fr) minmax(22rem, 0.9fr);
    align-items: center;
  }
}

/* The object. A square canvas, transparent, over the page's own ground;
   the flat mark underneath is what shows until the shader is ready and on
   a browser without WebGPU. */
.hero-visual {
  position: relative;
  width: min(100%, 30rem);
  aspect-ratio: 1;
  margin-inline: auto;
  justify-self: center;
}

@media (max-width: 63.98rem) {
  .hero-visual {
    order: -1;
    width: min(70vw, 20rem);
  }
}

#hero-canvas {
  position: absolute;
  inset: 0;
  display: block;
  opacity: 0;
  transition: opacity 900ms ease;
}

#hero-canvas.is-ready {
  opacity: 1;
}

.hero-fallback {
  position: absolute;
  inset: 14%;
  width: auto;
  height: auto;
  color: var(--brand);
  transition: opacity 600ms ease;
}

#hero-canvas.is-ready + .hero-fallback {
  opacity: 0;
}

.backed {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  color: var(--muted-foreground);
  font-size: 0.9375rem;
}

.yc-mark {
  width: 1.375rem;
  height: 1.375rem;
  flex: none;
}

/* Same face as the app's own landing: the grotesk at medium weight, set
   tight. */
.hero-title {
  /* Sized so the line breaks fall as "Data projects for / enterprises and /
     frontier labs." at every width: three lines, not four. */
  max-width: 19ch;
  margin-top: 1.25rem;
  font-size: clamp(2.5rem, 4.7vw, 4rem);
  font-weight: 500;
  letter-spacing: -0.04em;
  line-height: 1.02;
  text-wrap: balance;
}

.hero-lede {
  max-width: 26rem;
  margin-top: clamp(1.25rem, 2.5vw, 1.75rem);
  font-size: clamp(1.125rem, 1.7vw, 1.3125rem);
  line-height: 1.5;
  color: var(--muted-foreground);
  text-wrap: pretty;
}

.hero-actions {
  margin-top: clamp(1.75rem, 3vw, 2.5rem);
}

/* The products: a label that says these go somewhere, then two small
   buttons, each naming the product and what it is. */
.products {
  margin-top: clamp(1.75rem, 3vw, 2.25rem);
}

.products-label {
  margin-bottom: 0.625rem;
  color: var(--faint-foreground);
  font-size: 0.8125rem;
  letter-spacing: 0.01em;
}

.product-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.625rem;
}

.product-link {
  display: inline-flex;
  align-items: baseline;
  gap: 0.5rem;
  min-height: 2.5rem;
  padding: 0.5rem 0.9375rem;
  border: 0.0625rem solid color-mix(in srgb, var(--foreground) 22%, transparent);
  color: var(--foreground);
  font-size: 0.9375rem;
  font-weight: 500;
  letter-spacing: -0.01em;
  text-decoration: none;
  transition:
    border-color 160ms ease,
    background-color 160ms ease;
}

.product-link-desc {
  color: var(--muted-foreground);
  font-weight: 400;
}

.product-link-arrow {
  margin-left: 0.125rem;
  color: var(--muted-foreground);
  transition:
    color 160ms ease,
    transform 160ms ease;
}

.product-link:hover {
  border-color: var(--brand);
  background: color-mix(in srgb, var(--brand) 10%, transparent);
}

.product-link:hover .product-link-arrow {
  color: var(--brand);
  transform: translate(0.1rem, -0.1rem);
}

.button {
  display: inline-flex;
  align-items: center;
  min-height: 3rem;
  padding: 0 1.375rem;
  font-size: 0.9875rem;
  font-weight: 500;
  letter-spacing: -0.01em;
  text-decoration: none;
  transition:
    background-color 160ms ease,
    color 160ms ease;
}

.button-primary {
  background: var(--primary);
  color: var(--primary-foreground);
}

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

/* Footer */
.site-footer {
  border-top: 0.0625rem solid var(--border);
  padding-block: 1.75rem;
  font-size: 0.9375rem;
}

.footer-about {
  color: var(--muted-foreground);
}

.site-footer-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem 2.5rem;
}

.footer-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 1.75rem;
}

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

.footer-nav a:hover {
  color: var(--foreground);
}

.footer-note {
  margin-left: auto;
  color: var(--faint-foreground);
}

/* The theme switch: the app's light / dark / system toggle, laid flat. */
.theme-switch {
  display: inline-flex;
  border: 0.0625rem solid var(--border);
}

.theme-switch button {
  display: inline-grid;
  place-items: center;
  width: 2.25rem;
  height: 2.25rem;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--muted-foreground);
  cursor: pointer;
  transition:
    background-color 160ms ease,
    color 160ms ease;
}

.theme-switch button + button {
  border-left: 0.0625rem solid var(--border);
}

.theme-switch button:hover {
  color: var(--foreground);
}

.theme-switch button[aria-pressed="true"] {
  background: var(--primary);
  color: var(--primary-foreground);
}

.theme-switch svg {
  width: 1rem;
  height: 1rem;
}

.legal-page {
  max-width: 52rem;
  margin-inline: auto;
  padding: 2rem var(--gutter) 4rem;
  overflow-wrap: anywhere;
  font-size: 1rem;
}

.legal-page p,
.legal-page td,
.legal-page th {
  white-space: pre-wrap;
}

.legal-page > * + *,
.legal-page article > * + * {
  margin-top: 1rem;
}

.legal-page h1 {
  font-size: 2rem;
  line-height: 1.2;
}

.legal-page h2,
.legal-page h3 {
  margin-top: 2rem;
  font-size: 1.25rem;
}

.legal-page table {
  width: 100%;
  table-layout: fixed;
  border-collapse: collapse;
  font-size: 0.875rem;
}

.legal-page td,
.legal-page th {
  border: 0.0625rem solid var(--border);
  padding: 0.5rem;
  text-align: left;
  vertical-align: top;
}

/* Motion */
.reveal {
  opacity: 0;
  transform: translateY(0.75rem);
  animation: reveal-in 900ms cubic-bezier(0.16, 1, 0.3, 1) forwards;
  animation-delay: var(--reveal-delay, 0s);
}

@keyframes reveal-in {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (prefers-reduced-motion: reduce) {
  .reveal {
    animation: none;
    opacity: 1;
    transform: none;
  }

  .product-link,
  .button,
  .site-nav-cta,
  .theme-switch button,
  .hero-fallback,
  #hero-canvas {
    transition: none;
  }
}
