@font-face { font-family: "Noto Serif"; font-style: normal; font-weight: 100 900; font-display: swap; src: url("/fonts/NotoSerif.woff2") format("woff2"); }
@font-face { font-family: "Noto Sans"; font-style: normal; font-weight: 100 900; font-display: swap; src: url("/fonts/NotoSans.woff2") format("woff2"); }
:root {
  --bg: #FAF8F5;
  --surface: #F5F2ED;
  --text: #2C2C2C;
  --muted: #5C5C5C;
  --accent: #6E8460;
  --accent2: #C4A77D;
  --accent-text: #FAF8F5;
  --line: #E8E4DE;
  --line-strong: #D4C4B0;
  --heading-font: 'Noto Serif', Georgia, serif;
  --body-font: 'Noto Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  --heading-weight: 400;
  --heading-tracking: -.02em;
  --radius: 1rem;
}
/* Shared structure for all AppBear sites. Colours/fonts come from the per-site :root tokens
   (theme in sites/<id>/site.yaml); each site's own personality lives in sites/<id>/site.css.
   No inline styles anywhere (strict CSP). */
*, *::before, *::after { box-sizing: border-box; }
html { background: var(--bg); -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; min-height: 100vh; color: var(--text); background: var(--page-bg, var(--bg));
  font: 17px/1.65 var(--body-font); -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent); text-underline-offset: 3px; text-decoration-thickness: 1px; }
h1, h2, h3 { font-family: var(--heading-font); line-height: 1.08; margin: 0 0 .55em; text-wrap: balance; font-weight: var(--heading-weight, 700); letter-spacing: var(--heading-tracking, -.02em); }
h1 { font-size: clamp(2.5rem, 6.2vw, 4.6rem); }
h2 { font-size: clamp(1.85rem, 3.6vw, 2.75rem); }
h3 { font-size: 1.2rem; line-height: 1.25; letter-spacing: -.01em; }
p { margin: 0 0 1em; }
::selection { background: var(--accent); color: var(--accent-text); }
.wrap { width: min(1140px, 100% - 40px); margin-inline: auto; }
.narrow { width: min(760px, 100% - 40px); }
.center { text-align: center; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--accent); color: var(--accent-text); padding: 8px 14px; border-radius: 8px; z-index: 50; }
.skip:focus { left: 8px; }
a:focus-visible, .btn:focus-visible, .gallery:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 8px; }

/* top bar */
.topbar { position: sticky; top: 0; z-index: 20; background: var(--topbar-bg, color-mix(in srgb, var(--bg) 78%, transparent)); backdrop-filter: blur(14px) saturate(140%); -webkit-backdrop-filter: blur(14px) saturate(140%); border-bottom: 1px solid var(--line); }
.topbar-in { display: flex; align-items: center; gap: 24px; min-height: 66px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; font-family: var(--heading-font); font-size: 1.25rem; font-weight: var(--heading-weight, 700); letter-spacing: -.01em; margin-right: auto; }
.brand img { width: 34px; height: 34px; border-radius: 9px; }
.topnav { display: flex; gap: 22px; }
.topnav a { color: var(--muted); text-decoration: none; font-size: .95rem; font-weight: 500; transition: color .2s; }
.topnav a:hover { color: var(--text); }

/* buttons */
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-top: 28px; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 52px; padding: 0 24px; border-radius: var(--btn-radius, 999px); font-weight: 650; font-size: 1rem; text-decoration: none; transition: transform .2s ease, box-shadow .2s ease, background .2s ease, border-color .2s; }
.btn:hover { transform: translateY(-2px); }
.btn-play { background: var(--btn-bg, var(--accent)); color: var(--accent-text); box-shadow: var(--btn-shadow, none); }
.btn-play .play-icon { width: 20px; height: 20px; flex: none; }
.btn-play-text { display: grid; line-height: 1.05; text-align: left; }
.btn-play-text small { font-size: .7rem; font-weight: 600; opacity: .8; letter-spacing: .04em; text-transform: uppercase; }
.btn-play-text b { font-size: 1.12rem; font-weight: 750; }
.btn-ghost { border: 1px solid var(--line-strong, var(--line)); color: var(--text); background: transparent; }
.btn-ghost:hover { border-color: var(--accent); }
.btn-compact { min-height: 40px; padding: 0 16px; font-size: .9rem; }
.btn-compact .play-icon { width: 15px; height: 15px; }

