/* ==========================================================================
   Rafter & Rose — preview site
   Cinematic laneway: warm near-black, cream, dusty rose, lamp brass.
   Instrument Serif (italic) for display, Hanken Grotesk for reading.
   ========================================================================== */

:root {
  --ink: #15100c;
  --ink-2: #1e1712;
  --ink-3: #2a2019;
  --cream: #f5ede2;
  --cream-2: #e9dccb;
  --muted: rgba(245, 237, 226, .7);
  --line: rgba(245, 237, 226, .14);
  --rose: #c98a83;
  --rose-deep: #a9665f;
  --rose-soft: #e7b7ad;
  --brass: #d9a95f;

  --f-display: "Instrument Serif", "Iowan Old Style", Georgia, serif;
  --f-body: "Hanken Grotesk", "Helvetica Neue", Arial, sans-serif;

  --pad: clamp(18px, 5vw, 64px);
  --max: 1180px;
  --r: 18px;
  --out: cubic-bezier(.16, 1, .3, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 24px; }
body {
  margin: 0;
  background: var(--ink);
  color: var(--cream);
  font-family: var(--f-body);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
  padding-bottom: 76px; /* room for the phone dock */
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
h1, h2, h3, p { margin: 0; }
h2, h3, .hero__lede { text-wrap: balance; }
p { text-wrap: pretty; }
a[href^="tel:"] { white-space: nowrap; }
:focus-visible { outline: 2px solid var(--brass); outline-offset: 3px; border-radius: 6px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

/* --- shared type --- */
.eyebrow {
  font-size: 12px; font-weight: 600; letter-spacing: .2em; text-transform: uppercase;
  color: rgba(245, 237, 226, .86);
}
.eyebrow i { font-style: normal; color: var(--rose-soft); padding: 0 .3em; }
.eyebrow--rose { color: var(--rose-soft); margin-bottom: 14px; }
.h2 {
  font-family: var(--f-display); font-weight: 400;
  font-size: clamp(36px, 6.4vw, 64px); line-height: 1.02; letter-spacing: -.01em;
}
.h2 em, .h3 em { font-style: italic; color: var(--rose-soft); }
.h3 { font-family: var(--f-display); font-weight: 400; font-size: clamp(28px, 4vw, 38px); line-height: 1.05; }
.fine { font-size: 14px; color: var(--muted); }

/* --- buttons --- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  min-height: 52px; padding: 0 26px;
  border-radius: 999px;
  font-size: 16px; font-weight: 600; text-decoration: none;
  transition: transform .3s var(--out), background-color .3s, border-color .3s;
}
.btn svg { width: 18px; height: 18px; fill: currentColor; }
.btn:active { transform: scale(.97); }
.btn--rose { background: var(--rose); color: #23130f; }
.btn--rose:hover { background: var(--rose-soft); }
.btn--glass {
  background: rgba(245, 237, 226, .14); color: var(--cream);
  border: 1px solid rgba(245, 237, 226, .32);
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
}
.btn--glass:hover { background: rgba(245, 237, 226, .24); }
.btn--line { border: 1px solid rgba(245, 237, 226, .4); color: var(--cream); }
.btn--line:hover { border-color: var(--cream); }

/* --- nav (sits over the hero) --- */
.nav {
  position: absolute; z-index: 10; left: 0; right: 0; top: 0;
  display: flex; align-items: center; justify-content: space-between; gap: 20px;
  padding: 18px var(--pad);
}
.nav__logo {
  font-family: var(--f-display); font-style: italic; font-size: 26px; line-height: 1;
  text-decoration: none; color: var(--cream);
}
.nav__logo span, .foot__mark span, .hero__title .amp { color: var(--rose-soft); }
.nav__links { display: none; gap: 30px; font-size: 15px; }
.nav__links a { text-decoration: none; color: rgba(245, 237, 226, .88); position: relative; }
.nav__links a::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -4px; height: 1px;
  background: var(--rose-soft); transform: scaleX(0); transform-origin: left; transition: transform .4s var(--out);
}
.nav__links a:hover::after { transform: scaleX(1); }
@media (min-width: 761px) { .nav__links { display: flex; } }

/* --- hero --- */
.hero {
  position: relative; isolation: isolate;
  min-height: 100svh;
  display: flex; flex-direction: column; justify-content: flex-end; align-items: center;
  padding: 120px var(--pad) 104px;
  text-align: center;
  overflow: hidden;
}
/* the media layer shrinks into a rounded card as you scroll (--p: 0 → 1, set in main.js) */
.hero__media {
  position: absolute; inset: 0; z-index: -2; overflow: hidden;
  transform: scale(calc(1 - var(--p, 0) * .08)) translateY(calc(var(--p, 0) * 6%));
  border-radius: calc(var(--p, 0) * 40px);
  will-change: transform;
}
.hero__media picture, .hero__media img, .hero__video {
  position: absolute; inset: -3%; width: 106%; height: 106%;
  object-fit: cover; object-position: 50% 55%;
  transform: translate3d(var(--mx, 0px), var(--my, 0px), 0);
  transition: transform 1.2s var(--out);
}
.hero__media picture img { inset: 0; width: 100%; height: 100%; transform: none; transition: none; }
.hero__video { opacity: 0; transition: opacity 1.4s ease, transform 1.2s var(--out); }
.hero__video.is-playing { opacity: 1; }
.hero__shade {
  position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background:
    linear-gradient(180deg, rgba(13, 9, 7, .55) 0%, rgba(13, 9, 7, 0) 22%),
    linear-gradient(0deg, rgba(13, 9, 7, .92) 0%, rgba(13, 9, 7, .55) 34%, rgba(13, 9, 7, 0) 64%);
}
/* a warm lamp glow that follows the pointer */
.hero__glow {
  position: absolute; inset: 0; z-index: -1; pointer-events: none; mix-blend-mode: soft-light;
  background: radial-gradient(420px circle at var(--gx, 50%) var(--gy, 40%), rgba(255, 196, 120, .55), transparent 65%);
  opacity: 0; transition: opacity .6s ease;
}
.hero:hover .hero__glow { opacity: 1; }
@media (hover: none) { .hero__glow { display: none; } }

.hero__body { max-width: 860px; transform: translateY(calc(var(--p, 0) * -60px)); opacity: calc(1 - var(--p, 0) * 1.4); }
.hero__title {
  margin: 14px 0 12px;
  font-family: var(--f-display); font-style: italic; font-weight: 400;
  font-size: clamp(64px, 17vw, 176px); line-height: .9; letter-spacing: -.02em;
  text-shadow: 0 6px 40px rgba(0, 0, 0, .45);
}
.hero__title .amp { color: var(--rose-soft); display: inline-block; }
.hero__title .ch { display: inline-block; transition: transform .6s var(--out), color .6s; }
.hero__title .ch:hover { transform: translateY(-.08em) rotate(-3deg); color: var(--rose-soft); }
.hero__lede { font-size: clamp(17px, 2.2vw, 21px); color: rgba(245, 237, 226, .92); }
.hero__actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: 28px; }
.badge {
  position: absolute; bottom: 24px;
  display: inline-flex; align-items: center; gap: 7px;
  padding: 8px 14px; border-radius: 999px;
  background: rgba(13, 9, 7, .5); border: 1px solid rgba(245, 237, 226, .22);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  font-size: 13px; text-decoration: none; color: var(--cream);
}
.badge svg { width: 15px; height: 15px; fill: var(--rose-soft); }
.badge .star { color: var(--brass); }
.badge__muted { color: var(--muted); }
.badge--left { left: var(--pad); }
.badge--right { right: var(--pad); }
.scroll-cue {
  position: absolute; bottom: 24px; left: 50%; translate: -50% 0;
  width: 26px; height: 42px; border: 1.5px solid rgba(245, 237, 226, .45); border-radius: 20px;
}
.scroll-cue span {
  position: absolute; left: 50%; top: 8px; width: 3px; height: 8px; margin-left: -1.5px;
  border-radius: 2px; background: var(--cream); animation: cue 2s var(--out) infinite;
}
@keyframes cue { 0% { opacity: 0; transform: translateY(0); } 30% { opacity: 1; } 80%, 100% { opacity: 0; transform: translateY(14px); } }
@media (max-width: 760px) {
  .hero { padding-bottom: 96px; }
  .hero__actions .btn { flex: 1 1 100%; max-width: 340px; }
  .badge { bottom: 28px; font-size: 12px; padding: 7px 12px; }
  .badge__muted { display: none; }
  .badge--left { left: 16px; } .badge--right { right: 16px; }
  .scroll-cue { display: none; }
}

/* --- opening sequence --- */
.intro {
  position: fixed; inset: 0; z-index: 100;
  display: grid; place-content: center; justify-items: center; gap: 18px;
  background: var(--ink);
  transition: clip-path 1.1s cubic-bezier(.76, 0, .24, 1), visibility 0s linear 1.1s;
  clip-path: inset(0 0 0 0);
}
.intro__mark {
  font-family: var(--f-display); font-style: italic; font-size: clamp(44px, 10vw, 84px); line-height: 1; color: var(--cream);
}
.intro__mark span, .intro__mark em { display: inline-block; opacity: 0; transform: translateY(.4em); filter: blur(8px); animation: ink .9s var(--out) forwards; }
.intro__mark em { color: var(--rose-soft); animation-delay: .18s; }
.intro__mark span:last-child { animation-delay: .32s; }
@keyframes ink { to { opacity: 1; transform: none; filter: blur(0); } }
.intro__line { width: 120px; height: 1px; background: var(--rose-soft); transform: scaleX(0); animation: line 1s var(--out) .45s forwards; }
@keyframes line { to { transform: scaleX(1); } }
.is-ready .intro { clip-path: inset(0 0 100% 0); visibility: hidden; }
html:not(.js) .intro { display: none; }

/* hero pieces wait for the curtain, then rise in turn */
.js .hero__body > *, .js .nav, .js .badge, .js .scroll-cue { opacity: 0; }
.js .hero__title .ch, .js .hero__title .amp { opacity: 0; transform: translateY(.5em) rotate(4deg); }
.is-ready .hero__body > *, .is-ready .nav, .is-ready .badge, .is-ready .scroll-cue { animation: rise 1.1s var(--out) forwards; }
.is-ready .hero__body > :nth-child(1) { animation-delay: .55s; }
.is-ready .hero__body > :nth-child(2) { animation-delay: .5s; opacity: 1; animation: none; }
.is-ready .hero__body > :nth-child(3) { animation-delay: 1.15s; }
.is-ready .hero__body > :nth-child(4) { animation-delay: 1.3s; }
.is-ready .nav { animation-delay: 1.4s; }
.is-ready .badge, .is-ready .scroll-cue { animation-delay: 1.6s; }
.is-ready .hero__title .ch, .is-ready .hero__title .amp {
  animation: letter 1.1s var(--out) forwards; animation-delay: calc(.6s + var(--i, 0) * 45ms);
}
@keyframes rise { from { opacity: 0; transform: translateY(22px); } to { opacity: 1; transform: none; } }
@keyframes letter { to { opacity: 1; transform: none; } }
.hero__media { animation: settle 2.6s var(--out) .3s both; }
@keyframes settle { from { scale: 1.12; } to { scale: 1; } }

@media (prefers-reduced-motion: reduce) {
  .intro { display: none; }
  .js .hero__body > *, .js .nav, .js .badge, .js .scroll-cue, .js .hero__title .ch, .js .hero__title .amp { opacity: 1; transform: none; animation: none !important; }
  .hero__media { animation: none; }
  .hero__video { display: none; }
}

/* --- reveal on scroll --- */
.js .reveal { opacity: 0; transform: translateY(26px); transition: opacity 1s var(--out), transform 1s var(--out); }
.js .reveal.is-in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .js .reveal { opacity: 1; transform: none; transition: none; } }

