/* veelang.org. Colours follow the playground (purple, amber, Nunito) on a calm, paper-like page. */
@font-face {
  font-family: 'Nunito';
  src: url('nunito.woff2') format('woff2');
  font-weight: 200 1000;
  font-display: swap;
}

:root {
  --ink: #1e1b4b;
  --text: #3f3d56;
  --muted: #6b6a80;
  --purple: #7c3aed;
  --purple-deep: #5b21b6;
  --purple-soft: #ede9fe;
  --amber: #fcd34d;
  --paper: #fbfaff;
  --card: #ffffff;
  --line: #e7e3f5;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --shadow: 0 1px 2px rgba(30, 27, 75, 0.06), 0 12px 32px -12px rgba(30, 27, 75, 0.18);
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  font-family: 'Nunito', ui-sans-serif, system-ui, sans-serif;
  color: var(--text);
  background: var(--paper);
  line-height: 1.6;
  font-size: 17px;
}

a { color: var(--purple); text-underline-offset: 3px; }

h1, h2, h3 { color: var(--ink); line-height: 1.15; margin: 0; }

h2 { font-size: clamp(1.8rem, 3.6vw, 2.5rem); font-weight: 850; letter-spacing: -0.01em; }

code {
  font-family: var(--mono);
  font-size: 0.88em;
  background: var(--purple-soft);
  color: var(--purple-deep);
  padding: 0.1em 0.4em;
  border-radius: 6px;
}

.wrap {
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 24px;
}

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

a:focus-visible, button:focus-visible, textarea:focus-visible {
  outline: 3px solid #f472b6;
  outline-offset: 2px;
}

/* Buttons */
.button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 24px;
  border-radius: 12px;
  font-weight: 800;
  font-size: 1.02rem;
  text-decoration: none;
  border: 2px solid transparent;
  transition: transform 0.15s, box-shadow 0.15s, background 0.15s;
}

.button.primary {
  background: var(--purple);
  color: white;
  box-shadow: 0 6px 16px -6px rgba(124, 58, 237, 0.6);
}

.button.primary:hover { background: var(--purple-deep); transform: translateY(-1px); }

.button.ghost {
  color: var(--ink);
  border-color: var(--line);
  background: var(--card);
}

.button.ghost:hover { border-color: #c4b5fd; }

.button.small { padding: 8px 16px; font-size: 0.95rem; border-radius: 10px; }

.link-arrow {
  font-weight: 800;
  text-decoration: none;
  white-space: nowrap;
}

.link-arrow::after { content: ' →'; }
.link-arrow:hover { text-decoration: underline; }

/* Header */
.top {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(251, 250, 255, 0.88);
  backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--line);
}

.top-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 1.35rem;
  font-weight: 900;
  color: var(--ink);
  text-decoration: none;
}

.top nav {
  display: flex;
  align-items: center;
  gap: 26px;
}

.top nav a:not(.button) {
  color: var(--text);
  font-weight: 700;
  text-decoration: none;
}

.top nav a:not(.button):hover { color: var(--purple); }