/* hero */
.hero { position: relative; padding: clamp(56px, 9vw, 120px) 0 clamp(48px, 7vw, 96px); overflow: hidden; }
.hero-in { position: relative; display: grid; grid-template-columns: 1.15fr .85fr; gap: clamp(32px, 6vw, 80px); align-items: center; }
.kicker { display: inline-flex; align-items: center; gap: 10px; margin: 0 0 18px; color: var(--accent); font-size: .8rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; }
.lead, .lead p { font-size: clamp(1.08rem, 1.6vw, 1.25rem); color: var(--muted); max-width: 34em; }
.hero-note { margin-top: 16px; color: var(--muted); font-size: .9rem; }
.hero-visual { position: relative; justify-self: center; width: min(360px, 100%); }
.hero-visual img { width: 100%; border-radius: 30px; }
.chips { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; padding: 0; margin: 26px 0 0; }
.chips li { padding: 6px 13px; border-radius: 999px; border: 1px solid var(--line); color: var(--muted); font-size: .85rem; background: var(--surface); }

/* sections */
.band { position: relative; padding: clamp(64px, 9vw, 120px) 0; }
.band h2 { max-width: 20em; }
.intro { color: var(--muted); max-width: 40em; font-size: 1.08rem; margin-bottom: 36px; }
.gallery { display: flex; gap: 20px; overflow-x: auto; padding: 10px 4px 26px; margin: 0 -4px; scroll-snap-type: x mandatory; scrollbar-width: thin; scrollbar-color: var(--line-strong, var(--line)) transparent; }
.gallery figure { margin: 0; flex: 0 0 auto; width: clamp(210px, 24vw, 270px); scroll-snap-align: start; }
.gallery img { width: 100%; border-radius: 22px; border: 1px solid var(--line); transition: transform .35s ease, box-shadow .35s ease; }
.gallery figure:hover img { transform: translateY(-6px); box-shadow: var(--lift-shadow, 0 20px 40px rgba(0,0,0,.25)); }
.gallery figcaption { margin-top: 10px; color: var(--muted); font-size: .9rem; }
.cards { display: grid; gap: 18px; }
.cards.cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.cards.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.cards.cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.card { position: relative; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px 26px 22px; transition: border-color .25s, transform .25s; }
.card:hover { border-color: var(--line-strong, var(--accent)); transform: translateY(-3px); }
.card p { color: var(--muted); font-size: .98rem; }
.card p:last-child { margin-bottom: 0; }
.card-num { display: block; font-family: var(--heading-font); font-size: .85rem; font-weight: 700; color: var(--accent); letter-spacing: .08em; margin-bottom: 14px; }
.card-tag { position: absolute; top: 18px; right: 18px; font-size: .72rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; padding: 3px 9px; border-radius: 999px; color: var(--accent-text); background: var(--accent); }
.split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(32px, 6vw, 80px); align-items: center; }
.split.reverse .split-visual { order: -1; }
.split-text p { color: var(--muted); font-size: 1.05rem; }
.split-visual img { border-radius: var(--radius); }
.table-wrap { overflow-x: auto; }
.compare { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 1rem; }
.compare th, .compare td { padding: 14px 18px; text-align: center; border-bottom: 1px solid var(--line); }
.compare th[scope="row"] { text-align: left; font-weight: 500; color: var(--text); }
.compare thead th { font-family: var(--heading-font); font-size: 1.1rem; }
.compare .hl { background: var(--surface); }
.compare thead .hl { border-radius: 14px 14px 0 0; color: var(--accent); }
.compare tbody tr:last-child .hl { border-radius: 0 0 14px 14px; }
.compare .yes { color: var(--accent); font-weight: 800; font-size: 1.15rem; }
.compare .no { color: var(--muted); opacity: .6; }
.products { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px; }
.product { display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.product-visual { display: block; overflow: hidden; }
.product-visual img { width: 100%; aspect-ratio: 1024 / 500; object-fit: cover; transition: transform .5s ease; }
.product:hover .product-visual img { transform: scale(1.03); }
.product-body { padding: 28px 30px 32px; display: flex; flex-direction: column; flex: 1; }
.product-body h3 { font-size: 1.9rem; margin-bottom: .2em; }
.product-body h3 a { color: inherit; text-decoration: none; }
.product-kind { color: var(--accent); font-size: .78rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; margin-bottom: 8px; }
.product-tagline { color: var(--muted); font-size: 1.05rem; }
.product .actions { margin-top: auto; padding-top: 20px; }
.ticks { list-style: none; padding: 0; margin: 4px 0 0; display: grid; gap: 8px; }
.ticks li { position: relative; padding-left: 26px; color: var(--muted); }
.ticks li::before { content: ""; position: absolute; left: 2px; top: .55em; width: 12px; height: 7px; border-left: 2px solid var(--accent); border-bottom: 2px solid var(--accent); transform: rotate(-45deg); }
.cta-box { text-align: center; padding: clamp(40px, 6vw, 72px) clamp(24px, 5vw, 64px); border-radius: calc(var(--radius) + 8px); background: var(--cta-bg, var(--surface)); border: 1px solid var(--line); }
.cta-box .actions { justify-content: center; }
.cta-box p { color: var(--muted); }
.prose p, .prose li { color: var(--prose-color, var(--text)); }

/* blog */
.page-title { margin-top: clamp(40px, 7vw, 80px); }
.blog-index .lead { margin-bottom: 36px; }
.sub-title { margin-top: 48px; font-size: 1.6rem; }
.posts { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; margin: 8px 0 28px; }
.post-card { display: grid; align-content: start; gap: 6px; padding: 22px 24px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); color: var(--text); text-decoration: none; transition: border-color .2s, transform .2s; }
.post-card:hover { border-color: var(--accent); transform: translateY(-3px); }
.post-card .date { color: var(--accent); font-size: .78rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.post-card .title { font-family: var(--heading-font); font-size: 1.3rem; font-weight: var(--heading-weight, 700); line-height: 1.2; }
.post-card .desc { color: var(--muted); font-size: .95rem; }
.more a { font-weight: 650; text-decoration: none; }
.post { padding: clamp(40px, 7vw, 80px) 0 80px; }
.post h1 { font-size: clamp(2.2rem, 5vw, 3.4rem); }
.post .meta { color: var(--accent); font-size: .82rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; margin: 0 0 1em; }
.post-hero { border-radius: var(--radius); border: 1px solid var(--line); margin: 12px 0 34px; }
.prose { font-size: 1.07rem; }
.prose h2 { margin-top: 1.9em; font-size: 1.65rem; color: var(--heading-accent, var(--text)); }
.prose ul, .prose ol { padding-left: 1.25em; }
.prose li { margin-bottom: .4em; }
.prose img { border-radius: 14px; border: 1px solid var(--line); margin: 1.4em 0; }
.prose blockquote { margin: 1.6em 0; padding: 1.1em 1.4em; border-left: 3px solid var(--accent); background: var(--surface); border-radius: 0 14px 14px 0; }
.prose blockquote p:last-child { margin: 0; }
.post-cta { margin-top: 48px; padding: 32px; border-radius: var(--radius); background: var(--cta-bg, var(--surface)); border: 1px solid var(--line); text-align: center; }
.post-cta p { color: var(--muted); }
.post-cta .btn { margin-top: 6px; }
.back { margin-top: 40px; }
.back a { text-decoration: none; font-weight: 600; }
.preview-banner { background: #b3261e; color: #fff; text-align: center; padding: 8px; font-weight: 700; }
.notfound { padding: 120px 0; }

/* footer */
.foot { border-top: 1px solid var(--line); padding: 44px 0 52px; color: var(--muted); font-size: .92rem; }
.foot-in { display: grid; gap: 18px; }
.foot-brand { display: flex; align-items: center; gap: 10px; color: var(--text); font-family: var(--heading-font); font-weight: var(--heading-weight, 700); font-size: 1.1rem; }
.foot-brand img { width: 28px; height: 28px; border-radius: 7px; }
.foot-links { display: flex; flex-wrap: wrap; gap: 8px 22px; }
.foot a { color: var(--muted); text-decoration: none; }
.foot a:hover { color: var(--text); }
.foot-note { margin: 0; font-size: .85rem; }

/* entrance motion (CSS only) */
@keyframes rise { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
.hero-text > *, .hero-visual { animation: rise .8s cubic-bezier(.2, .7, .2, 1) both; }
.hero-text > :nth-child(2) { animation-delay: .08s; }
.hero-text > :nth-child(3) { animation-delay: .16s; }
.hero-text > :nth-child(4) { animation-delay: .24s; }
.hero-text > :nth-child(5) { animation-delay: .32s; }
.hero-visual { animation-delay: .2s; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}

@media (max-width: 880px) {
  .hero-in, .split { grid-template-columns: 1fr; }
  .split.reverse .split-visual { order: 0; }
  .cards.cols-3, .cards.cols-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .products { grid-template-columns: 1fr; }
  .topnav { display: none; }
}
@media (max-width: 560px) {
  body { font-size: 16px; }
  .cards.cols-2, .cards.cols-3, .cards.cols-4 { grid-template-columns: 1fr; }
  .hero-visual { width: min(300px, 86%); }
  .btn-compact span { display: none; }
  .btn-compact { padding: 0 12px; }
}

/* hero with a feature image that dissolves into the page (no hard edges) */
.hero.has-bg { min-height: clamp(540px, 76vh, 700px); display: flex; align-items: center; }
.hero.has-bg .wrap { position: relative; z-index: 1; }
.hero.has-bg .hero-in { grid-template-columns: minmax(0, 640px); }
.hero-bg { position: absolute; top: 0; right: max(0px, calc((100vw - 1440px) / 2)); bottom: 0; width: min(52%, 760px); z-index: 0; pointer-events: none; }
.hero-bg img {
  width: 100%; height: 100%; object-fit: cover; object-position: center;
  -webkit-mask-image: linear-gradient(to right, transparent 0%, rgba(0,0,0,.3) 30%, #000 60%, #000 84%, transparent 100%), linear-gradient(to bottom, transparent 0%, #000 14%, #000 72%, transparent 100%);
  -webkit-mask-composite: source-in;
  mask-image: linear-gradient(to right, transparent 0%, rgba(0,0,0,.3) 30%, #000 60%, #000 84%, transparent 100%), linear-gradient(to bottom, transparent 0%, #000 14%, #000 72%, transparent 100%);
  mask-composite: intersect;
  animation: fade-in 1.4s ease both;
}
@keyframes fade-in { from { opacity: 0; transform: scale(1.03); } to { opacity: 1; transform: none; } }
@media (max-width: 880px) {
  .hero.has-bg { display: block; min-height: 0; padding-top: 0; }
  .hero-bg { position: relative; width: 100%; height: clamp(220px, 58vw, 340px); margin-bottom: -40px; }
  .hero-bg img {
    object-position: 78% center;
    -webkit-mask-image: linear-gradient(to bottom, #000 55%, transparent 100%), linear-gradient(to right, transparent 0%, #000 18%, #000 100%);
    mask-image: linear-gradient(to bottom, #000 55%, transparent 100%), linear-gradient(to right, transparent 0%, #000 18%, #000 100%);
  }
}

/* email addresses are behind a button (build.py hide_emails + assets/reveal.js) */
.reveal-email { font: inherit; color: var(--accent); background: none; border: 0; padding: 0; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
.foot .reveal-email { color: var(--muted); text-decoration: none; }
.foot .reveal-email:hover { color: var(--text); }

/* ---- site-specific ---- */
/* AppBear blog: matches the hand-made front page (static/index.html). Flat warm paper, Noto, sage. */
body { font-weight: 300; line-height: 1.7; min-height: 100vh; display: flex; flex-direction: column; }
main { flex: 1; }
strong, b { font-weight: 500; }
.topbar { background: rgba(250, 248, 245, .95); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.brand { font-weight: 500; }
.brand img, .foot-brand img { border-radius: 0; }
.topnav a { color: var(--muted); font-size: .9rem; font-weight: 400; }
.topnav a:hover { color: var(--text); }
.kicker { color: var(--accent); font-weight: 500; }
.kicker::before { content: ""; width: 26px; height: 1px; background: currentColor; }
h1 em, h2 em { font-style: normal; color: inherit; }
.btn { border-radius: .5rem; font-weight: 400; }
.btn-play { background: var(--text); color: var(--bg); box-shadow: none; }
.btn-play:hover { background: var(--muted); }
.post-card { background: var(--bg); }
.post-card:hover { border-color: var(--line-strong); }
.post-card .date { font-weight: 500; }
.post-card .title { font-weight: 400; }
.prose blockquote { border-left-color: #9CAF88; }

/* footer: dark band like the front page */
.foot { background: var(--text); color: #8C8C8C; border-top: 0; }
.foot-brand { color: var(--surface); font-weight: 400; }
.foot-brand img { filter: invert(1) brightness(1.6); }
.foot a { color: var(--surface); }
.foot a:hover { color: #fff; }
.foot .reveal-email { color: var(--surface); }
