:root {
  --cream: #faf7f2;
  --cream-soft: #fdfbf7;
  --cream-deep: #f3ede3;
  --ink: #2c2522;
  --ink-muted: #5c534e;
  --copper: #a8442a;
  --gold: #d4a359;
  --radius: 12px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

html {
  scroll-behavior: smooth;
}

body {
  background:
    radial-gradient(ellipse 80% 50% at 10% -10%, rgba(212, 163, 89, 0.12), transparent 55%),
    radial-gradient(ellipse 60% 40% at 100% 0%, rgba(168, 68, 42, 0.06), transparent 50%),
    var(--cream);
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: -3rem;
  z-index: 100;
  border-radius: 999px;
  background: var(--ink);
  color: var(--cream-soft);
  padding: 0.5rem 1rem;
  transition: top 0.2s var(--ease);
}

.skip-link:focus {
  top: 1rem;
}

.logo-mark {
  display: block;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 8px;
  object-fit: contain;
  flex-shrink: 0;
  background: transparent;
}

.nav-link {
  display: inline-flex;
  align-items: center;
  padding: 0.4rem 0.65rem;
  border-radius: 999px;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--ink-muted);
  transition: color 0.2s var(--ease), background 0.2s var(--ease);
}

.nav-link:hover,
.nav-link.is-active {
  color: var(--copper);
  background: rgba(168, 68, 42, 0.08);
}

.lang-switch {
  align-items: center;
  gap: 0.15rem;
  padding: 0.2rem;
  border: 1px solid rgba(44, 37, 34, 0.12);
  border-radius: 999px;
  background: rgba(253, 251, 247, 0.85);
}

.lang-btn {
  display: inline-flex;
  min-width: 2.1rem;
  justify-content: center;
  border-radius: 999px;
  padding: 0.28rem 0.45rem;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--ink-muted);
  transition: background 0.2s var(--ease), color 0.2s var(--ease);
}

.lang-btn:hover {
  color: var(--ink);
}

.lang-btn.is-active {
  background: var(--ink);
  color: var(--cream-soft);
}

.lang-dropdown {
  position: relative;
}

.lang-dropdown-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  min-width: 3.4rem;
  justify-content: center;
  border: 1px solid rgba(44, 37, 34, 0.12);
  border-radius: 999px;
  background: rgba(253, 251, 247, 0.95);
  padding: 0.38rem 0.65rem;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--ink);
  transition: border-color 0.2s var(--ease), background 0.2s var(--ease);
}

.lang-dropdown-toggle:hover,
.lang-dropdown.is-open .lang-dropdown-toggle {
  border-color: rgba(168, 68, 42, 0.35);
  background: #fff;
}

.lang-dropdown-chevron {
  width: 0.9rem;
  height: 0.9rem;
  color: var(--ink-muted);
  transition: transform 0.2s var(--ease);
}

.lang-dropdown.is-open .lang-dropdown-chevron {
  transform: rotate(180deg);
}

.lang-dropdown-menu {
  position: absolute;
  right: 0;
  top: calc(100% + 0.4rem);
  z-index: 50;
  min-width: 5.5rem;
  margin: 0;
  padding: 0.3rem;
  list-style: none;
  border: 1px solid rgba(44, 37, 34, 0.12);
  border-radius: 12px;
  background: var(--cream-soft);
  box-shadow: 0 12px 28px -14px rgba(44, 37, 34, 0.4);
}

.lang-dropdown-item {
  display: block;
  border-radius: 8px;
  padding: 0.55rem 0.75rem;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--ink-muted);
  text-decoration: none;
  text-align: center;
  transition: background 0.15s var(--ease), color 0.15s var(--ease);
}

.lang-dropdown-item:hover {
  background: rgba(168, 68, 42, 0.08);
  color: var(--copper);
}

.lang-dropdown-item.is-active {
  background: var(--ink);
  color: var(--cream-soft);
}

.hero {
  position: relative;
}

.hero-wash {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(253, 251, 247, 0.2), rgba(250, 247, 242, 0.95)),
    url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23a8442a' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
  pointer-events: none;
}

.search-shell {
  position: relative;
  display: flex;
  align-items: center;
}

