/* The template gallery (/templates, views/templates/gallery.js), on the design system in site.css: colours, type,
   buttons, badges, cards and tiles come from there; this sheet only lays out the gallery's own parts (tg-).
   Each template is a tile with its example page in a phone on a colour block, then what it includes and its
   buttons; the free Basic card and Enterprise team pages follow. It loads after site.css. */
body{margin:0;background:#fff;color:var(--dh-ink)}
.skip{position:absolute;left:12px;top:-80px;z-index:100;padding:12px 18px;border-radius:12px;background:var(--dh-ink);color:#fff;font-weight:700;text-decoration:none}
.skip:focus{top:12px;outline:3px solid var(--dh-mint);outline-offset:2px}
.tg *{box-sizing:border-box}
/* Resets carry no weight (:where), so the design system's and this sheet's own rules always win over them */
:where(.tg) :where(h1,h2,h3,p,ul){margin:0}
:where(.tg) :where(ul){padding:0;list-style:none}
.tg-sr{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap;border:0}

.tg-head{display:flex;flex-direction:column;align-items:flex-start;gap:var(--dh-s4);padding-top:var(--dh-s8);padding-bottom:var(--dh-s7)}
.tg .tg-title{font-size:clamp(40px,4vw + 16px,72px);max-width:15ch}
.tg-note{font-size:15px;color:var(--dh-muted)}

/* The templates, three to a row */
.tg-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:var(--dh-s5)}
.tg-tpl{display:flex;flex-direction:column;overflow:hidden;border-radius:var(--dh-r-tile);background:var(--dh-white);box-shadow:inset 0 0 0 1.5px var(--dh-line)}
.tg-mint{--tg-bg:var(--dh-mint)}
.tg-lilac{--tg-bg:var(--dh-lilac)}
.tg-deep{--tg-bg:var(--dh-deep)}
/* The example in a phone that runs off the bottom of its colour block: the iframe is the page at 360 px wide,
   shown at 60 %, so it lays out as it does on a phone */
.tg-shot{display:flex;justify-content:center;height:340px;padding-top:var(--dh-s6);overflow:hidden;background:var(--tg-bg)}
.tg-phone{flex:none;width:232px;height:460px;overflow:hidden;border:8px solid #000;border-radius:40px;background:#fff;box-shadow:0 24px 48px rgba(11,26,22,.3);transition:transform var(--dh-enter) var(--dh-ease)}
.tg-deep .tg-phone{box-shadow:0 0 0 1.5px rgba(255,255,255,.18),0 24px 48px rgba(0,0,0,.4)}
.tg-phone iframe{display:block;width:360px;height:740px;border:0;transform:scale(.6);transform-origin:0 0;pointer-events:none}
.tg-tpl:hover .tg-phone{transform:translateY(-8px)}
.tg-body{display:flex;flex:1;flex-direction:column;gap:var(--dh-s3);padding:var(--dh-s6)}
.tg-body .dh-muted{font-size:17px}
.tg-has{display:flex;flex-direction:column;gap:6px;margin-top:var(--dh-s1)}
.tg-has li{display:flex;align-items:flex-start;gap:var(--dh-s2);font-size:15px;line-height:1.4}
.tg-has svg{flex:none;margin-top:2px;color:var(--dh-leaf)}
.tg-acts{display:flex;flex-wrap:wrap;align-items:center;gap:var(--dh-s2) var(--dh-s5);margin-top:auto;padding-top:var(--dh-s4)}
.tg .tg-see{padding:0;min-height:44px}
.tg-see svg{transition:transform var(--dh-fast) var(--dh-ease)}
.tg-see:hover svg{transform:translateX(4px)}

/* The free Basic card and team pages, side by side */
.tg-more{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:var(--dh-s5)}
.tg-more .dh-tile,.tg-more .dh-card{padding:var(--dh-s7)}
.tg-more .dh-muted{font-size:17px;max-width:46ch}
.tg-basic .tg-acts,.tg-team .tg-acts{padding-top:var(--dh-s3)}

@media (max-width:960px){
  .tg-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
  .tg-more{grid-template-columns:minmax(0,1fr)}
}
@media (max-width:640px){
  .tg-head{padding-top:var(--dh-s6);padding-bottom:var(--dh-s6)}
  .tg-grid{grid-template-columns:minmax(0,1fr)}
  .tg-shot{height:300px}
  .tg-body{padding:var(--dh-s5)}
  .tg-more .dh-tile,.tg-more .dh-card{padding:var(--dh-s5)}
}
@media (prefers-reduced-motion:reduce){
  .tg-phone,.tg-see svg{transition:none}
  .tg-tpl:hover .tg-phone,.tg-see:hover svg{transform:none}
}
