/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: var(--btn-h);
  padding: 14px 32px;
  border: 2px solid var(--accent);
  border-radius: var(--radius-sm);
  background: var(--accent);
  color: var(--accent-contrast);
  font-size: 17px;
  font-weight: 600;
  text-decoration: none;
  line-height: 1.2;
  transition: background 160ms ease, border-color 160ms ease, opacity 160ms ease;
}

.btn:hover,
.btn:focus-visible {
  background: var(--accent-hover);
  border-color: var(--accent-hover);
  color: var(--accent-contrast);
}

.btn:disabled {
  opacity: 0.55;
  cursor: wait;
}

.btn--block {
  width: 100%;
}

.btn-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: var(--btn-h);
  padding: 14px 32px;
  border: 2px solid var(--line);
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--text);
  font-size: 17px;
  font-weight: 600;
  text-decoration: none;
  line-height: 1.2;
}

.btn-ghost:hover,
.btn-ghost:focus-visible {
  border-color: var(--accent);
  color: var(--accent);
}

/* Fields */
.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.field__label {
  font-size: 16px;
  font-weight: 600;
}

.req {
  color: var(--accent);
}

.field input,
.field textarea {
  width: 100%;
  min-height: var(--field-h);
  padding: 14px 16px;
  border: 2px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--field-bg);
  font-size: 17px;
  outline: none;
  box-shadow: none;
}

.field textarea {
  min-height: 160px;
  resize: vertical;
}

.field input:focus,
.field textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 22%, transparent);
}

.field.is-error input,
.field.is-error textarea {
  border-color: var(--danger);
}

.field__error {
  display: none;
  font-size: 13px;
  color: var(--danger);
}

.field.is-error .field__error {
  display: block;
}

.honeypot {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}

/* Cards & pills */
.card {
  background: var(--surface);
  border: 1px dashed var(--line);
  border-radius: var(--radius-md);
  padding: var(--pad-card);
  box-shadow: none;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 32px;
  padding: 4px 12px;
  border-radius: var(--radius-full);
  background: var(--surface-soft);
  border: 2px solid var(--line);
  font-size: 14px;
  font-weight: 600;
  line-height: 1.3;
  color: var(--text);
}

.pill--price {
  background: var(--surface);
  border-color: var(--accent-soft);
  color: var(--accent);
}

.pill--muted {
  font-weight: 500;
  color: var(--text-muted);
}

.icon-circle {
  width: var(--tap);
  height: var(--tap);
  border-radius: 50%;
  border: 2px solid var(--line);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
  flex-shrink: 0;
}

.icon-circle svg {
  width: 20px;
  height: 20px;
}

/* Section titles — Cakecious rhythm */
.section-label {
  margin: 0 0 8px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
}

.section-title {
  text-align: center;
  font-size: clamp(28px, 4vw, 36px);
  font-weight: 700;
  padding-bottom: 12px;
  margin: 0 auto 40px;
  position: relative;
  max-width: 18em;
}

.section-head {
  text-align: center;
  margin-bottom: 40px;
}

.section-head .section-label {
  text-align: center;
}

.section-head .section-title {
  margin-bottom: 16px;
}

.section-title::after {
  content: "";
  width: 40px;
  height: 1px;
  position: absolute;
  left: 50%;
  bottom: 0;
  transform: translateX(-50%);
  background: var(--text);
}

.section-title--left {
  text-align: left;
  margin-left: 0;
  max-width: none;
}

.section-title--left::after {
  left: 0;
  transform: none;
}

.section-lead {
  max-width: 42em;
  margin: -16px auto 40px;
  text-align: center;
  color: var(--text-muted);
}

/* App bar */
.appbar {
  position: sticky;
  top: 0;
  z-index: 40;
  height: var(--appbar-h);
  background: var(--page);
  border-bottom: 2px solid transparent;
}