.search-icon {
  position: absolute;
  left: 1rem;
  width: 1.15rem;
  height: 1.15rem;
  color: var(--ink-faint, #8a8078);
  pointer-events: none;
}

.search-input {
  width: 100%;
  border: 1px solid rgba(44, 37, 34, 0.14);
  border-radius: var(--radius);
  background: rgba(253, 251, 247, 0.95);
  padding: 0.95rem 1rem 0.95rem 2.75rem;
  color: var(--ink);
  box-shadow: 0 8px 24px -16px rgba(44, 37, 34, 0.35);
  outline: none;
  transition: border-color 0.2s var(--ease), box-shadow 0.2s var(--ease);
}

.search-input:focus {
  border-color: rgba(168, 68, 42, 0.45);
  box-shadow: 0 0 0 3px rgba(168, 68, 42, 0.12), 0 8px 24px -16px rgba(44, 37, 34, 0.35);
}

.recipe-card {
  border: 1px solid rgba(44, 37, 34, 0.1);
  border-radius: var(--radius);
  background: var(--cream-soft);
  box-shadow: 0 4px 18px -8px rgba(44, 37, 34, 0.18);
  overflow: hidden;
  transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease), border-color 0.35s var(--ease);
}

.recipe-card:hover {
  transform: translateY(-4px);
  border-color: rgba(168, 68, 42, 0.28);
  box-shadow: 0 16px 36px -18px rgba(44, 37, 34, 0.35);
}

.recipe-card-link {
  display: block;
  height: 100%;
  color: inherit;
  text-decoration: none;
}

.recipe-card-media {
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: var(--cream-deep);
}

.recipe-card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.55s var(--ease);
}

.recipe-card:hover .recipe-card-media img {
  transform: scale(1.04);
}

.recipe-card-body {
  padding: 1.05rem 1.15rem 1.25rem;
}

.postcard-frame {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius);
  border: 1px solid rgba(44, 37, 34, 0.12);
  background: var(--cream-soft);
  box-shadow: 0 10px 30px -12px rgba(44, 37, 34, 0.28);
}

.postcard-frame::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.35);
  pointer-events: none;
}

.postcard-image {
  display: block;
  width: 100%;
  height: auto;
  transition: transform 0.5s var(--ease), filter 0.5s var(--ease);
}

[data-postcard-root].is-postcard .postcard-image {
  transform: scale(1.01);
  filter: contrast(1.04) saturate(1.05);
}

[data-postcard-root].is-postcard [data-recipe-body] {
  display: none;
}

[data-postcard-root].is-postcard [data-postcard-note] {
  display: block;
}

.btn-secondary,
.share-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  border-radius: 999px;
  border: 1px solid rgba(44, 37, 34, 0.14);
  background: var(--cream-soft);
  padding: 0.65rem 1rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--ink);
  text-decoration: none;
  transition: background 0.2s var(--ease), border-color 0.2s var(--ease), color 0.2s var(--ease);
}

.btn-secondary:hover,
.share-btn:hover {
  border-color: rgba(168, 68, 42, 0.35);
  color: var(--copper);
  background: #fff;
}

.btn-secondary[aria-pressed="true"] {
  background: rgba(168, 68, 42, 0.1);
  border-color: rgba(168, 68, 42, 0.35);
  color: var(--copper);
}

.section-title {
  font-family: "Cormorant Garamond", "Noto Serif Thai", Georgia, serif;
  font-size: 1.75rem;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 1rem;
}

.ingredient-list,
.simple-list,
.prep-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.ingredient-list li {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.7rem 0;
  border-bottom: 1px solid rgba(44, 37, 34, 0.08);
  font-size: 0.95rem;
}

.ing-item {
  color: var(--ink);
}

.ing-qty {
  flex-shrink: 0;
  color: var(--ink-muted);
  font-variant-numeric: tabular-nums;
}

.simple-list li {
  position: relative;
  padding: 0.35rem 0 0.35rem 1.1rem;
  color: var(--ink-muted);
}

.simple-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.75rem;
  width: 0.4rem;
  height: 0.4rem;
  border-radius: 999px;
  background: var(--gold);
}

.prep-list {
  counter-reset: step;
  display: grid;
  gap: 1rem;
}

