/* Soo:Tree — "experience" layer: display typography, marquee, root dividers, section tones,
   smooth scroll, brand chapters, mobile product slider, hero video. Loaded after main.css. */

/* ============================================================
   1. Typography — display serif for headlines, Pretendard stays for text
   ============================================================ */
:root {
	--font-display: "Noto Serif KR", "Fraunces", "Times New Roman", serif;
}
html:lang(en) {
	--font-display: "Fraunces", "Noto Serif KR", "Times New Roman", serif;
}
/* Specificity (0,0,2) so it also wins over the global heading styles WordPress prints. */
body :is(h1, h2),
.hero__title, .page-head__title, .section__title, .story__title, .product__title, .closing, .banner__title {
	font-family: var(--font-display);
	font-weight: 400;
	letter-spacing: -0.012em;
	line-height: 1.18;
}
body h1 { line-height: 1.12; }
.site-footer__tag:not(.site-footer__tag--ko) { font-family: var(--font-display); font-style: italic; font-size: 24px; opacity: 1; }
/* Card / product names and nav stay in the sans for legibility. */
.card__title, .card-banner__title, .site-nav a, .btn { font-family: var(--font-body); }

/* ============================================================
   2. Marquee strip
   ============================================================ */
.st-marquee { overflow: hidden; padding: clamp(14px, 2vw, 22px) 0; background: var(--ink); color: var(--paper); }
.st-marquee--paper { background: var(--white); color: var(--ink); border-block: 1px solid rgba(21, 28, 13, .12); }
.st-marquee--lime { background: var(--lime); color: var(--ink); }
.st-marquee__track { display: flex; width: max-content; animation: st-marquee var(--st-speed, 55s) linear infinite; will-change: transform; }
.st-marquee:hover .st-marquee__track { animation-play-state: paused; }
.st-marquee__group { display: flex; align-items: center; margin: 0; padding: 0; list-style: none; }
.st-marquee__item { display: flex; align-items: center; gap: clamp(22px, 3vw, 44px); padding-right: clamp(22px, 3vw, 44px); white-space: nowrap; font-family: var(--font-display); font-style: italic; font-size: clamp(22px, 3.2vw, 38px); font-weight: 400; letter-spacing: -0.005em; }
.st-marquee__sep { flex: none; opacity: .75; }
.st-marquee--ink .st-marquee__sep { color: var(--lime); }
@keyframes st-marquee { to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) {
	.st-marquee__track { animation: none; width: auto; flex-wrap: wrap; justify-content: center; }
	.st-marquee__group[aria-hidden="true"] { display: none; }
}

/* ============================================================
   3. Root dividers — lines that draw themselves
   ============================================================ */
.st-divider { color: var(--moss); padding: clamp(8px, 2vw, 28px) var(--gutter); max-width: var(--maxw); margin-inline: auto; --rv-y: 0; }
.st-divider--ink { color: var(--ink); }
.st-divider--light { color: var(--paper); }
.st-divider svg { display: block; width: 100%; height: auto; max-height: 130px; -webkit-mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent); mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent); }
@media (prefers-reduced-motion: no-preference) {
	.js-ready .st-divider path { stroke-dasharray: 1; stroke-dashoffset: 1; }
	.js-ready .st-divider.is-in path { animation: st-draw 2.6s cubic-bezier(.5, 0, .2, 1) calc(var(--i, 0) * .22s + .1s) forwards; }
}

/* ============================================================
   4. Section tones — the page colour glides from one section to the next
   ============================================================ */