.read-progress {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 3px;
  pointer-events: none;
  background: color-mix(in srgb, var(--line) 55%, transparent);
}

.read-progress i {
  display: block;
  height: 100%;
  width: 100%;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left center;
}

.appbar__inner {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  width: min(100% - 24px, var(--content));
  margin-inline: auto;
}

.appbar__logo {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--text);
  min-height: var(--tap);
}

.appbar__logo img {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  object-fit: cover;
  background: var(--page);
}

.appbar__brand {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

.appbar__brand strong {
  font-family: var(--font-display);
  font-size: 16px;
}

.appbar__brand span {
  font-size: 12px;
  color: var(--text-muted);
}

.nav-desktop {
  display: none;
  align-items: center;
  gap: 28px;
}

.nav-desktop a {
  color: var(--text);
  text-decoration: none;
  font-weight: 600;
  font-size: 15px;
}

.nav-desktop a:hover,
.nav-desktop a[aria-current="page"] {
  color: var(--accent);
}

.appbar__menu {
  width: var(--tap);
  height: var(--tap);
  border: 0;
  background: transparent;
  position: relative;
  padding: 0;
}

.appbar__menu span {
  position: absolute;
  left: 12px;
  right: 12px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: transform 200ms ease, top 200ms ease, opacity 200ms ease;
}

.appbar__menu span:nth-child(1) { top: 16px; }
.appbar__menu span:nth-child(2) { top: 21px; }
.appbar__menu span:nth-child(3) { top: 26px; }

.appbar__menu.is-open span:nth-child(1) {
  top: 21px;
  transform: rotate(45deg);
}

.appbar__menu.is-open span:nth-child(2) {
  opacity: 0;
}

.appbar__menu.is-open span:nth-child(3) {
  top: 21px;
  transform: rotate(-45deg);
}

.lang-switch {
  display: inline-flex;
  align-items: center;
}

.lang-switch select {
  appearance: none;
  -webkit-appearance: none;
  min-height: 40px;
  padding: 0 32px 0 12px;
  border: 2px solid var(--line);
  border-radius: var(--radius-sm);
  background-color: var(--surface-soft);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%23e04070' d='M1 1l5 5 5-5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  font-weight: 700;
  font-size: 13px;
  color: var(--text);
  cursor: pointer;
}

.lang-switch select:focus {
  border-color: var(--accent);
  outline: none;
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 22%, transparent);
}

.drawer__langs {
  display: block;
}

.drawer__langs select {
  width: 100%;
  min-height: var(--field-h);
  font-size: 17px;
  padding-left: 16px;
}

@media (min-width: 1024px) {
  .nav-desktop {
    display: flex;
    flex: 1;
    justify-content: flex-end;
  }

  .appbar__menu {
    display: none;
  }

  .appbar__logo img {
    width: 56px;
    height: 56px;
  }
}

@media (max-width: 1023px) {
  .appbar__brand {
    display: none;
  }
}

/* Drawer */
.drawer-backdrop {
  position: fixed;
  inset: 0;
  background: color-mix(in srgb, var(--text) 45%, transparent);
  z-index: 50;
  opacity: 0;
  pointer-events: none;
  transition: opacity 220ms ease;
}

.drawer-backdrop.is-open {
  opacity: 1;
  pointer-events: auto;
}

.drawer {
  position: fixed;
  top: 0;
  right: 0;
  z-index: 60;
  width: min(100%, 400px);
  height: 100%;
  background: var(--surface);
  border-radius: var(--radius-md) 0 0 var(--radius-md);
  padding: calc(var(--appbar-h) + 8px) 24px 32px;
  overflow: auto;
  transform: translateX(100%);
  transition: transform 280ms cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: var(--shadow-card);
}

.drawer.is-open {
  transform: translateX(0);
}

.drawer__search {
  margin-bottom: 20px;
}

.drawer__langs {
  margin-bottom: 24px;
}

.drawer__nav {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 28px;
}

