/* ==========================================================================
   Homepage (design B) — Linh's specs "Home: Slow hands", "Home: Experiences (Sei / Jaku)",
   "Home: About" (10–12 Nov 2026). Values for a 390px phone; column 560px from 768px.
   Notes: docs/home-spec-notes.md. The hero is in wabi.css, the closing words in footer.css.
   ========================================================================== */
.design-b.home {
	--hm-cream: #EFE9DF;
	--hm-paper: #F4EFE6;
	--hm-navy: #0E1A24;
	--hm-copper: #7A5C28;
	--hm-gold: #B89B5E;
	--hm-serif: 'Cormorant Garamond', 'Shippori Mincho', Georgia, serif;
	--hm-label: 'Montserrat', system-ui, sans-serif;
	--hm-ja: 'Shippori Mincho', 'Noto Serif JP', serif;
}
.hm-slow, .hm-exp, .hm-about { background: var(--hm-cream); color: var(--hm-navy); }
.hm-slow p, .hm-exp p, .hm-about p { margin: 0; }

/* One column with 24px margins (560px wide from 768px) */
.hm-slow, .hm-exp__head, .hm-about { padding-inline: 24px; }
@media (min-width: 768px) {
	.hm-slow, .hm-exp__head, .hm-about { padding-inline: max(24px, calc(50% - 280px)); }
}

/* Shared: Japanese label (金継ぎ · 茶道 / 体験 · EXPERIENCES), small caps label (ABOUT) */
.hm-jlabel { font-family: var(--hm-ja); font-weight: 400; font-size: 16px; line-height: 1.4; letter-spacing: .3em; color: var(--hm-copper); }
.hm-exp .hm-jlabel, .hm-about .hm-jlabel { font-size: 14px; letter-spacing: .1em; }
.hm-jlabel__en { font-family: var(--hm-label); font-size: 12px; letter-spacing: .22em; text-transform: uppercase; }
.hm-label { font-family: var(--hm-label); font-weight: 400; font-size: 12px; line-height: 20px; letter-spacing: .22em; text-transform: uppercase; color: var(--hm-copper); }

/* Shared: body paragraphs, justified with the last line left (site-wide rule, 12 Nov) */
.hm-body { font-family: var(--hm-serif); font-weight: 400; font-size: 18px; line-height: 1.4; letter-spacing: 0; color: var(--hm-navy);
	text-align: justify; text-align-last: left; text-wrap: pretty; hyphens: none; -webkit-hyphens: none; }

/* Shared: text link with the gold arrow (same as The practice) */
.home .pr-link { display: inline-flex; align-items: center; gap: 14px; min-height: 44px; color: var(--hm-navy); text-decoration: none; }
.home .pr-link__text { font-family: var(--hm-serif); font-weight: 400; font-size: 20px; line-height: 1.3; letter-spacing: 0; text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 4px; }
.home .pr-link__arrow { flex: none; width: 28px; height: 10px; color: var(--hm-gold); overflow: visible; transition: transform .3s ease-out; }
.home .pr-link:hover .pr-link__arrow, .home .pr-link:focus-visible .pr-link__arrow { transform: translateX(6px); }
.home .hm-slow :focus-visible, .home .hm-about :focus-visible { outline: 1px solid var(--hm-gold); outline-offset: 4px; }

/* 2 · Slow hands -------------------------------------------------------- */
.hm-slow { padding-top: 40px; padding-bottom: 48px; }
.design-b .hm-slow__title { margin: 32px 0 0; font-family: var(--hm-serif); font-weight: 300; font-style: italic; font-size: 48px; line-height: 1.05; letter-spacing: 0; color: var(--hm-navy); }
.hm-slow__line { display: block; }
.hm-slow__line--2 { padding-left: 48px; }
.hm-slow__body { margin-top: 44px; }
.hm-slow__body .hm-body + .hm-body { margin-top: 24px; }
.hm-slow .hm-more { margin-top: 44px; }

/* 3 · Experiences: lead-in then two cards ------------------------------- */
.hm-exp { padding-bottom: 72px; }
.design-b .hm-exp__title { margin: 20px 0 0; font-family: var(--hm-serif); font-weight: 300; font-style: italic; font-size: 32px; line-height: 1; letter-spacing: 0; color: var(--hm-navy); }
.hm-exp__line { display: block; }
.hm-exp__line--2 { padding-left: 32px; }
@media (max-width: 360px) { .design-b .hm-exp__title { font-size: 28px; } }
.hm-cards { margin-top: 40px; display: grid; gap: 2px; background: var(--hm-cream); }

