/* Direction A: sketchbook (after PostHog's DESIGN.md), re-skinned with the Jellybean palette. */
:root {
  --mustard: #E9A13B;
  --mustard-deep: #C9832A;
  --jellybean-black: #141414;
  --tongue-pink: #F2879C;

  --canvas: #FFFAF0;       /* warm cream sheet, end to end */
  --surface-soft: #F7EBD3; /* mustard-tinted: secondary buttons, chips, icon tiles */
  --card: #FFFFFF;
  --hairline: #E6D5B5;
  --hairline-soft: #EFE1C6;
  --ink: var(--jellybean-black);
  --body: #4A453D;         /* warm, 9:1 on canvas */
  --mute: #6F675A;

  --r-sm: 4px;
  --r-md: 6px;
  --max: 1200px;
  --display: "Fredoka", "Nunito", system-ui, sans-serif;
  --sans: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, monospace;
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; font: 17px/1.6 var(--sans); color: var(--body); background: var(--canvas); }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--ink); text-underline-offset: 3px; }
h1, h2, h3 { color: var(--ink); margin: 0 0 .45em; text-wrap: balance; }
h1, h2 { font-family: var(--display); font-weight: 600; letter-spacing: -0.5px; }
h1 { font-size: clamp(2.4rem, 5.5vw, 3.4rem); line-height: 1.05; }
h2 { font-size: clamp(1.7rem, 3.2vw, 2.2rem); line-height: 1.15; }
h3 { font-size: 1.15rem; font-weight: 700; line-height: 1.35; }
p { margin: 0 0 1em; max-width: 62ch; text-wrap: pretty; }
.lede { font-size: 1.15rem; }

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 24px; }
.skip { position: absolute; left: -999px; }
.skip:focus { left: 16px; top: 16px; background: var(--mustard); color: var(--ink); padding: 8px 12px; border-radius: var(--r-md); z-index: 10; }
:focus-visible { outline: 3px solid var(--mustard-deep); outline-offset: 2px; }

.eyebrow { font-size: .8rem; font-weight: 700; letter-spacing: .6px; text-transform: uppercase; color: var(--mute); margin-bottom: 14px; }

/* Header */
.site-header { position: sticky; top: 0; z-index: 5; background: var(--canvas); border-bottom: 1px solid var(--hairline); }
.site-header .wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 24px; min-height: 64px; padding-block: 6px; }
.site-header .logo img { height: 52px; width: auto; }
.site-header nav { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 22px; font-size: 1rem; font-weight: 600; }
.site-header nav a:not(.btn) { text-decoration: none; padding: 4px 0; border-bottom: 2px solid transparent; }
.site-header nav a:not(.btn):hover, .site-header nav a[aria-current] { border-color: var(--mustard); }

/* Buttons */
.btn {
  display: inline-block; font: 700 .95rem/1.5 var(--sans); text-decoration: none; cursor: pointer;
  padding: 9px 18px; border-radius: var(--r-md); border: 0;
  background: var(--mustard); color: var(--ink);
  transition: background-color .15s, transform .15s;
}
.btn:hover { background: var(--mustard-deep); }
.btn:active { transform: translateY(1px); }
.btn.secondary { background: var(--surface-soft); }
.btn.secondary:hover { background: var(--hairline-soft); }
.btn.sm { padding: 6px 14px; font-size: .875rem; }
.text-link { font-weight: 700; }
.text-link:hover { color: var(--mustard-deep); }

/* Sections: one continuous cream sheet, no bands */
section { padding: 80px 0 0; }
main > section:last-child { padding-bottom: 80px; }
section[id] { scroll-margin-top: 48px; } /* keep #anchors clear of the sticky header */
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 24px; margin-top: 24px; }

.hero { padding-top: 56px; }
.hero .wrap { display: grid; grid-template-columns: 1.3fr 1fr; gap: 48px; align-items: center; }
.hero-art { justify-self: center; width: min(100%, 320px); }
/* Real photo: framed like a card, with the badge mark peeking over the corner */
.hero-art.photo { position: relative; margin: 0; width: min(100%, 380px); }
.hero-art.photo > img:first-child { border-radius: var(--r-md); border: 1px solid var(--hairline); aspect-ratio: 3 / 4; object-fit: cover; }
.hero-art.photo .mascot { width: 88px; top: auto; bottom: -24px; right: -20px; }

