/* Shared styles for public marketing pages (/, /templates, /pricing).
   Load after bulma.min.css and /ui/bulma.css. */
:root { --p: #ffd202; --p-ink: #c98f00; --p-soft: #fff3c4; --line: #e8e6dd; --ink: #0f0f0f; --mute: #6f6f68; }

/* No fixed height on html/body: a sticky nav is confined to its containing
   block, so `height: 100%` on body made it scroll away after one viewport. */
html, body { margin: 0; background: #fafaf5; }
body { font-family: "Inter", system-ui, sans-serif; color: #171717; min-height: 100vh; }

nav.top {
  position: sticky; top: .75rem; z-index: 30;
  width: fit-content; margin: .75rem auto -3.4rem;
  background: rgba(255,255,255,.92); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  border: 1px solid var(--line); border-radius: 999px;
  box-shadow: 0 6px 24px rgba(20,20,15,.08);
  display: flex; justify-content: center; align-items: center; gap: 1.75rem;
  padding: .55rem .6rem .55rem 1.15rem;
}
nav.top a:not(.button) { color: #171717; font-weight: 500; }
nav.top a:not(.button):hover, nav.top a[aria-current]:not(.logo) { color: #8a887f; }
.button.is-primary { background: var(--ink); border-color: var(--ink); color: #fff; border-radius: 999px; font-weight: 500; }
.button.is-primary:hover { background: #2b2a26; border-color: #2b2a26; color: #fff; }

/* page header (sub-pages) */
.page-head { position: relative; padding: 8rem 1rem 3.5rem; text-align: center; }
.page-head::before {
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .8;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='320' height='192'%3E%3Cg fill='%23ffd202'%3E%3Crect x='0' y='0' width='64' height='40' fill-opacity='.12'/%3E%3Crect x='64' y='0' width='64' height='40' fill-opacity='.30'/%3E%3Crect x='192' y='0' width='64' height='40' fill-opacity='.18'/%3E%3Crect x='128' y='40' width='64' height='40' fill-opacity='.36'/%3E%3Crect x='256' y='40' width='64' height='40' fill-opacity='.14'/%3E%3Crect x='0' y='80' width='64' height='40' fill-opacity='.24'/%3E%3Crect x='192' y='80' width='64' height='40' fill-opacity='.32'/%3E%3Crect x='64' y='120' width='64' height='40' fill-opacity='.16'/%3E%3Crect x='256' y='120' width='64' height='40' fill-opacity='.28'/%3E%3Crect x='128' y='160' width='64' height='40' fill-opacity='.20'/%3E%3C/g%3E%3C/svg%3E");
  -webkit-mask-image: radial-gradient(ellipse 80% 90% at 50% 60%, transparent 45%, #000 95%);
          mask-image: radial-gradient(ellipse 80% 90% at 50% 60%, transparent 45%, #000 95%);
}
.page-head > * { position: relative; }
.page-head h1 { font-family: "Source Serif 4", Georgia, serif; font-size: clamp(2.1rem, 5.6vw, 3.5rem); font-weight: 500;
  line-height: 1.05; letter-spacing: -.01em; color: var(--ink); margin: 1rem 0 .9rem; text-wrap: balance; }
.page-head h1 span { position: relative; white-space: nowrap; z-index: 0; }
.page-head h1 span::after { content: ""; position: absolute; left: -.04em; right: -.04em; bottom: .08em; height: .32em;
  border-radius: .1em; background: var(--p); opacity: .55; z-index: -1; }
.page-head .lead { color: var(--mute); font-size: 1.1rem; max-width: 34rem; margin: 0 auto; }

/* sections */
.sec { padding: 6rem 1rem; border-top: 1px solid var(--line); background: #fafaf5; }
.sec.is-white { background: #fff; }
.wrap { max-width: 64rem; margin: 0 auto; }
.sec-head { text-align: center; margin-bottom: 3rem; }
.sec-head.is-left { text-align: left; }
.pill { display: inline-flex; align-items: center; gap: .4rem; font-size: .8rem; font-weight: 500; color: #171717;
  padding: .2rem .7rem; border: 1px solid var(--line); border-radius: 999px; background: #fff; }
.pill i { color: var(--p-ink); font-size: .75rem; }
.sec h2 { font-family: "Source Serif 4", Georgia, serif; font-size: clamp(1.9rem, 4.8vw, 2.75rem); line-height: 1.08; font-weight: 500;
  color: var(--ink); margin: 1rem 0 .75rem; letter-spacing: -.01em; }
.sec .lead { color: var(--mute); font-size: 1.05rem; max-width: 30rem; }
.sec-head:not(.is-left) .lead { margin: 0 auto; }
.btn-ghost { display: inline-flex; align-items: center; gap: .5rem; padding: .45rem 1rem; border: 1px solid #e0ddd2;
  border-radius: 999px; background: #fff; color: #171717; font-weight: 500; font-size: .9rem; box-shadow: 0 1px 2px rgba(20,20,15,.05); }
.btn-ghost:hover { border-color: var(--ink); color: var(--ink); }
.center { text-align: center; margin-top: 2.5rem; }
.pattern {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='96'%3E%3Cg fill='%23ffd202'%3E%3Crect x='0' y='0' width='32' height='24' fill-opacity='.10'/%3E%3Crect x='32' y='0' width='32' height='24' fill-opacity='.28'/%3E%3Crect x='96' y='0' width='32' height='24' fill-opacity='.16'/%3E%3Crect x='64' y='24' width='32' height='24' fill-opacity='.34'/%3E%3Crect x='128' y='24' width='32' height='24' fill-opacity='.12'/%3E%3Crect x='0' y='48' width='32' height='24' fill-opacity='.22'/%3E%3Crect x='96' y='48' width='32' height='24' fill-opacity='.30'/%3E%3Crect x='32' y='72' width='32' height='24' fill-opacity='.14'/%3E%3Crect x='128' y='72' width='32' height='24' fill-opacity='.26'/%3E%3C/g%3E%3C/svg%3E"); }

/* chips (category filter) */
.chips { display: flex; flex-wrap: wrap; gap: .5rem; justify-content: center; margin-top: 1.5rem; }
.chips span, .chips button { padding: .35rem .9rem; border: 1px solid #e0ddd2; border-radius: 999px; background: #fff;
  font: inherit; font-size: .85rem; font-weight: 500; color: #2a2a26; }
.chips button { cursor: pointer; }
.chips button:hover { border-color: var(--ink); }
.chips button.is-on { background: var(--ink); border-color: var(--ink); color: #fff; }
.chips .is-mute { color: #999; }

/* live template cards (api.templates_cards) */
.tpl { display: block; background: #fff; border: 1px solid var(--line); border-radius: .9rem; padding: .5rem; color: var(--ink);
  box-shadow: 0 1px 3px rgba(0,0,0,.04); overflow: hidden; transition: transform .15s, box-shadow .15s; }
.tpl:hover { transform: translateY(-3px); box-shadow: 0 12px 28px rgba(0,0,0,.08); color: var(--ink); }
.tpl-frame { position: relative; width: 100%; aspect-ratio: 16/10; overflow: hidden; border-radius: .6rem; background: #f4f2ea; }
.tpl-frame iframe { position: absolute; top: 0; left: 0; width: 1280px; height: 800px; border: 0; transform-origin: 0 0; pointer-events: none; }
.tpl-name { padding: .7rem .3rem .3rem; font-weight: 600; }

/* dark closing CTA */
.cta { background: #242421; color: #eceae2; padding: 5rem 1rem; text-align: center; }
.cta h2 { font-family: "Source Serif 4", Georgia, serif; color: #fff; margin: 0 0 .75rem; font-size: clamp(1.9rem, 4.8vw, 2.75rem); font-weight: 500; letter-spacing: -.01em; }
.cta p { color: #b5b2a6; margin-bottom: 1.75rem; }
.cta .button.is-primary { background: var(--p); border-color: var(--p); color: var(--ink); }
.cta .button.is-primary:hover { background: #ffdc33; border-color: #ffdc33; color: var(--ink); }

@media (max-width: 768px) {
  nav.top { gap: .8rem; padding: .4rem .4rem .4rem .8rem; font-size: .9rem; max-width: calc(100vw - 1rem); }
  nav.top .logo { font-size: 1.05rem; }
  nav.top .button { font-size: .85rem; padding-inline: .8rem; }
  .page-head { padding-top: 7rem; }
}
@media (max-width: 420px) {
  nav.top .logo span { display: none; }
}