/* --- story --- */
.story {
  max-width: var(--max); margin: 0 auto;
  padding: clamp(72px, 12vw, 140px) var(--pad);
  display: grid; gap: 40px; align-items: center;
}
.story__text p:not(.eyebrow) { margin-top: 18px; color: var(--muted); max-width: 52ch; }
.story__text .h2 { max-width: 15ch; }
.story__photo { margin: 0; border-radius: 200px 200px var(--r) var(--r); overflow: hidden; aspect-ratio: 4 / 5; }
.story__photo img { width: 100%; height: 100%; object-fit: cover; }
@media (min-width: 861px) { .story { grid-template-columns: 1.1fr .9fr; gap: 80px; } }

/* --- baked here --- */
.baked { background: var(--ink-2); padding: clamp(72px, 11vw, 130px) 0; }
.section-head { max-width: var(--max); margin: 0 auto 40px; padding: 0 var(--pad); }
.cards {
  max-width: var(--max); margin: 0 auto; padding: 0 var(--pad);
  display: grid; gap: 18px; grid-template-columns: repeat(2, 1fr);
}
.card { background: var(--ink-3); border-radius: var(--r); overflow: hidden; }
.card img { aspect-ratio: 4 / 5; width: 100%; object-fit: cover; transition: transform 1.2s var(--out); }
.card:hover img { transform: scale(1.05); }
.card__body { padding: 16px 16px 20px; }
.card h3 { font-family: var(--f-display); font-weight: 400; font-size: 26px; line-height: 1.1; }
.card p { margin-top: 6px; font-size: 15px; color: var(--muted); }
@media (min-width: 900px) { .cards { grid-template-columns: repeat(4, 1fr); gap: 22px; } }
@media (max-width: 420px) { .card h3 { font-size: 22px; } .card p { font-size: 14px; } }

