:root {
  --rice: #f5efe6;
  --milk: #d4b896;
  --brown: #3d2914;
  --ember: #c85a2a;
  --ink: #4a5d4a;
  --white: #fffaf5;
  --shadow: 0 12px 40px rgba(61, 41, 20, 0.08);
  --radius: 14px;
  --font-display: "Noto Serif SC", "Songti SC", serif;
  --font-body: "Figtree", "PingFang SC", "Hiragino Sans GB", sans-serif;
  --max: 720px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-body);
  color: var(--brown);
  background: var(--rice);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
.btn {
  font: inherit;
  cursor: pointer;
  border: none;
  background: none;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.85rem 1.25rem;
  background: rgba(245, 239, 230, 0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(212, 184, 150, 0.35);
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: 0.04em;
}

.brand-mark {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background:
    radial-gradient(circle at 50% 70%, var(--milk) 0 28%, transparent 29%),
    linear-gradient(160deg, var(--ink), var(--brown));
  box-shadow: inset 0 -4px 0 rgba(255, 255, 255, 0.15);
}

.nav {
  display: flex;
  align-items: center;
  gap: 1.1rem;
  font-size: 0.92rem;
}

.nav a {
  opacity: 0.78;
  transition: opacity 0.2s ease, color 0.2s ease;
}

.nav a:hover,
.nav a.is-active {
  opacity: 1;
  color: var(--ember);
}

.bag {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  border: 1px solid var(--milk);
  transition: background 0.2s ease;
}

.bag:hover {
  background: rgba(212, 184, 150, 0.25);
}

.page {
  width: min(100%, var(--max));
  margin: 0 auto;
}

.hero {
  position: relative;
  min-height: min(92vh, 860px);
  display: grid;
  align-items: end;
  overflow: hidden;
  color: #fff;
}

.hero-media {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.04);
  animation: heroDrift 18s ease-in-out infinite alternate;
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    linear-gradient(180deg, rgba(61, 41, 20, 0.15) 0%, rgba(61, 41, 20, 0.25) 40%, rgba(61, 41, 20, 0.78) 100%);
}

.hero-content {
  position: relative;
  z-index: 2;
  padding: 2.5rem 1.4rem 2rem;
  animation: riseIn 0.9s ease both;
}

.hero-brand {
  font-family: var(--font-display);
  font-size: clamp(2.4rem, 8vw, 3.4rem);
  line-height: 1.05;
  margin: 0 0 0.35rem;
  letter-spacing: 0.06em;
}

.hero-en {
  margin: 0 0 1rem;
  letter-spacing: 0.28em;
  font-size: 0.72rem;
  opacity: 0.85;
  text-transform: uppercase;
}

.hero-lead {
  margin: 0 0 1.4rem;
  font-size: 1.05rem;
  opacity: 0.92;
}

.btn-outline,
.btn-solid {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  min-height: 46px;
  padding: 0.7rem 1.35rem;
  border-radius: 999px;
  transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}

.btn-outline {
  border: 1.5px solid rgba(255, 255, 255, 0.85);
  color: #fff;
}

.btn-outline:hover {
  background: rgba(255, 255, 255, 0.12);
  transform: translateY(-1px);
}

.btn-solid {
  background: var(--ember);
  color: #fff;
  box-shadow: 0 10px 24px rgba(200, 90, 42, 0.28);
}

.btn-solid:hover {
  transform: translateY(-1px);
  filter: brightness(1.05);
}

.btn-ghost {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  color: var(--ember);
  font-weight: 600;
}

.quote-bar {
  position: relative;
  z-index: 2;
  padding: 1rem 1.4rem 1.2rem;
  background: rgba(61, 41, 20, 0.88);
  color: rgba(255, 255, 255, 0.9);
  font-family: var(--font-display);
  font-size: 0.95rem;
}

.quote-bar cite {
  display: block;
  margin-top: 0.35rem;
  font-style: normal;
  font-family: var(--font-body);
  font-size: 0.78rem;
  opacity: 0.7;
}

.origin-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
}

