/* the crumble — homepage */

html { scroll-padding-top: 72px; }
.page .hero { overflow: clip; }
.container { max-width: var(--container-max); margin: 0 auto; }

/* ---------- 01 hero ---------- */
.hero { position: relative; isolation: isolate; height: min(calc(100svh - 72px), 960px); min-height: 600px; color: var(--ink-on-photo); background: var(--cup-cocoa); view-timeline: --hero block; }
.hero__parallax { position: absolute; top: 0; bottom: 0; left: 0; right: -26%; z-index: -2; }
.hero__intro { position: absolute; inset: 0; overflow: clip; }
.page .hero__img { width: 100%; height: 100%; max-width: none; object-fit: cover; object-position: 50% 30%; transform-origin: 62% 38%; }
.hero__scrim { position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: linear-gradient(to top, rgba(28, 18, 11, .74) 0%, rgba(28, 18, 11, .46) 34%, rgba(28, 18, 11, .08) 70%, rgba(28, 18, 11, 0) 100%), linear-gradient(to right, rgba(28, 18, 11, .42) 0%, rgba(28, 18, 11, 0) 58%); }
.hero__content { position: absolute; inset: 0; display: flex; align-items: flex-end; padding: 0 var(--gutter) 88px; }
.hero__inner { width: 100%; max-width: var(--container-max); margin: 0 auto; }
.hero__title { margin: 0; font: 800 clamp(56px, 7.6vw, 112px)/.95 var(--font-sans); letter-spacing: -.03em; }
.hero__title span { display: block; }
.hero__rule { width: min(300px, 60%); height: 2px; margin: 32px 0 24px; border: 0; border-radius: var(--radius-pill); background: var(--ink-on-photo); transform-origin: left center; }
.hero__lead { margin: 0 0 32px; max-width: 32ch; font: 500 20px/30px var(--font-sans); }
.hero__actions { display: flex; flex-wrap: wrap; gap: 16px; }
.hero__cue { position: absolute; right: var(--gutter); bottom: 88px; width: 2px; height: 72px; border-radius: var(--radius-pill); background: rgba(255, 255, 255, .28); overflow: clip; }
.hero__cue span { display: block; width: 100%; height: 40%; border-radius: inherit; background: var(--ink-on-photo); }

/* ai marker: present, but quiet */
.sig-media, .layer__frame { position: relative; }
.ai-tag { position: absolute; right: 10px; bottom: 10px; z-index: 2; padding: 1px 7px; border-radius: var(--radius-pill); background: rgba(28, 18, 11, .28);
  color: rgba(255, 255, 255, .8); font: 600 10px/16px var(--font-sans); letter-spacing: .02em; white-space: nowrap; pointer-events: none;
  -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); }
.hero .ai-tag { right: var(--gutter); bottom: 20px; }

/* ---------- section heads ---------- */
.band__head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 24px 40px; margin-bottom: 56px; }
.page .band__head .tc-section-title { margin-bottom: 0; }
.band__lead { margin: 16px 0 0; font: 500 20px/30px var(--font-sans); }

/* ---------- 02 signatures ---------- */
.sig-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 48px; }
.page .sig-card { padding: 12px 12px 24px; gap: 20px; }
.sig-media { overflow: clip; border-radius: var(--radius-sm); }
.page .sig-media .tc-card__media { border-radius: 0; transition: scale .9s var(--ease); }
.sig-card:hover .sig-media .tc-card__media { scale: 1.035; }
.page .sig-card .tc-card__body { gap: 6px; padding: 0 8px; }
.page .sig-card .tc-card__title { font-size: 22px; line-height: 28px; }

/* ---------- 03 made in layers ---------- */
.layers__intro { max-width: 680px; margin-bottom: 56px; }
.layers__sub { margin: 0; font: 500 20px/30px var(--font-sans); color: var(--ink-muted); }
.layers__grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 40px 24px; margin: 0; padding: 0; list-style: none; }
.layer__frame { aspect-ratio: 4 / 5; border-radius: var(--radius-sm); overflow: clip; background: var(--surface-raised); }
.page .layer__frame img { width: 100%; height: 100%; max-width: none; object-fit: cover; scale: 1.14; transform-origin: 50% 55%; }
.layer__caption { margin-top: 16px; }
.layer__num { display: block; font: 800 13px/16px var(--font-sans); letter-spacing: .12em; color: var(--brand); }
.layer__name { margin: 8px 0 4px; font: 700 20px/26px var(--font-sans); }
.layer__desc { margin: 0; font: 400 14px/22px var(--font-sans); color: var(--ink-muted); }

