/* Overgrown Coffee Co.: coffee roaster website concept by Mint Labs. Fictional brand. */
:root {
  --persimmon: #dd5022;   /* the opening film's backdrop */
  --accent: #ee6a3c;      /* second line of the two-tone headlines */
  --cream: #f3e8d2;
  --ink: #24120b;
  --roast: #2a1710;
  --night: #1c120d;
  --glass: rgba(28, 18, 13, .78);
  --display: "Big Shoulders Display", "Arial Narrow", Impact, sans-serif;
  --sans: "Instrument Sans", "Helvetica Neue", Arial, sans-serif;
  --side: max(20px, 4vw);
  --top-h: 92px;
}
*, *::before, *::after { box-sizing: border-box; }
html { background: var(--night); color: var(--cream); -webkit-text-size-adjust: 100%; }
body { margin: 0; font: 400 16px/1.55 var(--sans); background: var(--night); }
img { display: block; max-width: 100%; height: auto; }
[hidden] { display: none !important; }
section[id], .mxs-step[id] { scroll-margin-top: var(--top-h); }
a { color: inherit; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

.skip { position: absolute; left: 12px; top: -60px; z-index: 50; padding: 10px 14px; border-radius: 999px; background: var(--cream); color: var(--ink); text-decoration: none; }
.skip:focus { top: 12px; }

/* ---------- header ---------- */
.top { position: fixed; inset: 0 0 auto; z-index: 20; }
.concept-bar { margin: 0; padding: 6px var(--side); background: var(--night); color: var(--cream); font-size: 11.5px; letter-spacing: .02em; text-align: center; }
.concept-bar a { text-underline-offset: 2px; }
.bar { display: flex; align-items: center; gap: 24px; padding: 12px var(--side); transition: background .3s; }
.top.solid .bar { background: var(--glass); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
.logo { margin-right: auto; font-family: var(--display); font-weight: 900; font-size: 27px; line-height: .9; letter-spacing: .05em; text-transform: uppercase; text-decoration: none; }
.logo small { display: block; margin-top: 3px; font-family: var(--sans); font-size: 10px; font-weight: 600; letter-spacing: .34em; opacity: .8; }
.nav { display: flex; align-items: center; gap: 28px; font-size: 14px; font-weight: 550; }
.nav a { text-decoration: none; }
.nav a:not(.pill):hover { text-decoration: underline; text-underline-offset: 4px; }
.pill { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; padding: 0 22px; border: 0; border-radius: 999px; background: var(--cream); color: var(--ink);
  font-size: 14px; font-weight: 650; text-decoration: none; white-space: nowrap; cursor: pointer; transition: background .2s, color .2s, transform .2s; }
.pill:hover { background: var(--accent); color: var(--ink); }
.pill:active { transform: scale(.98); }

/* ---------- shared type ---------- */
.disp { margin: 0; font-family: var(--display); font-weight: 900; line-height: .8; letter-spacing: -.005em; text-transform: uppercase; }
.two { color: var(--accent); }
.eyebrow { margin: 0; font-size: 12px; font-weight: 650; letter-spacing: .24em; text-transform: uppercase; }
.eyebrow span { display: inline-block; margin-right: 8px; padding: 2px 8px; border: 1px solid currentColor; border-radius: 999px; letter-spacing: .06em; }
.lede { margin: 0; max-width: 40ch; font-size: clamp(15px, 1.2vw, 18px); line-height: 1.5; }
.text-link { display: inline-flex; align-items: center; gap: 8px; padding-bottom: 2px; border-bottom: 1px solid rgba(243, 232, 210, .4); font-size: 14px; font-weight: 600; text-decoration: none; }
.text-link:hover { border-color: currentColor; }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 24px; }
.fine { margin: 0; font-size: 12.5px; opacity: .7; }

/* ---------- stages: the frame box ----------
   Frames are drawn on the canvas with "cover" fit, centred. .fbox is a box of the frame's own shape laid out the
   same way, so type and cutouts inside it land on the same pixels at every screen size. Its stage (the pinned
   layer, or a still panel) is a size container, so cqw/cqh below are the stage's width and height. */
.intro .mxs-sticky, .cup { container-type: size; }
.fbox { position: absolute; left: 50%; top: 50%; width: max(100cqw, 177.778cqh); aspect-ratio: 16 / 9; transform: translate(-50%, -50%); container-type: inline-size; pointer-events: none; }
.fbox .cut, .fbox .cut img { position: absolute; inset: 0; width: 100%; height: 100%; }
@media (max-aspect-ratio: 9/10) {
  .fbox { width: max(100cqw, 56.25cqh); aspect-ratio: 9 / 16; }
}

/* ---------- 1. opening film ----------
   still layout first (no JS, reduced motion, data saver, missing frames): the hero frame with its headline */
.intro { position: relative; height: 100vh; height: 100svh; overflow: hidden; background: var(--roast); }
.intro .mxs-sticky { position: absolute; inset: 0; overflow: hidden; }
.intro .poster, .intro .mxs-canvas, .intro .open, .intro .mxs-loading { display: none; }
.intro .still, .intro .still img, .intro .poster img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.scrim { position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(180deg, rgba(18, 11, 7, .62), transparent 26%), linear-gradient(0deg, rgba(18, 11, 7, .8), transparent 44%); }
/* the headline's bottom tucks just under the cup's rim (rim at 36% of the frame's height on wide frames, 42% on tall) */
.h1 { position: absolute; left: 0; right: 0; bottom: 60.5%; text-align: center; font-size: min(11cqw, 15cqh, 17vw); color: var(--cream);
  text-shadow: 0 2px 30px rgba(14, 9, 6, .45); }
.h1 span { display: block; }
.h1 .two { color: var(--accent); }
.hero-foot { position: absolute; z-index: 2; left: var(--side); bottom: max(28px, 5vh); display: grid; gap: 16px; width: min(380px, 27vw); }
.hero-foot .lede { text-shadow: 0 1px 14px rgba(14, 9, 6, .6); }
@media (max-aspect-ratio: 9/10) {
  .h1 { bottom: 55%; font-size: min(18.6cqw, 18.5vw, 11cqh); }
}

/* film layout: pinned while the forest grows */
.film .intro:not(.mxs-static) { height: auto; overflow: visible; }
.film .intro:not(.mxs-static) .mxs-sticky { position: sticky; top: 0; height: 100vh; height: 100svh; }
.film .intro:not(.mxs-static) .poster, .film .intro:not(.mxs-static) .mxs-canvas { display: block; position: absolute; inset: 0; width: 100%; height: 100%; }
.film .intro:not(.mxs-static) .still { display: none; }
.film .intro:not(.mxs-static) .mxs-canvas { opacity: 0; transition: opacity .35s; }
.film .intro.mxs-ready .mxs-canvas { opacity: 1; }
.film .intro:not(.mxs-static) .scrim { opacity: var(--mxs-pos, 0); }
.film .intro:not(.mxs-static) .headline { opacity: 0; }
.film .intro:not(.mxs-static) .mxs-step { opacity: 0; visibility: hidden; will-change: opacity; }
.film .intro:not(.mxs-static) .mxs-step[data-step="0"] { opacity: 1; visibility: visible; }
.film .intro:not(.mxs-static) .open { display: block; position: absolute; inset: 0; z-index: 2; pointer-events: none; }
.open .eyebrow { position: absolute; left: var(--side); right: var(--side); top: calc(var(--top-h) + 3.5vh); text-align: center; }
.open .cue { position: absolute; left: 0; right: 0; bottom: max(26px, 5vh); margin: 0; text-align: center; font-size: 12px; font-weight: 650; letter-spacing: .22em; text-transform: uppercase; }
.open .cue span { display: inline-block; animation: nudge 1.8s ease-in-out infinite; }
@keyframes nudge { 50% { transform: translateY(5px); } }
.mxs-loading { position: absolute; z-index: 3; right: var(--side); top: calc(var(--top-h) + 14px); font-size: 11px; opacity: .8; }
.film .intro:not(.mxs-static) .mxs-loading, .film .cups:not(.mxs-static) .mxs-loading { display: block; }

/* ---------- 2. farms ---------- */
.farms { position: relative; display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); align-items: center; min-height: 100vh; min-height: 100svh;
  padding: calc(var(--top-h) + 40px) var(--side) 80px; background: var(--roast); overflow: hidden; }
