/* Homepage: hero slides, "Made by Gemma" gallery, how custom cakes work, corporate work. */

/* ---------- Hero slides ---------- */
.qh { position: relative; background: var(--ink-3); color: var(--cream-text); padding-top: 84px; overflow: hidden; }
.qh-slides { position: relative; display: grid; }
.qh-slide { grid-area: 1 / 1; display: grid; grid-template-columns: minmax(0, 1fr) min(44vw, 560px); min-height: min(55vw, 700px); opacity: 0; visibility: hidden; transition: opacity .9s ease, visibility 0s linear .9s; }
.qh-slide.is-active { opacity: 1; visibility: visible; transition: opacity .9s ease, visibility 0s; }
.qh-copy { display: flex; flex-direction: column; justify-content: center; padding: 3rem clamp(1.5rem, 5vw, 5rem) 6rem; }
.qh-copy .eyebrow { color: var(--gold-light); }
.qh-title { font-family: var(--serif); font-weight: 400; font-size: clamp(2.4rem, 4.3vw, 4.4rem); line-height: 1.08; margin: 1.1rem 0 0; color: var(--cream-text); }
.qh-title em { color: var(--gold-light); }
.qh-lede { margin: 1.4rem 0 0; max-width: 40ch; font-size: 1.12rem; line-height: 1.65; color: #d9d2c1; }
.qh-ctas { display: flex; flex-wrap: wrap; gap: .8rem; margin-top: 2rem; }
.qh-media { position: relative; background: #ede2d1; overflow: hidden; }
.qh-media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center 40%; transform: scale(1.04); transition: transform 7s ease-out; }
.qh-slide.is-active .qh-media img { transform: scale(1); }
.qh-controls { position: absolute; left: clamp(1.5rem, 5vw, 5rem); bottom: 2.2rem; display: flex; align-items: center; gap: .9rem; z-index: 2; }
.qh-dot { width: 44px; height: 44px; padding: 0; border: 0; background: none; cursor: pointer; display: grid; place-items: center; }
.qh-dot span { display: block; width: 34px; height: 3px; border-radius: 2px; background: rgba(243,236,221,.28); overflow: hidden; }
.qh-dot span::after { content: ""; display: block; height: 100%; width: 0; background: var(--gold-light); }
.qh-dot[aria-current="true"] span::after { width: 100%; }
.qh.is-playing .qh-dot[aria-current="true"] span::after { width: 0; animation: qhFill var(--qh-time, 6s) linear forwards; }
@keyframes qhFill { to { width: 100%; } }
.qh-dot:focus-visible, .qh-pause:focus-visible { outline: 2px solid var(--gold-light); outline-offset: 2px; border-radius: 4px; }
.qh-pause { width: 44px; height: 44px; border: 1px solid rgba(243,236,221,.3); border-radius: 50%; background: none; color: var(--cream-text); cursor: pointer; display: grid; place-items: center; }
.qh-pause svg { width: 14px; height: 14px; fill: currentColor; }
.qh-label { font-size: .78rem; letter-spacing: .14em; text-transform: uppercase; color: #a9a291; min-width: 7.5rem; }

@media (max-width: 980px) {
  .qh { padding-top: 76px; }
  .qh-copy { padding: 2.4rem 28px 5.6rem; }
  .qh-title { font-size: clamp(2.2rem, 5vw, 3rem); }
  .qh-lede { font-size: 1.02rem; margin-top: 1rem; }
  .qh-ctas { margin-top: 1.4rem; }
  .qh-controls { left: 28px; bottom: 1.4rem; }
  .qh-label { display: none; }
}
@media (max-width: 760px) {
  .qh { padding-top: 72px; }
  .qh-slide { grid-template-columns: minmax(0, 1fr); min-height: 0; }
  .qh-media { order: -1; aspect-ratio: 4 / 5; max-height: 58vh; width: 100%; }
  .qh-copy { padding: 1.6rem 20px 5.2rem; }
  .qh-title { font-size: clamp(2.2rem, 9vw, 2.8rem); margin-top: .7rem; }
  .qh-ctas { display: grid; grid-template-columns: 1fr 1fr; }
  .qh-ctas .btn { justify-content: center; padding: .9rem .6rem; min-height: 48px; text-align: center; }
  .qh-controls { left: 20px; }
}
@media (prefers-reduced-motion: reduce) {
  .qh-media img, .qh-slide.is-active .qh-media img { transform: none; transition: none; }
}

/* ---------- Collection cards: show their photos on desktop too ---------- */
@media (min-width: 761px) {
  .collection-grid[data-swipe] .collection-media { display: block; aspect-ratio: 4 / 5; overflow: hidden; border-radius: 6px; margin-bottom: 1.1rem; width: 100%; }
  .collection-grid[data-swipe] .collection-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s ease; }
  .collection-grid[data-swipe] .collection-item:hover .collection-media img { transform: scale(1.03); }
}

/* ---------- Made by Gemma ---------- */
.made { padding: 5.5rem 0 5rem; background: var(--parchment); }
.made-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 2rem; flex-wrap: wrap; margin-bottom: 2.4rem; }
.made-head h2 { font-family: var(--serif); font-weight: 400; font-size: clamp(2.2rem, 4vw, 3.2rem); margin: .6rem 0 0; color: var(--ink); }
.made-head p { max-width: 46ch; color: var(--muted); margin: 0; line-height: 1.65; }
.made-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.made-grid figure { margin: 0; }
.made-grid .made-img { aspect-ratio: 4 / 5; overflow: hidden; border-radius: 6px; background: #ede2d1; }
.made-grid img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .6s ease; }
.made-grid figure:hover img { transform: scale(1.03); }
.made-grid figcaption { font-size: .92rem; color: var(--ink); margin-top: .7rem; }
.made-cta { display: flex; align-items: center; gap: 1.2rem; flex-wrap: wrap; margin-top: 2.6rem; }
.made-cta .made-note { color: var(--muted); font-size: .95rem; }
@media (max-width: 760px) {
  .made { padding: 3.8rem 0 3.4rem; }
  .made-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .made-grid figcaption { font-size: .85rem; }
}