.drawer__nav a {
  display: flex;
  align-items: center;
  min-height: var(--tap);
  color: var(--text);
  text-decoration: none;
  font-size: 22px;
  font-family: var(--font-display);
  font-weight: 600;
  border-bottom: 2px solid var(--surface-soft);
}

.drawer__nav a[aria-current="page"] {
  color: var(--accent);
}

.drawer__contact {
  display: grid;
  gap: 12px;
  padding-top: 8px;
  border-top: 2px solid var(--line);
  margin-bottom: 24px;
  color: var(--text-muted);
}

.drawer__row {
  display: flex;
  align-items: center;
  gap: 12px;
}

.drawer__row a {
  color: var(--text);
  text-decoration: underline dashed;
  text-underline-offset: 3px;
}

/* Cookie sheet */
.cookie {
  position: fixed;
  z-index: 45;
  left: 0;
  right: 0;
  bottom: 0;
}

.cookie[hidden] {
  display: none !important;
}

.cookie__overlay {
  display: none;
}

.cookie__panel {
  background: var(--surface);
  border: 2px solid var(--line);
  border-radius: var(--radius-md) var(--radius-md) 0 0;
  box-shadow: var(--shadow-card);
  padding: 24px 20px calc(20px + env(safe-area-inset-bottom));
  max-height: min(80vh, 640px);
  overflow: auto;
}

.cookie__panel h2 {
  font-size: 22px;
  margin-bottom: 8px;
}

.cookie__panel p {
  color: var(--text-muted);
  font-size: 15px;
}

.cookie__actions {
  display: grid;
  gap: 10px;
  margin-top: 20px;
}

.cookie__prefs {
  display: grid;
  gap: 12px;
  margin: 16px 0;
}

.cookie-switch {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 4px 16px;
  padding: 12px 0;
  border-bottom: 2px solid var(--surface-soft);
  align-items: center;
}

.cookie-switch small {
  grid-column: 1;
  color: var(--text-muted);
  font-size: 13px;
}

.switch {
  width: 48px;
  height: var(--tap);
  border: 0;
  background: transparent;
  position: relative;
  padding: 0;
}

.switch i {
  display: block;
  width: 44px;
  height: 26px;
  border-radius: var(--radius-full);
  background: var(--line);
  position: relative;
  margin: auto;
}

.switch i::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--surface);
  transition: transform 160ms ease;
}

.switch[aria-checked="true"] i {
  background: var(--accent);
}

.switch[aria-checked="true"] i::after {
  transform: translateX(18px);
}

.switch:disabled {
  opacity: 0.7;
  cursor: default;
}

@media (min-width: 1024px) {
  .cookie {
    left: 24px;
    right: auto;
    bottom: 24px;
    width: min(420px, calc(100% - 48px));
  }

  .cookie__panel {
    border-radius: var(--radius-md);
  }
}

@media (max-width: 1023px) {
  body.cookie-open {
    overflow: hidden;
  }
}

/* Footer */
.site-footer {
  background: var(--surface);
  border-top: 2px solid var(--line);
  padding: 48px 0 28px;
  margin-top: 24px;
}

.footer-grid {
  display: grid;
  gap: 32px;
}

.site-footer h2,
.site-footer h3 {
  font-size: 18px;
  margin-bottom: 12px;
}

.site-footer ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.site-footer li + li {
  margin-top: 8px;
}

.site-footer a {
  color: var(--text);
  text-decoration: none;
}

.site-footer a:hover {
  color: var(--accent);
}

.footer-copy {
  margin-top: 32px;
  padding-top: 16px;
  border-top: 2px solid var(--surface-soft);
  font-size: 13px;
  color: var(--text-muted);
}

@media (min-width: 768px) {
  .footer-grid {
    grid-template-columns: 1.4fr 1fr 1fr;
  }
}

/* Feature boxes */
.feature-grid {
  display: grid;
  gap: 20px;
}

