/* Llamora welcome page. Colours follow the app's own tokens. */

:root {
  color-scheme: light dark;

  --bg: #fafafa;
  --bg-alt: #f3f4f6;
  --surface: #ffffff;
  --text: #343434;
  --heading: #222222;
  --muted: #666666;
  --accent: #36a6f4;
  --accent-hover: #1f97f2;
  --accent-soft: rgba(54, 166, 244, 0.1);
  --border: rgba(0, 0, 0, 0.1);
  --shadow: 0 18px 48px rgba(20, 30, 45, 0.1), 0 2px 6px rgba(0, 0, 0, 0.05);
  --code-bg: #f1f3f5;

  --radius: 1.2rem;
  --measure: 34rem;
  --page: 72rem;
  --font: system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0d0f12;
    --bg-alt: #12151a;
    --surface: #0f1318;
    --text: #d8dbe0;
    --heading: #fafbfc;
    --muted: #b3b8c0;
    --accent: #6fb7e6;
    --accent-hover: #86c3ea;
    --accent-soft: rgba(111, 183, 230, 0.14);
    --border: rgba(230, 231, 234, 0.14);
    --shadow: 0 18px 48px rgba(0, 0, 0, 0.55), 0 0 0 1px rgba(255, 255, 255, 0.04);
    --code-bg: #161a20;
  }
}

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

html {
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}

body {
  margin: 0;
  padding-inline: 1.25rem;
  background: var(--bg);
  color: var(--text);
  font: 400 1.0625rem / 1.65 var(--font);
  -webkit-font-smoothing: antialiased;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

a {
  color: var(--accent);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
}

a:hover {
  color: var(--accent-hover);
}

h2,
h3 {
  color: var(--heading);
  line-height: 1.25;
  font-weight: 600;
  letter-spacing: -0.01em;
}

h2 {
  margin: 0 0 0.75rem;
  font-size: clamp(1.5rem, 1.2rem + 1vw, 1.9rem);
}

h3 {
  margin: 0 0 0.4rem;
  font-size: 1.1rem;
}

p {
  margin: 0 0 1rem;
}

/* -- hero ---------------------------------------------------------------- */

.hero {
  max-width: var(--page);
  margin: 0 auto;
  padding-block: clamp(3rem, 8vw, 6rem) 0;
  text-align: center;
}

.hero__logo img {
  width: min(22rem, 80vw);
  margin: 0 auto;
}

.hero__tagline {
  margin: 1.5rem auto 0.75rem;
  color: var(--heading);
  font-size: clamp(1.35rem, 1.1rem + 1.2vw, 1.85rem);
  font-weight: 500;
  line-height: 1.3;
  letter-spacing: -0.01em;
}

.hero__lede {
  max-width: var(--measure);
  margin: 0 auto 2rem;
  color: var(--muted);
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.hero__note {
  margin: 0 auto clamp(2.5rem, 6vw, 4rem);
  color: var(--muted);
  font-size: 0.875rem;
}

.button {
  display: inline-block;
  padding: 0.6rem 1.25rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--heading);
  font-size: 0.975rem;
  font-weight: 500;
  text-decoration: none;
  transition: border-color 160ms ease, background-color 160ms ease;
}

.button:hover {
  border-color: var(--accent);
  color: var(--heading);
}

.button--primary {
  background: var(--accent-soft);
  border-color: color-mix(in srgb, var(--accent) 45%, transparent);
}

/* -- screenshots ---------------------------------------------------------- */

.shot {
  margin: 0;
}

.shot picture {
  display: block;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.shot figcaption {
  margin-top: 0.9rem;
  color: var(--muted);
  font-size: 0.925rem;
  text-align: center;
}

.shot--hero {
  max-width: var(--page);
  margin: 0 auto;
}

/* The hero: a still, with the video laid over it once it plays. */
.shot__frame {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.shot .shot__frame picture {
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

.shot__frame video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 500ms ease;
}

.is-playing .shot__frame video {
  opacity: 1;
}

.shot__toggle {
  position: absolute;
  right: 0.75rem;
  bottom: 0.75rem;
  display: grid;
  place-items: center;
  width: 2.25rem;
  height: 2.25rem;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: color-mix(in srgb, var(--surface) 85%, transparent);
  color: var(--muted);
  cursor: pointer;
  opacity: 0.55;
  transition: opacity 160ms ease, color 160ms ease;
}

.shot__toggle[hidden] {
  display: none;
}

.shot__toggle:hover,
.shot__toggle:focus-visible {
  opacity: 1;
  color: var(--heading);
}

.shot__toggle svg {
  width: 0.9rem;
  height: 0.9rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.shot__toggle .icon-play,
.shot__toggle.is-paused .icon-pause {
  display: none;
}

.shot__toggle.is-paused .icon-play {
  display: block;
}

.shot--phone {
  justify-self: center;
  width: min(19rem, 72vw);
}

.shot--phone picture {
  border-radius: 2.25rem;
  border-width: 6px;
  border-color: color-mix(in srgb, var(--heading) 12%, transparent);
}

/* -- features ------------------------------------------------------------- */

main {
  max-width: var(--page);
  margin: 0 auto;
}

.feature {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(0, 3fr);
  gap: clamp(2rem, 5vw, 4rem);
  align-items: center;
  padding-block: clamp(3.5rem, 9vw, 7rem) 0;
}

.feature__text {
  max-width: var(--measure);
}

.feature__text p {
  color: var(--muted);
}

.feature--flip {
  grid-template-columns: minmax(0, 3fr) minmax(0, 2fr);
}

.feature--flip .feature__text {
  order: 2;
}

.feature--wide {
  display: block;
  padding-top: clamp(2rem, 5vw, 3.5rem);
}

.feature--phone {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
}

@media (max-width: 800px) {
  .feature,
  .feature--phone {
    grid-template-columns: minmax(0, 1fr);
  }

  .feature--flip .feature__text {
    order: 0;
  }
}

/* -- principles ----------------------------------------------------------- */

.principles {
  margin-top: clamp(4rem, 10vw, 8rem);
  padding: clamp(2rem, 5vw, 3.5rem);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-alt);
}

.principles > h2 {
  margin-bottom: 2rem;
  text-align: center;
}

.principles__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr));
  gap: 1.75rem 2.5rem;
}

.principles p {
  margin: 0;
  color: var(--muted);
  font-size: 0.975rem;
}

/* -- getting started ------------------------------------------------------ */

.start {
  max-width: 44rem;
  margin: clamp(4rem, 10vw, 7rem) auto 0;
}

.start > h2 {
  text-align: center;
}

.start > p {
  color: var(--muted);
}

pre {
  overflow-x: auto;
  margin: 1.5rem 0;
  padding: 1.1rem 1.25rem;
  border: 1px solid var(--border);
  border-radius: 0.8rem;
  background: var(--code-bg);
  color: var(--heading);
  font: 0.875rem / 1.6 var(--mono);
}

code {
  font-family: var(--mono);
  font-size: 0.9em;
}

pre code {
  font-size: inherit;
}

pre .comment {
  color: var(--muted);
}

/* -- footer --------------------------------------------------------------- */

.footer {
  max-width: var(--page);
  margin: clamp(4rem, 10vw, 6rem) auto 0;
  padding-block: 2rem 3rem;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 0.9rem;
  text-align: center;
}

.footer p {
  margin: 0;
}
