/* ==========================================================
   MIEN TREATS: page sections (Phase 3)
   About (cream) > Cakes (plum) > Treats (paper) > Order (deep cream)
   Portrait screens key off aspect ratio, matching the hero.
   ========================================================== */
.btn--gold { background: var(--gold-bright); color: var(--ink); border-color: var(--gold-bright); }
.btn--gold:hover, .btn--gold:focus-visible { background: var(--cream); border-color: var(--cream); }

/* ---------- about ---------- */
.about { background: var(--cream); padding-block: var(--space-6); }
.about__grid { display: grid; gap: var(--space-4); align-items: center; }
.about__portrait { position: relative; isolation: isolate; margin: 0; width: 100%; max-width: 26rem; justify-self: center; }
.about__portrait img { width: 100%; height: auto; aspect-ratio: 2 / 3; object-fit: cover; border-radius: 999px 999px 0 0; }
.about__portrait::after {
  content: ""; position: absolute; inset: 0; z-index: -1; transform: translate(.9rem, .9rem);
  border: 1px solid var(--gold); border-radius: 999px 999px 0 0;
}
.about__text h2 { font-size: var(--step-3); margin-bottom: var(--space-3); max-width: 12em; }
.about__text p + p { margin-top: 1.1rem; }
.about__lede { font-size: var(--step-1); line-height: 1.5; color: var(--ink); }
.about__sign { margin-top: var(--space-3) !important; font-family: var(--font-display); font-style: italic; font-size: var(--step-1); color: var(--plum-soft); }
@media (min-aspect-ratio: 17/20) {
  .about__grid { grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: clamp(3rem, 7vw, 7rem); }
}
/* the portrait is unveiled once, like the curtain in the opening */
html:not(.no-js) .about__portrait img { clip-path: inset(100% 0 0 0); transition: clip-path 1.4s var(--ease-soft); }
html:not(.no-js) .about__portrait::after { opacity: 0; transition: opacity .9s ease 1s; }
html:not(.no-js) .about__portrait.is-in img { clip-path: inset(0); }
html:not(.no-js) .about__portrait.is-in::after { opacity: 1; }

/* ---------- 3D card slider (used by Cakes and Treats) ---------- */
.cf { --cw: clamp(16rem, 25vw, 25rem); --fg: var(--cream); --accent: var(--gold-bright); color: var(--fg); outline-offset: 6px; }
.cf--light { --fg: var(--plum); --accent: var(--rose-text); }
.cf__stage {
  position: relative; height: calc(var(--cw) * 1.25 + 3.5rem); perspective: 1500px; perspective-origin: 50% 42%;
  overflow: hidden; touch-action: pan-y; user-select: none; -webkit-user-select: none; cursor: grab;
}
.cf.is-dragging .cf__stage { cursor: grabbing; }
.cf--dark .cf__stage::before {           /* a soft pool of light under the cards */
  content: ""; position: absolute; left: 50%; bottom: 0; width: 80%; height: 34%; transform: translateX(-50%);
  background: radial-gradient(closest-side, rgba(228, 180, 108, .22), rgba(228, 180, 108, 0)); pointer-events: none;
}
.cf__card {
  position: absolute; top: 1.4rem; left: 50%; width: var(--cw); margin: 0 0 0 calc(var(--cw) / -2); aspect-ratio: 4 / 5;
  background: #fff; border-radius: var(--radius); overflow: hidden; backface-visibility: hidden; will-change: transform, opacity;
  box-shadow: 0 34px 60px -28px rgba(20, 5, 12, .55); opacity: 0;
}
.cf--light .cf__card { box-shadow: 0 30px 55px -28px rgba(91, 21, 51, .45); }
.cf__card img { width: 100%; height: 100%; object-fit: cover; pointer-events: none; }
.cf__ui { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: var(--space-2); max-width: 30rem; margin: var(--space-2) auto 0; }
.cf__btn {
  display: grid; place-items: center; width: 3.1rem; height: 3.1rem; padding: 0; background: none; color: inherit; cursor: pointer;
  border: 1px solid currentColor; border-radius: 50%; opacity: .85;
  transition: background var(--dur-fast) ease, color var(--dur-fast) ease, opacity var(--dur-fast) ease;
}
.cf__btn:hover, .cf__btn:focus-visible { opacity: 1; background: var(--fg); }
.cf--dark .cf__btn:hover, .cf--dark .cf__btn:focus-visible { color: var(--plum); }
.cf--light .cf__btn:hover, .cf--light .cf__btn:focus-visible { color: var(--cream); }
.cf__meta { display: grid; justify-items: center; text-align: center; gap: .15rem; min-height: 4.6rem; align-content: center; }
.cf__title { font-family: var(--font-display); font-size: var(--step-2); line-height: 1.1; }
.cf__sub { font-size: var(--step--1); letter-spacing: .06em; color: var(--accent); }
.cf__count { margin-top: .3rem; font-size: var(--step--1); letter-spacing: .14em; font-variant-numeric: tabular-nums; opacity: .7; }

