/* ==========================================================
   cafe-sweets.xyz — chrome confectionery atelier
   muji minimalism × Y2K chrome render
   ========================================================== */

/* --------- Tokens --------- */
:root {
  --linen:        #f4f1ea;   /* page background */
  --tray:         #e8e4da;   /* module background */
  --aluminum:     #c8ccd1;   /* hero counter base */
  --chrome-mid:   #a8b0b8;   /* polished chrome body */
  --chrome-deep:  #5a6068;   /* shadow + primary text */
  --counter-edge: #2a2d31;   /* darkest accent + label keys */
  --caramel:      #d9b8a3;   /* single warm accent */
  --highlight:    #ffffff;   /* chrome specular */
  --cool-tint:    #d6dadf;   /* cool aluminum tint */

  --pad-page-x:   8vw;
  --pad-tray:     4rem 3.5rem;
  --gap-grid:     3rem;
  --gap-vert:     12vh;
  --r-tray:       28px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  background: var(--linen);
  color: var(--chrome-deep);
  font-family: "Inter", system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

/* --------- HERO / COUNTER --------- */
.hero {
  position: relative;
  min-height: 75vh;
  padding: clamp(4rem, 10vh, 8rem) var(--pad-page-x) clamp(3rem, 6vh, 6rem);
  display: flex;
  align-items: flex-end;
  isolation: isolate;
  overflow: hidden;
}

.hero-counter {
  position: absolute;
  inset: 0;
  z-index: -2;
  background:
    repeating-linear-gradient(90deg,
      var(--aluminum) 0px,
      var(--cool-tint) 1px,
      var(--aluminum) 2px),
    linear-gradient(180deg, var(--cool-tint) 0%, var(--aluminum) 60%, #b9bec5 100%);
}

.hero-counter::after {
  content: "";
  position: absolute; inset: 0;
  background: radial-gradient(ellipse at 50% 40%, rgba(244,241,234,0.55) 0%, rgba(244,241,234,0) 60%);
  pointer-events: none;
}

.hero-stage {
  position: relative;
  width: 100%;
  display: grid;
  grid-template-columns: 1fr;
  align-items: end;
  gap: 2rem;
  z-index: 1;
}

.hero-mark {
  font-family: "Fredoka", "Inter", sans-serif;
  font-weight: 600;
  font-size: clamp(2.4rem, 8vw, 5.6rem);
  line-height: 0.95;
  letter-spacing: -0.02em;
  color: var(--counter-edge);
  position: relative;
  display: inline-flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.05em 0.15em;
}
.hero-mark__a, .hero-mark__b { position: relative; }
.hero-mark__a::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -0.05em;
  height: 3px; background: var(--caramel);
  transform: scaleX(0.6); transform-origin: left;
}
.hero-mark__dash { color: var(--chrome-mid); padding: 0 0.05em; }
.hero-mark__tld {
  color: var(--chrome-deep);
  font-weight: 400;
  font-size: 0.45em;
  letter-spacing: 0.02em;
  align-self: end;
  padding-bottom: 0.55em;
}

.hero-caption {
  font-family: "DM Mono", ui-monospace, monospace;
  font-size: 0.78rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--chrome-deep);
  margin-top: 0.5rem;
  position: relative;
  padding-left: 1.6rem;
}
.hero-caption::before {
  content: ""; position: absolute; left: 0; top: 50%;
  width: 1.1rem; height: 1px; background: var(--counter-edge);
}

/* hero stage chrome dorayaki */
.confection--hero {
  position: absolute;
  right: clamp(2rem, 8vw, 9rem);
  bottom: clamp(2rem, 6vh, 6rem);
  width: clamp(220px, 36vw, 460px);
  height: clamp(150px, 26vw, 320px);
  z-index: 2;
}

.counter-rule {
  height: 1px;
  background: var(--aluminum);
  margin-top: clamp(2rem, 5vh, 4rem);
  width: 100%;
}
.counter-rule--footer { margin: 0 0 3rem 0; }

/* --------- GRID + TRAYS --------- */
.grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: var(--gap-grid);
  row-gap: var(--gap-vert);
  padding: clamp(4rem, 9vh, 8rem) var(--pad-page-x);
  perspective: 1200px;
}

.tray {
  background: var(--tray);
  border-radius: var(--r-tray);
  padding: var(--pad-tray);
  position: relative;
  transform-style: preserve-3d;
  transform: perspective(1200px) rotateX(0deg) translateZ(0);
  transition: box-shadow 320ms ease;
  box-shadow:
    0 4px 12px rgba(42,45,49,0.08),
    0 24px 60px rgba(42,45,49,0.06);
  will-change: transform;
}

