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

body {
  background-color: #c8a96e;
  background-size: cover;
  background-attachment: fixed;
  font-family: "Space Mono", monospace;
  color: #1a1a1a;
  -webkit-font-smoothing: antialiased;
}

/* ── Paper sheet ── */
.paper {
  background: #fff;
  max-width: 810px;
  margin: 0 auto;
  box-shadow: 0 4px 60px rgba(0, 0, 0, 0.28);
  min-height: 100vh;
}

/* ── Nav ── */
.nav-link {
  position: relative;
  text-decoration: none;
  color: #1a1a1a;
  font-size: 0.68rem;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}
.nav-link::after {
  content: "";
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 1px;
  background: #1a1a1a;
  transition: width 0.2s ease;
}
.nav-link:hover::after {
  width: 100%;
}

.btn {
  display: inline-block;
  font-family: "Space Mono", monospace;
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-decoration: none;
  border: 1.5px solid #1a1a1a;
  color: #1a1a1a;
  border-radius: 999px;
  padding: 0.5rem 1.3rem;
  transition:
    background 0.18s,
    color 0.18s;
  cursor: pointer;
  background: transparent;
}
.btn:hover {
  background: #1a1a1a;
  color: #fff;
}

/* ── Hero ── */
.hero-rule {
  border: none;
  border-top: 1px solid #e4e4e4;
}

/* ── Video band ── */
.video-band {
  background: #3b2314;
  padding: 3rem 0;
  display: flex;
  justify-content: center;
  align-items: center;
}
@media (max-width: 640px) {
  .video-band {
    background: transparent;
    padding: 0.75rem;
  }
}

.video-card {
  border-radius: 1.5rem;
  overflow: hidden;
  box-shadow: 0 12px 48px rgba(0, 0, 0, 0.35);
  background: #000;
  width: min(360px, calc(100vw - 1.5rem));
  aspect-ratio: 9 / 16;
  position: relative;
}
@media (min-width: 641px) {
  .video-card {
    width: min(380px, 40%);
  }
}

.video-card video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* ── Cards section ── */
.cards-section {
  background: #f5f3ee;
}

/* ── Flip card ── */
.card-scene {
  perspective: 900px;
  border-radius: 1.25rem;
  filter: drop-shadow(0 6px 18px rgba(0, 0, 0, 0.12));
  cursor: pointer;
}
.card-flipper {
  position: relative;
  width: 100%;
  transform-style: preserve-3d;
  transition: transform 0.55s cubic-bezier(0.4, 0.2, 0.2, 1);
  border-radius: 1.25rem;
}
.card-scene.flipped .card-flipper {
  transform: rotateY(180deg);
}
.card-face {
  position: absolute;
  inset: 0;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  border-radius: 1.25rem;
  overflow: hidden;
}
.card-back {
  transform: rotateY(180deg);
  background: #fff;
  border: 1px solid #e4e4e4;
}
.card-front {
  background: #fff;
}

/* Front */
.front-inner {
  display: flex;
  flex-direction: column;
  height: 100%;
}
.front-image-wrap {
  flex: 1;
  overflow: hidden;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  border-radius: 1.25rem 1.25rem 0 0;
}
.front-image-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center bottom;
  display: block;
}
.front-label {
  background: #fff;
  padding: 0.8rem 1rem 0.9rem;
  border-top: 1px solid #e4e4e4;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
}
.front-name {
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #1a1a1a;
}
.front-logo-small img {
  height: 16px;
  width: auto;
}
.tap-hint {
  font-size: 0.5rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #aaa;
  margin-top: 0.12rem;
}

/* Back */
.back-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 1.4rem 1.25rem 1.25rem;
  height: 100%;
  overflow-y: auto;
  scrollbar-width: none;
}
.back-inner::-webkit-scrollbar {
  display: none;
}

.back-title {
  font-size: clamp(1rem, 4.29rem - 0.87vw, 1.1rem);
  font-weight: 700;
  letter-spacing: 0.05em;
  margin-bottom: 0.75rem;
  flex-shrink: 0;
}
.back-divider {
  width: 100%;
  border: none;
  border-top: 1px solid #ebebeb;
  margin-bottom: 0.75rem;
  flex-shrink: 0;
}
.back-label {
  font-size: clamp(0.5rem, 1.31rem - 0.21vw, 0.8rem);
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-decoration: underline;
  color: #1a1a1a;
  margin-bottom: 0.15rem;
}
.back-value {
  font-size: clamp(0.6rem, 1.61rem - 0.26vw, 0.9rem);
  color: #1a1a1a;
  margin-bottom: 0.6rem;
  line-height: 1.4;
}

/* Roast beans */
.roast-beans {
  display: flex;
  gap: 0.35rem;
  align-items: flex-start; /* leave room above for the star */
  justify-content: center;
  margin-bottom: 0.65rem;
  padding-top: 1.2rem; /* space for the star that pops above */
}
.roast-bean-wrap {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}
.roast-bean-wrap img {
  width: 1.35rem;
  height: 1.35rem;
}
.roast-star {
  position: absolute;
  top: -1.1rem;
  left: 50%;
  transform: translateX(-50%);
  color: #c8102e;
  font-size: 1.4rem;
  line-height: 1;
  pointer-events: none;
}