/* ---------- cakes ---------- */
.cakes { background: var(--plum); color: var(--cream); padding-block: var(--space-6) var(--space-5); overflow-x: clip; }
.cakes h2 { color: var(--cream); font-size: var(--step-3); }
.cakes__head { max-width: 40rem; }
.cakes__head p { margin-top: var(--space-2); font-size: var(--step-1); line-height: 1.5; }
.cakes__head .cakes__flavors { font-size: var(--step--1); letter-spacing: .03em; color: var(--blush); }
.tabs { display: flex; flex-wrap: wrap; gap: .4rem var(--space-3); margin-top: var(--space-4); border-bottom: 1px solid rgba(244, 234, 223, .22); }
.tab {
  position: relative; background: none; border: 0; padding: .9rem 0; color: rgba(244, 234, 223, .62); cursor: pointer;
  font-family: var(--font-display); font-size: var(--step-1); transition: color var(--dur-fast) ease;
}
.tab::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; background: var(--gold-bright);
  transform: scaleX(0); transform-origin: left; transition: transform var(--dur-med) var(--ease-out); }
.tab:hover, .tab:focus-visible, .tab[aria-selected="true"] { color: var(--cream); }
.tab[aria-selected="true"]::after { transform: scaleX(1); }
.tabpanel { padding-top: var(--space-3); }
.tabpanel:not([hidden]) { animation: panel-in .7s var(--ease-out); }
@keyframes panel-in { from { opacity: 0; } to { opacity: 1; } }
.tabpanel__lede { max-width: 34rem; margin-bottom: var(--space-1); color: rgba(244, 234, 223, .86); }
.cakes__cta { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2); margin-top: var(--space-4); }
.cakes__cta p { font-size: var(--step--1); color: var(--blush); }

/* size & serving guide */
.sizes { margin-top: var(--space-5); border-block: 1px solid rgba(244, 234, 223, .25); }
.sizes summary { display: flex; justify-content: space-between; align-items: center; gap: var(--space-2); cursor: pointer; list-style: none;
  padding: 1.15rem 0; font-family: var(--font-display); font-size: var(--step-1); }
.sizes summary::-webkit-details-marker { display: none; }
.sizes summary::after { content: "+"; color: var(--gold-bright); font-size: var(--step-2); line-height: 1; }
.sizes[open] summary::after { content: "\2212"; }
.sizes__tables { display: grid; gap: var(--space-4); padding: var(--space-1) 0 var(--space-3); }
@media (min-width: 900px) { .sizes__tables { grid-template-columns: 1fr 1fr; gap: var(--space-5); } }
.sizes table { width: 100%; border-collapse: collapse; font-size: var(--step--1); font-variant-numeric: tabular-nums; }
.sizes caption { text-align: left; padding-bottom: .7rem; color: var(--gold-bright); letter-spacing: .04em; }
.sizes th, .sizes td { padding: .6rem .4rem .6rem 0; text-align: left; font-weight: 300; border-bottom: 1px solid rgba(244, 234, 223, .16); }
.sizes thead th { color: var(--blush); font-weight: 400; }
.sizes tbody th { font-weight: 400; }

/* ---------- treats ---------- */
.treats { background: var(--paper); padding-block: var(--space-6); overflow-x: clip; }
.treats__head { max-width: 40rem; margin-bottom: var(--space-3); }
.treats__head h2 { font-size: var(--step-3); }
.treats__head p { margin-top: var(--space-2); font-size: var(--step-1); }
.treats__also { margin-top: var(--space-4); text-align: center; color: var(--plum-soft); margin-inline: auto; }
.treats__cta { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: var(--space-2); margin-top: var(--space-3); }
.treats__cta p { font-size: var(--step--1); color: var(--plum-soft); }

/* portrait phones and tablets: bigger cards, gentler angle */
@media (max-aspect-ratio: 17/20) {
  .cf { --cw: min(66vw, 22rem); }
  .tabs { gap: .2rem var(--space-2); }
  .tab { font-size: var(--step-0); }
}

/* ---------- order ---------- */
.order { background: var(--cream-deep); padding-block: var(--space-6); }
.order__grid { display: grid; gap: var(--space-5); }
.order h2 { font-size: var(--step-3); }
.order__intro { margin-top: var(--space-2); font-size: var(--step-1); line-height: 1.5; }
.steps { list-style: none; counter-reset: step; margin: var(--space-4) 0 0; padding: 0; display: grid; gap: var(--space-3); }
.steps li { counter-increment: step; display: grid; grid-template-columns: 3.2rem 1fr; column-gap: var(--space-2); align-items: baseline;
  padding-top: var(--space-2); border-top: 1px solid rgba(91, 21, 51, .22); }
.steps li::before { content: counter(step); grid-row: 1; font-family: var(--font-display); font-style: italic; font-size: var(--step-2); color: var(--rose); }
.steps h3 { grid-column: 2; font-size: var(--step-1); }
.steps p { grid-column: 2; margin-top: .25rem; }
.lead { margin: 0; display: grid; gap: var(--space-2); }
.lead > div { background: var(--paper); border: 1px solid rgba(91, 21, 51, .22); padding: 1.1rem 1.3rem; }
.lead dt { font-size: var(--step--1); letter-spacing: .1em; color: var(--plum-soft); }
.lead dd { margin: .2rem 0 0; font-family: var(--font-display); font-size: var(--step-2); color: var(--plum); line-height: 1.15; }
.order__services { margin-block: var(--space-3); }
@media (min-aspect-ratio: 17/20) {
  .order__grid { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: clamp(3rem, 7vw, 7rem); align-items: start; }
}

/* no-JS: show the photos in a simple scrolling row */
.no-js .cf__stage { height: auto; display: flex; gap: var(--space-2); overflow-x: auto; perspective: none; padding-block: var(--space-2); }
.no-js .cf__card { position: relative; top: auto; left: auto; margin: 0; flex: none; opacity: 1; }
.no-js .cf__ui { display: none; }
.no-js .tabpanel[hidden] { display: block; }