.tray--01 { grid-column: span 7; }
.tray--02 { grid-column: span 5; }
.tray--03 { grid-column: span 4; }
.tray--04 { grid-column: span 8; }
.tray--05 { grid-column: span 6; }
.tray--06 { grid-column: span 6; }

.tray-head {
  display: flex;
  align-items: baseline;
  gap: 1.4rem;
  padding-bottom: 1.2rem;
  border-bottom: 1px solid var(--aluminum);
  margin-bottom: 2rem;
}
.tray-num {
  font-family: "DM Mono", monospace;
  font-size: 0.78rem;
  letter-spacing: 0.16em;
  color: var(--counter-edge);
  text-transform: uppercase;
}
.tray-title {
  font-family: "Fredoka", sans-serif;
  font-weight: 500;
  font-size: clamp(1.6rem, 3.2vw, 2.6rem);
  letter-spacing: -0.02em;
  line-height: 1.05;
  color: var(--counter-edge);
}
.tray-title:hover { color: var(--caramel); transition: color 220ms ease; }
.cue {
  color: var(--caramel);
  font-size: 0.6rem;
  vertical-align: middle;
  padding-left: 0.4rem;
}

.tray-body {
  display: grid;
  grid-template-columns: minmax(180px, 0.7fr) 1fr;
  gap: 2.4rem 3rem;
  align-items: center;
}

.tray-text {
  display: flex; flex-direction: column;
  gap: 1.6rem;
}
.tray-prose {
  font-family: "Inter", sans-serif;
  font-size: 1rem;
  line-height: 1.7;
  color: var(--chrome-deep);
  max-width: 56ch;
}

/* nutrition-style spec card */
.spec {
  font-family: "DM Mono", monospace;
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  color: var(--chrome-deep);
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  padding-top: 1.2rem;
  border-top: 1px solid var(--aluminum);
}
.spec-row {
  display: grid;
  grid-template-columns: 9rem 1fr;
  gap: 0.6rem;
  align-items: baseline;
  text-transform: uppercase;
}
.spec dt {
  color: var(--counter-edge);
  font-weight: 500;
  position: relative;
}
.spec dt::after {
  content: " — — — ";
  color: var(--chrome-mid);
  letter-spacing: 0.05em;
}
.spec dd { color: var(--chrome-deep); }
.spec .dot { color: var(--caramel); padding-left: 0.4rem; font-size: 0.6rem; }

/* --------- CHROME CONFECTIONS (CSS only) --------- */
.confection {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 0.78;
  min-height: 180px;
  filter: drop-shadow(0 18px 22px rgba(42,45,49,0.18));
  transform-style: preserve-3d;
}

.confection > * {
  position: absolute;
}