/* ---------- 04 better together ---------- */
.together__grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 80px; align-items: start; }
.together__text { position: sticky; top: 136px; }
.together__media { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; margin: 0; padding: 0 0 96px; list-style: none; }
.together__photo { --rad: 8px; aspect-ratio: 4 / 5; border-radius: var(--radius-sm); overflow: clip; background: var(--surface-sand); }
.together__photo:nth-child(even) { transform: translateY(96px); }
.page .together__photo img { width: 100%; height: 100%; max-width: none; object-fit: cover; }

/* ---------- 05 in good company ---------- */
.moments__aside { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
.moments__aside .tc-handle { margin-right: 8px; }
.moments__grid { display: grid; grid-auto-flow: column; grid-auto-columns: 300px; gap: 24px; margin: 0 calc(50% - 50vw) 0 0; padding: 0 var(--gutter) 4px 0;
  overflow-x: auto; scroll-snap-type: x mandatory; overscroll-behavior-x: contain; scrollbar-width: none; }
.moments__grid::-webkit-scrollbar { display: none; }
.moments__grid:focus-visible { outline: var(--border-outline) solid var(--focus); outline-offset: 4px; border-radius: var(--radius-sm); }
.moment { margin: 0; scroll-snap-align: start; }
.moment__frame { aspect-ratio: 4 / 5; border-radius: var(--radius-sm); overflow: clip; background: var(--surface-sand); }
.page .moment__frame img { width: 100%; height: 100%; max-width: none; object-fit: cover; }
.moment figcaption { margin-top: 12px; font: 400 14px/22px var(--font-sans); color: var(--ink-muted); }
.moments__nav { display: flex; justify-content: flex-end; gap: 8px; margin-top: 24px; }
.moments__btn { display: inline-grid; place-items: center; width: 44px; height: 44px; padding: 0; border: var(--border-outline) solid var(--line); border-radius: var(--radius-pill);
  background: transparent; color: var(--ink); cursor: pointer; transition: background-color .2s ease-out, color .2s ease-out; }
.moments__btn:hover { background: var(--ink); color: var(--surface-blush); }
.moments__btn:focus-visible { outline: var(--border-outline) solid var(--focus); outline-offset: 2px; }

/* ---------- 06 come by ---------- */
.visit__grid { display: grid; grid-template-columns: minmax(0, 6fr) minmax(0, 5fr); gap: 96px; align-items: center; }
.visit__media { --rad: 999px 999px 8px 8px; width: 100%; max-width: 560px; aspect-ratio: 9 / 10; border-radius: var(--radius-pill) var(--radius-pill) var(--radius-sm) var(--radius-sm); overflow: clip; }
.page .visit__media img { width: 100%; height: 100%; max-width: none; object-fit: cover; object-position: 50% 50%; }
.visit__address { margin: 0; font: 700 28px/34px var(--font-sans); letter-spacing: -.005em; }
.page .visit__rule { margin: 32px 0; }
.page .visit__hours { margin-top: 10px; font: 400 16px/26px var(--font-sans); }
.visit__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 24px; margin-top: 40px; }

/* ---------- menu overlay ---------- */
.menu-layer { position: fixed; inset: 0; z-index: 60; }
.menu-backdrop { position: absolute; inset: 0; width: 100%; padding: 0; border: 0; background: rgba(28, 18, 11, .38); cursor: pointer; }
.page .menu-panel { position: absolute; top: 0; bottom: 0; left: 0; width: min(440px, 100%); min-height: 0; overflow-y: auto; }
.page .menu-panel .tc-logo { width: 88px; }