.origin-strip a {
  padding: 1rem 0.75rem;
  text-align: center;
  color: #fff;
  font-weight: 600;
  font-size: 0.92rem;
  transition: filter 0.2s ease;
}

.origin-strip a:hover {
  filter: brightness(1.08);
}

.origin-strip a small {
  display: block;
  margin-top: 0.25rem;
  font-weight: 400;
  font-size: 0.72rem;
  opacity: 0.88;
}

.origin-eth {
  background: var(--ember);
}

.origin-col {
  background: #c9a227;
  color: var(--brown) !important;
}

.origin-yn {
  background: var(--ink);
}

.section {
  padding: 2.4rem 1.25rem 2.8rem;
}

.section-head {
  margin-bottom: 1.6rem;
}

.section-head h1,
.section-head h2 {
  margin: 0 0 0.4rem;
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 5vw, 2rem);
  font-weight: 700;
}

.section-head p {
  margin: 0;
  color: rgba(61, 41, 20, 0.68);
}

.bean-list {
  display: grid;
  gap: 1.25rem;
}

.bean-card {
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--white);
  box-shadow: var(--shadow);
  border: 1px solid rgba(212, 184, 150, 0.35);
  animation: riseIn 0.7s ease both;
}

.bean-card:nth-child(2) {
  animation-delay: 0.08s;
}

.bean-card:nth-child(3) {
  animation-delay: 0.16s;
}

.bean-card img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
}

.bean-body {
  padding: 1.15rem 1.2rem 1.25rem;
}

.bean-body h3 {
  margin: 0 0 0.65rem;
  font-family: var(--font-display);
  font-size: 1.45rem;
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 0.75rem;
}

.tag {
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  background: rgba(212, 184, 150, 0.28);
  font-size: 0.75rem;
  color: rgba(61, 41, 20, 0.85);
}

.meta {
  margin: 0 0 0.85rem;
  font-size: 0.88rem;
  color: rgba(61, 41, 20, 0.65);
}

.bean-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.price {
  font-family: var(--font-display);
  font-size: 1.25rem;
  color: var(--ember);
  font-weight: 700;
}

.price span {
  font-size: 0.8rem;
  font-family: var(--font-body);
  font-weight: 500;
  color: rgba(61, 41, 20, 0.55);
}

.site-footer {
  padding: 1.5rem 1.25rem 2.2rem;
  text-align: center;
  color: rgba(61, 41, 20, 0.55);
  font-size: 0.82rem;
  border-top: 1px solid rgba(212, 184, 150, 0.35);
}

.detail-hero img {
  width: 100%;
  aspect-ratio: 16 / 11;
  object-fit: cover;
}

.detail-panel {
  padding: 1.4rem 1.25rem 2.4rem;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  margin-bottom: 0.9rem;
  font-size: 0.9rem;
  color: rgba(61, 41, 20, 0.7);
}

.detail-panel h1 {
  margin: 0 0 0.75rem;
  font-family: var(--font-display);
  font-size: 1.7rem;
}

.flavor-board,
.roast-board,
.reviews {
  margin-top: 1.5rem;
  padding: 1.1rem;
  border-radius: var(--radius);
  background: var(--white);
  border: 1px solid rgba(212, 184, 150, 0.35);
}

.flavor-board h2,
.roast-board h2,
.reviews h2 {
  margin: 0 0 0.9rem;
  font-family: var(--font-display);
  font-size: 1.05rem;
}

.bars {
  display: grid;
  gap: 0.7rem;
}

.bar-row {
  display: grid;
  grid-template-columns: 3.5rem 1fr;
  gap: 0.65rem;
  align-items: center;
  font-size: 0.82rem;
}

.bar-track {
  height: 8px;
  border-radius: 999px;
  background: rgba(212, 184, 150, 0.35);
  overflow: hidden;
}

.bar-fill {
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--milk), var(--ember));
  transform-origin: left;
  animation: growBar 1s ease both;
}

.roast-steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.4rem;
  text-align: center;
  font-size: 0.78rem;
}