/* Cards: white on cream, 1px hairline */
.grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin-top: 32px; }
.grid > :last-child:nth-child(odd) { grid-column: 1 / -1; } /* odd count: last card spans the row */
.card { position: relative; background: var(--card); border: 1px solid var(--hairline); border-radius: var(--r-md); padding: 24px; }
.card p:last-child, .card ul:last-child { margin-bottom: 0; }
.card p { font-size: .95rem; }
.card ul { padding-left: 1.1em; margin: 0 0 1em; font-size: .95rem; }
.card li + li { margin-top: 2px; }
.icon { display: grid; place-items: center; width: 44px; height: 44px; border-radius: var(--r-md); background: var(--surface-soft); color: var(--ink); font-size: 24px; margin-bottom: 16px; }

/* Jellybean in the margin: the signature card */
.mascot { position: absolute; width: 72px; top: -26px; right: -14px; transform: rotate(8deg); }

.split { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: center; }
.split.top { align-items: start; }
.feature { padding: clamp(24px, 4vw, 40px); }

/* Tech stack as code chips */
.chips { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; padding: 0; margin: 0; }
.chips li { font: 500 .85rem/1.4 var(--mono); color: var(--ink); background: var(--surface-soft); border-radius: var(--r-sm); padding: 4px 10px; }

.cta-card { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 20px; padding: 32px; }
.cta-card h2 { margin: 0; }

/* Contact */
.contact-list { list-style: none; padding: 0; margin: 0 0 32px; }
.contact-list li { padding: 14px 0; border-bottom: 1px solid var(--hairline); }
.contact-list li:first-child { padding-top: 0; }
.contact-list strong { display: block; color: var(--ink); }
.contact-form label { display: block; font-weight: 600; color: var(--ink); font-size: .95rem; margin-bottom: 16px; }
.contact-form .opt { color: var(--mute); font-weight: 400; }
.contact-form input, .contact-form textarea {
  display: block; width: 100%; margin-top: 6px; padding: 10px 12px;
  font: 400 1rem/1.5 var(--sans); color: var(--ink); background: var(--card);
  border: 1px solid #D9C6A2; border-radius: var(--r-sm);
}
.contact-form input:focus, .contact-form textarea:focus { border-color: var(--mustard-deep); outline: 2px solid var(--mustard); outline-offset: 0; }
.hp { position: absolute; left: -9999px; }
.notice { display: none; padding: 14px 18px; border-radius: var(--r-md); margin-bottom: 20px; color: var(--ink); font-size: .95rem; }
.notice:target { display: block; }
.notice.ok { background: #FBEBD0; }
.notice.err { background: #FBE2E7; }

/* Footer: same sheet, hairline on top */
.site-footer { border-top: 1px solid var(--hairline); padding: 32px 0 40px; font-size: .9rem; color: var(--mute); }
.site-footer .wrap { display: grid; grid-template-columns: auto 1fr; gap: 16px 32px; align-items: center; }
.site-footer nav { justify-content: flex-end; }
.site-footer p { grid-column: 1 / -1; }
.site-footer img { height: 48px; width: auto; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 6px 20px; font-weight: 600; }
.site-footer a { text-decoration: none; }
.site-footer a:hover { color: var(--mustard-deep); }
.site-footer p { margin: 0; }

@media (max-width: 767px) {
  body { font-size: 16px; }
  section { padding-top: 56px; }
  main > section:last-child { padding-bottom: 56px; }
  .wrap { padding: 0 16px; }
  .hero { padding-top: 32px; }
  .hero .wrap, .split, .grid { grid-template-columns: 1fr; }
  .hero-art { width: 200px; order: -1; }
  .hero-art.photo { width: 260px; }
  .hero-art.photo .mascot { width: 64px; bottom: -16px; right: -14px; }
  .site-header .logo img { height: 44px; }
  .site-header nav { gap: 4px 16px; }
  .mascot { width: 56px; right: -6px; }
  .site-footer .wrap { grid-template-columns: 1fr; }
  .site-footer nav { justify-content: flex-start; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .btn { transition: none; }
}