.back-sensory-label {
  font-size: clamp(0.63rem, 1rem - 0.21vw, 0.7rem);
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-decoration: underline;
  color: #1a1a1a;
  margin-bottom: 0.1rem;
}
.back-sensory-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.3rem;
  margin-bottom: 0.75rem;
}
.sensory-tag {
  font-size: clamp(0.67rem, 1.38rem - 0.22vw, 0.7rem);
  letter-spacing: 0.02em;
  color: #5a5a5a;
  border: 1px solid #e0e0e0;
  border-radius: 999px;
  padding: 3px 9px;
}
.back-footer {
  margin-top: auto;
  padding-top: 0.5rem;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
}
.back-footer img {
  height: 16px;
  width: auto;
}

/* ── Subscription card ── */
.sub-card {
  background: #f1ebe4;
  border-radius: 1.25rem;
  box-shadow: 0 6px 28px rgba(0, 0, 0, 0.08);
  padding: 2rem;
  width: 100%;
  max-width: 325px;
  aspect-ratio: 2 / 3;
  margin: 0 auto;
  text-align: center;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
}
.sub-label {
  font-size: 0.52rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-decoration: underline;
  color: #1a1a1a;
  margin-bottom: 0.2rem;
}
.sub-value {
  font-size: 0.72rem;
  color: #1a1a1a;
  margin-bottom: 0.75rem;
  line-height: 1.4;
}
.sub-sensory-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.35rem 0.5rem;
  font-size: 0.56rem;
  color: #5a5a5a;
  text-align: left;
  margin-top: 0.5rem;
}
.sub-sensory-item::before {
  content: "· ";
  color: #1a1a1a;
}
.card-divider-line {
  border: none;
  border-top: 1px solid #ebebeb;
  margin: 0.75rem 0;
}

/* ── Fade in ── */
.fade-in {
  opacity: 0;
  transform: translateY(14px);
  transition:
    opacity 0.5s ease,
    transform 0.5s ease;
}
.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ── Scrollbar ── */
::-webkit-scrollbar {
  width: 4px;
}
::-webkit-scrollbar-track {
  background: #fff;
}
::-webkit-scrollbar-thumb {
  background: #e7ba86;
  border-radius: 2px;
}

.hero-inner {
  max-width: 480px;
  margin: 0 auto;
  padding: 4rem 1.5rem 4rem; /* mobile */
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.hero-logo {
  height: 72px;
  width: auto;
  max-width: 100%;
  display: block;
  margin: 0 auto;
}

@media (min-width: 640px) {
  .hero-inner {
    padding: 8rem 1.5rem 5rem;
  }
  .hero-logo {
    height: 110px;
  }
  #sub-grid {
    grid-template-columns: 1fr 1fr !important;
    align-items: center !important;
  }
}

.coming-soon-banner {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translateX(-50%);
  background: #1a1a1a;
  color: #fff;
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 0.3rem 0.9rem;
  border-radius: 999px;
  white-space: nowrap;
  z-index: 10;
  pointer-events: none;
}

/* ── Buy modal ── */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  z-index: 100;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}
.modal-overlay.open {
  display: flex;
}
.modal-box {
  background: #fff;
  border-radius: 1.25rem;
  padding: 2rem;
  width: 100%;
  max-width: 380px;
  font-family: "Space Mono", monospace;
}
.modal-title {
  font-size: 0.9rem;
  font-weight: 700;
  margin-bottom: 0.25rem;
  letter-spacing: 0.04em;
}
.modal-subtitle {
  font-size: 0.6rem;
  color: #767676;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 1.5rem;
}
.modal-label {
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 0.4rem;
  display: block;
}
.modal-select {
  width: 100%;
  font-family: "Space Mono", monospace;
  font-size: 0.72rem;
  border: 1.5px solid #1a1a1a;
  border-radius: 0.5rem;
  padding: 0.5rem 0.75rem;
  margin-bottom: 1.25rem;
  background: #fff;
  appearance: none;
  cursor: pointer;
}
.modal-price {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 1.25rem;
  min-height: 1.6rem;
}
.modal-actions {
  display: flex;
  gap: 0.75rem;
  justify-content: flex-end;
}
.modal-cancel {
  background: none;
  border: none;
  font-family: "Space Mono", monospace;
  font-size: 0.62rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  color: #767676;
  padding: 0.5rem;
}
.modal-cancel:hover {
  color: #1a1a1a;
}

.modal-select textarea {
  font-family: "Space Mono", monospace;
}

.modal-input {
  width: 100%;
  font-family: "Space Mono", monospace;
  font-size: 0.72rem;
  border: 1.5px solid #1a1a1a;
  border-radius: 0.5rem;
  padding: 0.5rem 0.75rem;
  margin-bottom: 1.25rem;
  background: #fff;
}
