/* Sippin Smilez — design tokens
   Palette drawn from the coffee cherry (the fruit the bean grows in),
   the leaf, and a warm "smile" gold. */
:root {
  /* Taken from the Sippin Smilez bag designs */
  --cherry: #5A1A22;      /* oxblood (light roast bag) */
  --cherry-2: #7A2A33;
  --midnight: #0E1524;    /* dark roast bag */
  --emerald: #123A2E;     /* medium roast bag */
  --roast: #1E1A1C;
  --bone: #FBF7F3;
  --blush: #F3E3DA;
  --cream: #F3E9D2;
  --gold: #C9A45C;
  --gold-ink: #8A6A2B;    /* gold dark enough for text on light grounds */
  --leaf: #123A2E;
  --muted: #5E5357;
  --line: #E7D8D0;

  --display: "Cormorant Garamond", Georgia, serif;
  --body: "Jost", system-ui, -apple-system, "Segoe UI", sans-serif;

  --step--1: 0.9rem;
  --step-0: 1.0625rem;
  --step-1: 1.35rem;
  --step-2: 1.75rem;
  --step-3: 2.6rem;
  --step-4: clamp(2.9rem, 6vw, 5rem);

  --radius-s: 6px;
  --radius-l: 18px;
  --wrap: 1120px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--bone);
  color: var(--roast);
  font-family: var(--body);
  font-size: var(--step-0);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img, svg { display: block; max-width: 100%; }
a { color: var(--cherry-2); }
h1, h2, h3 { font-family: var(--display); font-weight: 600; line-height: 1.12; margin: 0 0 .5em; letter-spacing: -0.01em; }
h2 { font-size: var(--step-3); }
h3 { font-size: var(--step-2); }
p { margin: 0 0 1em; max-width: 62ch; }

.wrap { width: min(100% - 32px, var(--wrap)); margin-inline: auto; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--roast); color: #fff; padding: 8px 12px; z-index: 100; }
.skip:focus { left: 8px; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font: 600 var(--step-0)/1 var(--body);
  padding: 14px 22px; border-radius: 999px; border: 1.5px solid transparent;
  text-decoration: none; cursor: pointer; transition: background .15s, color .15s, transform .1s;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--cherry); color: #fff; }
.btn-primary:hover { background: var(--cherry-2); }
.btn-ghost { border-color: var(--cherry); color: var(--cherry); background: transparent; }
.btn-ghost:hover { background: var(--cherry); color: #fff; }
.btn-light { background: var(--cream); color: var(--emerald); }
.btn-light:hover { background: var(--gold); color: var(--roast); }
.btn-block { width: 100%; }
.btn[disabled] { opacity: .55; cursor: not-allowed; }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 20;
  background: color-mix(in srgb, var(--bone) 92%, transparent);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.header-inner { display: flex; align-items: center; gap: 24px; height: 68px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--cherry); font-family: var(--display); font-weight: 600; font-size: var(--step-2); }
