:root {
  --espresso: #1c1410;
  --walnut: #3e2b22;
  --umber: #7a4b32;
  --cream: #f4eee2;
  --sand: #e4d4bb;
  --gold: #b4894f;
  --gold-soft: rgba(180, 137, 79, 0.35);
  --line: rgba(28, 20, 16, 0.12);
  --line-inv: rgba(244, 238, 226, 0.14);
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}
html {
  scroll-behavior: smooth;
}
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  * {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}

body {
  background: var(--cream);
  color: var(--espresso);
  font-family: "Manrope", sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

h1,
h2,
h3,
.serif {
  font-family: "Fraunces", serif;
  font-weight: 500;
  letter-spacing: -0.01em;
}

.eyebrow {
  font-family: "IBM Plex Mono", monospace;
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--umber);
}
.eyebrow.on-dark {
  color: var(--gold);
}

.mono {
  font-family: "IBM Plex Mono", monospace;
}

::selection {
  background: var(--gold);
  color: var(--espresso);
}

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

.container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 6vw;
}
@media (max-width: 768px) {
  .container {
    padding: 0 24px;
  }
}

/* focus states */
a:focus-visible,
button:focus-visible,
input:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
  border-radius: 2px;
}

/* ---------- reveal ---------- */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition:
    opacity 0.9s var(--ease),
    transform 0.9s var(--ease);
  will-change: transform, opacity;
}
.reveal.in {
  opacity: 1;
  transform: translateY(0);
}
.reveal-stagger > * {
  transition-delay: calc(var(--i, 0) * 90ms);
}

/* ---------- nav ---------- */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 26px 6vw;
  background: var(--espresso);
  mix-blend-mode: normal;
  transition: padding 0.4s var(--ease);
}
.nav.scrolled {
  padding: 16px 6vw;
}
.wordmark {
  font-family: "Fraunces", serif;
  font-size: 20px;
  font-weight: 600;
  letter-spacing: 0.01em;
  color: var(--cream);
}
.nav img.logo {
  width: 120px;
  height: auto;
}
.nav-links {
  display: flex;
  gap: 40px;
  align-items: center;
}
.nav-links a {
  font-size: 13px;
  color: var(--sand);
  opacity: 0.85;
  letter-spacing: 0.02em;
  position: relative;
  padding-bottom: 4px;
}
.nav-links a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 0;
  height: 1px;
  background: var(--sand);
  transition: width 0.35s var(--ease);
}
.nav-links a:hover::after {
  width: 100%;
}
.nav-cta {
  font-size: 13px;
  color: var(--sand);
  border: 1px solid var(--line-inv);
  padding: 10px 20px;
  border-radius: 100px;
  opacity: 0.95;
  transition:
    background 0.3s var(--ease),
    color 0.3s var(--ease);
}
.nav-cta:hover {
  background: var(--gold);
  color: var(--espresso);
}
.nav-toggle {
  display: none;
  color: var(--sand);
  background: none;
  border: none;
  font-size: 13px;
}
@media (max-width: 860px) {
  .nav-links {
    display: none;
  }
  .nav-toggle {
    display: block;
  }
}

/* ---------- hero ---------- */
.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  align-items: center;
  background: radial-gradient(
    120% 90% at 50% 20%,
    #2a1c15 0%,
    var(--espresso) 60%
  );
  overflow: hidden;
}
.hero-grain {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.05;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
.hero-grid {
  position: relative;
  z-index: 2;
  width: 100%;
  display: grid;
  grid-template-columns: 1fr minmax(280px, 420px) 1fr;
  align-items: center;
  gap: 24px;
  padding: 140px 6vw 80px;
}
#bean-canvas {
  width: 100%;
  height: 460px;
  display: block;
  cursor: grab;
}
.hero-copy-left {
  color: var(--sand);
}
.hero-copy-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  text-align: right;
  color: var(--sand);
}
.hero-eyebrow {
  font-family: "IBM Plex Mono", monospace;
  font-size: 11px;
  letter-spacing: 0.2em;
  color: var(--gold);
  margin-bottom: 22px;
}
.hero-h {
  font-size: clamp(2.4rem, 5.4vw, 4.6rem);
  line-height: 0.98;
  color: var(--cream);
}
.hero-h em {
  font-style: italic;
  color: var(--gold);
  font-weight: 400;
}
.hero-sub {
  font-size: 15px;
  line-height: 1.7;
  color: var(--sand);
  opacity: 0.82;
  max-width: 280px;
  margin-top: 26px;
}
.hero-copy-right .hero-sub {
  margin-left: auto;
}
.hero-actions {
  display: flex;
  gap: 14px;
  margin-top: 38px;
  flex-wrap: wrap;
}
.hero-copy-right .hero-actions {
  justify-content: flex-end;
}
.hero-copy-left .hero-actions {
  justify-content: center;
}