.farms-copy { position: relative; z-index: 1; display: grid; gap: 26px; max-width: 760px; }
.farms .eyebrow, .visit .eyebrow { color: var(--accent); }
.farms h2 { font-size: clamp(68px, 9.4vw, 160px); }
.farms h2 .two { display: block; }
.facts { list-style: none; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; margin: 8px 0 0; padding: 0; max-width: 640px; }
.facts li { padding-top: 12px; border-top: 1px solid rgba(243, 232, 210, .25); font-size: 14px; line-height: 1.4; opacity: .9; }
.facts b { display: block; margin-bottom: 4px; font-family: var(--display); font-size: clamp(32px, 3vw, 46px); font-weight: 900; line-height: 1; color: var(--accent); }
.art { position: absolute; z-index: 0; width: auto; max-width: none; pointer-events: none; }
.art-farms { right: 4vw; bottom: -4%; height: 104%; }

/* ---------- 3. four cups ----------
   still layout first: one full-height panel per cup, each its own frame, word and cutout */
.cups { position: relative; background: var(--night); }
.cups .poster, .cups .mxs-canvas, .cup-nav, .mxs-watch, .mxs-hint, .cups .mxs-loading { display: none; }
.cups-title { position: absolute; z-index: 4; left: var(--side); top: calc(var(--top-h) + 18px); padding: 8px 14px; border-radius: 999px; background: var(--glass); color: var(--cream);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
.cup { position: relative; height: 100vh; height: 100svh; min-height: 600px; overflow: hidden; background: var(--bg); color: var(--fg, var(--cream)); --word: var(--cream); }
.cup.light { --fg: var(--ink); --word: var(--ink); }
.cup .still, .cup .still img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
/* the flavour name sits behind the cup and its swirl; its bottom meets the cup's rim (40% of the frame's height) */
.word { position: absolute; left: 0; right: 0; bottom: 57%; text-align: center; font-size: min(calc(84vw / (var(--chars, 7) * .48)), 30cqh); color: var(--word); }
.copy { position: absolute; z-index: 2; left: var(--side); bottom: max(36px, 7vh); display: grid; justify-items: start; gap: 12px; width: min(340px, 24vw); }
.copy h3 { margin: 0; font-size: clamp(22px, 2vw, 30px); font-weight: 650; line-height: 1.1; letter-spacing: -.01em; }
.copy .lede { font-size: 15px; }
.notes { margin: 0; font-size: 11px; font-weight: 650; letter-spacing: .2em; text-transform: uppercase; opacity: .8; }
.cup .pill { margin-top: 4px; }
.cup.light .pill { background: var(--ink); color: var(--cream); }
.cup.light .pill:hover { background: var(--night); color: var(--accent); }
@media (max-aspect-ratio: 9/10) {
  /* phones: the square sits in the top half; its rim is at 31% of the frame's height */
  .word { bottom: 66%; font-size: min(calc(90vw / (var(--chars, 7) * .48)), 13cqh); }
  .copy { right: var(--side); width: auto; bottom: 84px; gap: 9px; }
  .hero-foot { width: auto; right: var(--side); }
  .copy h3 { font-size: 22px; }
  .copy .lede { font-size: 14.5px; }
}
@media (max-aspect-ratio: 9/10) and (max-height: 720px) {
  .copy .notes { display: none; }
  .copy .lede { font-size: 14px; line-height: 1.4; }
}

/* film layout: one pinned stage, the canvas plays the cups and each caption fades in at its stop */
.film .cups:not(.mxs-static) .mxs-sticky { position: sticky; top: 0; height: 100vh; height: 100svh; overflow: hidden; container-type: size; }
.film .cups:not(.mxs-static) .poster, .film .cups:not(.mxs-static) .mxs-canvas { display: block; position: absolute; inset: 0; width: 100%; height: 100%; }
.film .cups:not(.mxs-static) .poster img { width: 100%; height: 100%; object-fit: cover; }
.film .cups:not(.mxs-static) .mxs-canvas { opacity: 0; transition: opacity .35s; }
.film .cups.mxs-ready .mxs-canvas { opacity: 1; }
.film .cups:not(.mxs-static) .cup { position: absolute; inset: 0; height: auto; min-height: 0; background: none; container-type: normal;
  opacity: 0; visibility: hidden; will-change: opacity; pointer-events: none; }
.film .cups:not(.mxs-static) .cup[data-step="0"] { opacity: 1; visibility: visible; }
.film .cups:not(.mxs-static) .cup .still { display: none; }
.film .cups:not(.mxs-static) .cup a { pointer-events: auto; }

.film .cups:not(.mxs-static) .cup-nav { display: flex; position: absolute; z-index: 4; right: var(--side); bottom: max(36px, 7vh); gap: 6px; padding: 6px; border-radius: 999px;
  background: var(--glass); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
.cup-nav a { --on: clamp(0, 1 - max(var(--mxs-pos, 0) - var(--k), var(--k) - var(--mxs-pos, 0)) * 2, 1);
  display: grid; place-items: center; min-width: 48px; min-height: 36px; padding: 0 12px; border-radius: 999px; font-size: 13px; font-weight: 650; text-decoration: none;
  background: rgba(243, 232, 210, calc(var(--on) * .95)); color: color-mix(in srgb, var(--ink) calc(var(--on) * 100%), var(--cream)); }
.film .cups:not(.mxs-static) .mxs-watch { display: inline-flex; position: absolute; z-index: 4; right: var(--side); bottom: calc(max(36px, 7vh) + 62px); align-items: center; gap: 8px;
  min-height: 40px; padding: 0 16px; border: 0; border-radius: 999px; background: var(--glass); color: var(--cream); font-size: 13px; font-weight: 600; cursor: pointer;
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
.mxs-watch span { font-size: 9px; }
.film .cups.mxs-playing .mxs-watch { opacity: 0; pointer-events: none; }
.film .cups:not(.mxs-static) .mxs-hint { display: block; position: absolute; z-index: 4; right: var(--side); bottom: calc(max(36px, 7vh) + 72px); margin: 0; padding: 6px 12px;
  border-radius: 999px; background: var(--glass); font-size: 12px; opacity: 0; transition: opacity .3s; pointer-events: none; }
.film .cups.mxs-playing .mxs-hint { opacity: 1; }
@media (max-aspect-ratio: 9/10) {
  .film .cups:not(.mxs-static) .cup-nav { left: var(--side); right: auto; bottom: 18px; }
  .film .cups:not(.mxs-static) .mxs-watch { right: var(--side); top: calc(var(--top-h) + 16px); bottom: auto; }
  .film .cups:not(.mxs-static) .mxs-hint { right: auto; left: var(--side); top: calc(var(--top-h) + 64px); bottom: auto; }
  .cup-nav a { min-width: 44px; }
}

/* ---------- 4. visit ---------- */
.visit { position: relative; display: grid; place-items: center; min-height: 100vh; min-height: 100svh; padding: calc(var(--top-h) + 40px) var(--side) 90px; overflow: hidden; background: var(--night); }
.visit-copy { position: relative; z-index: 1; display: grid; justify-items: center; gap: 24px; max-width: 760px; text-align: center; }
.visit h2 { font-size: clamp(56px, 8.2vw, 150px); }
.visit h2 .two { display: block; }
.hours { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 32px; width: min(620px, 100%); margin: 6px 0 8px; text-align: left; }
.hours div { display: grid; gap: 2px; padding: 12px 0; border-top: 1px solid rgba(243, 232, 210, .2); }
.hours dt { font-size: 11px; font-weight: 650; letter-spacing: .2em; text-transform: uppercase; color: var(--accent); }
.hours dd { margin: 0; font-size: 15px; }
.art-left { left: -7vw; bottom: -6%; height: 80%; }
.art-right { right: -8vw; top: -4%; height: 80%; }

/* ---------- footer ---------- */
.foot { display: flex; flex-wrap: wrap; align-items: center; gap: 18px 40px; padding: 36px var(--side) 44px; border-top: 1px solid rgba(243, 232, 210, .14); background: var(--night); font-size: 14px; }
.foot .logo { margin-right: 0; font-size: 24px; }
.foot p { flex: 1 1 320px; margin: 0; opacity: .8; }

/* ---------- small screens ---------- */
@media (max-width: 760px) {
  :root { --top-h: 84px; }
  .wide-only { display: none; }
  .bar { gap: 14px; padding: 10px var(--side); }
  .logo { font-size: 24px; }
  .nav { gap: 16px; }
  .nav-cta { min-height: 40px; padding: 0 16px; }
  .farms { grid-template-columns: 1fr; align-items: end; padding-top: calc(var(--top-h) + 30vh); }
  .art-farms { right: -18vw; top: calc(var(--top-h) - 10px); bottom: auto; height: 46vh; opacity: .9; }
  .facts { grid-template-columns: 1fr 1fr 1fr; gap: 12px; }
  .facts li { font-size: 13px; }
  .hours { grid-template-columns: 1fr; }
  .visit { padding-bottom: 34vh; }
  .art-left { left: -20vw; bottom: -4%; height: 34vh; }
  .art-right { right: -30vw; top: calc(var(--top-h) - 30px); height: 30vh; opacity: .5; }
}

@media (prefers-reduced-motion: reduce) {
  .open .cue span { animation: none; }
  .pill, .bar { transition: none; }
}