.brand img { height: 44px; width: auto; }
.site-footer .brand img { height: 40px; }
.nav { display: flex; gap: 22px; margin-left: auto; }
.nav a { color: var(--roast); text-decoration: none; font-weight: 500; }
.nav a:hover { color: var(--cherry-2); }
.cart-btn {
  display: inline-flex; align-items: center; gap: 8px; border: 1.5px solid var(--cherry);
  background: transparent; color: var(--cherry); border-radius: 999px; padding: 8px 14px;
  font: 600 var(--step--1) var(--body); cursor: pointer;
}
.cart-count { background: var(--cherry); color: #fff; border-radius: 999px; min-width: 22px; height: 22px; display: grid; place-items: center; font-size: 12px; padding: 0 6px; }
@media (max-width: 760px) {
  .nav { display: none; }
  .cart-btn { margin-left: auto; }
}

/* Hero — the Midnight Gold bag, at page scale */
.hero { padding: 72px 0 88px; background: var(--midnight); color: var(--cream); position: relative; overflow: hidden; }
.hero::before { content: ""; position: absolute; inset: 18px; border: 1px solid rgba(201,164,92,.45); pointer-events: none; }
.hero-grid { display: grid; grid-template-columns: 1.1fr .9fr; align-items: center; gap: 48px; position: relative; }
.hero h1 { font-size: var(--step-4); color: var(--cream); max-width: 13ch; line-height: 1.02; }
.hero-place { color: var(--gold); font-weight: 500; letter-spacing: .04em; margin-bottom: 18px; }
.lede { font-size: var(--step-1); color: #D9CFBA; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 32px; }
.hero .btn-primary { background: var(--gold); color: var(--midnight); }
.hero .btn-primary:hover { background: #DDBD7E; }
.hero .btn-ghost { border-color: var(--gold); color: var(--cream); }
.hero .btn-ghost:hover { background: var(--gold); color: var(--midnight); }
.hero-art { justify-self: center; width: min(100%, 400px); }
.hero-art img { width: 100%; height: auto; animation: rise 2.2s .2s cubic-bezier(.5,0,.2,1) both; }
/* The one orchestrated motion: the logo appears bottom-up, like steam leaving the cup */
@keyframes rise { from { clip-path: inset(100% 0 0 0); opacity: .2; } to { clip-path: inset(0 0 0 0); opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .hero-art img { animation: none; } }
@media (max-width: 860px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-art { order: -1; width: 230px; }
}

/* Sections */
.section { padding: 88px 0; }
.section-tint { background: var(--blush); }
.section-dark { background: var(--emerald); color: var(--cream); }
.section-dark p { color: #D5DDD3; }
.section-head { display: flex; justify-content: space-between; align-items: end; gap: 32px; margin-bottom: 40px; flex-wrap: wrap; }
.section-head p { color: var(--muted); margin: 0; }
.section-dark .section-head p { color: #D5DDD3; }

/* Products */
.products { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 32px; }
.product { display: flex; flex-direction: column; }
.bag { border-radius: var(--radius-l); overflow: hidden; margin-bottom: 18px; background: var(--tint, var(--blush)); padding: 22px; }
.bag img { width: 100%; height: auto; aspect-ratio: 560 / 860; border-radius: 4px; box-shadow: 0 18px 30px -12px rgba(30,26,28,.35); transition: transform .25s ease; }
.product:hover .bag img { transform: translateY(-4px) rotate(-.6deg); }
@media (prefers-reduced-motion: reduce) { .product:hover .bag img { transform: none; } }
@media (max-width: 640px) { .bag { padding: 18px 22%; } }
.product h3 { font-size: var(--step-2); margin-bottom: 2px; color: var(--accent, var(--cherry)); }
.origin { color: var(--gold-ink); font-weight: 500; font-size: var(--step--1); margin: 0 0 8px; }
.notes { color: var(--muted); font-size: var(--step--1); margin-bottom: 12px; }
.roast { display: flex; align-items: center; gap: 10px; font-size: var(--step--1); color: var(--muted); margin-bottom: 14px; }
.roast-bar { flex: 1; height: 6px; border-radius: 3px; background: linear-gradient(90deg, #d7a46b, #6b3a22, #24130d); position: relative; }
.roast-bar i { position: absolute; top: 50%; width: 14px; height: 14px; border-radius: 50%; background: var(--bone); border: 3px solid var(--roast); transform: translate(-50%, -50%); }
.opts { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 14px; }
.opts select, .brew select, .brew input, .contact input, .contact select, .contact textarea, .newsletter input {
  width: 100%; font: inherit; padding: 10px 12px; border: 1.5px solid var(--line); border-radius: var(--radius-s); background: #fff; color: var(--roast);
}
.opts select { font-size: var(--step--1); padding: 10px 8px; }
.buy { display: flex; align-items: center; justify-content: space-between; margin-top: auto; gap: 12px; }
.price { font-family: var(--display); font-weight: 600; font-size: var(--step-2); color: var(--roast); }
.product .btn { padding: 12px 18px; background: var(--accent, var(--cherry)); }
.product .btn:hover { filter: brightness(1.25); }
.opts.one { grid-template-columns: 1fr; }
.ship-note { color: var(--muted); margin-top: 32px; font-size: var(--step--1); }
.loading { color: var(--muted); }
.added { animation: pop .4s ease; }
@keyframes pop { 50% { transform: scale(1.12); } }

/* Matcher */
.match-grid, .brew-grid, .contact-grid { display: grid; grid-template-columns: .8fr 1.2fr; gap: 48px; align-items: start; }
@media (max-width: 860px) { .match-grid, .brew-grid, .contact-grid { grid-template-columns: 1fr; gap: 24px; } }
.matcher { background: var(--bone); border-radius: var(--radius-l); padding: 28px; }
.matcher fieldset, .fulfil { border: 0; padding: 0; margin: 0 0 22px; }
.matcher legend, .fulfil legend { font-weight: 600; margin-bottom: 10px; }
.matcher label {
  display: inline-flex; align-items: center; gap: 8px; margin: 0 8px 8px 0; padding: 9px 14px;
  border: 1.5px solid var(--line); border-radius: 999px; cursor: pointer; background: #fff;
}
.matcher label:has(input:checked) { border-color: var(--cherry); background: var(--blush); }
.matcher input { accent-color: var(--cherry); }
.match-result:not(:empty) { margin-top: 22px; padding: 18px; background: #fff; border-radius: var(--radius-s); display: grid; grid-template-columns: 96px 1fr; gap: 18px; align-items: center; }
.match-result img { width: 96px; height: auto; border-radius: 3px; box-shadow: 0 8px 16px -8px rgba(30,26,28,.4); }
.match-result h3 { margin-bottom: 6px; }

/* Brew */
.brew { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.brew label { font-weight: 600; display: grid; gap: 6px; }
.brew-out { grid-column: 1 / -1; display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.brew-out div { background: var(--blush); border-radius: var(--radius-l); padding: 20px 22px; }
.brew-out strong { display: block; font-family: var(--display); font-size: var(--step-3); font-weight: 600; color: var(--cherry); line-height: 1.1; }
.brew-out span { color: var(--muted); font-size: var(--step--1); }

/* Events */
.events { list-style: none; padding: 0; margin: 0 0 48px; display: grid; gap: 1px; background: rgba(255,255,255,.18); border-radius: var(--radius-l); overflow: hidden; }
.events li { display: grid; grid-template-columns: 110px 1fr auto; gap: 20px; align-items: center; background: var(--emerald); padding: 20px 24px; }
.ev-date { font-family: var(--display); font-size: var(--step-2); line-height: 1; color: var(--gold); }
.ev-date small { display: block; font-family: var(--body); font-size: var(--step--1); color: #D5DDD3; margin-top: 4px; }
.events h3 { font-size: var(--step-1); margin: 0 0 2px; }
.events p { margin: 0; }
.ev-tag { font-size: var(--step--1); border: 1px solid rgba(255,255,255,.4); padding: 4px 10px; border-radius: 999px; white-space: nowrap; }
@media (max-width: 640px) { .events li { grid-template-columns: 1fr; gap: 6px; } }
.partner { display: flex; justify-content: space-between; align-items: center; gap: 24px; flex-wrap: wrap; padding: 32px; border: 1px solid rgba(255,255,255,.3); border-radius: var(--radius-l); }
.partner h3 { margin-bottom: 6px; }
.partner p { margin: 0; }

/* Story */
.story { display: grid; grid-template-columns: 220px 1fr; gap: 48px; align-items: center; }
@media (max-width: 640px) { .story { grid-template-columns: 1fr; } }

/* Forms */
.contact { display: grid; gap: 14px; background: var(--bone); padding: 28px; border-radius: var(--radius-l); }
.contact label { display: grid; gap: 6px; font-weight: 600; }
.newsletter { margin-top: 28px; }
.newsletter label { font-weight: 600; display: block; margin-bottom: 8px; }
.inline { display: flex; gap: 8px; }
.inline input { flex: 1; }
@media (max-width: 480px) { .inline { flex-direction: column; } }
.form-msg { min-height: 1.4em; margin: 6px 0 0; font-size: var(--step--1); }
.form-msg.ok { color: var(--leaf); }
.form-msg.err { color: #a32020; }
.hp { position: absolute; left: -9999px; }

/* Footer */
.site-footer { background: var(--midnight); color: #e9d9db; padding: 36px 0; }
.footer-inner { display: flex; flex-wrap: wrap; align-items: center; gap: 20px 32px; }
.site-footer .brand { color: var(--cream); font-size: var(--step-0); font-family: var(--body); }
.site-footer nav { display: flex; gap: 18px; }
.site-footer a { color: #e9d9db; }
.copy { margin: 0 0 0 auto; font-size: var(--step--1); }

/* Cart drawer */
.scrim { position: fixed; inset: 0; background: rgba(35,21,25,.45); z-index: 40; }
.cart {
  position: fixed; top: 0; right: 0; height: 100%; width: min(420px, 100%); z-index: 50;
  background: var(--bone); display: flex; flex-direction: column;
  transform: translateX(100%); transition: transform .28s cubic-bezier(.3,.7,.2,1);
  box-shadow: -20px 0 40px rgba(35,21,25,.15);
}
.cart.open { transform: none; }
@media (prefers-reduced-motion: reduce) { .cart { transition: none; } }
.cart-head { display: flex; justify-content: space-between; align-items: center; padding: 20px 24px; border-bottom: 1px solid var(--line); }
.cart-head h2 { font-size: var(--step-2); margin: 0; }
.icon-btn { background: none; border: 0; font-size: 20px; cursor: pointer; color: var(--roast); padding: 6px; }
.cart-items { list-style: none; margin: 0; padding: 8px 24px; overflow-y: auto; flex: 1; }
.cart-items li { display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; padding: 16px 0; border-bottom: 1px solid var(--line); }
.cart-items .meta { color: var(--muted); font-size: var(--step--1); }
.qty { display: inline-flex; align-items: center; gap: 4px; }
.qty button { width: 28px; height: 28px; border-radius: 50%; border: 1.5px solid var(--line); background: #fff; cursor: pointer; font-size: 16px; line-height: 1; }
.remove { background: none; border: 0; color: var(--muted); text-decoration: underline; cursor: pointer; font-size: var(--step--1); padding: 0; justify-self: end; }
.empty { color: var(--muted); padding: 24px 0; }
.cart-foot { padding: 20px 24px; border-top: 1px solid var(--line); }
.fulfil label { display: block; margin-bottom: 4px; }
.fulfil input { accent-color: var(--cherry); }
.totals { margin: 0 0 16px; }
.totals div { display: flex; justify-content: space-between; padding: 4px 0; }
.totals dd { margin: 0; }
.totals .grand { font-weight: 600; font-size: var(--step-1); border-top: 1px solid var(--line); margin-top: 6px; padding-top: 10px; }
.price .per { font-family: var(--body); font-weight: 400; font-size: var(--step--1); color: var(--muted); }
.addr { font-style: normal; line-height: 1.7; margin: 8px 0 4px; padding: 18px 20px; background: var(--bone); border-radius: var(--radius-s); max-width: 320px; }
.addr strong { font-family: var(--display); font-size: var(--step-1); font-weight: 600; color: var(--cherry); }
.site-footer nav { flex-wrap: wrap; row-gap: 6px; }
.site-footer nav a { overflow-wrap: anywhere; }
.cart:not(.open) { visibility: hidden; transition: transform .28s cubic-bezier(.3,.7,.2,1), visibility 0s .28s; }
@media (max-width: 860px) {
  .hero::before { inset: 10px; }
  .hero .wrap { width: min(100% - 56px, var(--wrap)); }
}

/* Visually hidden text for screen readers */
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Gallery: one tall feature photo, two stacked beside it */
.gallery { display: grid; grid-template-columns: 1.35fr 1fr; grid-template-rows: 1fr 1fr; gap: 16px; }
.shot { padding: 0; border: 0; background: var(--blush); border-radius: var(--radius-l); overflow: hidden; cursor: zoom-in; display: block; }
.shot img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease; }
.shot:hover img { transform: scale(1.03); }
.shot-a { grid-row: 1 / 3; aspect-ratio: auto; min-height: 420px; }
.shot-b, .shot-c { aspect-ratio: 4 / 3; }
@media (max-width: 760px) {
  .gallery { grid-template-columns: 1fr; grid-template-rows: none; }
  .shot-a { grid-row: auto; min-height: 0; aspect-ratio: 4 / 3; }
}
@media (prefers-reduced-motion: reduce) { .shot:hover img { transform: none; } }
.lightbox { border: 0; padding: 0; background: transparent; max-width: min(1100px, 94vw); max-height: 92vh; }
.lightbox::backdrop { background: rgba(14,21,36,.88); }
.lightbox img { max-width: 100%; max-height: 92vh; display: block; border-radius: var(--radius-s); }
.lb-close { position: absolute; top: 8px; right: 8px; background: rgba(251,247,243,.9); border-radius: 50%; width: 44px; height: 44px; }

/* Reviews */
.reviews-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: start; }
@media (max-width: 860px) { .reviews-grid { grid-template-columns: 1fr; } }
.testimonials { display: grid; gap: 20px; margin-top: 8px; }
.quote { margin: 0; padding: 24px 26px; background: var(--blush); border-radius: var(--radius-l); }
.quote p { font-family: var(--display); font-size: var(--step-1); line-height: 1.4; color: var(--roast); margin-bottom: 12px; }
.quote footer { color: var(--muted); font-size: var(--step--1); }
.quote .q-stars { color: var(--gold-ink); letter-spacing: 2px; margin-bottom: 6px; }
.reviews-empty { color: var(--muted); max-width: 40ch; }
.feedback { display: grid; gap: 14px; background: var(--bone); border: 1px solid var(--line); padding: 28px; border-radius: var(--radius-l); }
.feedback h3 { margin: 0; }
.feedback .hint { color: var(--muted); margin: 0; font-size: var(--step--1); }
.feedback label { display: grid; gap: 6px; font-weight: 500; }
.feedback input:not([type=radio]):not([type=checkbox]), .feedback select, .feedback textarea {
  width: 100%; font: inherit; padding: 10px 12px; border: 1.5px solid var(--line); border-radius: var(--radius-s); background: #fff; color: var(--roast);
}
.feedback .opt { font-weight: 400; color: var(--muted); font-size: var(--step--1); }
.feedback .check { display: flex; gap: 10px; align-items: flex-start; font-weight: 400; font-size: var(--step--1); }
.feedback .check input { margin-top: 4px; accent-color: var(--cherry); }
.stars { border: 0; padding: 0; margin: 0; }
.stars legend { font-weight: 500; margin-bottom: 4px; }
.star-row { display: inline-flex; flex-direction: row-reverse; gap: 2px; }
.star-row input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.star-row label { font-size: 30px; line-height: 1; color: var(--line); cursor: pointer; padding: 4px; display: block; }
.star-row label:hover, .star-row label:hover ~ label,
.star-row input:checked ~ label { color: var(--gold); }
.star-row input:focus-visible + label { outline: 3px solid var(--gold); outline-offset: 2px; border-radius: 4px; }
#reviews { border-top: 1px solid var(--line); }
.star-row label { color: #C9B5AB; }