.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 15px 28px;
  border-radius: 100px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.01em;
  cursor: pointer;
  border: none;
  transition:
    transform 0.25s var(--ease),
    box-shadow 0.25s var(--ease);
}
.btn-primary {
  background: var(--gold);
  color: var(--espresso);
  box-shadow: 0 8px 24px -8px rgba(180, 137, 79, 0.6);
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 30px -8px rgba(180, 137, 79, 0.75);
}
.btn-ghost {
  background: transparent;
  color: var(--cream);
  border: 1px solid var(--line-inv);
}
.btn-ghost:hover {
  transform: translateY(-2px);
  border-color: var(--gold);
  color: var(--gold);
}
.btn-dark {
  background: var(--espresso);
  color: var(--cream);
  box-shadow: 0 8px 22px -10px rgba(28, 20, 16, 0.5);
}
.btn-dark:hover {
  transform: translateY(-2px);
}

.scroll-cue {
  position: absolute;
  bottom: 34px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  color: var(--sand);
  opacity: 0.55;
  z-index: 2;
}
.scroll-cue .line {
  width: 1px;
  height: 34px;
  background: linear-gradient(var(--gold), transparent);
  animation: cueMove 2.2s ease-in-out infinite;
}
@keyframes cueMove {
  0% {
    transform: scaleY(0.3);
    transform-origin: top;
  }
  50% {
    transform: scaleY(1);
    transform-origin: top;
  }
  100% {
    transform: scaleY(0.3);
    transform-origin: bottom;
  }
}

@media (max-width: 860px) {
  .hero-grid {
    grid-template-columns: 1fr;
    text-align: center;
    padding-top: 120px;
    gap: 8px;
  }
  .hero-copy-left,
  .hero-copy-right {
    align-items: center;
    text-align: center;
  }
  .hero-copy-right .hero-sub {
    margin-left: 0;
  }
  .hero-copy-right .hero-actions {
    justify-content: center;
  }
  #bean-canvas {
    height: 320px;
    order: -1;
  }
  .hero-sub {
    max-width: 420px;
    margin-left: auto;
    margin-right: auto;
  }
}

/* ---------- marquee ---------- */
.marquee-wrap {
  background: var(--espresso);
  color: var(--sand);
  overflow: hidden;
  padding: 16px 0;
  border-top: 1px solid var(--line-inv);
  border-bottom: 1px solid var(--line-inv);
}
.marquee {
  display: flex;
  width: max-content;
  animation: scroll 32s linear infinite;
}
.marquee span {
  font-family: "IBM Plex Mono", monospace;
  font-size: 12px;
  letter-spacing: 0.14em;
  padding: 0 28px;
  white-space: nowrap;
  opacity: 0.7;
}
.marquee span::after {
  content: "—";
  margin-left: 28px;
  color: var(--gold);
}
@keyframes scroll {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(-50%);
  }
}

/* ---------- section shells ---------- */
section {
  position: relative;
}
.section-pad {
  padding: 140px 0;
}
@media (max-width: 768px) {
  .section-pad {
    padding: 90px 0;
  }
}

.section-head {
  max-width: 640px;
  margin-bottom: 70px;
}
.section-head h2 {
  font-size: clamp(2rem, 4vw, 3.2rem);
  line-height: 1.05;
  margin-top: 16px;
}

/* ---------- image frame / skeleton ---------- */
.img-frame {
  position: relative;
  overflow: hidden;
  border-radius: 6px;
  background: linear-gradient(
    120deg,
    var(--sand) 0%,
    #efe3cc 40%,
    var(--sand) 80%
  );
  background-size: 200% 100%;
  animation: shimmer 2.4s ease-in-out infinite;
}
.img-frame::before {
  content: "";
  display: block;
  padding-top: var(--ar, 125%);
}
.img-frame.dark {
  background: linear-gradient(120deg, #2a1d16 0%, #3a271d 40%, #2a1d16 80%);
}
.img-frame img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transform: scale(1.08);
  transition:
    opacity 1s var(--ease),
    transform 1.2s var(--ease);
}
.img-frame img.loaded {
  opacity: 1;
  transform: scale(1);
}
.img-frame .frame-mark {
  position: absolute;
  bottom: 14px;
  right: 16px;
  z-index: 2;
  font-family: "IBM Plex Mono", monospace;
  font-size: 10px;
  letter-spacing: 0.1em;
  color: var(--walnut);
  opacity: 0.45;
  text-transform: uppercase;
}
@keyframes shimmer {
  0% {
    background-position: 0% 0;
  }
  50% {
    background-position: 100% 0;
  }
  100% {
    background-position: 0% 0;
  }
}

