/* CMS page templates (legal/basic, landing, knowledge, discovery): additions on top of info.css and landing.css.
   Bodies are imported Webflow HTML, so these rules style generic prose rather than structured content. */

/* ---- prose inside the info column (ContentProse brings its own light defaults; these win) ---- */
.info-page .info-body{overflow-wrap:anywhere}
.info-page .info-body .content-prose > :first-child{margin-top:0}
.info-page .info-body .content-prose :is(h1,h2,h3,h4,h5,h6){font-family:"Archivo Expanded",sans-serif;font-stretch:125%;font-weight:500;color:#5a534a;line-height:1.3;margin:2em 0 .6em}
.info-page .info-body .content-prose :is(h1,h2){font-size:21px}
.info-page .info-body .content-prose h3{font-size:18px}
.info-page .info-body .content-prose :is(h4,h5,h6){font-size:16px}
.info-page .info-body .content-prose p{margin:0 0 1em}
.info-page .info-body .content-prose :is(ul,ol){margin:0 0 1.2em;padding-left:1.3em}
.info-page .info-body .content-prose li{margin:.3em 0}
.info-page .info-body .content-prose li + li{margin-top:.3em}
.info-page .info-body .content-prose figure{margin:1.6em 0}
.info-page .info-body .content-prose img{border:1px solid rgba(47,43,38,.12);border-radius:12px;margin:0 auto;background:#fffdf8}
.info-page .info-body .content-prose blockquote{margin:1.4em 0;padding:2px 0 2px 18px;border-left:2px solid rgba(47,43,38,.25);color:#6b645a}
.info-page .info-body .content-prose :is(th,td){border:1px solid rgba(47,43,38,.15);padding:.55em .7em}
.info-page .info-body .content-prose th{color:#5a534a;font-weight:600}
.info-page .info-body .content-prose pre{background:#ece7dd;border-radius:10px}
.info-page .info-body .content-prose code{font-size:.92em}
.info-page .info-body .content-prose strong{color:#2f2b26}
.info-page .info-body .content-prose :is(h1,h2,h3,h4,h5,h6) :is(strong,b){color:inherit;font-weight:inherit}

/* Webflow used h4 for lead paragraphs and link lists: read them as text, not headings */
.cms-article .info-body .content-prose h4,.cms-lp-prose h4,.cms-lp h4{font:500 17px/1.6 -apple-system,BlinkMacSystemFont,"Inter","Segoe UI",sans-serif;font-stretch:normal;color:#5a534a;margin:0 0 1em}

/* lead under a page title */
.cms-lead{margin:14px 0 0;font-size:18px;line-height:1.6;color:#6b645a}
.cms-article .cms-lead + .info-body{margin-top:32px}

/* stray top-level links in imported bodies were Webflow buttons ("Start Playing!") */
.info-page .content-prose > a,.cms-cta a{display:inline-block;margin:.4em 0 1.4em;padding:10px 20px;border-radius:999px;box-shadow:inset 0 0 0 1.5px rgba(47,43,38,.55);color:#2f2b26;font-weight:600;font-size:15px;line-height:1.3;text-decoration:none;transition:background .2s,box-shadow .2s}
.info-page .content-prose > a:hover,.cms-cta a:hover{background:#2f2b26;color:#fff;box-shadow:inset 0 0 0 1.5px #2f2b26}
.info-page .content-prose > a br,.cms-cta a br{display:none}

/* ---- project galleries regrouped from imported bodies (figure + linked caption pairs) ---- */
.cms-gallery{list-style:none;margin:28px 0;padding:0;display:grid;grid-template-columns:repeat(auto-fill,minmax(180px,1fr));gap:22px 18px}
.info-page .cms-gallery{grid-template-columns:repeat(auto-fill,minmax(150px,1fr))}
.cms-gallery .lp-card{margin:0}
.cms-gallery .lp-card > a{display:block;color:inherit;text-decoration:none}
.cms-gallery .lp-card-img{display:block;aspect-ratio:1;border-radius:12px;overflow:hidden;background:#ece7dd}
.info-page .info-body .content-prose .cms-gallery img,.cms-gallery img{width:100%;height:100%;object-fit:cover;display:block;margin:0;border:0;border-radius:0;transition:transform .35s ease}
.cms-gallery .lp-card-label{display:block;margin-top:8px;font-size:14px;line-height:1.4;font-weight:500;color:#5a534a}
.cms-gallery .lp-card > a:hover .lp-card-label{color:#2f2b26;text-decoration:underline;text-underline-offset:3px}
.cms-gallery .lp-card > a:hover img{transform:scale(1.03)}
.info-page .info-body .content-prose .cms-gallery li{margin:0}

/* ---- landing pages ---- */
.cms-lp .lp-prop h2{margin:0 0 6px;font:500 18px/1.3 "Archivo Expanded",sans-serif;font-stretch:125%;color:#5a534a}
.cms-lp .lp-prop p{margin:0;color:#6b645a}
.cms-lp .lp-prop :is(strong,b){font-weight:inherit;color:inherit}
.cms-lp .lp-sec h2 :is(strong,b),.cms-lp .lp-h :is(strong,b){font-weight:inherit}
.cms-props-block .cms-cta{text-align:center;margin:28px 0 0}
.cms-props-block + .lp-secs,.cms-props-block + .lp-block{padding-top:clamp(64px,8vw,112px)}
.cms-lp .lp-sec-text p{margin:0 0 1em;color:#6b645a}
.cms-lp .lp-sec-text p:last-child{margin-bottom:0}
.cms-lp .lp-sec-text .cms-cta{margin-top:18px}
.cms-sec-img{display:grid;gap:16px}
.cms-sec--multi .cms-sec-img{grid-template-columns:1fr 1fr;align-items:center}
.cms-sec-img figure{margin:0}
.cms-sec-img img{width:100%;height:auto;display:block;border-radius:14px}
.cms-lp .lp-sub{margin-bottom:8px}
.cms-lp-prose{max-width:760px;margin:0 auto}
.cms-lp-prose:empty{display:none}
.cms-lp-prose figure{margin:1.4em 0}.cms-lp-prose img{max-width:100%;height:auto;border-radius:12px}

/* ---- knowledge articles ---- */
.cms-article-cta{padding:clamp(56px,7vw,96px) 0 0;margin-top:clamp(40px,5vw,64px);border-top:1px solid rgba(47,43,38,.15)}
.cms-article-cta h2{font-size:clamp(24px,3vw,34px)}

/* ---- discovery pages (/diy, tutorials index) ---- */
.cms-discovery{max-width:1180px;margin:0 auto}
.cms-discovery-head{max-width:720px;margin:0 auto clamp(36px,5vw,56px);font:16px/1.7 -apple-system,BlinkMacSystemFont,"Inter","Segoe UI",sans-serif;text-align:center}
.cms-discovery-head .cms-lead{margin-left:auto;margin-right:auto;max-width:56ch}
.cms-cards{list-style:none;margin:0;padding:0 0 24px;display:grid;grid-template-columns:repeat(auto-fill,minmax(220px,1fr));gap:34px 22px;font:16px/1.5 -apple-system,BlinkMacSystemFont,"Inter","Segoe UI",sans-serif}
.cms-card a{display:block;color:inherit;text-decoration:none}
.cms-card-img{display:block;aspect-ratio:4/3;border-radius:12px;overflow:hidden;background:#ece7dd;position:relative}
.cms-card-img img{width:100%;height:100%;object-fit:cover;display:block;transition:transform .35s ease}
.cms-card-img--wide{aspect-ratio:16/9}
.cms-card-title{display:block;margin-top:12px;font:500 15.5px/1.35 "Archivo Expanded",sans-serif;font-stretch:125%;color:#5a534a}
.cms-card-text{display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;overflow:hidden;margin-top:6px;font-size:14.5px;color:#6b645a}
.cms-card a:hover img{transform:scale(1.03)}
.cms-card a:hover .cms-card-title{color:#2f2b26}

@media (max-width:820px){.cms-sec--multi .cms-sec-img{grid-template-columns:1fr 1fr}}
@media (max-width:480px){
  .cms-gallery,.info-page .cms-gallery{grid-template-columns:1fr 1fr;gap:18px 12px}
  .cms-cards{grid-template-columns:1fr 1fr;gap:26px 14px}
  .cms-card-title{font-size:14px;margin-top:9px}
  .cms-card-text{font-size:13.5px}
  .cms-lead{font-size:17px}
}
@media (prefers-reduced-motion:reduce){.cms-gallery img,.cms-card-img img{transition:none}.cms-gallery .lp-card > a:hover img,.cms-card a:hover img{transform:none}}
@media (max-width:820px){.cms-lp .lp-sec--noimg{text-align:left}}

/* ---- landing images: sizing and blending into the page ---- */
/* restyled images sit on the page cream; darken drops any slightly lighter cream so no tile edge shows */
.cms-lp :is(.cms-sec-img,.cms-lp-prose) img{mix-blend-mode:darken;border-radius:0}
/* one or two images beside a text section: keep them modest, tall screenshots capped by height */
.cms-sec-img{justify-items:center}
.cms-sec-img img{width:auto;max-width:min(100%,420px);max-height:520px}
.cms-sec--multi .cms-sec-img img{max-width:100%}
/* many images (part galleries): text centred on top, a compact grid of feathered tiles below */
.lp-sec.cms-sec--gallery{grid-template-columns:1fr;max-width:1040px;margin:0 auto;justify-items:center}
.lp-sec.cms-sec--gallery .lp-sec-text{order:0;max-width:760px;text-align:center}
.cms-sec--gallery .cms-sec-img{width:100%;grid-template-columns:repeat(auto-fill,minmax(128px,1fr));gap:10px}
.cms-sec--gallery .cms-sec-img img{width:100%;max-width:none;max-height:none;
  -webkit-mask-image:linear-gradient(90deg,transparent,#000 9%,#000 91%,transparent),linear-gradient(transparent,#000 9%,#000 91%,transparent);
  -webkit-mask-composite:source-in;mask-image:linear-gradient(90deg,transparent,#000 9%,#000 91%,transparent),linear-gradient(transparent,#000 9%,#000 91%,transparent);mask-composite:intersect}
@media (max-width:600px){.cms-sec--gallery .cms-sec-img{grid-template-columns:repeat(3,1fr);gap:6px}}
/* a few app screenshots (library previews): text on top, up to three readable screenshots side by side */
.lp-sec.cms-sec--shots{grid-template-columns:1fr;max-width:1040px;margin:0 auto;justify-items:center}
.lp-sec.cms-sec--shots .lp-sec-text{order:0;max-width:760px;text-align:center}
.cms-sec--shots .cms-sec-img{width:100%;grid-template-columns:repeat(auto-fit,minmax(220px,300px));justify-content:center;align-items:start;gap:20px}
.cms-sec--shots .cms-sec-img img{width:100%;max-width:none;max-height:none}

/* ---- text links in CMS bodies: a dark sage from the palette instead of the browser blue (buttons keep their own styles) ---- */
.info-page main :is(p,li,h3,h4,h5,td,figcaption) a:not([class]):not(.cms-cta a){color:#4d6352;text-decoration:underline;text-decoration-color:rgba(77,99,82,.4);text-underline-offset:3px;transition:color .15s,text-decoration-color .15s}
.info-page main :is(p,li,h3,h4,h5,td,figcaption) a:not([class]):not(.cms-cta a):hover{color:#2f3d33;text-decoration-color:currentColor}

/* ---- landing pages with a header video (landing-headers.json): the video sits like the homepage header, title below ---- */
.landing-page--video .lp-hero{padding-top:clamp(28px,4vw,56px)}
/* project grid cards showing the architectural-sketch cardImage: on the page colour, whole drawing visible, no tile edge */
.cms-gallery .lp-card--sketch .lp-card-img{background:#F5F2EC}
.cms-gallery .lp-card--sketch img{object-fit:contain;mix-blend-mode:darken}