.hm-card { position: relative; aspect-ratio: 8 / 7; max-height: 460px; width: 100%; overflow: hidden; color: var(--hm-paper); }
.hm-card--sei { background: #16282F; }
.hm-card--jaku { background: #1E1812; }
.hm-card__media { position: absolute; inset: 0; }
.hm-card__img { display: block; width: 100%; height: 100%; object-fit: cover; border-radius: 0; }
/* Two overlays: a dark wash from the bottom (under the text), a light one at the top (under the kanji) */
.hm-card__media::before, .hm-card__media::after { content: ""; position: absolute; left: 0; right: 0; pointer-events: none; }
.hm-card__media::after { inset: 0; background: linear-gradient(to top, rgba(14,26,36,.9) 0%, rgba(14,26,36,.68) 40%, rgba(14,26,36,0) 80%); } /* spec: .85/.55/0 at 0/35/70%, made darker for the current bright photos (allowed by the spec) */
.hm-card__media::before { top: 0; height: 120px; z-index: 1; background: linear-gradient(to bottom, rgba(14,26,36,.30) 0%, rgba(14,26,36,0) 100%); }

.hm-card__kanji { position: absolute; z-index: 2; top: 24px; right: 24px; height: 80px; color: var(--hm-paper); font-family: var(--hm-ja); font-weight: 400; font-size: 72px; line-height: 80px; }
.hm-card__kanji--svg svg { display: block; height: 80px; width: auto; fill: currentColor; }

.hm-card__text { position: absolute; z-index: 2; left: 24px; right: 24px; bottom: 24px; }
@media (min-width: 768px) { .hm-card__text { left: max(24px, calc(50% - 280px)); right: max(24px, calc(50% - 280px)); } }
.hm-card__label { font-family: var(--hm-label); font-weight: 400; font-size: 11px; line-height: 16px; letter-spacing: .22em; text-transform: uppercase; }
.hm-card__sep { display: inline-block; width: 20px; text-align: center; letter-spacing: 0; opacity: .7; }
.hm-card__hours { opacity: .7; }
.design-b .hm-card__title { margin: 14px 0 0; font-family: var(--hm-serif); font-weight: 300; font-style: italic; font-size: 30px; line-height: 34px; letter-spacing: 0; color: var(--hm-paper); }
.hm-card__desc { margin-top: 10px; }
.hm-card__desc p { font-family: var(--hm-serif); font-weight: 400; font-size: 17px; line-height: 24px; letter-spacing: 0; text-align: left; text-wrap: pretty; }
@media (max-width: 360px) { .hm-card__desc p { font-size: 16px; } }
.hm-card__more { margin-top: 12px; } /* 22px to the link text: the 44px tap area adds the rest */
.home .hm-card__link { color: var(--hm-paper); min-height: 44px; }
.home .hm-card__link .pr-link__text { font-size: 18px; }
/* The whole card is the link */
.hm-card__link::after { content: ""; position: absolute; inset: 0; z-index: 3; }
.hm-card { isolation: isolate; }
.hm-card__text { position: absolute; }
.hm-card__more { position: static; }
.home .hm-card:hover .pr-link__arrow { transform: translateX(6px); }
.home .hm-card__link:focus-visible { outline: none; }
.home .hm-card__link:focus-visible::after { outline: 1px solid var(--hm-paper); outline-offset: -4px; }

/* 4 · About -------------------------------------------------------------- */
.hm-about { padding-top: 0; padding-bottom: 80px; } /* 72px above the label = the 72px after the cards */
.hm-about__img { margin-top: 24px; aspect-ratio: 3 / 4; background: #1B2430; overflow: hidden; }
.hm-about__img img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: 50% 20%; border-radius: 0; }
.hm-about__body { margin-top: 32px; }
.hm-about__body .hm-body { line-height: 26px; }
.hm-about__body .hm-body + .hm-body { margin-top: 16px; }
.hm-about .hm-more { margin-top: 28px; } /* 40px to the link text */

/* Closing words: the h2 keeps the look of the old <p> */
.design-b .ft-end__line { font-family: var(--ft-serif); }

/* Fade in: opacity only, 800ms, once (main.js), off with reduced motion */
.fade-ready .hm-slow [data-fade], .fade-ready .hm-exp [data-fade], .fade-ready .hm-about [data-fade] { opacity: 0; transition: opacity .8s ease-out; }
.fade-ready .hm-slow [data-fade].is-in, .fade-ready .hm-exp [data-fade].is-in, .fade-ready .hm-about [data-fade].is-in { opacity: 1; }
@media (prefers-reduced-motion: reduce) {
	.fade-ready .hm-slow [data-fade], .fade-ready .hm-exp [data-fade], .fade-ready .hm-about [data-fade] { opacity: 1; transition: none; }
	.home .pr-link__arrow { transition: none; }
}
.hm-body { -webkit-hyphenate-limit-before: 4; -webkit-hyphenate-limit-after: 4; }

/* ==========================================================================
   Chỉnh sửa v1 (Linh, 18 Nov 2026)
   ========================================================================== */
/* Anchors (#experiences from the menu, #slow-hands, #about…): land 96px down (72px bar + 24px air). */
.design-b [id] { scroll-margin-top: 96px; }
/* v2 (Linh, 19 Nov): no cream at first paint. Two overlays on the bottom 30% of the hero follow the scroll:
   navy (transparent to 35%) fades out as p goes 0 to 1, cream (transparent to solid) fades in. TOKYO and the pause button fade out.
   p = clamp(scrollY / (0.4 x screen height), 0, 1). CSS scroll timeline when supported, else main.js sets --p. */
.w-hero { --p: 0; }
.w-hero::before, .w-hero::after { content: ""; position: absolute; z-index: 1; left: 0; right: 0; bottom: 0; height: 30%; pointer-events: none; }
.w-hero::before { background: linear-gradient(to bottom, rgba(14,26,36,0), rgba(14,26,36,.35)); opacity: calc(1 - var(--p)); }
.w-hero::after { background: linear-gradient(to bottom, rgba(239,233,223,0), #EFE9DF); opacity: var(--p); }
.w-hero__center, .w-hero__place, .w-hero__pause, .w-hero__scroll { z-index: 2; }
.w-hero__place, .w-hero__pause { opacity: calc(1 - var(--p)); }
@keyframes hero-navy { from { opacity: 1; } to { opacity: 0; } }
@keyframes hero-cream { from { opacity: 0; } to { opacity: 1; } }
@supports (animation-timeline: scroll()) {
	.w-hero::before { opacity: 1; animation: hero-navy linear both; animation-timeline: scroll(root block); animation-range: 0 40svh; }
	.w-hero::after { opacity: 0; animation: hero-cream linear both; animation-timeline: scroll(root block); animation-range: 0 40svh; }
	.w-hero__place, .w-hero__pause { opacity: 1; animation: hero-navy linear both; animation-timeline: scroll(root block); animation-range: 0 40svh; }
}