/* ---------- products ---------- */
.products {
  background: var(--cream);
}
.product {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: center;
  padding: 70px 0;
  border-top: 1px solid var(--line);
}
.product:last-child {
  border-bottom: 1px solid var(--line);
}
.product:nth-child(even) .product-media {
  order: 2;
}
.product-media .img-frame {
  --ar: 110%;
}
.product-name {
  font-size: clamp(1.8rem, 3vw, 2.6rem);
  margin: 14px 0 20px;
}
.product-desc {
  font-size: 15px;
  line-height: 1.75;
  color: var(--walnut);
  opacity: 0.85;
  max-width: 420px;
}
.specs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px 30px;
  margin: 34px 0;
  max-width: 440px;
}
.spec-label {
  font-family: "IBM Plex Mono", monospace;
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--umber);
}
.spec-val {
  font-size: 14px;
  margin-top: 5px;
}
.product-price {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin: 30px 0 26px;
}
.product-price .amt {
  font-family: "Fraunces", serif;
  font-size: 2rem;
}
.product-price .cur {
  font-size: 12px;
  color: var(--umber);
  font-family: "IBM Plex Mono", monospace;
}
@media (max-width: 860px) {
  .product,
  .product:nth-child(even) {
    grid-template-columns: 1fr;
    gap: 34px;
  }
  .product:nth-child(even) .product-media {
    order: 0;
  }
}

/* ---------- story ---------- */
.story {
  background: var(--walnut);
  color: var(--sand);
}
.story .section-head h2 {
  color: var(--cream);
}
.story-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 70px;
  align-items: center;
  padding: 64px 0;
}
.story-row:nth-child(even) .story-media {
  order: 2;
}
.story-row .img-frame {
  --ar: 120%;
}
.story-eyebrow {
  color: var(--gold);
}
.story-title {
  font-size: clamp(1.5rem, 2.6vw, 2.1rem);
  margin: 14px 0 18px;
  color: var(--cream);
}
.story-text {
  font-size: 15px;
  line-height: 1.8;
  opacity: 0.85;
  max-width: 440px;
}
.quote-block {
  border-left: 2px solid var(--gold);
  padding-left: 26px;
  margin: 70px 0;
  font-family: "Fraunces", serif;
  font-style: italic;
  font-size: clamp(1.3rem, 2.4vw, 1.9rem);
  line-height: 1.5;
  color: var(--cream);
  max-width: 820px;
}
.quote-block cite {
  display: block;
  margin-top: 20px;
  font-style: normal;
  font-family: "IBM Plex Mono", monospace;
  font-size: 12px;
  letter-spacing: 0.08em;
  color: var(--gold);
  opacity: 0.8;
}
@media (max-width: 860px) {
  .story-row,
  .story-row:nth-child(even) {
    grid-template-columns: 1fr;
    gap: 30px;
  }
  .story-row:nth-child(even) .story-media {
    order: 0;
  }
}

/* ---------- process timeline ---------- */
.process {
  background: var(--cream);
}
.process-list {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  margin-top: 20px;
}
.process-item {
  background: var(--cream);
  padding: 34px 22px;
  min-height: 220px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: background 0.4s var(--ease);
}
.process-item:hover {
  background: var(--sand);
}
.process-num {
  font-family: "IBM Plex Mono", monospace;
  font-size: 12px;
  color: var(--gold);
}
.process-title {
  font-family: "Fraunces", serif;
  font-size: 1.2rem;
  margin: 16px 0 8px;
}
.process-desc {
  font-size: 13px;
  line-height: 1.6;
  color: var(--walnut);
  opacity: 0.8;
}
@media (max-width: 860px) {
  .process-list {
    grid-template-columns: 1fr;
  }
}