/* --- coffee + dogs --- */
.duo {
  max-width: var(--max); margin: 0 auto;
  padding: clamp(72px, 11vw, 130px) var(--pad);
  display: grid; gap: 22px;
}
.duo__item { position: relative; border-radius: var(--r); overflow: hidden; min-height: 460px; display: flex; align-items: flex-end; }
.duo__item img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.duo__item::after { content: ""; position: absolute; inset: 0; background: linear-gradient(0deg, rgba(13, 9, 7, .92) 0%, rgba(13, 9, 7, .2) 55%, rgba(13, 9, 7, 0) 100%); }
.duo__copy { position: relative; z-index: 1; padding: 28px; }
.duo__copy p:last-child { margin-top: 10px; color: rgba(245, 237, 226, .82); max-width: 40ch; }
@media (min-width: 861px) { .duo { grid-template-columns: 1fr 1fr; } .duo__item { min-height: 560px; } }

/* --- hours --- */
.hours {
  position: relative; padding: clamp(72px, 11vw, 130px) var(--pad);
  background:
    radial-gradient(60% 50% at 50% 0%, rgba(217, 169, 95, .16), transparent 70%),
    var(--ink-2);
}
.hours__inner { max-width: 640px; margin: 0 auto; text-align: center; }
.hours__status {
  display: inline-flex; align-items: center; gap: 8px; margin: 22px 0 8px;
  padding: 7px 14px; border-radius: 999px; font-size: 14px; font-weight: 600;
  background: rgba(245, 237, 226, .08); border: 1px solid var(--line);
}
.hours__status:empty { display: none; }
.hours__status::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--muted); }
.hours__status.is-open::before { background: #8fd18b; box-shadow: 0 0 0 4px rgba(143, 209, 139, .18); }
.hours__table { width: 100%; margin: 18px 0 16px; border-collapse: collapse; font-size: 17px; }
.hours__table th, .hours__table td { padding: 14px 6px; border-bottom: 1px solid var(--line); }
.hours__table th { text-align: left; font-weight: 500; }
.hours__table td { text-align: right; color: var(--muted); font-variant-numeric: tabular-nums; }
.hours__table tr.is-today th, .hours__table tr.is-today td { color: var(--rose-soft); font-weight: 600; }

/* --- gallery --- */
.gallery {
  display: grid; grid-auto-flow: column; grid-auto-columns: 78%; gap: 12px;
  overflow-x: auto; scroll-snap-type: x mandatory; padding: 0 var(--pad) 4px;
  scrollbar-width: none;
}
.gallery::-webkit-scrollbar { display: none; }
.gallery img { scroll-snap-align: center; border-radius: var(--r); aspect-ratio: 4 / 5; width: 100%; object-fit: cover; }
@media (min-width: 861px) {
  .gallery { grid-auto-flow: row; grid-template-columns: repeat(3, 1fr); overflow: visible; max-width: var(--max); margin: 0 auto; }
  .gallery img:nth-child(2) { transform: translateY(40px); }
  .js .gallery img.reveal:nth-child(2) { transform: translateY(66px); }
  .js .gallery img.reveal.is-in:nth-child(2) { transform: translateY(40px); }
}

/* --- visit --- */
.visit {
  max-width: var(--max); margin: 0 auto;
  padding: clamp(96px, 13vw, 160px) var(--pad) clamp(72px, 10vw, 120px);
  display: grid; gap: 36px; align-items: center;
}
.visit__info p:not(.eyebrow) { margin-top: 16px; color: var(--muted); max-width: 44ch; }
.visit__actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.visit__map { border-radius: var(--r); overflow: hidden; border: 1px solid var(--line); aspect-ratio: 4 / 3.4; background: var(--ink-3); }
.visit__map iframe { width: 100%; height: 100%; border: 0; filter: grayscale(.35) sepia(.15) contrast(1.02); }
@media (min-width: 861px) { .visit { grid-template-columns: .9fr 1.1fr; gap: 64px; } }
@media (max-width: 760px) { .visit__actions .btn { flex: 1 1 100%; } }

/* --- footer --- */
.foot { padding: 48px var(--pad) 36px; text-align: center; border-top: 1px solid var(--line); color: var(--muted); font-size: 15px; }
.foot__mark { font-family: var(--f-display); font-style: italic; font-size: 34px; color: var(--cream); margin-bottom: 8px; }
.foot a { text-decoration: none; }
.foot__note { max-width: 520px; margin: 18px auto 0; font-size: 13px; color: rgba(245, 237, 226, .55); }

/* --- phone dock --- */
.dock {
  position: fixed; z-index: 30; left: 12px; right: 12px; bottom: calc(12px + env(safe-area-inset-bottom));
  display: grid; grid-template-columns: 1fr 1fr; gap: 8px;
  padding: 8px; border-radius: 999px;
  background: rgba(21, 16, 12, .82); border: 1px solid var(--line);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  transform: translateY(140%); transition: transform .5s var(--out);
}
.dock.is-shown { transform: none; }
.dock a {
  display: flex; align-items: center; justify-content: center; min-height: 46px;
  border-radius: 999px; font-weight: 600; text-decoration: none; font-size: 15px;
}
.dock a:first-child { background: var(--rose); color: #23130f; }
.dock a:last-child { background: rgba(245, 237, 226, .1); }
@media (min-width: 761px) { .dock { display: none; } body { padding-bottom: 0; } }