/* ---------- cookie notice (info only, closes with OK) ---------- */
.notice-spacer { background: var(--surface-inverse); }
.notice { position: fixed; left: var(--gutter); right: var(--gutter); bottom: 16px; z-index: 50; display: flex; justify-content: center; pointer-events: none; }
.notice__inner { pointer-events: auto; display: flex; align-items: center; gap: 16px 40px; width: 100%; max-width: 1080px; box-sizing: border-box; padding: 20px 20px 20px 28px;
  border: 1px solid rgba(255, 247, 235, .16); border-radius: var(--radius-lg); background: var(--surface-inverse); color: var(--ink-inverse); box-shadow: 0 18px 48px rgba(28, 18, 11, .28); }
.notice__text { flex: 1 1 auto; min-width: 0; }
.notice__title { margin: 0 0 4px; font: 800 15px/20px var(--font-sans); letter-spacing: .02em; color: var(--crumble-cream); }
.notice__body { margin: 0; max-width: 76ch; font: 400 15px/23px var(--font-sans); }
.notice__body a { color: var(--crumble-cream); font-weight: 700; text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 3px; }
.notice__body a:hover { text-decoration-thickness: 3px; }
.notice__body a:focus-visible { outline: var(--border-outline) solid var(--ink-inverse); outline-offset: 2px; border-radius: 2px; }
.page .notice__ok { flex: none; min-width: 112px; min-height: 48px; }

/* ---------- responsive ---------- */
@media (max-width: 1024px) {
  .layers__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .together__grid, .visit__grid { gap: 56px; }
}
@media (max-width: 860px) {
  .together__grid, .visit__grid { grid-template-columns: minmax(0, 1fr); }
  .visit__media { max-width: 100%; }
  .layers__grid, .moments__grid, .together__media { grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: 78%; gap: 16px; overflow-x: auto; scroll-snap-type: x mandatory;
    margin: 0 calc(var(--gutter) * -1); padding: 0 var(--gutter) 8px; scroll-padding-inline: var(--gutter); scrollbar-width: none; }
  .sig-grid { scroll-padding-inline: var(--gutter); }
  .layer, .moment, .moment--a, .moment--b, .together__photo { grid-column: auto; scroll-snap-align: start; }
  .together__photo:nth-child(even) { transform: none; }
  .together__text { position: static; }
  .moment--offset { margin-top: 0; }
  .moments__nav { display: none; }
}
@media (max-width: 760px) {
  .hero__parallax { right: 0; }
  .page .hero__img { object-position: 50% 40%; }
  .hero__content { padding-bottom: 56px; }
  .hero__lead { font-size: 18px; line-height: 28px; }
  .hero__cue { display: none; }
  .sig-grid { grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: 82%; gap: 16px; overflow-x: auto; scroll-snap-type: x mandatory;
    margin: 0 calc(var(--gutter) * -1); padding: 4px var(--gutter) 16px; scrollbar-width: none; }
  .sig-card { scroll-snap-align: center; }
  .band__head { margin-bottom: 32px; }
}
@media (max-width: 640px) {
  .page { --gutter: 16px; }
  .visit__address { font-size: 24px; line-height: 30px; }
  .notice { left: 12px; right: 12px; bottom: 12px; }
  .notice__inner { flex-direction: column; align-items: stretch; padding: 20px; }
  .page .notice__ok { width: 100%; }
}