/* ---------- order ---------- */
.order {
  background: var(--espresso);
  color: var(--cream);
}
.order .section-head h2 {
  color: var(--cream);
}
.order-card {
  background: rgba(244, 238, 226, 0.05);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid var(--line-inv);
  border-radius: 18px;
  padding: 44px;
  max-width: 760px;
  margin: 0 auto;
}
.order-select {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 34px;
}
.order-opt {
  flex: 1;
  min-width: 200px;
  border: 1px solid var(--line-inv);
  border-radius: 12px;
  padding: 20px;
  cursor: pointer;
  transition: all 0.3s var(--ease);
  background: transparent;
}
.order-opt.active {
  border-color: var(--cream);
  background: rgba(180, 137, 79, 0.09);
}
.order-opt .name {
  font-family: "Fraunces", serif;
  font-size: 1.05rem;
  color: white;
}
.order-opt .p {
  font-family: "IBM Plex Mono", monospace;
  font-size: 12px;
  color: var(--cream);
  margin-top: 8px;
}
.qty-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 22px 0;
  border-top: 1px solid var(--line-inv);
  border-bottom: 1px solid var(--line-inv);
  margin-bottom: 30px;
}
.qty-label {
  font-size: 13px;
  opacity: 0.7;
}
.stepper {
  display: flex;
  align-items: center;
  gap: 18px;
}
.stepper button {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid var(--line-inv);
  background: transparent;
  color: var(--cream);
  font-size: 16px;
  cursor: pointer;
  transition: all 0.25s var(--ease);
}
.stepper button:hover {
  border-color: var(--gold);
  color: var(--gold);
}
.stepper .qn {
  font-family: "IBM Plex Mono", monospace;
  min-width: 20px;
  text-align: center;
}
.order-total {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 30px;
}
.order-total .amt {
  font-family: "Fraunces", serif;
  font-size: 1.9rem;
}

/* ---------- contact ---------- */
.contact {
  background: var(--cream);
}
.contact-grid {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 60px;
  align-items: start;
}
.contact-item {
  display: flex;
  gap: 18px;
  padding: 24px 0;
  border-top: 1px solid var(--line);
}
.contact-item:last-child {
  border-bottom: 1px solid var(--line);
}
.contact-icon {
  width: 36px;
  height: 36px;
  flex-shrink: 0;
  color: var(--gold);
}
.contact-label {
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-family: "IBM Plex Mono", monospace;
  color: var(--umber);
}
.contact-val {
  font-family: "Fraunces", serif;
  font-size: 1.15rem;
  margin-top: 4px;
}

.field {
  position: relative;
  margin-bottom: 26px;
}
.field input,
.field textarea {
  width: 100%;
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--line);
  padding: 14px 0 10px;
  font-family: "Manrope", sans-serif;
  font-size: 15px;
  color: var(--espresso);
  transition: border-color 0.3s var(--ease);
}
.field textarea {
  resize: none;
  min-height: 70px;
}
.field label {
  position: absolute;
  left: 0;
  top: 14px;
  font-size: 15px;
  color: var(--umber);
  opacity: 0.6;
  pointer-events: none;
  transition: all 0.25s var(--ease);
}
.field input:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--gold);
}
.field input:focus ~ label,
.field input:not(:placeholder-shown) ~ label,
.field textarea:focus ~ label,
.field textarea:not(:placeholder-shown) ~ label {
  top: -12px;
  font-size: 11px;
  letter-spacing: 0.06em;
  color: var(--gold);
  opacity: 1;
}
@media (max-width: 860px) {
  .contact-grid {
    grid-template-columns: 1fr;
  }
}

/* ---------- footer ---------- */
footer {
  background: var(--espresso);
  color: var(--sand);
  padding: 100px 0 40px;
}
.footer-top {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 50px;
  padding-bottom: 80px;
  border-bottom: 1px solid var(--line-inv);
}
.footer-brand {
  font-family: "Fraunces", serif;
  font-size: 2rem;
  color: var(--cream);
  max-width: 340px;
  line-height: 1.3;
}
.footer-col h4 {
  font-family: "IBM Plex Mono", monospace;
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 18px;
}
.footer-col a {
  display: block;
  font-size: 14px;
  opacity: 0.75;
  margin-bottom: 12px;
  transition:
    opacity 0.25s,
    color 0.25s;
}
.footer-col a:hover {
  opacity: 1;
  color: var(--gold);
}
.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 30px;
  flex-wrap: wrap;
  gap: 16px;
}
.footer-bottom span {
  font-size: 12px;
  opacity: 0.5;
  font-family: "IBM Plex Mono", monospace;
}
@media (max-width: 860px) {
  .footer-top {
    grid-template-columns: 1fr 1fr;
  }
  .footer-brand {
    grid-column: 1/-1;
  }
}