/* Hero, on graph paper: the drawing's own coordinates are a grid too */
.hero {
  padding: 64px 0 72px;
  background-color: var(--paper);
  background-image:
    linear-gradient(rgba(124, 58, 237, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(124, 58, 237, 0.06) 1px, transparent 1px);
  background-size: 28px 28px;
  border-bottom: 1px solid var(--line);
}

.hero-grid {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 48px;
}

.hero-text {
  max-width: 860px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.demo { width: 100%; max-width: 1080px; }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 18px;
  padding: 5px 14px 5px 6px;
  border-radius: 999px;
  background: var(--card);
  border: 1px solid var(--line);
  font-weight: 800;
  font-size: 0.92rem;
  color: var(--purple-deep);
}

.news {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 14px;
  padding: 4px 14px 4px 4px;
  border-radius: 999px;
  background: var(--purple-soft);
  color: var(--purple-deep);
  font-size: 0.9rem;
  font-weight: 700;
  text-decoration: none;
}
.news strong {
  padding: 2px 10px;
  border-radius: 999px;
  background: var(--purple);
  color: white;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.news::after { content: "→"; }
.news:hover { background: #ddd6fe; }

.hero h1 {
  font-size: clamp(2.3rem, 5.4vw, 4rem);
  font-weight: 900;
  letter-spacing: -0.02em;
}

/* A highlighter stroke, as if marked by hand */
.mark {
  background: linear-gradient(transparent 62%, rgba(252, 211, 77, 0.85) 62%, rgba(252, 211, 77, 0.85) 92%, transparent 92%);
  padding: 0 2px;
}

.lead {
  margin: 22px 0 0;
  font-size: 1.25rem;
  color: var(--text);
  max-width: 34em;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin-top: 30px;
}

.fine {
  margin: 16px 0 0;
  font-size: 0.92rem;
  color: var(--muted);
  font-weight: 600;
}

/* The live example */
.demo {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 20px;
  box-shadow: var(--shadow);
  overflow: hidden;
}

.demo-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
  background: #faf8ff;
}

.demo-bar h2 { font-size: 1rem; font-weight: 900; }

.examples { display: flex; gap: 6px; flex-wrap: wrap; }

.examples button {
  font: inherit;
  font-size: 0.88rem;
  font-weight: 800;
  padding: 4px 12px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: var(--card);
  color: var(--text);
  cursor: pointer;
}

.examples button[aria-pressed="true"] {
  background: var(--purple);
  border-color: var(--purple);
  color: white;
}

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

.pane { min-width: 0; }

.pane + .pane {
  border-left: 1px solid var(--line);
  padding: 20px;
  background: #f8f7fc;
}

/* The code box: a see-through textarea over a <pre> with the same text, coloured (home.js).
   Both must lay out text identically, so they share every text and box setting. */
.editor { position: relative; height: 100%; }

.editor pre,
.editor textarea {
  display: block;
  width: 100%;
  min-height: 320px;
  margin: 0;
  padding: 16px;
  border: 0;
  font-family: var(--mono);
  font-size: 14px;
  font-weight: 400;
  line-height: 1.6;
  letter-spacing: normal;
  tab-size: 2;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.editor pre {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  background: var(--card);
  color: var(--ink);
}

/* It grows with the code instead of scrolling, so the two never drift apart. */
.editor textarea {
  position: relative;
  resize: none;
  overflow: hidden;
  background: transparent;
  color: transparent;
  caret-color: var(--purple);
  outline-offset: -3px;
}

.editor textarea::selection { background: rgba(124, 58, 237, 0.25); }

/* Colours from the playground editor's theme (website_2/src/utils/monaco.ts) */
.tok-keyword { color: #7c3aed; }
.tok-type { color: #0e7490; }
.tok-number { color: #c2410c; }
.tok-string { color: #15803d; }
.tok-string-invalid { color: #b91c1c; }
.tok-comment { color: #8a8799; }
.tok-delimiter { color: #8a8799; }

.drawing {
  aspect-ratio: 4 / 3;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  overflow: hidden;
  background: white;
  box-shadow: 0 0 0 1px var(--line);
  transition: opacity 0.2s;
}

.drawing svg { display: block; width: 100%; height: 100%; }
.drawing.stale { opacity: 0.45; }
.foot-note { display: inline-flex; align-items: center; gap: 10px; }
.play {
  font: inherit;
  font-size: 0.85rem;
  font-weight: 800;
  padding: 3px 12px;
  border-radius: 8px;
  border: 1px solid var(--purple);
  background: var(--card);
  color: var(--purple-deep);
  cursor: pointer;
}
.play:hover { background: var(--purple-soft); }
.waiting { color: var(--muted); }

.problem {
  margin: 12px 0 0;
  padding: 10px 12px;
  border-radius: 10px;
  background: #fef3c7;
  color: #78350f;
  font-size: 0.92rem;
  font-weight: 700;
}

.demo-foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  padding: 12px 16px;
  border-top: 1px solid var(--line);
  font-size: 0.92rem;
  color: var(--muted);
}

/* Sections */
.section { padding: 96px 0; }

.kicker {
  margin: 0 0 10px;
  font-size: 0.85rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--purple);
}

.section-lead {
  margin: 14px 0 0;
  max-width: 40em;
  font-size: 1.12rem;
}

/* What you can do: a few features, each with its code and its drawing, side by side */
.features {
  list-style: none;
  margin: 44px 0 0;
  padding: 0;
  display: grid;
  gap: 24px;
}

.feature {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 32px;
  align-items: center;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 28px;
  box-shadow: 0 1px 2px rgba(30, 27, 75, 0.04);
}
/* Every other one has its drawing first */
.feature:nth-child(even) .mini { order: -1; }

.feature .tag {
  display: inline-block;
  margin: 0 0 10px;
  padding: 2px 10px;
  border-radius: 999px;
  background: var(--purple-soft);
  color: var(--purple-deep);
  font-size: 0.78rem;
  font-weight: 800;
}

.feature h3 { font-size: 1.5rem; font-weight: 900; }
.feature-text > p:not(.tag) { margin: 4px 0 16px; color: var(--muted); line-height: 1.45; }
.feature .snippet { font-size: 13px; }

.snippet {
  margin: 0;
  padding: 12px 14px;
  border-radius: 12px;
  background: #faf9fd;
  border: 1px solid var(--line);
  font-family: var(--mono);
  font-size: 12px;
  line-height: 1.6;
  color: var(--ink);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.mini {
  aspect-ratio: 3 / 2;
  border-radius: 12px;
  overflow: hidden;
  background: white;
  box-shadow: 0 0 0 1px var(--line);
}

.mini svg { display: block; width: 100%; height: 100%; }

.features-more { margin: 28px 0 0; color: var(--muted); }

/* Why it works */
.why { background: white; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }

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

.why-icon { width: 52px; height: 52px; }
.why-item h3 { margin: 14px 0 8px; font-size: 1.3rem; font-weight: 850; }
.why-item p { margin: 0; }

/* Families and classrooms */
.families-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  gap: 56px;
  align-items: center;
}

.shot {
  margin: 0;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  background: white;
}

.shot-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 12px;
  background: #f4f2fa;
  border-bottom: 1px solid var(--line);
}

.shot-bar span { width: 10px; height: 10px; border-radius: 50%; background: #d9d4ea; }

.shot-bar em {
  margin-left: 10px;
  font-style: normal;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--muted);
}

.shot img { display: block; width: 100%; height: auto; }

.checks { list-style: none; margin: 24px 0 0; padding: 0; }

.checks li {
  position: relative;
  padding-left: 36px;
  margin: 14px 0;
}

.checks li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 3px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #dcfce7 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6 12.5l4 4 8-9' fill='none' stroke='%2316a34a' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 14px no-repeat;
}

.checks strong { color: var(--ink); }

/* About */
.about {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 36px;
  align-items: start;
  max-width: 900px;
  margin: 0 auto;
  padding: 44px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 24px;
  box-shadow: var(--shadow);
}

.about-quote {
  display: block;
  font-size: 120px;
  line-height: 1;
  height: 80px;
  font-weight: 900;
  color: var(--purple);
  font-family: Georgia, 'Times New Roman', serif;
}

.about blockquote { margin: 0; }

.about blockquote p {
  margin: 0 0 14px;
  font-size: 1.22rem;
  line-height: 1.6;
  color: var(--ink);
}

.byline { margin: 18px 0 0; color: var(--muted); }
.byline strong { color: var(--ink); }

/* Closing call to action */
.cta {
  text-align: center;
  padding: 80px 0;
  background: linear-gradient(135deg, #6d28d9, #7c3aed 50%, #a855f7);
  color: white;
}

.cta h2 { color: white; }
.cta p { margin: 12px 0 28px; font-size: 1.15rem; opacity: 0.92; }
.cta .button.primary { background: var(--amber); color: #3b0764; box-shadow: none; }
.cta .button.primary:hover { background: #fde68a; }

/* Footer */
.foot {
  background: var(--ink);
  color: #c7c4e0;
  padding: 56px 0 28px;
}

.foot-grid {
  display: grid;
  grid-template-columns: minmax(0, 2fr) repeat(2, minmax(0, 1fr));
  gap: 32px;
}

.foot .brand { color: white; }
.foot p { margin: 10px 0 0; }

.foot nav { display: flex; flex-direction: column; gap: 8px; }
.foot h3 { color: white; font-size: 0.85rem; letter-spacing: 0.08em; text-transform: uppercase; margin-bottom: 4px; }
.foot nav a { color: #c7c4e0; text-decoration: none; font-weight: 600; }
.foot nav a:hover { color: white; }

.foot .legal {
  margin: 40px auto 0;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  font-size: 0.88rem;
  color: #9e9bbd;
}

/* Smaller screens */
@media (max-width: 980px) {
  .families-grid { grid-template-columns: minmax(0, 1fr); gap: 40px; }
  .top nav a:not(.button) { display: none; }
}

@media (max-width: 640px) {
  body { font-size: 16px; }
  .wrap { padding: 0 16px; }
  .hero { padding: 40px 0 48px; }
  .section { padding: 64px 0; }
  .panes { grid-template-columns: minmax(0, 1fr); }
  .pane + .pane { border-left: 0; border-top: 1px solid var(--line); }
  .editor pre, .editor textarea { min-height: 0; font-size: 13px; }
  .feature, .why-grid { grid-template-columns: minmax(0, 1fr); }
  .feature { gap: 16px; padding: 20px; }
  .feature:nth-child(even) .mini { order: 0; }
  .why-grid { gap: 28px; }
  .about { grid-template-columns: minmax(0, 1fr); padding: 28px 22px; gap: 16px; }
  .about-quote { font-size: 72px; height: 48px; }
  .about blockquote p { font-size: 1.08rem; }
  .foot-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .foot-grid > div:first-child { grid-column: 1 / -1; }
}

/* News and What's new (scripts/home-pages.mjs): one readable column. */
.article-page { padding: 56px 0 96px; }
.article { max-width: 760px; }
.article h1 { font-size: clamp(2rem, 4.4vw, 2.8rem); font-weight: 900; letter-spacing: -0.015em; margin: 6px 0 12px; }
.article .lead { margin: 0 0 32px; }
.article-meta { margin: 0; color: var(--muted); font-size: 0.92rem; font-weight: 700; }
.article-meta a { text-decoration: none; }
.article-byline { margin: 0 0 32px; color: var(--muted); }
.article-end { margin: 48px 0 0; }

.prose h2 { font-size: 1.6rem; margin: 40px 0 12px; }
.prose p, .prose ul, .prose ol { margin: 0 0 18px; }
.prose li { margin-bottom: 8px; }
.prose pre {
  margin: 0 0 22px;
  padding: 14px 18px;
  overflow-x: auto;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
  font-size: 0.95rem;
  line-height: 1.55;
}
.prose pre code { background: none; color: var(--ink); padding: 0; font-size: inherit; }

.vee-example {
  margin: 8px 0 28px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: var(--shadow);
  overflow: hidden;
}
.vee-example pre { margin: 0; border: 0; border-bottom: 1px solid var(--line); border-radius: 0; }
.vee-drawing { padding: 16px; background: var(--paper); }
.vee-drawing svg { display: block; width: 100%; height: auto; max-height: 420px; }
.vee-example figcaption { padding: 10px 18px; border-top: 1px solid var(--line); font-weight: 700; font-size: 0.95rem; }

.post-list { list-style: none; margin: 0; padding: 0; }
.post-list li { padding: 24px 0; border-top: 1px solid var(--line); }
.post-list h2 { font-size: 1.5rem; margin: 4px 0 8px; }
.post-list h2 a { color: var(--ink); text-decoration: none; }
.post-list h2 a:hover { color: var(--purple); }
.post-list p:last-child { margin: 0; }