.prep-list li {
  counter-increment: step;
  position: relative;
  padding-left: 2.75rem;
  line-height: 1.65;
  color: var(--ink-muted);
}

.prep-list li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: 0;
  display: grid;
  place-items: center;
  width: 1.85rem;
  height: 1.85rem;
  border-radius: 999px;
  background: rgba(168, 68, 42, 0.1);
  color: var(--copper);
  font-size: 0.8rem;
  font-weight: 700;
}

.tip-box {
  border-left: 3px solid var(--gold);
  border-radius: 0 var(--radius) var(--radius) 0;
  background: rgba(212, 163, 89, 0.1);
  padding: 1rem 1.15rem;
}

.shopee-cta {
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  border-radius: var(--radius);
  background: linear-gradient(135deg, var(--copper), #c45e42 55%, #b4532f);
  padding: 1.05rem 1.25rem;
  text-align: center;
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  color: #fff8f3;
  text-decoration: none;
  box-shadow: 0 14px 28px -16px rgba(168, 68, 42, 0.75);
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease), filter 0.25s var(--ease);
}

.shopee-cta:hover {
  transform: translateY(-2px);
  filter: brightness(1.04);
  box-shadow: 0 18px 34px -14px rgba(168, 68, 42, 0.8);
}

.shopee-cta:focus-visible {
  outline: 3px solid rgba(212, 163, 89, 0.55);
  outline-offset: 3px;
}

.pager-link {
  display: block;
  border: 1px solid rgba(44, 37, 34, 0.1);
  border-radius: var(--radius);
  background: var(--cream-soft);
  padding: 1rem 1.15rem;
  text-decoration: none;
  transition: border-color 0.2s var(--ease), transform 0.2s var(--ease);
}

.pager-link:hover {
  border-color: rgba(168, 68, 42, 0.3);
  transform: translateY(-2px);
}

.pager-label {
  display: block;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-faint, #8a8078);
}

.pager-title {
  display: block;
  margin-top: 0.35rem;
  font-family: "Cormorant Garamond", "Noto Serif Thai", Georgia, serif;
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--ink);
}

.about-hero {
  background:
    linear-gradient(180deg, rgba(243, 237, 227, 0.85), rgba(250, 247, 242, 0)),
    radial-gradient(ellipse at 80% 20%, rgba(212, 163, 89, 0.16), transparent 50%);
  border-bottom: 1px solid rgba(44, 37, 34, 0.06);
}

.about-heading {
  font-family: "Cormorant Garamond", "Noto Serif Thai", Georgia, serif;
  font-size: clamp(1.75rem, 2.4vw, 2.35rem);
  font-weight: 600;
  line-height: 1.25;
  color: var(--ink);
}

.about-prose p {
  font-size: 1.05rem;
  line-height: 1.8;
  color: var(--ink-muted);
}

.about-prose .is-emphasis {
  font-family: "Cormorant Garamond", "Noto Serif Thai", Georgia, serif;
  font-size: 1.25rem;
  font-style: italic;
  color: var(--ink);
}

.about-prose .is-strong {
  color: var(--ink);
  font-weight: 600;
}

.about-prose strong {
  color: var(--ink);
  font-weight: 700;
}

.about-figure {
  margin: 0;
  overflow: hidden;
  border-radius: var(--radius);
  border: 1px solid rgba(44, 37, 34, 0.1);
  box-shadow: 0 14px 36px -18px rgba(44, 37, 34, 0.35);
  background: var(--cream-deep);
}

.about-figure img {
  display: block;
  width: 100%;
  height: auto;
  vertical-align: middle;
}

.reveal {
  opacity: 0;
  transform: translateY(14px);
  animation: rise 0.7s var(--ease) forwards;
  animation-delay: var(--delay, 0ms);
}

.reveal-delay-1 { animation-delay: 80ms; }
.reveal-delay-2 { animation-delay: 160ms; }
.reveal-delay-3 { animation-delay: 240ms; }

@keyframes rise {
  to {
    opacity: 1;
    transform: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal,
  .recipe-card,
  .recipe-card-media img,
  .shopee-cta,
  .postcard-image {
    animation: none !important;
    transition: none !important;
    opacity: 1 !important;
    transform: none !important;
  }
}
