:root {
  color-scheme: light;
  --paper: #eeeeec;
  --ink: #202020;
  --muted: #686866;
  --line: #d6d6d3;
  --panel: #e5e5e3;
  --dark-panel: #454544;
  --feature-surface: #e5e5e3;
  --feature-foreground: #202020;
  --feature-muted: #5f5f5d;
  --feature-divider: #c7c7c4;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: Arial, Helvetica, sans-serif; -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: none; }
a:focus-visible { outline: 2px solid #171717; outline-offset: 4px; border-radius: 3px; }

.site-header, .site-footer { width: min(1180px, calc(100% - 96px)); margin: 0 auto; display: flex; align-items: center; justify-content: space-between; }
.site-header { height: 82px; border-bottom: 1px solid var(--line); }
.wordmark { display: inline-flex; align-items: center; gap: 10px; font-size: 17px; font-weight: 700; letter-spacing: -0.6px; }
.brand-mark { display: block; width: 36px; height: 36px; flex: 0 0 auto; }
.brand-mark img { display: block; width: 100%; height: 100%; }
.site-header nav { display: flex; gap: 29px; align-items: center; color: #505050; font-size: 13px; }
.site-header nav a, .site-footer > a:last-child { transition: color 150ms ease; }
.site-header nav a:hover, .site-footer > a:last-child:hover { color: #000; }
.source-nav { display: inline-flex; align-items: center; gap: 7px; }
.source-nav img { width: 16px; height: 16px; opacity: .78; }
.header-download { padding: 10px 14px; border: 1px solid #c9c9c6; border-radius: 6px; font-size: 12px; font-weight: 650; transition: background 150ms ease; }
.header-download:hover { background: #fff; }

.hero { width: min(1180px, calc(100% - 96px)); min-height: 590px; margin: 0 auto; padding: 77px 0 79px; display: grid; grid-template-columns: 1fr 1fr; align-items: center; gap: 46px; }
.hero-copy { padding-left: clamp(0px, 3vw, 38px); }
.hero h1 { max-width: 560px; margin: 0 0 22px; font-size: clamp(54px, 6vw, 76px); line-height: .99; letter-spacing: -5.6px; font-weight: 680; }
.hero-description { max-width: 405px; margin: 0; color: #626262; font-size: 16px; line-height: 1.65; }
.hero-actions { display: flex; align-items: center; gap: 23px; margin-top: 30px; }
.download-button { display: flex; align-items: center; gap: 13px; min-width: 275px; padding: 13px 17px; border: 1px solid #3b3b3a; border-radius: 7px; background: #3b3b3a; color: white; transition: transform 160ms ease, background 160ms ease; }
.download-button:hover { transform: translateY(-2px); background: #50504f; }
.download-button:active { transform: translateY(1px); }
.download-icon { display: grid; place-items: center; width: 34px; height: 34px; flex: 0 0 auto; border-radius: 5px; background: #e5e5e3; color: #30302f; }
.download-icon svg { width: 17px; height: 17px; }
.download-copy { display: flex; flex-direction: column; gap: 5px; }
.download-button strong { font-size: 13px; font-weight: 650; }
.download-copy > span { color: #dededc; font-size: 11px; }
.hero-note { margin: 15px 0 0; color: #777; font-size: 11px; line-height: 1.6; }
.hero-note a { color: #333; text-decoration: underline; text-underline-offset: 3px; }

/* Secondary GitHub button: light, fully square — deliberately not the primary. */
.github-button { display: inline-flex; align-items: center; gap: 10px; padding: 13px 20px; border: 1px solid #c9c9c6; border-radius: 0; background: transparent; color: var(--ink); font-size: 13px; font-weight: 650; transition: background 150ms ease, transform 160ms ease; }
.github-button:hover { background: #fff; transform: translateY(-2px); }
.github-button:active { transform: translateY(1px); }
.github-icon { display: block; width: 20px; height: 20px; flex: 0 0 auto; }
.github-icon img { display: block; width: 100%; height: 100%; }

.mascot-wrap { display: flex; min-height: 420px; flex-direction: column; align-items: center; justify-content: center; gap: 1rem; }
.mascot-svg { width: min(62vmin, 340px); height: auto; overflow: visible; cursor: pointer; touch-action: manipulation; -webkit-tap-highlight-color: transparent; outline: none; }
.mascot-svg:focus-visible { outline: 2px dashed #8c7355; outline-offset: 10px; border-radius: 24px; }
.mascot-hop, .mascot-bob { transform-box: view-box; transform-origin: 32px 54px; }
.mascot-bob { animation: mascot-bob 3.4s ease-in-out infinite; }
#shadow { fill: #3a2713; opacity: .2; transform-box: view-box; transform-origin: 32px 55px; animation: mascot-shadow 3.4s ease-in-out infinite; }
.mascot-hop.jump { animation: mascot-hop .7s cubic-bezier(.3, .7, .4, 1); }
@keyframes mascot-bob { 0%, 100% { transform: translateY(0) scale(1, 1); } 50% { transform: translateY(-3px) scale(.975, 1.035); } }
@keyframes mascot-shadow { 0%, 100% { transform: scale(1); opacity: .2; } 50% { transform: scale(.9); opacity: .13; } }
@keyframes mascot-hop { 0% { transform: translateY(0) scale(1, 1); } 18% { transform: translateY(0) scale(1.12, .86); } 50% { transform: translateY(-15px) scale(.94, 1.09); } 80% { transform: translateY(0) scale(1.08, .9); } 100% { transform: translateY(0) scale(1, 1); } }
.mascot-shine { animation: mascot-shine 4.2s ease-in-out infinite; }
@keyframes mascot-shine { 0%, 100% { stroke-opacity: .5; } 50% { stroke-opacity: .9; } }
.mascot-cheek { opacity: .5; transition: opacity .3s, transform .3s; transform-box: fill-box; transform-origin: center; }
.mascot-svg.is-happy .mascot-cheek, .mascot-svg.is-joy .mascot-cheek { opacity: .85; transform: scale(1.18); }
.mascot-lid { transform-box: fill-box; transform-origin: center; transition: transform .15s; }
.mascot-svg.is-blinking .mascot-lid { animation: mascot-blink .2s ease-in-out; }
@keyframes mascot-blink { 50% { transform: scaleY(.08); } }
.mascot-svg.is-joy .mascot-lid { transform: scaleY(.25); }
.mascot-spark { fill: #e3b77a; transform: scale(0); transform-box: fill-box; transform-origin: center; animation: mascot-twinkle 2.8s ease-in-out infinite; }
@keyframes mascot-twinkle { 0%, 100% { transform: scale(0) rotate(0); opacity: 0; } 50% { transform: scale(1) rotate(45deg); opacity: 1; } }

.workflow-section { width: min(1180px, calc(100% - 96px)); margin: 0 auto 54px; padding: 46px 48px 38px; border-radius: 14px; background: var(--feature-surface); color: var(--feature-foreground); }
.workflow-heading { margin-bottom: 38px; }
.workflow-heading h2 { margin: 0; font-size: clamp(42px, 5vw, 58px); font-weight: 650; letter-spacing: -3.8px; line-height: .98; }
.workflow-steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-top: 1px solid var(--feature-divider); }
.workflow-step { padding: 22px 30px 0 0; }
.workflow-step + .workflow-step { padding-left: 30px; border-left: 1px solid var(--feature-divider); }
.workflow-step h3 { margin: 0 0 10px; font-size: 19px; font-weight: 600; letter-spacing: -.45px; }
.workflow-step p { max-width: 290px; margin: 0; color: var(--feature-muted); font-size: 13px; line-height: 1.7; }
.site-footer { min-height: 80px; border-top: 1px solid var(--line); color: #777; font-size: 11px; }
.footer-wordmark { color: var(--ink); font-size: 14px; }
.footer-wordmark .brand-mark { width: 30px; height: 30px; }
.site-footer > a:last-child { color: #444; }

@media (max-width: 760px) {
  .site-header, .site-footer { width: calc(100% - 40px); }
  .site-header { height: 70px; }
  .site-header nav { gap: 18px; }
  .wordmark { font-size: 15px; }
  .header-download { padding: 9px 11px; font-size: 11px; }
  .hero { width: calc(100% - 40px); padding: 53px 0 56px; grid-template-columns: 1fr; gap: 35px; }
  .hero-copy { padding: 0; }
  .hero h1 { font-size: clamp(48px, 11.5vw, 66px); letter-spacing: -3.8px; }
  .hero-description { max-width: 370px; font-size: 15px; }
  .hero-actions { align-items: flex-start; flex-direction: column; gap: 16px; }
  .download-button { width: min(100%, 340px); }
  .github-button { width: min(100%, 340px); justify-content: center; }
  .mascot-wrap { min-height: 320px; }
  .mascot-svg { width: min(62vmin, 300px); }
  .workflow-section { width: calc(100% - 40px); margin-bottom: 36px; padding: 30px 22px 24px; }
  .workflow-heading { margin-bottom: 28px; }
  .workflow-heading h2 { font-size: clamp(40px, 10vw, 48px); letter-spacing: -2.8px; }
  .workflow-steps { grid-template-columns: 1fr; }
  .workflow-step { padding: 18px 0 20px; }
  .workflow-step + .workflow-step { padding-left: 0; border-top: 1px solid var(--feature-divider); border-left: 0; }
  .workflow-step h3 { margin: 0 0 6px; font-size: 18px; }
  .workflow-step p { font-size: 12px; }
  .site-footer { min-height: 72px; gap: 10px; flex-wrap: wrap; }
  .site-footer > span { font-size: 10px; }
}
@media (prefers-reduced-motion: reduce) {  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
  .mascot-bob, #shadow, .mascot-shine, .mascot-spark, .mascot-hop.jump { animation: none; }
  .mascot-spark { opacity: .8; transform: scale(.8); }
}

/* Single-column hero (features page): same rhythm, centered narrow copy. */
.hero-single { grid-template-columns: 1fr; max-width: 820px; min-height: 0; padding: 64px 0 56px; }
.hero-single .hero-copy { padding-left: 0; max-width: 620px; }

/* Second row of cards (features grid): same divider rhythm as the first. */
@media (min-width: 761px) {
  .workflow-step:nth-child(n+4) { border-top: 1px solid var(--feature-divider); margin-top: 26px; padding-top: 22px; }
}