:root { --page-bg: var(--paper); --page-fg: var(--ink); }
html body { background-color: var(--page-bg); color: var(--page-fg); }
@media (prefers-reduced-motion: no-preference) {
	html body { transition: background-color 1s ease, color 1s ease; }
}
.st-tone--paper { --tone-bg: #edece4; --tone-fg: #151c0d; }
.st-tone--blush { --tone-bg: #f4eae3; --tone-fg: #151c0d; }
.st-tone--sky   { --tone-bg: #dde9f1; --tone-fg: #151c0d; }
.st-tone--moss  { --tone-bg: #e9eed2; --tone-fg: #151c0d; }
.st-tone--ink   { --tone-bg: #151c0d; --tone-fg: #edece4; }
/* Things that must keep their own colours whatever the page tone is. */
.site-header, .tabbar, .card, .card-banner, .notify-form { color: var(--ink); }
.site-header--overlay:not(.is-solid) { color: var(--paper); }

/* ============================================================
   5. Smooth scroll (Lenis) — recommended base rules
   ============================================================ */
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
.lenis.lenis-smooth [data-lenis-prevent] { overscroll-behavior: contain; }
.lenis.lenis-stopped { overflow: clip; }
.lenis.lenis-smooth iframe { pointer-events: none; }

/* ============================================================
   6. Brand chapters — a pinned number while the story scrolls
   ============================================================ */
.st-chapter > * { margin-block: 0; }
.st-chapter { display: grid; gap: 16px; align-content: center; padding-block: clamp(36px, 7vw, 64px); }
.st-chapter .wp-block-heading { font-size: clamp(30px, 4.2vw, 52px); line-height: 1.2; max-width: 22ch; }
.st-chapter p:last-child { max-width: 52ch; font-size: clamp(17px, 1.6vw, 20px); color: var(--muted); }
.st-chapters__panel { display: none; }

/* Phones & tablets: the number sits above each chapter. */
.js-ready .st-chapters--live .st-chapter::before { content: attr(data-num); display: block; font-family: var(--font-display); font-size: clamp(64px, 18vw, 96px); font-weight: 300; line-height: 1; color: var(--sky); }

@media (min-width: 900px) {
	.st-chapters--live { display: grid; grid-template-columns: minmax(240px, 5fr) 7fr; column-gap: clamp(40px, 6vw, 96px); grid-template-rows: repeat(var(--n, 5), auto); }
	.st-chapters--live > * { margin-block: 0; margin-inline: 0 !important; max-width: none !important; }
	.st-chapters--live .st-chapters__panel { display: grid; grid-column: 1; grid-row: 1 / span var(--n, 5); position: sticky; top: 96px; align-self: start; justify-self: stretch; width: 100%; height: min(76vh, 620px); place-items: center; }
	.st-chapters--live .st-chapter { grid-column: 2; min-height: 82vh; opacity: .22; transition: opacity .7s ease; }
	.st-chapters--live .st-chapter.is-active { opacity: 1; }
	.js-ready .st-chapters--live .st-chapter::before { display: none; }

	.st-chapters__orb { position: absolute; width: min(100%, 440px); aspect-ratio: 1; border-radius: 50%; background:
		radial-gradient(circle at 28% 28%, rgba(255, 255, 255, .75), rgba(255, 255, 255, 0) 55%),
		linear-gradient(135deg, #c3e978 0%, #bfe6c9 45%, #a3d8ff 100%);
		box-shadow: inset 0 0 0 1px rgba(21, 28, 13, .08), 0 30px 80px rgba(21, 28, 13, .12);
		filter: hue-rotate(calc(var(--i, 0) * 24deg)); transition: filter 1s ease, transform 1.2s cubic-bezier(.2, .7, .2, 1); transform: scale(calc(.94 + var(--i, 0) * .02)); }
	.st-chapters__nums { position: relative; width: 100%; height: 100%; display: grid; place-items: center; }
	.st-chapters__nums span { position: absolute; font-family: var(--font-display); font-weight: 300; font-size: clamp(130px, 15vw, 230px); line-height: 1; color: var(--ink); opacity: 0; transform: translateY(32px); transition: opacity .6s ease, transform .8s cubic-bezier(.2, .7, .2, 1); }
	.st-chapters__nums span.is-on { opacity: 1; transform: none; }
	.st-chapters__dots { position: absolute; bottom: 4%; display: flex; gap: 8px; }
	.st-chapters__dots i { width: 7px; height: 7px; border-radius: 50%; background: rgba(21, 28, 13, .2); transition: background .4s ease, transform .4s ease; }
	.st-chapters__dots i.is-on { background: var(--ink); transform: scale(1.4); }
}
@media (prefers-reduced-motion: reduce) {
	.st-chapters--live .st-chapter { opacity: 1; }
}

/* ============================================================
   7. Mobile product slider — swipe, snap, dots
   ============================================================ */
.st-dots { display: none; }
@media (max-width: 719px) {
	.st-products { grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: 84%; gap: 14px;
		overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x mandatory; -webkit-overflow-scrolling: touch;
		margin-inline: calc(var(--gutter) * -1); padding: 2px var(--gutter) 8px; scroll-padding-inline: var(--gutter); scrollbar-width: none; }
	.st-products::-webkit-scrollbar { display: none; }
	.st-products > * { scroll-snap-align: start; }
	.st-dots { display: flex; justify-content: center; gap: 8px; margin-top: 14px; }
	.st-dots button { width: 8px; height: 8px; padding: 0; border: 0; border-radius: 50%; background: rgba(21, 28, 13, .22); cursor: pointer; transition: background .3s ease, transform .3s ease; }
	.st-dots button.is-on { background: var(--ink); transform: scale(1.35); }
}

/* ============================================================
   8. Hero video (only exists when a video is chosen in Customize)
   ============================================================ */
.st-hero-video { opacity: 0; transition: opacity 1.2s ease; }
.st-hero-video.is-playing { opacity: 1; }
.hero-cover-tight .st-hero-video { scale: 1.12; object-position: 68% 30%; will-change: transform; }

/* ============================================================
   9. Delivery · exchange · refund summary (product page)
   ============================================================ */
.st-policy { display: grid; gap: 14px; grid-template-columns: repeat(3, 1fr); margin-top: clamp(28px, 4vw, 48px); }
.st-policy__card { background: var(--white); border-radius: 14px; padding: 20px 22px; border: 1px solid rgba(21, 28, 13, .08); }
.st-policy__icon { display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: rgba(163, 216, 255, .35); color: var(--ink); margin-bottom: 10px; }
.st-policy__card h3 { font-size: 16px; font-weight: 700; margin: 0 0 6px; }
.st-policy__card ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 4px; font-size: 14px; color: var(--muted); }
.st-policy__more { grid-column: 1 / -1; font-size: 14px; margin: 2px 0 0; }
@media (max-width: 719px) { .st-policy { grid-template-columns: 1fr; } }