/* ---------- motion: load ---------- */
@keyframes fadeUp { from { opacity: 0; transform: translate3d(0, 28px, 0); } to { opacity: 1; transform: none; } }
@keyframes riseIn { from { opacity: 0; transform: translate3d(0, 64px, 0); } to { opacity: 1; transform: none; } }
@keyframes fadeDown { from { opacity: 0; transform: translate3d(0, -14px, 0); } to { opacity: 1; transform: none; } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes slideIn { from { opacity: 0; transform: translate3d(-32px, 0, 0); } to { opacity: 1; transform: none; } }
@keyframes drawX { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@keyframes heroIntro { from { clip-path: inset(7% 5% 7% 5% round 28px); transform: scale(1.16); } to { clip-path: inset(0% 0% 0% 0% round 0px); transform: scale(1); } }
@keyframes kenBurns { from { transform: scale(1) translate3d(0, 0, 0); } to { transform: scale(1.07) translate3d(-1.5%, -1%, 0); } }
@keyframes cue { 0% { transform: translateY(-100%); } 70%, 100% { transform: translateY(260%); } }
@keyframes heroDrift { from { transform: translate3d(0, 0, 0); } to { transform: translate3d(0, 18%, 0); } }
@keyframes heroOut { from { opacity: 1; transform: none; } to { opacity: 0; transform: translate3d(0, -48px, 0); } }
@keyframes imgSettle { from { transform: scale(1.16); } to { transform: scale(1); } }
@keyframes clipUp { from { clip-path: inset(26% 0 0 0 round var(--rad, 8px)); } to { clip-path: inset(0 0 0 0 round var(--rad, 8px)); } }

@media (prefers-reduced-motion: no-preference) {
  html:has(.motion-on) { scroll-behavior: smooth; }
  .motion-on .site-header { animation: fadeDown 1s var(--ease) .1s both; }
  .motion-on .hero__intro { animation: heroIntro 2.2s var(--ease) both; }
  .motion-on .hero__img { animation: kenBurns 26s ease-in-out 2.2s infinite alternate both; }
  .motion-on .hero-in { animation: fadeUp 1.3s var(--ease) var(--d, .6s) both; }
  .motion-on .hero__rule { animation: drawX 1.4s var(--ease) 1s both; }
  .motion-on .hero__cue span { animation: cue 2.8s cubic-bezier(.65, 0, .35, 1) 2.4s infinite both; }
  .motion-on .menu-backdrop { animation: fadeIn .35s ease-out both; }
  .motion-on .menu-panel { animation: slideIn .5s var(--ease) both; }
  .motion-on .notice__inner { animation: fadeUp .8s var(--ease) .8s both; }
  .motion-on .tc-btn .arrow { display: inline-block; transition: transform .2s ease-out; }
  .motion-on .tc-btn:hover .arrow { transform: translateX(3px); }
}

/* ---------- motion: scroll-driven (Chrome, Edge, Safari 26+; elsewhere static) ---------- */
@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) {
    .motion-on .hero__parallax { animation: heroDrift linear both; animation-timeline: --hero; animation-range: exit 0% exit 100%; }
    .motion-on .hero__content { animation: heroOut linear both; animation-timeline: --hero; animation-range: exit 0% exit 55%; }

    .motion-on .reveal { animation: fadeUp linear both; animation-timeline: view(); animation-range: entry 0% cover 28%; }
    .motion-on .title-draw { view-timeline: --tl block; animation: fadeUp linear both; animation-timeline: view(); animation-range: entry 0% cover 25%; }
    .motion-on .title-draw::before { transform-origin: left center; animation: drawX linear both; animation-timeline: --tl; animation-range: entry 20% cover 40%; }

    .motion-on .sig-card { animation: riseIn linear both; animation-timeline: view(); animation-range: entry 0% cover 32%; }
    .motion-on .sig-card:nth-child(2) { animation-range: entry 10% cover 38%; }
    .motion-on .sig-card:nth-child(3) { animation-range: entry 20% cover 44%; }
    .motion-on .sig-media .tc-card__media { animation: imgSettle linear both; animation-timeline: view(); animation-range: entry 0% cover 50%; }

    .motion-on .layer { animation: riseIn linear both; animation-timeline: view(); animation-range: entry 0% cover 30%; }
    .motion-on .layer:nth-child(2) { animation-range: entry 8% cover 36%; }
    .motion-on .layer:nth-child(3) { animation-range: entry 16% cover 42%; }
    .motion-on .layer:nth-child(4) { animation-range: entry 24% cover 48%; }
    .motion-on .layer__frame img { animation: imgSettle linear both; animation-timeline: view(); animation-range: entry 0% cover 50%; }

    .motion-on .clip-reveal { animation: clipUp linear both; animation-timeline: view(); animation-range: entry 0% cover 40%; }
    .motion-on .clip-reveal img { animation: imgSettle linear both; animation-timeline: view(); animation-range: entry 0% cover 55%; }

    .motion-on .moment { animation: riseIn linear both; animation-timeline: view(); animation-range: entry 0% cover 30%; }
    .motion-on .moment:nth-child(3n+2) { animation-range: entry 10% cover 36%; }
    .motion-on .moment:nth-child(3n) { animation-range: entry 20% cover 42%; }
    .motion-on .moment__frame img { animation: imgSettle linear both; animation-timeline: view(); animation-range: entry 0% cover 50%; }
  }
}