/* ---------- How a custom cake works ---------- */
.how { padding: 5rem 0; background: var(--parchment-2); color: var(--ink); }
.how h2 { font-family: var(--serif); font-weight: 400; font-size: clamp(2rem, 3.6vw, 2.8rem); margin: .6rem 0 2.4rem; }
.how-steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2rem; list-style: none; padding: 0; margin: 0; counter-reset: how; }
.how-steps li { counter-increment: how; border-top: 1px solid rgba(27,42,52,.25); padding-top: 1.2rem; }
.how-steps li::before { content: counter(how, decimal-leading-zero); font-family: var(--label); font-size: .8rem; letter-spacing: .14em; color: var(--gold-dim); }
.how-steps h3 { font-family: var(--serif); font-weight: 400; font-size: 1.45rem; margin: .5rem 0 .5rem; }
.how-steps p { color: #4c463d; line-height: 1.65; margin: 0; }
.how .btn { margin-top: 2.4rem; }
@media (max-width: 760px) { .how { padding: 3.6rem 0; } .how-steps { grid-template-columns: 1fr; gap: 1.4rem; } }

/* ---------- Corporate, with real work ---------- */
.biz { background: var(--ink-3); color: var(--cream-text); padding: 5.5rem 0; }
.biz-grid { display: grid; grid-template-columns: .9fr 1.1fr; gap: 3.5rem; align-items: center; }
.biz h2 { font-family: var(--serif); font-weight: 400; font-size: clamp(2.2rem, 4vw, 3.2rem); line-height: 1.1; margin: 1rem 0; color: var(--cream-text); }
.biz p { color: #d9d2c1; line-height: 1.7; max-width: 46ch; }
.biz ul { list-style: none; padding: 0; margin: 1.4rem 0 2rem; color: #d9d2c1; }
.biz li { padding: .45rem 0; border-bottom: 1px solid rgba(222,196,142,.14); }
.biz-photos { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); grid-template-rows: auto auto; gap: 14px; }
.biz-photos figure { margin: 0; }
.biz-photos figure:first-child { grid-row: span 2; }
.biz-photos .biz-img { overflow: hidden; border-radius: 6px; height: 100%; }
.biz-photos img { width: 100%; height: 100%; object-fit: cover; display: block; }
.biz-photos figure:first-child .biz-img { aspect-ratio: 4 / 5.2; }
.biz-photos figure:not(:first-child) .biz-img { aspect-ratio: 4 / 3; }
.biz-photos figcaption { font-size: .8rem; color: #a9a291; margin-top: .45rem; }
@media (max-width: 900px) { .biz { padding: 3.8rem 0; } .biz-grid { grid-template-columns: 1fr; gap: 2.2rem; } }
/* Grid children may shrink below their images' natural width. */
.biz-grid > *, .made-grid > *, .biz-photos > * { min-width: 0; }
@media (max-width: 900px) { .biz-grid { grid-template-columns: minmax(0, 1fr); } }
.biz-photos .biz-img { height: auto; }
@media (max-width: 600px) {
  .biz-photos { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .biz-photos figure:first-child { grid-row: auto; grid-column: 1 / -1; }
  .biz-photos figure .biz-img, .biz-photos figure:first-child .biz-img, .biz-photos figure:not(:first-child) .biz-img { aspect-ratio: 4 / 5; }
  .biz-photos figcaption { font-size: .72rem; line-height: 1.35; }
}
/* Corporate: two photos side by side. */
.biz-photos.biz-two figure:first-child { grid-row: auto; }
.biz-photos.biz-two .biz-img, .biz-photos.biz-two figure:first-child .biz-img, .biz-photos.biz-two figure:not(:first-child) .biz-img { aspect-ratio: 4 / 5; }
@media (max-width: 600px) { .biz-photos.biz-two { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
/* A landscape photo (e.g. the cake, cookie and cupcake trio) gets a wider panel. */
.qh-slide.is-wide { grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr); }
@media (max-width: 760px) { .qh-slide.is-wide { grid-template-columns: minmax(0, 1fr); } .qh-slide.is-wide .qh-media { aspect-ratio: 3 / 2; } }
@media (max-width: 760px) { .qh-copy { justify-content: flex-start; } }
@media (max-width: 760px) { .qh-slide { align-content: start; } }
/* Slider controls centred under the text (desktop) or across the screen (phones). */
.qh-controls { left: 0; width: calc(100% - min(44vw, 560px)); justify-content: center; }
.qh-label { display: none; }
@media (max-width: 760px) { .qh-controls { width: 100%; left: 0; } }
.made-insta { flex-basis: 100%; color: var(--ink); font-size: .95rem; text-decoration: underline; text-underline-offset: 3px; }
.made-insta b { font-weight: 500; }

/* ---------- Latest cakes (from Photo Studio) ---------- */
.latest { padding: 0 0 5rem; background: var(--parchment); }
/* A row you scroll sideways: about four cakes on a laptop, with the next one peeking in. */
.latest-grid { display: flex; gap: 16px; overflow-x: auto; scroll-snap-type: x mandatory; scroll-behavior: smooth; scrollbar-width: none; overscroll-behavior-x: contain; padding-bottom: 2px; }
.latest-grid::-webkit-scrollbar { display: none; }
.latest-card { margin: 0; min-width: 0; flex: 0 0 calc((100% - 3 * 16px) / 4.25); scroll-snap-align: start; }
.lc-ui { display: flex; align-items: center; justify-content: center; gap: 1.4rem; margin-top: 1.6rem; }
.lc-ui[hidden] { display: none; }
.lc-progress { width: min(240px, 40vw); height: 2px; background: rgba(27,42,52,.12); border-radius: 2px; overflow: hidden; }
.lc-progress span { display: block; height: 100%; width: 30%; background: var(--gold-dim); transition: transform .2s ease, width .2s ease; }
.lc-nav { display: flex; gap: .6rem; }
.lc-btn { width: 44px; height: 44px; border-radius: 50%; border: 1px solid rgba(27,42,52,.25); background: none; color: var(--ink); display: grid; place-items: center; cursor: pointer; transition: background .2s, opacity .2s; }
.lc-btn:hover:not(:disabled) { background: rgba(27,42,52,.06); }
.lc-btn:disabled { opacity: .3; cursor: default; }
.lc-btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; }
.lc-media { position: relative; border-radius: 6px; overflow: hidden; background: #ede2d1; }
.lc-track { display: flex; overflow-x: hidden; scroll-snap-type: x mandatory; scrollbar-width: none; }
.lc-track::-webkit-scrollbar { display: none; }
.lc-shot { flex: 0 0 100%; scroll-snap-align: start; aspect-ratio: 4 / 5; padding: 0; border: 0; background: none; cursor: zoom-in; display: block; }
.lc-shot img { width: 100%; height: 100%; object-fit: cover; display: block; }
.lc-shot:focus-visible { outline: 2px solid var(--gold); outline-offset: -2px; }
.lc-media .lc-arrow { position: absolute; top: 50%; transform: translateY(-50%); width: 34px; height: 34px; border-radius: 50%; border: 0; background: rgba(255,255,255,.85); color: var(--ink); display: grid; place-items: center; cursor: pointer; opacity: 0; transition: opacity .2s; }
.lc-media:hover .lc-arrow, .lc-media .lc-arrow:focus-visible { opacity: 1; }
@media (hover: none) { .lc-media .lc-arrow { opacity: 1; width: 30px; height: 30px; } }
.lc-media .lc-prev { left: 8px; } .lc-media .lc-next { right: 8px; }
.lc-media .lc-arrow[hidden] { display: none; }
.lc-new { position: absolute; top: 10px; left: 10px; padding: .3rem .65rem; border-radius: 999px; background: rgba(255,255,255,.92); color: var(--ink); font-size: .74rem; font-weight: 500; letter-spacing: .02em; pointer-events: none; box-shadow: 0 1px 4px rgba(0,0,0,.08); }
.lc-new::before { content: ""; display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: #c0392b; margin-right: .4rem; vertical-align: middle; }
.lc-arrow svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; }
.lc-dots { position: absolute; bottom: 8px; left: 0; right: 0; display: flex; justify-content: center; gap: 5px; pointer-events: none; }
.lc-dots span { width: 6px; height: 6px; border-radius: 50%; background: rgba(255,255,255,.6); box-shadow: 0 0 2px rgba(0,0,0,.3); }
.lc-dots span.on { background: #fff; }
.latest-card figcaption { margin-top: .6rem; display: grid; gap: .15rem; }
.lc-caption { font-size: .92rem; color: var(--ink); line-height: 1.4; }
.lc-price { font-size: .9rem; font-weight: 500; color: var(--gold-dim); }
.latest-card figcaption small { font-size: .82rem; color: var(--muted); }
.latest-card figcaption a { color: var(--gold-dim); text-decoration: underline; text-underline-offset: 2px; }
.latest .made-insta { display: inline-block; margin-top: 2rem; }
/* Enlarged photo */
.lc-box { position: fixed; inset: 0; z-index: 10000; background: rgba(15,26,33,.92); display: flex; align-items: center; justify-content: center; padding: 3rem 4rem; }
.lc-box[hidden] { display: none; }
.lc-box figure { margin: 0; max-width: min(92vw, 900px); max-height: 100%; display: flex; flex-direction: column; align-items: center; }
.lc-box img { max-width: 100%; max-height: calc(100vh - 9rem); object-fit: contain; border-radius: 6px; }
.lc-box figcaption { color: #e8e1d2; margin-top: .8rem; font-size: .95rem; text-align: center; }
.lc-box .lc-close { position: absolute; top: 14px; right: 18px; width: 44px; height: 44px; border: 0; background: none; color: #fff; font-size: 2.2rem; line-height: 1; cursor: pointer; }
.lc-box .lc-arrow { width: 46px; height: 46px; border-radius: 50%; border: 1px solid rgba(255,255,255,.35); background: none; color: #fff; display: grid; place-items: center; cursor: pointer; flex: none; margin: 0 1rem; }
.lc-box .lc-arrow[hidden] { visibility: hidden; display: grid; }
@media (max-width: 980px) { .latest-card { flex-basis: calc((100% - 2 * 16px) / 3.2); } }
@media (max-width: 760px) {
  .latest { padding-bottom: 3.4rem; }
  .latest-grid { gap: 12px; }
  .latest-card { flex-basis: 72%; }
  .lc-box { padding: 3.5rem .5rem 2rem; }
  .lc-box .lc-arrow { position: absolute; bottom: 1rem; margin: 0; } .lc-box .lc-prev { left: 1rem; } .lc-box .lc-next { right: 1rem; }
  .lc-box img { max-height: calc(100vh - 11rem); }
}