/* shared chrome gradient mixin via class */
.conf-disc, .conf-sphere, .conf-fish, .conf-dome, .conf-cyl, .conf-slab {
  background: radial-gradient(ellipse at 30% 20%,
      var(--highlight) 0%,
      var(--cool-tint) 15%,
      var(--chrome-mid) 40%,
      var(--chrome-deep) 75%,
      #c8ccd1 100%);
  box-shadow:
    inset 0 -6px 14px rgba(42,45,49,0.32),
    inset 0 6px 14px rgba(255,255,255,0.45);
}

/* idle float keyframes — staggered */
@keyframes float {
  0%, 100% { transform: translate3d(0, 0, 0) rotateZ(-1.5deg); }
  50%      { transform: translate3d(0, -8px, 0) rotateZ(1.5deg); }
}

.confection { animation: float 6s ease-in-out infinite; }
.tray--01 .confection { animation-delay: -0.2s; }
.tray--02 .confection { animation-delay: -1.1s; }
.tray--03 .confection { animation-delay: -2.0s; }
.tray--04 .confection { animation-delay: -2.9s; }
.tray--05 .confection { animation-delay: -3.8s; }
.tray--06 .confection { animation-delay: -4.7s; }

/* DORAYAKI: two stacked discs */
.conf-dorayaki { display: block; }
.conf-dorayaki .conf-disc {
  left: 8%;
  width: 84%;
  height: 38%;
  border-radius: 50% / 60%;
}
.conf-dorayaki .conf-disc--top    { top: 18%; }
.conf-dorayaki .conf-disc--bottom {
  top: 46%;
  background: radial-gradient(ellipse at 30% 25%,
      var(--cool-tint) 0%,
      var(--chrome-mid) 35%,
      var(--chrome-deep) 80%,
      #b9bec5 100%);
}
.conf-dorayaki::before {
  content: "";
  position: absolute;
  left: 24%;
  top: 24%;
  width: 35%;
  height: 6%;
  border-radius: 50%;
  background: linear-gradient(90deg, transparent, var(--highlight), transparent);
  filter: blur(1.5px);
  mix-blend-mode: screen;
  z-index: 5;
  animation: shine 7s ease-in-out infinite;
}
@keyframes shine {
  0%, 100% { opacity: 0.95; transform: translateX(0); }
  50%      { opacity: 0.7;  transform: translateX(8%); }
}

/* DAIFUKU: squashed sphere with dimple */
.conf-daifuku .conf-sphere {
  left: 14%; top: 18%;
  width: 72%; height: 70%;
  border-radius: 52% 48% 50% 50% / 56% 56% 44% 44%;
}
.conf-daifuku .conf-dimple {
  left: 46%; top: 26%;
  width: 12%; height: 8%;
  border-radius: 50%;
  background: radial-gradient(ellipse at 50% 50%,
      rgba(42,45,49,0.18) 0%,
      rgba(42,45,49,0) 70%);
  z-index: 4;
}
.conf-daifuku::before {
  content: "";
  position: absolute;
  left: 28%; top: 26%;
  width: 22%; height: 12%;
  border-radius: 50%;
  background: radial-gradient(ellipse, var(--highlight) 0%, transparent 70%);
  filter: blur(1.2px);
  mix-blend-mode: screen;
  z-index: 5;
}

/* TAIYAKI: fish silhouette */
.conf-taiyaki .conf-fish {
  left: 6%; top: 22%;
  width: 70%; height: 56%;
  border-radius: 42% 58% 50% 50% / 60% 60% 40% 40%;
}
.conf-taiyaki .conf-tail {
  right: 4%; top: 30%;
  width: 26%; height: 40%;
  background: radial-gradient(ellipse at 30% 30%,
      var(--cool-tint) 0%,
      var(--chrome-mid) 50%,
      var(--chrome-deep) 100%);
  clip-path: polygon(0% 50%, 100% 0%, 100% 100%);
  box-shadow: inset 0 -4px 8px rgba(42,45,49,0.3);
}
.conf-taiyaki .conf-eye {
  left: 18%; top: 40%;
  width: 5%; height: 7%;
  border-radius: 50%;
  background: var(--counter-edge);
  z-index: 4;
}
.conf-taiyaki::before {
  content: "";
  position: absolute;
  left: 14%; top: 30%;
  width: 38%; height: 8%;
  border-radius: 50%;
  background: linear-gradient(90deg, transparent, var(--highlight), transparent);
  filter: blur(1.4px);
  mix-blend-mode: screen;
  z-index: 5;
}

/* PINEAPPLE BUN: dome with crosshatch */
.conf-bolo .conf-dome {
  left: 12%; top: 18%;
  width: 76%; height: 70%;
  border-radius: 50% 50% 42% 42% / 70% 70% 38% 38%;
}
.conf-bolo .conf-hatch {
  left: 12%; top: 18%;
  width: 76%; height: 70%;
  border-radius: 50% 50% 42% 42% / 70% 70% 38% 38%;
  background-image:
    repeating-linear-gradient(45deg,
      rgba(42,45,49,0.18) 0 1px,
      transparent 1px 14px),
    repeating-linear-gradient(-45deg,
      rgba(42,45,49,0.18) 0 1px,
      transparent 1px 14px);
  mix-blend-mode: multiply;
  z-index: 4;
}
.conf-bolo::before {
  content: "";
  position: absolute;
  left: 26%; top: 26%;
  width: 26%; height: 12%;
  border-radius: 50%;
  background: radial-gradient(ellipse, var(--highlight) 0%, transparent 70%);
  filter: blur(1.3px);
  mix-blend-mode: screen;
  z-index: 5;
}

/* DASIK: low cylinder with stamped flower */
.conf-dasik .conf-cyl {
  left: 14%; top: 30%;
  width: 72%; height: 50%;
  border-radius: 50% / 26%;
}
.conf-dasik .conf-stamp {
  left: 38%; top: 38%;
  width: 24%; height: 28%;
  background:
    radial-gradient(circle at 50% 18%, var(--chrome-deep) 0 8%, transparent 9%),
    radial-gradient(circle at 82% 38%, var(--chrome-deep) 0 8%, transparent 9%),
    radial-gradient(circle at 70% 78%, var(--chrome-deep) 0 7%, transparent 8%),
    radial-gradient(circle at 30% 78%, var(--chrome-deep) 0 8%, transparent 9%),
    radial-gradient(circle at 18% 38%, var(--chrome-deep) 0 8%, transparent 9%),
    radial-gradient(circle at 50% 50%, var(--counter-edge) 0 7%, transparent 8%);
  mix-blend-mode: multiply;
  opacity: 0.55;
  z-index: 4;
}
.conf-dasik::before {
  content: "";
  position: absolute;
  left: 22%; top: 34%;
  width: 30%; height: 6%;
  border-radius: 50%;
  background: linear-gradient(90deg, transparent, var(--highlight), transparent);
  filter: blur(1.4px);
  mix-blend-mode: screen;
  z-index: 5;
}

/* CASTELLA: chamfered slab */
.conf-castella .conf-slab {
  left: 10%; top: 24%;
  width: 80%; height: 56%;
  border-radius: 14px;
  clip-path: polygon(
    8% 0%, 92% 0%,
    100% 18%, 100% 82%,
    92% 100%, 8% 100%,
    0% 82%, 0% 18%);
}
.conf-castella .conf-bevel {
  left: 10%; top: 24%;
  width: 80%; height: 56%;
  border-radius: 14px;
  background: linear-gradient(180deg,
    rgba(255,255,255,0.35) 0%,
    rgba(255,255,255,0) 30%,
    rgba(42,45,49,0) 70%,
    rgba(42,45,49,0.25) 100%);
  clip-path: polygon(
    8% 0%, 92% 0%,
    100% 18%, 100% 82%,
    92% 100%, 8% 100%,
    0% 82%, 0% 18%);
  mix-blend-mode: overlay;
  z-index: 4;
}
.conf-castella::before {
  content: "";
  position: absolute;
  left: 18%; top: 30%;
  width: 38%; height: 6%;
  background: linear-gradient(90deg, transparent, var(--highlight), transparent);
  filter: blur(1.5px);
  mix-blend-mode: screen;
  z-index: 5;
}

/* contact shadow ::after on every confection */
.confection::after {
  content: "";
  position: absolute;
  left: 16%; right: 16%;
  bottom: -6%;
  height: 16%;
  background: radial-gradient(ellipse at 50% 50%,
      rgba(42,45,49,0.32) 0%,
      rgba(42,45,49,0) 70%);
  filter: blur(8px);
  z-index: -1;
  opacity: 0.85;
}

/* --------- FOOTER / CONTACT SHEET --------- */
.contact-sheet {
  padding: clamp(3rem, 8vh, 6rem) var(--pad-page-x) clamp(4rem, 8vh, 6rem);
}
.sheet-label {
  font-family: "DM Mono", monospace;
  font-size: 0.78rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--counter-edge);
  margin-bottom: 2rem;
}
.sheet-grid {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 1.6rem;
  perspective: 1000px;
}
.sheet-cell {
  background: var(--tray);
  border-radius: 18px;
  padding: 1.4rem 1rem 0.9rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.8rem;
  transform-style: preserve-3d;
}
.sheet-cell--1 { transform: rotateZ(-1.4deg) rotateX(2deg); }
.sheet-cell--2 { transform: rotateZ(0.8deg)  rotateX(-1.5deg); }
.sheet-cell--3 { transform: rotateZ(-0.6deg) rotateX(2.4deg); }
.sheet-cell--4 { transform: rotateZ(1.6deg)  rotateX(-2.2deg); }
.sheet-cell--5 { transform: rotateZ(-1.2deg) rotateX(1.6deg); }
.sheet-cell--6 { transform: rotateZ(0.4deg)  rotateX(-1.2deg); }

.conf-mini {
  width: 100%;
  aspect-ratio: 1 / 0.78;
  min-height: 80px;
}
.sheet-cap {
  font-family: "DM Mono", monospace;
  font-size: 0.62rem;
  letter-spacing: 0.16em;
  color: var(--counter-edge);
}
.sheet-foot {
  font-family: "DM Mono", monospace;
  font-size: 0.7rem;
  letter-spacing: 0.16em;
  color: var(--chrome-deep);
  text-transform: uppercase;
  margin-top: 3rem;
}

/* --------- RESPONSIVE --------- */
@media (max-width: 900px) {
  :root {
    --pad-page-x: 6vw;
    --pad-tray: 2.4rem 2rem;
    --gap-grid: 2rem;
    --gap-vert: 8vh;
  }
  .grid { grid-template-columns: 1fr; }
  .tray, .tray--01, .tray--02, .tray--03, .tray--04, .tray--05, .tray--06 {
    grid-column: 1 / -1;
  }
  .tray-body { grid-template-columns: 1fr; }
  .spec-row { grid-template-columns: 7rem 1fr; }
  .sheet-grid { grid-template-columns: repeat(2, 1fr); }
  .confection--hero {
    position: relative;
    right: auto; bottom: auto;
    width: 80%;
    margin: 0 auto 1rem;
  }
  .hero-stage { text-align: left; }
}

@media (prefers-reduced-motion: reduce) {
  .confection, .conf-dorayaki::before { animation: none; }
  .tray { transform: none !important; }
}
