/* Concept cards: what a Pulse Pro page needs to show the concept designs, websites and apps alike
   (data/concepts.json, data/apps.json, src/lib/concepts.mjs). Loaded on the two galleries, the homepage, /websites/
   and /apps/. The concepts themselves use concepts.css; the quick preview dialog is in concept-preview.css.

   1. Devices      .cdev: a laptop and a phone (websites) or three phones (apps) drawn in CSS around real screenshots
                   (made by scripts/build/concept-shots.mjs; the concept photo or a colour block when there is none)
   2. Actions      .chost, .cact: "Quick preview" and "Visit full site" over a card, on hover, focus or touch
   3. Gallery      .cgal, .cf (filter chips), .cc (card)
   4. Carousel     .ccar
   5. Picker       .cpick ("Pick a design you like" in the forms)
   6. Sections     .csec (the sections that hold a carousel) */

/* ---------- 1. Devices ---------- */
.cdev{position:relative;display:block;padding:0 3% 7%}
.cdev__laptop{position:relative;display:block;padding:2.2% 2.2% 3%;border-radius:14px 14px 4px 4px;background:#1a1a1a;box-shadow:0 26px 50px -18px rgba(20,20,20,.35)}
.cdev__laptop:after{content:"";position:absolute;left:-5%;right:-5%;top:100%;height:10px;border-radius:0 0 12px 12px;background:linear-gradient(#d3d0c9,#a8a59e)}
.cdev__screen{display:block;overflow:hidden;background:var(--c-bg,#eee)}
.cdev__laptop .cdev__screen{aspect-ratio:1200/750;border-radius:3px}
.cdev__phone{position:absolute;right:0;bottom:0;width:21%;padding:1.1%;border-radius:14% / 6.5%;background:#111;box-shadow:0 18px 36px -10px rgba(20,20,20,.45)}
.cdev__phone .cdev__screen{aspect-ratio:480/1039;border-radius:11% / 5%}
.cdev__shot{display:block;width:100%;height:100%;max-width:none;object-fit:cover;object-position:top;color:transparent;transition:transform .9s cubic-bezier(.16,1,.3,1)}
.cdev__shot--photo{object-position:center}
.cdev__blank{display:grid;place-items:center;width:100%;height:100%;padding:8%;text-align:center;font-weight:600;font-size:.8rem;line-height:1.2;color:#fff;mix-blend-mode:difference}
.chost:hover .cdev__laptop .cdev__shot{transform:scale(1.03)}
/* Apps: three phones on the app's own colour, the middle one a little higher, all running off the bottom edge. */
.cdev--app{display:flex;justify-content:center;align-items:flex-start;gap:4.5%;aspect-ratio:1200/760;padding:6% 5% 0;border-radius:18px;background:var(--c-bg,#eee);overflow:hidden}
.cdev--app .cdev__phone{position:relative;flex:none;width:27.5%;padding:1%;border-radius:13% / 6%;transition:transform .7s cubic-bezier(.16,1,.3,1)}
.cdev--app .cdev__phone:nth-child(1){transform:translateY(9%)}
.cdev--app .cdev__phone:nth-child(3){transform:translateY(16%)}
.chost:hover .cdev--app .cdev__phone:nth-child(2){transform:translateY(-2.5%)}

/* ---------- 2. Actions ---------- */
.chost{position:relative}
.cact{display:flex;flex-wrap:wrap;justify-content:center;gap:.5rem}
.chost>.cact{position:absolute;left:0;right:0;bottom:9%;z-index:2;padding-inline:.5rem}
.cact__btn{position:relative;display:inline-flex;align-items:center;gap:.45rem;min-height:44px;padding:.5rem 1rem;border:0;border-radius:999px;background:var(--paper,#f7f6f3);color:var(--ink,#151413);font:inherit;font-size:.9rem;font-weight:600;line-height:1.1;text-decoration:none;white-space:nowrap;cursor:pointer;box-shadow:0 0 0 1px rgba(21,20,19,.12),0 10px 24px -8px rgba(21,20,19,.5);transition:background .16s,color .16s,transform .16s}
.cact__btn[hidden]{display:none}
.cact__btn:hover{background:var(--ink,#151413);color:var(--paper,#f7f6f3)}
.cact__btn svg{flex:none}
/* With a mouse the two actions wait until the card is pointed at or focused. Touch screens always show them. */
@media (hover:hover){
 .chost>.cact,.cpick__opt>.cact{opacity:0;transition:opacity .2s}
 .chost>.cact{bottom:0;top:0;align-content:center;transform:translateY(6px);transition:opacity .2s,transform .3s cubic-bezier(.16,1,.3,1)}
 .chost:hover>.cact,.chost:focus-within>.cact{opacity:1;transform:none}
 .cpick__opt:hover>.cact,.cpick__opt:focus-within>.cact{opacity:1}
}

/* ---------- 3. Gallery (/concepts/ and /apps/concepts/) ---------- */
.cg-hero{padding-block:var(--s6,64px) var(--s5,40px)}
.cg-lead{max-width:44rem}
.cg-ctas{display:flex;flex-wrap:wrap;gap:.6rem;margin-top:1.4rem}
.cg-note{padding-bottom:var(--s6,64px)}
.cgal{padding-bottom:var(--s6,64px)}
.cf{display:grid;gap:.75rem;padding-block:var(--s3,16px) var(--s5,40px)}
.cf__row{display:flex;flex-wrap:wrap;align-items:center;gap:.5rem}
.cf__label{min-width:4.5rem;font-family:var(--mono,ui-monospace,monospace);font-size:.75rem;letter-spacing:.08em;text-transform:uppercase;color:var(--ink-2,#55524c)}
.cf__empty{padding-block:var(--s4,24px)}
.cf__empty[hidden]{display:none}
@media (max-width:640px){.cf__label{flex-basis:100%}}
.cf[hidden]{display:none}
.cf__chip{min-height:44px;padding:.5rem 1.05rem;border:1px solid var(--line-2,#b9b6af);border-radius:999px;background:transparent;color:var(--ink,#151413);font:inherit;font-size:.95rem;cursor:pointer;transition:background .16s,color .16s,border-color .16s}
.cf__chip:hover{border-color:var(--ink,#151413)}
.cf__chip[aria-pressed="true"]{background:var(--ink,#151413);border-color:var(--ink,#151413);color:var(--paper,#f7f6f3)}
.cgal__grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:var(--s6,64px) var(--s5,40px)}
.cc{display:flex;flex-direction:column;gap:1.3rem}
.cc[hidden]{display:none}
.cc__body{display:grid;gap:.55rem;max-width:36rem}
.cc__name{margin:0;font-size:1.7rem;line-height:1.1;letter-spacing:-.025em;font-weight:600}
.cc__hero{margin:0;color:var(--ink-2,#45433f);font-size:1.05rem}
.cc__points{list-style:none;margin:.5rem 0 0;padding:0;border-top:1px solid var(--line,#d9d6cf)}
.cc__points li{position:relative;padding:.65rem 0 .65rem 1.7rem;border-bottom:1px solid var(--line,#d9d6cf);font-size:.97rem;line-height:1.45}
.cc__points li:before{content:"";position:absolute;left:.15rem;top:1.05rem;width:.75rem;height:.4rem;border-left:2px solid var(--coral,#ff5b49);border-bottom:2px solid var(--coral,#ff5b49);transform:rotate(-45deg)}
.cc__for{margin:.5rem 0 0;color:var(--stone,#5f5d58);font-size:.93rem;line-height:1.5}
.cc__for .label{margin-right:.4rem;color:var(--ink,#151413)}
.cc__go{margin:.8rem 0 0}

/* ---------- 4. Carousel ---------- */
/* --cc-edge lines the first card up with the page's .wrap column while the strip itself runs edge to edge. */
.ccar{position:relative;--cc-edge:max(var(--s3,16px),calc((100vw - var(--w-max,1200px))/2 + var(--s4,24px)))}
.ccar__track{display:flex;gap:var(--s4,24px);margin:0;padding:.4rem var(--cc-edge) 1.4rem;list-style:none;overflow-x:auto;scroll-snap-type:x mandatory;scroll-padding-inline:var(--cc-edge);scrollbar-width:thin;-webkit-overflow-scrolling:touch}
.ccar__item{flex:0 0 min(78vw,25rem);scroll-snap-align:start}
.ccar__meta{display:grid;gap:.15rem;margin:0;padding-top:1rem}
.ccar__meta b{font-size:1.2rem;font-weight:600;letter-spacing:-.02em}
.ccar__meta span:last-child{font-size:.93rem;opacity:.75}
.ccar__nav{display:flex;gap:.5rem;justify-content:flex-end;margin:0;padding-inline:var(--cc-edge)}
.ccar__nav[hidden]{display:none}
.ccar__btn{display:grid;place-items:center;width:48px;height:48px;border:1px solid currentColor;border-radius:50%;background:transparent;color:inherit;cursor:pointer;transition:background .16s,color .16s,opacity .16s}
.ccar__btn--prev svg{transform:rotate(180deg)}
.ccar__btn:hover:not(:disabled){background:var(--ink,#151413);color:var(--paper,#f7f6f3);border-color:var(--ink,#151413)}
.ccar__btn:disabled{opacity:.3;cursor:default}

/* ---------- 5. Picker ---------- */
.cpick{min-width:0;margin:0;padding:0;border:0}
.cpick__legend{padding:0;margin-bottom:.6rem;font-weight:600}
.cpick__picked{display:flex;flex-wrap:wrap;align-items:baseline;gap:.3rem .6rem;margin:0 0 .7rem;padding:.6rem .8rem;border-radius:8px;background:var(--paper-2,#efede8);font-size:.92rem}
.cpick__picked[hidden]{display:none}
.cpick__change{padding:0;border:0;background:none;color:inherit;font:inherit;font-weight:600;text-decoration:underline;text-underline-offset:2px;cursor:pointer}
.cpick__row{display:flex;gap:.8rem;padding:.3rem .3rem .8rem;overflow-x:auto;scroll-snap-type:x proximity;scrollbar-width:thin}
.cpick__opt{flex:0 0 10.5rem;display:flex;flex-direction:column;gap:.35rem;scroll-snap-align:start}
.cpick__opt label{position:relative;display:flex;flex-direction:column;gap:.45rem;cursor:pointer}
.cpick__opt input{position:absolute;opacity:0;width:1px;height:1px}
.cpick__shot,.cpick__none{border-radius:8px;box-shadow:0 0 0 1px var(--line-2,#b9b6af);transition:box-shadow .16s}
.cpick__shot{display:block;aspect-ratio:16/10;overflow:hidden;background:var(--c-bg,#eee)}
.cpick__shot--app{display:flex;justify-content:center;align-items:flex-start;gap:7%;padding:9% 0 0}
.cpick__shot--app .cdev__shot{width:36%;height:auto;border-radius:9px 9px 0 0;box-shadow:0 0 0 2px #111}
.cpick__shot--app .cdev__blank{font-size:.72rem}
.cpick__none{display:grid;place-items:center;aspect-ratio:16/10;padding:.5rem;background:var(--paper-2,#efede8);text-align:center;font-weight:600;font-size:.9rem;line-height:1.2}
.cpick__name{font-size:.84rem;font-weight:600;line-height:1.25}
.cpick__name small{display:block;font-weight:400;color:var(--stone,#5f5d58)}
.cpick__opt input:checked~.cpick__shot,.cpick__opt input:checked~.cpick__none{box-shadow:0 0 0 3px var(--coral,#ff5b49)}
.cpick__opt input:focus-visible~.cpick__shot,.cpick__opt input:focus-visible~.cpick__none{outline:2px solid var(--ink,#151413);outline-offset:5px}
.cpick__opt input:checked~.cpick__name:before{content:"";display:inline-block;width:.7rem;height:.38rem;margin:0 .35rem .15rem 0;border-left:2px solid var(--coral-deep,#c8321e);border-bottom:2px solid var(--coral-deep,#c8321e);transform:rotate(-45deg)}
/* In a picker the two actions are small text buttons under the name. */
.cpick__opt>.cact{flex-direction:column;align-items:flex-start;gap:0}
.cpick__opt .cact__btn{min-height:30px;padding:.15rem 0;background:none;box-shadow:none;font-size:.78rem;font-weight:500;color:var(--ink-2,#45433f)}
.cpick__opt .cact__btn:hover{background:none;color:var(--ink,#151413);text-decoration:underline}
.cpick__more{margin:0;font-size:.88rem;color:var(--stone,#5f5d58)}
.pform .cpick{margin-top:var(--s3,16px)}
.est__done .cpick{padding-top:var(--s3,16px);border-top:1px solid var(--line,#d9d6cf)}
/* The estimator's receipt names the chosen design. */
.receipt-panel__row[hidden]{display:none}

/* ---------- 6. Sections that hold a carousel ---------- */
.csec{padding-block:var(--s7,104px);overflow:hidden}
.csec__head{display:grid;grid-template-columns:1fr auto;gap:var(--s3,16px) var(--s5,40px);align-items:end;margin-bottom:var(--s5,40px)}
.csec__head .label{grid-column:1/-1}
.csec__title{margin:0;max-width:18ch}
.csec__lead{grid-column:1/-1;margin:0;max-width:40rem}
.csec--after{padding-top:0}

@media (max-width:860px){
 .cgal__grid{grid-template-columns:1fr;gap:var(--s5h,48px)}
 .csec{padding-block:var(--s6,64px)}
 .csec__head{grid-template-columns:1fr}
}
@media (prefers-reduced-motion:reduce){
 .cdev__shot,.cdev__phone,.cact,.cact__btn,.cf__chip,.ccar__btn{transition:none}
 .ccar__track{scroll-behavior:auto}
}
