/*
 * ramblett.com, the home page (ADR-185). Plain CSS, no build step. Colors are the app's theme
 * tokens (src/theme/tokens.generated.ts) plus the brand violet (assets/brand/tokens), headings use
 * the app's display face (Newsreader 600, subset to Latin; rename the file when it changes, since
 * it is cached for a year), and body text uses the system UI face, as the app does.
 */

@font-face {
  font-family: 'Newsreader';
  src: url('fonts/newsreader-600-latin.woff2') format('woff2');
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

:root {
  color-scheme: light dark;

  /* tokens.color.light */
  --bg: #f7f7f5;
  --section-alt: #efefec;
  --surface: #ffffff;
  --surface-sunken: #efefec;
  --border: #deddd8;
  --text: #1a1a18;
  --text-muted: #5a5953;
  --focus: #3d5bc9;
  --todo: #2d5fc4;
  --event: #7444c8;
  --high: #c8322b;

  /* brand violet-deep, white on it is 6:1 */
  --accent: #5a48e8;
  --accent-hover: #4a38d6;
  --on-accent: #ffffff;
  --accent-text: #5a48e8;

  --shadow: 0 1px 2px rgb(20 20 18 / 0.04), 0 6px 20px rgb(20 20 18 / 0.06);
  --radius-md: 10px;
  --radius-lg: 14px;
  --radius-xl: 20px;
  --radius-pill: 999px;

  --font-display: 'Newsreader', Georgia, 'Times New Roman', serif;
  --font-ui:
    system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial,
    sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    /* tokens.color.dark */
    --bg: #141413;
    --section-alt: #1c1c1a;
    --surface: #252523;
    --surface-sunken: #0f0f0e;
    --border: #33322f;
    --text: #ecebe7;
    --text-muted: #a4a29b;
    --focus: #8fa6f5;
    --todo: #7fa6f5;
    --event: #b79af0;
    --high: #ff7b6e;

    --accent: #5a48e8;
    --accent-hover: #6b5af0;
    --on-accent: #ffffff;
    /* violet text on dark surfaces needs a lighter tint than the fold's (topic violet, 7:1) */
    --accent-text: #a69ef5;

    --shadow: none;
  }
}

/* Base */

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

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

body {
  margin: 0;
  background-color: var(--bg);
  color: var(--text);
  font-family: var(--font-ui);
  font-size: 1.0625rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1,
h2,
h3,
p,
ul,
ol,
figure {
  margin: 0;
}

h1,
h2 {
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: -0.01em;
  text-wrap: balance;
}

h3 {
  font-size: 1.125rem;
  font-weight: 600;
  line-height: 1.35;
}

p {
  text-wrap: pretty;
}

img,
svg {
  display: block;
  max-width: 100%;
}

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

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

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

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

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

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

.container {
  width: 100%;
  max-width: 1120px;
  margin-inline: auto;
  padding-inline: 16px;
}

@media (min-width: 600px) {
  .container {
    padding-inline: 24px;
  }
}

@media (min-width: 1024px) {
  .container {
    padding-inline: 32px;
  }
}

/* Header */

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 72px;
}

.brand {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
}

.brand img {
  width: 154px;
  height: auto;
}

@media (min-width: 600px) {
  .brand img {
    width: 176px;
  }
}

.header-link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  margin-right: -12px;
  padding-inline: 12px;
  color: var(--text);
  font-weight: 600;
  text-decoration: none;
}

.header-link:hover {
  text-decoration: underline;
}

/* Buttons */

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 0 28px;
  border-radius: var(--radius-pill);
  font-size: 1.0625rem;
  font-weight: 600;
  line-height: 1.2;
  text-decoration: none;
}

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

.button--primary:hover {
  background: var(--accent-hover);
}

@media (prefers-reduced-motion: no-preference) {
  .button {
    transition: background-color 120ms cubic-bezier(0.2, 0, 0, 1);
  }
}

/* Hero */

.hero {
  padding-block: 24px 64px;
}

.hero__inner {
  display: grid;
  gap: 48px;
  align-items: center;
}

@media (min-width: 960px) {
  .hero {
    padding-block: 56px 104px;
  }

  .hero__inner {
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
    gap: 64px;
  }
}

.hero h1 {
  font-size: clamp(2.5rem, 1.55rem + 4.2vw, 4.25rem);
  line-height: 1.04;
  letter-spacing: -0.02em;
}

.lede {
  margin-top: 20px;
  max-width: 34em;
  color: var(--text-muted);
  font-size: clamp(1.125rem, 1rem + 0.5vw, 1.3125rem);
  line-height: 1.55;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 24px;
  margin-top: 32px;
}

.soon {
  color: var(--text-muted);
  font-size: 0.9375rem;
}

/* Demo cards: what you capture and what Ramblett makes from it */

