/* Eight Ounce Coffee — layout inspired by a minimal editorial coffee storefront */
:root {
  --bg: #fbfaf6;
  --surface: #ffffff;
  --ink: #1c1c1a;
  --muted: #6d6c66;
  --line: #e4e1d8;
  --green: #1f4a2c;
  --green-deep: #163620;
  --lime: #c3c134;
  --cream: #f3f0e6;
  --max: 1280px;
  --gutter: clamp(16px, 4vw, 56px);
  --header-h: 72px;
  --font: "Figtree", "Helvetica Neue", Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.65;
  letter-spacing: 0.01em;
  -webkit-font-smoothing: antialiased;
}
img, video { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
h1, h2, h3, h4 { font-weight: 400; line-height: 1.3; margin: 0; letter-spacing: -0.005em; }
p { margin: 0; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--ink); color: #fff; padding: 8px 12px; z-index: 100; }
.skip:focus { left: 8px; }
:focus-visible { outline: 2px solid var(--green); outline-offset: 3px; }

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }

/* ---------- Announcement ---------- */
.announce {
  background: var(--green);
  color: #f4f2e8;
  text-align: center;
  font-size: 12px;
  letter-spacing: 0.04em;
  padding: 8px 16px;
}
.announce a { text-decoration: underline; text-underline-offset: 3px; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(251, 250, 246, 0.96);
  backdrop-filter: saturate(140%) blur(8px);
  border-bottom: 1px solid transparent;
  transition: border-color .2s;
}
.site-header.scrolled { border-bottom-color: var(--line); }
.header-inner {
  height: var(--header-h);
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center;
  max-width: none; padding: 0 var(--gutter);
}
.nav-main { display: flex; gap: 28px; font-size: 14px; }
.nav-main a, .nav-util a { position: relative; padding: 4px 0; }
.nav-main a::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -2px; height: 1px;
  background: currentColor; transform: scaleX(0); transform-origin: left; transition: transform .25s;
}
.nav-main a:hover::after, .nav-main a[aria-current="page"]::after { transform: scaleX(1); }
.brand { display: block; }
.brand img { height: 46px; width: auto; }
.nav-util { display: flex; justify-content: flex-end; align-items: center; gap: 20px; font-size: 14px; }
.icon { width: 20px; height: 20px; stroke: currentColor; fill: none; stroke-width: 1.4; }
.menu-btn { display: none; width: 40px; height: 40px; margin-left: -10px; align-items: center; justify-content: center; }