.roast-steps div {
  padding: 0.65rem 0.3rem;
  border-radius: 10px;
  background: rgba(245, 239, 230, 0.9);
  border: 1px dashed rgba(212, 184, 150, 0.7);
}

.roast-steps strong {
  display: block;
  margin-bottom: 0.2rem;
  font-family: var(--font-display);
}

.detail-copy {
  margin: 1.2rem 0 0;
  color: rgba(61, 41, 20, 0.78);
}

.review-list {
  display: grid;
  gap: 0.8rem;
}

.review {
  padding: 0.85rem 0.9rem;
  border-radius: 12px;
  background: rgba(245, 239, 230, 0.85);
}

.stars {
  color: var(--ember);
  letter-spacing: 0.08em;
  font-size: 0.85rem;
}

.review p {
  margin: 0.35rem 0 0.2rem;
}

.review small {
  color: rgba(61, 41, 20, 0.55);
}

.buy-bar {
  position: sticky;
  bottom: 0;
  display: flex;
  gap: 0.75rem;
  padding: 0.9rem 1.25rem calc(0.9rem + env(safe-area-inset-bottom));
  background: rgba(245, 239, 230, 0.96);
  backdrop-filter: blur(10px);
  border-top: 1px solid rgba(212, 184, 150, 0.4);
}

.buy-bar .btn-solid {
  flex: 1;
}

.plans {
  display: grid;
  gap: 1rem;
}

.plan {
  position: relative;
  padding: 1.25rem 1.15rem 1.2rem;
  border-radius: var(--radius);
  background: var(--white);
  border: 1px solid rgba(212, 184, 150, 0.4);
  box-shadow: var(--shadow);
  animation: riseIn 0.7s ease both;
}

.plan.featured {
  border-color: var(--ember);
  box-shadow: 0 14px 36px rgba(200, 90, 42, 0.16);
}

.plan-badge {
  position: absolute;
  top: 0.85rem;
  right: 0.85rem;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  background: var(--ember);
  color: #fff;
  font-size: 0.72rem;
}

.plan h3 {
  margin: 0 0 0.35rem;
  font-family: var(--font-display);
  font-size: 1.3rem;
}

.plan .price {
  margin-bottom: 0.7rem;
}

.plan ul {
  margin: 0;
  padding-left: 1.1rem;
  color: rgba(61, 41, 20, 0.75);
  font-size: 0.92rem;
}

.flow {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.6rem;
  margin: 1.6rem 0 1.4rem;
}

.flow-item {
  text-align: center;
  padding: 0.9rem 0.5rem;
  border-radius: 12px;
  background: rgba(212, 184, 150, 0.18);
  font-size: 0.82rem;
}

.flow-item strong {
  display: block;
  margin-bottom: 0.25rem;
  font-family: var(--font-display);
}

.subscribe-cta {
  width: 100%;
  margin-bottom: 1rem;
}

.closing {
  margin: 0;
  text-align: center;
  font-family: var(--font-display);
  color: rgba(61, 41, 20, 0.75);
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 1.4rem;
  z-index: 60;
  transform: translateX(-50%) translateY(120%);
  padding: 0.75rem 1.1rem;
  border-radius: 999px;
  background: var(--brown);
  color: #fff;
  font-size: 0.88rem;
  opacity: 0;
  transition: transform 0.3s ease, opacity 0.3s ease;
  pointer-events: none;
}

.toast.show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}

@keyframes riseIn {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes heroDrift {
  from {
    transform: scale(1.04) translateY(0);
  }
  to {
    transform: scale(1.08) translateY(-1.5%);
  }
}

@keyframes growBar {
  from {
    transform: scaleX(0.15);
  }
  to {
    transform: scaleX(1);
  }
}

@media (min-width: 860px) {
  :root {
    --max: 980px;
  }

  .bean-list {
    grid-template-columns: repeat(3, 1fr);
  }

  .plans {
    grid-template-columns: repeat(3, 1fr);
    align-items: stretch;
  }

  .page-wide {
    width: min(100%, 1100px);
    margin: 0 auto;
  }

  .hero {
    min-height: 88vh;
  }
}