.feature-box {
  padding: 25px 16px 32px;
  border: 1px dashed var(--line);
  border-radius: var(--radius-md);
  background: var(--surface);
}

.feature-box:hover {
  border-color: var(--accent);
}

.feature-box h3 {
  font-size: 20px;
  margin: 12px 0 8px;
}

.feature-box p {
  color: var(--text-muted);
  font-size: 15px;
  line-height: 1.7;
}

.feature-ico {
  width: 48px;
  height: 48px;
  color: var(--accent);
}

@media (min-width: 768px) {
  .feature-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .feature-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

/* Product teaser cards */
.product-row {
  display: grid;
  gap: 28px 20px;
  overflow: visible;
}

.product-teaser {
  text-decoration: none;
  color: inherit;
  padding: 0;
  overflow: visible;
  display: grid;
  gap: 14px;
  border: 0;
  background: transparent;
}

.product-teaser:hover .blob {
  transform: scale(1.03);
}

@media (prefers-reduced-motion: reduce) {
  .product-teaser:hover .blob {
    transform: none;
  }
}

.blob {
  display: block;
  overflow: hidden;
  transition: transform 220ms ease;
}

.blob img {
  width: 100%;
  height: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  display: block;
}

.blob--1 { border-radius: 64% 36% 48% 52% / 42% 54% 46% 58%; }
.blob--2 { border-radius: 38% 62% 44% 56% / 58% 36% 64% 42%; }
.blob--3 { border-radius: 72% 28% 55% 45% / 38% 62% 38% 62%; }
.blob--4 { border-radius: 32% 68% 40% 60% / 52% 48% 52% 48%; }

.has-blobs {
  position: relative;
  overflow: hidden;
}

.has-blobs::before,
.has-blobs::after {
  content: "";
  position: absolute;
  background: var(--accent-soft);
  pointer-events: none;
  z-index: 0;
}

.has-blobs::before {
  width: min(42vw, 340px);
  height: min(42vw, 340px);
  top: -18%;
  left: -8%;
  border-radius: 64% 36% 48% 52% / 42% 54% 46% 58%;
  opacity: 0.9;
}

.has-blobs::after {
  width: min(38vw, 300px);
  height: min(38vw, 300px);
  bottom: -16%;
  right: -6%;
  border-radius: 38% 62% 44% 56% / 58% 36% 64% 42%;
  opacity: 0.75;
}

.has-blobs > .wrap {
  position: relative;
  z-index: 1;
}

.featured__media img,
.story__media img,
.product-teaser img {
  width: 100%;
  height: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  display: block;
}

.product-teaser__body {
  padding: 18px 18px 22px;
  border: 1px dashed var(--line);
  border-radius: var(--radius-md);
  background: var(--surface);
}

.product-teaser__cat {
  font-size: 13px;
  color: var(--accent);
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin: 0 0 4px;
}

.product-teaser h3 {
  font-size: 22px;
  margin: 0 0 6px;
}

@media (min-width: 640px) {
  .product-row {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .product-row {
    grid-template-columns: repeat(4, 1fr);
  }
}

/* Catalog card (kejtlyn logic) */
.product-card {
  margin-bottom: 28px;
}

.product-card__head {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 20px;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 16px;
}

.product-card__title {
  font-size: 26px;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  margin: 0;
}

.product-card__sub {
  margin: 4px 0 0;
  color: var(--text-muted);
  font-size: 15px;
}

.product-card__prices,
.product-card__info {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.product-card__info {
  margin-bottom: 16px;
}

.flavors {
  border-top: 2px dashed var(--line);
  padding-top: 8px;
  margin-bottom: 8px;
}

.flavors summary {
  cursor: pointer;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 13px;
  min-height: var(--tap);
  display: flex;
  align-items: center;
  list-style: none;
}

.flavors summary::-webkit-details-marker {
  display: none;
}

.flavor-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding-bottom: 12px;
}

.gallery-label {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin: 12px 0 10px;
  color: var(--text-muted);
}

.gallery {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
  align-items: start;
}

@media (min-width: 700px) {
  .gallery {
    grid-template-columns: repeat(4, 1fr);
  }
}

.gallery button {
  padding: 0;
  border: 0;
  background: none;
  overflow: hidden;
  width: 100%;
  aspect-ratio: 1;
  border-radius: 64% 36% 48% 52% / 42% 54% 46% 58%;
}

.gallery button:nth-child(4n + 2) {
  border-radius: 38% 62% 44% 56% / 58% 36% 64% 42%;
}

.gallery button:nth-child(4n + 3) {
  border-radius: 72% 28% 55% 45% / 38% 62% 38% 62%;
}

.gallery button:nth-child(4n + 4) {
  border-radius: 32% 68% 40% 60% / 52% 48% 52% 48%;
}

.gallery .ph,
.gallery img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Placeholders */
.ph {
  background:
    radial-gradient(circle at 30% 20%, color-mix(in srgb, var(--accent-contrast) 40%, transparent), transparent 40%),
    linear-gradient(160deg, var(--accent-soft), color-mix(in srgb, var(--gold) 55%, var(--accent)));
}

.ph--cake {
  background: linear-gradient(165deg, #f7d3c3, #e04070 60%, #432013);
}

.ph--macaron {
  background: linear-gradient(165deg, #ffe4ec, #e84878, #f9c061);
}

.ph--tart {
  background: linear-gradient(165deg, #fff1d6, #e8a05a, #7a3b1a);
}

.ph--pavlova {
  background: linear-gradient(165deg, #fff, #f9dbdf, #c9e4c5);
}

.ph--bar {
  background: linear-gradient(165deg, #fce7ef, #e04070, #f9c061 80%);
}

.ph--choco {
  background: linear-gradient(165deg, #8b4a2b, #432013, #f9c061);
}

/* Lightbox */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 80;
  background: color-mix(in srgb, var(--text) 78%, transparent);
  display: grid;
  place-items: center;
  padding: 24px;
}

.lightbox[hidden] {
  display: none !important;
}

.lightbox img,
.lightbox .ph {
  max-width: min(90vw, 920px);
  max-height: 80vh;
  width: min(90vw, 920px);
  aspect-ratio: 1;
  border-radius: var(--radius-md);
}

.lightbox__close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: var(--tap);
  height: var(--tap);
  border: 0;
  border-radius: 50%;
  background: var(--surface);
  color: var(--text);
  font-size: 24px;
}

/* Page intro */
.page-intro {
  padding: 48px 0 8px;
}

.page-intro .section-title {
  text-align: left;
  margin-left: 0;
  max-width: none;
}

.page-intro .section-title::after {
  left: 0;
  transform: none;
}

.page-intro .section-label {
  text-align: left;
}

.rules {
  display: grid;
  gap: 8px;
  margin: 0 0 40px;
  padding: 20px 24px;
  background: var(--surface);
  border: 1px dashed var(--line);
  border-radius: var(--radius-md);
}

.rules li {
  color: var(--text-muted);
}

.combo-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--surface);
  border: 1px dashed var(--line);
  border-radius: var(--radius-md);
  overflow: hidden;
  margin-bottom: 40px;
}

.combo-table th,
.combo-table td {
  text-align: left;
  padding: 12px 16px;
  border-bottom: 2px solid var(--surface-soft);
  font-size: 15px;
}

.combo-table th {
  background: var(--surface-soft);
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.form-success {
  font-size: 20px;
  font-family: var(--font-display);
}

.hint {
  margin-top: 12px;
  font-size: 12px;
  color: var(--text-muted);
}

.link-dash {
  color: var(--text);
  text-decoration: underline dashed;
  text-underline-offset: 3px;
}