.drawer {
  position: fixed; inset: 0; z-index: 60; pointer-events: none;
}
.drawer__scrim { position: absolute; inset: 0; background: rgba(0,0,0,.35); opacity: 0; transition: opacity .3s; }
.drawer__panel {
  position: absolute; top: 0; left: 0; bottom: 0; width: min(86vw, 360px);
  background: var(--bg); padding: 24px; transform: translateX(-100%); transition: transform .35s ease;
  display: flex; flex-direction: column; gap: 8px;
}
.drawer.open { pointer-events: auto; }
.drawer.open .drawer__scrim { opacity: 1; }
.drawer.open .drawer__panel { transform: none; }
.drawer__panel nav a { display: block; font-size: 20px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.drawer__close { align-self: flex-end; width: 40px; height: 40px; display: flex; align-items: center; justify-content: center; }
.drawer__meta { margin-top: auto; font-size: 13px; color: var(--muted); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 200px; padding: 13px 28px;
  font-size: 13px; letter-spacing: 0.06em;
  border: 1px solid var(--ink); background: transparent; color: var(--ink);
  transition: background .2s, color .2s, border-color .2s;
}
.btn:hover { background: var(--ink); color: #fff; }
.btn--solid { background: var(--green); border-color: var(--green); color: #fff; }
.btn--solid:hover { background: var(--green-deep); border-color: var(--green-deep); }
.btn--light { background: #fff; border-color: #fff; color: var(--ink); }
.btn--light:hover { background: transparent; color: #fff; }
.btn-row { display: flex; flex-wrap: wrap; gap: 8px; }

/* ---------- Hero slider ---------- */
.hero { position: relative; height: min(78vh, 760px); min-height: 460px; overflow: hidden; background: #111; color: #fff; }
.slide { position: absolute; inset: 0; opacity: 0; transition: opacity .9s ease; }
.slide.is-active { opacity: 1; z-index: 1; }
.slide__media, .slide__media img, .slide__media video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.slide::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(0,0,0,.45) 0%, rgba(0,0,0,.1) 55%, rgba(0,0,0,0) 100%); }
.slide__copy {
  position: absolute; z-index: 2; left: var(--gutter); bottom: clamp(48px, 12vh, 110px);
  max-width: 520px;
}
.slide__copy h2 { font-size: clamp(28px, 3.6vw, 44px); margin-bottom: 10px; }
.slide__copy p { font-size: 16px; margin-bottom: 28px; opacity: .92; }
.hero__dots { position: absolute; z-index: 3; right: var(--gutter); bottom: 32px; display: flex; gap: 14px; font-size: 12px; letter-spacing: .08em; }
.hero__dots button { opacity: .5; padding: 4px 0; border-bottom: 1px solid transparent; }
.hero__dots button[aria-current="true"] { opacity: 1; border-bottom-color: #fff; }

/* ---------- Product trio ---------- */
.trio { padding: clamp(56px, 8vw, 100px) 0; background: var(--surface); }
.trio__grid { display: grid; grid-template-columns: repeat(3, 1fr); }
.trio__item { text-align: center; padding: 0 24px; border-left: 1px solid var(--line); display: flex; flex-direction: column; align-items: center; }
.trio__item:first-child { border-left: 0; }
.trio__item h3 { font-size: 18px; margin-bottom: 6px; }
.trio__item p { font-size: 13px; color: var(--muted); }
.trio__item img { margin-top: 24px; width: 100%; max-width: 300px; aspect-ratio: 4/5; object-fit: cover; transition: transform .5s ease; }
.trio__item:hover img { transform: scale(1.03); }

/* ---------- Full bleed banner ---------- */
.banner { position: relative; min-height: min(82vh, 760px); color: #fff; display: flex; align-items: flex-end; overflow: hidden; }
.banner > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.banner::before { content: ""; position: absolute; inset: 0; background: linear-gradient(0deg, rgba(0,0,0,.5), rgba(0,0,0,0) 60%); z-index: 1; }
.banner__copy { position: relative; z-index: 2; padding: 0 var(--gutter) clamp(48px, 8vw, 88px); max-width: 640px; }
.banner__eyebrow { font-size: 12px; letter-spacing: .18em; text-transform: uppercase; margin-bottom: 14px; }
.banner__copy h2 { font-size: clamp(26px, 3.2vw, 40px); margin-bottom: 12px; }
.banner__copy p { font-size: 16px; opacity: .92; margin-bottom: 28px; }

/* ---------- Split feature ---------- */
.split { padding: clamp(64px, 9vw, 120px) 0; }
.split__grid { display: grid; grid-template-columns: 1.15fr 1fr; gap: clamp(32px, 7vw, 110px); align-items: center; }
.split--rev .split__media { order: 2; }
.split__media img { width: 100%; aspect-ratio: 4/5; object-fit: cover; }
.split__media--wide img { aspect-ratio: 5/4; }
.split__copy h2 { font-size: clamp(24px, 2.6vw, 32px); margin-bottom: 36px; }
.split__list { list-style: none; margin: 0 0 40px; padding: 0; display: grid; gap: 22px; }
.split__list h3 { font-size: 13px; font-weight: 600; letter-spacing: .04em; margin-bottom: 4px; }
.split__list p { color: var(--muted); font-size: 14px; }
.eyebrow { font-size: 12px; letter-spacing: .18em; text-transform: uppercase; color: var(--green); margin-bottom: 14px; display: block; }

/* ---------- Ratio story ---------- */
.ratio { background: var(--cream); padding: clamp(64px, 9vw, 120px) 0; text-align: center; }
.ratio__formula { display: flex; justify-content: center; align-items: baseline; gap: clamp(10px, 2vw, 28px); font-size: clamp(30px, 5vw, 64px); color: var(--green); font-weight: 300; margin: 6px 0 22px; flex-wrap: wrap; }
.ratio__formula small { display: block; font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); font-weight: 400; }
.ratio__formula span { display: inline-flex; flex-direction: column; align-items: center; }
.ratio__formula i { font-style: normal; color: var(--muted); font-size: .6em; }
.ratio__lede { max-width: 680px; margin: 0 auto; color: var(--muted); }
.ratio__imgs { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(12px, 2vw, 24px); margin-top: clamp(40px, 6vw, 64px); }
.ratio__imgs img { width: 100%; aspect-ratio: 3/4; object-fit: cover; border-radius: 999px 999px 999px 999px / 50% 50% 50% 50%; }

/* ---------- Cafe finder ---------- */
.finder { padding: clamp(64px, 9vw, 110px) 0; text-align: center; border-top: 1px solid var(--line); }
.finder__bar { display: flex; justify-content: space-between; font-size: 13px; margin-bottom: 40px; text-align: left; gap: 16px; }
.finder__bar strong { font-weight: 600; }
.finder__count { color: var(--muted); letter-spacing: .08em; white-space: nowrap; }
.finder__count b { color: var(--ink); font-weight: 400; }
.finder h2 { font-size: clamp(22px, 2.4vw, 28px); margin-bottom: 24px; }

/* ---------- Page hero ---------- */
.page-hero { position: relative; height: clamp(320px, 52vh, 560px); color: #fff; display: flex; align-items: flex-end; overflow: hidden; }
.page-hero img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.page-hero::before { content: ""; position: absolute; inset: 0; background: linear-gradient(0deg, rgba(0,0,0,.5), rgba(0,0,0,.05) 70%); z-index: 1; }
.page-hero__copy { position: relative; z-index: 2; padding: 0 var(--gutter) clamp(36px, 6vw, 64px); max-width: 720px; }
.page-hero h1 { font-size: clamp(30px, 4vw, 50px); margin-bottom: 8px; }
.page-hero p { font-size: 16px; opacity: .92; }

.page-head { padding: clamp(48px, 7vw, 88px) 0 clamp(24px, 4vw, 40px); text-align: center; }
.page-head h1 { font-size: clamp(30px, 3.6vw, 44px); margin-bottom: 12px; }
.page-head p { color: var(--muted); max-width: 640px; margin: 0 auto; }

.prose { max-width: 720px; margin: 0 auto; padding: clamp(56px, 8vw, 100px) var(--gutter); }
.prose h2 { font-size: clamp(24px, 2.6vw, 32px); margin-bottom: 20px; }
.prose p + p { margin-top: 16px; }
.prose p { color: #3d3c38; font-size: 16px; }

/* ---------- Cards / grids ---------- */
.cards3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(16px, 2.5vw, 32px); }
.card img { width: 100%; aspect-ratio: 3/4; object-fit: cover; margin-bottom: 18px; }
.card h3 { font-size: 17px; margin-bottom: 8px; }
.card p { color: var(--muted); font-size: 14px; }

.tiers { display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.tier { padding: clamp(28px, 4vw, 48px) clamp(16px, 3vw, 36px); border-left: 1px solid var(--line); }
.tier:first-child { border-left: 0; }
.tier__num { font-size: 13px; color: var(--muted); letter-spacing: .1em; }
.tier h3 { font-size: 20px; letter-spacing: .08em; margin: 10px 0 10px; color: var(--green); }
.tier p { color: var(--muted); font-size: 14px; }

.beans { display: grid; grid-template-columns: repeat(5, 1fr); gap: 16px; }
.beans img { width: 100%; aspect-ratio: 900/1277; object-fit: cover; transition: transform .4s; }
.beans figure { margin: 0; }
.beans figcaption { font-size: 12px; color: var(--muted); margin-top: 10px; letter-spacing: .06em; text-transform: uppercase; }
.beans a:hover img { transform: translateY(-4px); }

/* ---------- Shop ---------- */
.filters { display: flex; justify-content: center; flex-wrap: wrap; gap: 8px; margin-bottom: clamp(32px, 5vw, 56px); }
.filters button { padding: 8px 18px; font-size: 13px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); }
.filters button[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: #fff; }
.products { display: grid; grid-template-columns: repeat(4, 1fr); gap: clamp(28px, 3vw, 40px) clamp(14px, 2vw, 24px); padding-bottom: clamp(64px, 8vw, 100px); }
.product { display: flex; flex-direction: column; }
.product[hidden] { display: none; }
.product__img { background: #f1efea; aspect-ratio: 4/5; overflow: hidden; margin-bottom: 14px; position: relative; }
.product__img img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.product:hover .product__img img { transform: scale(1.04); }
.product__cat { font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin-bottom: 4px; }
.product h3 { font-size: 16px; margin-bottom: 2px; }
.product__size { font-size: 13px; color: var(--muted); }
.product__notes { font-size: 13px; color: var(--muted); margin-top: 8px; }
.product__meta { font-size: 12px; color: var(--muted); margin-top: 8px; display: grid; gap: 2px; }
.product__meta b { color: var(--ink); font-weight: 500; }
.product__price { margin-top: 10px; font-size: 15px; }
.tag { position: absolute; top: 10px; left: 10px; background: var(--surface); font-size: 11px; letter-spacing: .08em; padding: 4px 8px; text-transform: uppercase; }

.instore { background: var(--green); color: #f4f2e8; }
.instore .split__copy h2 { color: #fff; }
.instore .split__list p { color: #d4dcd2; }
.instore .btn { border-color: #fff; color: #fff; }
.instore .btn:hover { background: #fff; color: var(--green); }

/* ---------- Locations ---------- */
.locations { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 0; border-top: 1px solid var(--line); margin-bottom: clamp(64px, 8vw, 100px); }
.loc { padding: 32px 28px 36px 0; border-bottom: 1px solid var(--line); display: flex; flex-direction: column; }
.loc__num { font-size: 12px; color: var(--muted); letter-spacing: .1em; }
.loc h2 { font-size: 22px; margin: 8px 0 14px; }
.loc address { font-style: normal; color: #3d3c38; font-size: 14px; margin-bottom: 16px; }
.loc dl { display: grid; grid-template-columns: auto 1fr; gap: 2px 14px; font-size: 13px; margin: 0 0 20px; }
.loc dt { color: var(--muted); }
.loc dd { margin: 0; }
.loc .link { margin-top: auto; font-size: 13px; text-decoration: underline; text-underline-offset: 4px; }

/* ---------- Contact ---------- */
.form { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.form .full { grid-column: 1 / -1; }
.form label { display: block; font-size: 12px; letter-spacing: .06em; color: var(--muted); margin-bottom: 6px; }
.form input, .form textarea, .form select {
  width: 100%; font: inherit; font-size: 15px; padding: 12px 0; border: 0; border-bottom: 1px solid #bdb9ad; background: transparent; color: var(--ink); border-radius: 0;
}
.form textarea { min-height: 140px; resize: vertical; }
.form input:focus, .form textarea:focus, .form select:focus { outline: none; border-bottom-color: var(--green); }
.form-note { font-size: 13px; color: var(--muted); margin-top: 14px; }
.contact-list { list-style: none; padding: 0; margin: 0 0 36px; display: grid; gap: 18px; }
.contact-list h3 { font-size: 13px; font-weight: 600; letter-spacing: .04em; margin-bottom: 2px; }
.contact-list a { text-decoration: underline; text-underline-offset: 3px; }

/* ---------- Footer ---------- */
.site-footer { background: var(--green-deep); color: #dfe4dc; font-size: 13px; padding: clamp(56px, 7vw, 88px) 0 28px; }
.footer-grid { display: grid; grid-template-columns: 1fr 1fr 1fr 1.6fr; gap: 32px; }
.site-footer h4 { color: #fff; font-size: 14px; margin-bottom: 18px; font-weight: 500; }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.site-footer a:hover { color: #fff; text-decoration: underline; text-underline-offset: 3px; }
.footer-brand img { height: 64px; width: auto; margin-bottom: 18px; }
.footer-brand p { max-width: 380px; margin-bottom: 20px; }
.socials { display: flex; gap: 16px; }
.socials a { width: 36px; height: 36px; border: 1px solid rgba(255,255,255,.35); border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; }
.socials a:hover { background: #fff; color: var(--green-deep); text-decoration: none; }
.footer-legal { border-top: 1px solid rgba(255,255,255,.15); margin-top: 48px; padding-top: 20px; display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; color: #aab6a8; font-size: 12px; }

.pos-top { object-position: center 27%; }

/* ---------- Reveal ---------- */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .8s ease, transform .8s ease; }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  .slide { transition: none; }
  html { scroll-behavior: auto; }
}

/* ---------- Responsive ---------- */
@media (max-width: 1080px) {
  .products { grid-template-columns: repeat(3, 1fr); }
  .beans { grid-template-columns: repeat(3, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 860px) {
  :root { --header-h: 60px; }
  .nav-main, .nav-util .hide-sm { display: none; }
  .menu-btn { display: inline-flex; }
  .header-inner { grid-template-columns: 1fr auto 1fr; }
  .brand img { height: 38px; }
  .trio__grid { grid-template-columns: 1fr; gap: 48px; }
  .trio__item { border-left: 0; }
  .trio__item img { max-width: 260px; }
  .split__grid { grid-template-columns: 1fr; }
  .split--rev .split__media { order: 0; }
  .cards3, .tiers { grid-template-columns: 1fr; }
  .tier { border-left: 0; border-top: 1px solid var(--line); }
  .tier:first-child { border-top: 0; }
  .products { grid-template-columns: repeat(2, 1fr); }
  .beans { grid-template-columns: repeat(2, 1fr); }
  .ratio__imgs { gap: 10px; }
  .form { grid-template-columns: 1fr; }
  .slide__copy { right: var(--gutter); }
  .slide::after { background: linear-gradient(0deg, rgba(0,0,0,.55) 0%, rgba(0,0,0,0) 65%); }
  .hero__dots { left: var(--gutter); right: auto; bottom: 20px; }
  .slide__copy { bottom: 64px; }
  .loc { padding-right: 0; }
  .banner::before { background: linear-gradient(0deg, rgba(0,0,0,.72), rgba(0,0,0,.15) 75%); }
}
@media (max-width: 520px) {
  .footer-grid { grid-template-columns: 1fr; }
  .btn { min-width: 0; width: 100%; }
  .btn-row { flex-direction: column; }
  .finder__bar { flex-direction: column; gap: 4px; }
}