.demo {
  padding: 20px;
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  background: var(--section-alt);
}

@media (min-width: 600px) {
  .demo {
    padding: 28px;
  }
}

.label {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--text-muted);
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.label svg {
  width: 16px;
  height: 16px;
  flex: none;
}

.bubble {
  padding: 16px 18px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
}

.bubble__text {
  margin-top: 6px;
  font-size: 1.0625rem;
  line-height: 1.5;
}

.flow {
  display: flex;
  justify-content: center;
  padding-block: 10px;
  color: var(--accent-text);
}

.flow svg {
  width: 24px;
  height: 24px;
}

.card {
  padding: 16px 18px 18px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.kind {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.kind::before {
  content: '';
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: currentColor;
}

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

.kind--event {
  color: var(--event);
}

.card__title {
  margin-top: 6px;
  font-size: 1.125rem;
  font-weight: 600;
  line-height: 1.35;
}

.meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
  padding: 0;
  list-style: none;
}

.meta li {
  padding: 3px 10px;
  border-radius: var(--radius-pill);
  background: var(--section-alt);
  color: var(--text);
  font-size: 0.875rem;
  line-height: 1.5;
}

.meta .meta--high {
  color: var(--high);
  font-weight: 600;
}

.meta .meta--topic {
  border: 1px solid var(--border);
  background: transparent;
}

.card__more {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
}

.checklist {
  display: grid;
  gap: 8px;
  margin-top: 12px;
  padding: 0;
  list-style: none;
}

.checklist li {
  display: flex;
  align-items: center;
  gap: 10px;
}

.checklist li::before {
  content: '';
  width: 18px;
  height: 18px;
  flex: none;
  border: 2px solid var(--text-muted);
  border-radius: 5px;
}

/* Sections */

.section {
  padding-block: 64px;
}

@media (min-width: 960px) {
  .section {
    padding-block: 96px;
  }
}

.section--alt {
  background: var(--section-alt);
}

.section--alt .demo,
.section--alt .panel {
  background: var(--bg);
}

.section h2 {
  font-size: clamp(1.875rem, 1.4rem + 1.8vw, 2.625rem);
  line-height: 1.15;
}

.section__intro {
  margin-top: 12px;
  max-width: 40em;
  color: var(--text-muted);
  font-size: 1.125rem;
}

.steps {
  display: grid;
  gap: 32px;
  margin-top: 40px;
  padding: 0;
  list-style: none;
}

@media (min-width: 820px) {
  .steps {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 40px;
  }
}

.step__number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--accent);
  color: var(--on-accent);
  font-weight: 700;
}

.step h3 {
  margin-top: 16px;
}

.step p,
.panel p,
.example__note {
  margin-top: 8px;
  color: var(--text-muted);
}

.examples {
  display: grid;
  gap: 24px;
  margin-top: 40px;
}

@media (min-width: 820px) {
  .examples {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 32px;
  }
}

.example {
  display: flex;
  flex-direction: column;
}

.example h3 {
  margin-bottom: 16px;
}

.example .demo {
  flex: 1;
}

.example__note {
  margin-top: 16px;
}

.panels {
  display: grid;
  gap: 16px;
  margin-top: 40px;
}

@media (min-width: 720px) {
  .panels {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 24px;
  }
}

.panel {
  padding: 24px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
}

.more {
  margin-top: 32px;
  font-weight: 600;
}

.more a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
}

/* Sign in with Google */

.disclosure {
  max-width: 760px;
}

.disclosure > p {
  margin-top: 16px;
  font-size: 1.125rem;
}

.facts {
  display: grid;
  gap: 12px;
  margin-top: 24px;
  padding: 0;
  list-style: none;
}

.facts li {
  position: relative;
  padding-left: 32px;
}

.facts li::before {
  content: '';
  position: absolute;
  top: 0.45em;
  left: 4px;
  width: 14px;
  height: 8px;
  border-bottom: 2.5px solid var(--accent-text);
  border-left: 2.5px solid var(--accent-text);
  transform: rotate(-45deg);
}

/* Footer */

.site-footer {
  border-top: 1px solid var(--border);
  padding-block: 24px 40px;
  color: var(--text-muted);
  font-size: 0.9375rem;
}

.site-footer__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 24px;
}

.site-footer ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0 20px;
  padding: 0;
  list-style: none;
}

.site-footer a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--text);
}

/* Not found */

.not-found {
  padding-block: 64px 96px;
}

.not-found h1 {
  font-size: clamp(2.25rem, 1.6rem + 2.6vw, 3.25rem);
  line-height: 1.1;
}

.not-found p {
  margin-top: 16px;
  color: var(--text-muted);
  font-size: 1.125rem;
}

.not-found .hero__actions {
  margin-top: 28px;
}
