/*
Theme Name: The Better Story Scroll
Theme URI: https://example.com/
Author: Sean
Description: Scroll-driven version of The Better Story theme: a race-course progress line, pinned chapters and slow scroll zooms. Same colours, fonts, logo and content.
Version: 1.10.2
Requires at least: 6.5
Tested up to: 6.8
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: the-better-story
*/

:root {
  --tbs-charcoal: var(--wp--preset--color--charcoal, #1E1E1C);
  --tbs-charcoal-soft: var(--wp--preset--color--charcoal-soft, #2B2A27);
  --tbs-bone: var(--wp--preset--color--bone, #F2EDE4);
  --tbs-sand: var(--wp--preset--color--sand, #E6DFD2);
  --tbs-stone: var(--wp--preset--color--stone, #D9D1C3);
  --tbs-rust: var(--wp--preset--color--rust, #B5502D);
  --tbs-rust-light: var(--wp--preset--color--rust-light, #E08A62);
  --tbs-muted: var(--wp--preset--color--ink-muted, #4A463F);
  --tbs-mist: var(--wp--preset--color--mist, #C9C1B4);
  --tbs-ash: var(--wp--preset--color--ash, #A39B8E);
  --tbs-display: var(--wp--preset--font-family--oswald, Archivo, 'Helvetica Neue', Arial, sans-serif);
  --tbs-gutter: clamp(20px, 5vw, 80px);
}

body { margin: 0; }
:focus-visible { outline: 3px solid var(--tbs-rust-light); outline-offset: 3px; }
.tbs-main { margin: 0; }
body .wp-site-blocks > * { margin-block: 0; }

/* Shared type */
.tbs-display,
body .tbs-numeral,
body .tbs-kicker { font-family: var(--tbs-display); }
body .tbs-kicker {
  font-size: 0.875rem; letter-spacing: 0.18em; text-transform: uppercase; color: var(--tbs-rust); line-height: 1.4;
}
.tbs-dark .tbs-kicker, .tbs-sec--dark .tbs-kicker { color: var(--tbs-rust-light); }

/* Buttons */
body .wp-block-button.is-style-outline .wp-block-button__link {
  background: transparent; color: inherit; border: 2px solid var(--tbs-rust); padding: calc(1.05rem - 2px) calc(2.25rem - 2px);
}
body .wp-block-button.is-style-outline .wp-block-button__link:hover { background: var(--tbs-rust); color: #fff; }
body .wp-block-button.is-style-plain .wp-block-button__link { background: transparent; color: inherit; padding-left: 1rem; padding-right: 1rem; }
body .wp-block-button.is-style-plain .wp-block-button__link:hover { color: var(--tbs-rust-light); background: transparent; }

/* Header */
body .tbs-header {
  background: var(--tbs-charcoal); color: var(--tbs-bone); min-height: 80px; padding: 0 var(--tbs-gutter); box-sizing: border-box; gap: 24px;
}
body .tbs-header .wp-block-site-title { margin: 0; font-family: var(--tbs-display); font-weight: 700; font-size: 1.5rem; letter-spacing: 0.06em; text-transform: uppercase; line-height: 1.1; }
body .tbs-header .wp-block-site-title a { color: var(--tbs-bone); text-decoration: none; }
body .tbs-header__right { gap: 36px; }
body .tbs-nav { font-family: var(--tbs-display); font-size: 1rem; letter-spacing: 0.12em; text-transform: uppercase; gap: 36px; }
body .tbs-nav a { color: var(--tbs-mist); }
body .tbs-nav a:hover { color: var(--tbs-bone); }
body .tbs-nav .wp-block-navigation__responsive-container-open { color: var(--tbs-bone); }
body .tbs-nav .wp-block-navigation__responsive-container.is-menu-open { background: var(--tbs-charcoal); color: var(--tbs-bone); padding: 24px; }
body .tbs-nav .wp-block-navigation__responsive-container.is-menu-open a { color: var(--tbs-bone); font-size: 1.75rem; }
body .tbs-header__cta { margin: 0; }
body .tbs-header__cta .wp-block-button__link { padding: 0.7rem 1.4rem; font-size: 1rem; color: var(--tbs-bone); }
@media (max-width: 599px) { body .tbs-header__cta { display: none; } }

/* Hero */
body .tbs-hero {
  background: var(--tbs-charcoal); color: var(--tbs-bone); text-align: center; margin: 0;
  padding: clamp(88px, 11vw, 160px) clamp(24px, 8vw, 120px);
  display: flex; flex-direction: column; align-items: center; gap: 28px;
}
body .tbs-hero > * { margin: 0; }
body .tbs-hero::before { content: ""; width: 64px; height: 4px; background: var(--tbs-rust); }
body .tbs-hero__title { font-size: clamp(3.9rem, 10vw, 8.75rem); line-height: 0.92; color: var(--tbs-bone); max-width: 1200px; }
body .tbs-hero__step { font-family: var(--tbs-display); font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; font-size: clamp(2.1rem, 4.5vw, 4rem); line-height: 1; color: var(--tbs-rust-light); margin-top: -8px; }
body .tbs-hero__verse { font-style: italic; font-size: clamp(1rem, 1.5vw, 1.25rem); color: var(--tbs-ash); max-width: 760px; line-height: 1.5; }
body .tbs-hero__lede { font-size: clamp(1.2rem, 2vw, 1.5rem); line-height: 1.5; color: var(--tbs-mist); max-width: 760px; }
body .tbs-hero .wp-block-buttons { justify-content: center; gap: 16px; }
body .tbs-hero .wp-block-button.is-style-plain .wp-block-button__link { color: var(--tbs-bone); }

/* Numbered sections */
body .tbs-sec { margin: 0; padding: clamp(72px, 9vw, 128px) var(--tbs-gutter); }
body .tbs-sec--sand { background: var(--tbs-sand); }
body .tbs-sec--dark { background: var(--tbs-charcoal); color: var(--tbs-bone); }
body .tbs-sec__inner { max-width: 1040px; margin: 0 auto; display: grid; grid-template-columns: 160px minmax(0, 1fr); column-gap: 64px; align-items: start; }
body .tbs-sec__inner > * { margin: 0; }
body .tbs-numeral { font-size: clamp(4.5rem, 9vw, 7.5rem); line-height: 0.9; font-weight: 700; color: var(--tbs-rust); }
body .tbs-sec__body { display: flex; flex-direction: column; gap: 24px; font-size: clamp(1.125rem, 1.6vw, 1.375rem); line-height: 1.7; }
body .tbs-sec__body > * { margin: 0; }
body .tbs-sec h2 { font-size: clamp(2.375rem, 5vw, 3.5rem); line-height: 1; }
body .tbs-sec--dark h2, body .tbs-sec--dark h3 { color: var(--tbs-bone); }
body .tbs-turn { font-weight: 600; font-size: 1.1em; }
@media (max-width: 781px) {
  body .tbs-sec__inner { grid-template-columns: minmax(0, 1fr); row-gap: 18px; }
}

/* II. What this is */
body .tbs-trio { border-top: 3px solid var(--tbs-charcoal); padding-top: 28px; gap: 32px; margin: 8px 0 0; }
body .tbs-trio h3 { font-size: 1.5rem; margin: 0 0 10px; }
body .tbs-trio p { font-size: 1.125rem; line-height: 1.6; color: var(--tbs-muted); margin: 0; }

/* III. Start here */
body .tbs-picks { max-width: 1280px; margin: 56px auto 0; gap: 40px; }
body .tbs-picks .wp-block-column > * { margin: 0 0 14px; }
body .tbs-picks .wp-block-embed { background: var(--tbs-charcoal-soft); }
body .tbs-picks h3 { font-size: clamp(1.4rem, 2vw, 1.75rem); line-height: 1.1; }
body .tbs-sec__lede { color: var(--tbs-mist); font-size: 1.25rem; }

/* IV. About */
body .tbs-about { gap: 48px; margin: 0; }
body .tbs-about .wp-block-image { margin: 0; }
body .tbs-about .wp-block-image img { width: 100%; height: auto; aspect-ratio: 7 / 9; object-fit: cover; display: block; background: var(--tbs-stone); }

/* Writing rows (homepage V, keep reading, blog list) */
body .tbs-rows { margin: 0; }
body .tbs-rows .wp-block-post-template { margin: 0; padding: 0; list-style: none; }
body .tbs-rows .wp-block-post-template > li { margin: 0; border-top: 2px solid var(--tbs-charcoal); }
body .tbs-row { display: flex; align-items: baseline; gap: 32px; padding: 24px 0; margin: 0; }
body .tbs-row > * { margin: 0; }
body .tbs-row__tag { width: 140px; flex-shrink: 0; font-family: var(--tbs-display); font-size: 0.875rem; letter-spacing: 0.15em; text-transform: uppercase; line-height: 1.4; }
body .tbs-row__main { flex: 1; min-width: 0; }
body .tbs-row__main > * { margin: 0; }
body .tbs-row__title { font-size: clamp(1.5rem, 2.4vw, 1.875rem); line-height: 1.1; font-weight: 600; }
body .tbs-row__title a { color: var(--tbs-charcoal); }
body .tbs-row__title a:hover { color: var(--tbs-rust); }
body .tbs-row::after { content: "→"; font-family: var(--tbs-display); font-size: 1.4rem; }
body .tbs-row__excerpt { margin-top: 10px !important; font-size: 1.0625rem; line-height: 1.6; color: var(--tbs-muted); }
body .tbs-row__excerpt .wp-block-post-excerpt__excerpt { margin: 0; }
body .tbs-row__date { font-family: var(--tbs-display); font-size: 0.875rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--tbs-muted); margin-top: 8px !important; }
body .tbs-rows__head { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; margin: 0 0 16px; }
body .tbs-rows__head > * { margin: 0; }
body .tbs-more { font-family: var(--tbs-display); font-weight: 600; font-size: 1.0625rem; letter-spacing: 0.12em; text-transform: uppercase; }
@media (max-width: 599px) {
  body .tbs-row { flex-direction: column; gap: 6px; padding: 18px 0; }
  body .tbs-row::after { display: none; }
  body .tbs-row__tag { width: auto; }
}

/* Page + archive heads */
body .tbs-page-head { background: var(--tbs-charcoal); color: var(--tbs-bone); text-align: center; margin: 0; padding: clamp(88px, 10vw, 128px) var(--tbs-gutter) clamp(72px, 8vw, 112px); display: flex; flex-direction: column; align-items: center; gap: 24px; }
body .tbs-page-head > * { margin: 0; }
body .tbs-page-head::after { content: ""; width: 64px; height: 4px; background: var(--tbs-rust); order: 5; }
body .tbs-page-head h1 { color: var(--tbs-bone); max-width: 1100px; }
body .tbs-page-head__tag a, body .tbs-page-head__tag { font-family: var(--tbs-display); font-size: 1rem; letter-spacing: 0.22em; text-transform: uppercase; color: var(--tbs-rust-light); }
body .tbs-page-head__meta { order: 6; font-family: var(--tbs-display); font-size: 1rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--tbs-ash); gap: 20px; }
body .tbs-page-head__meta > * { margin: 0; }
body .tbs-page-head__meta .wp-block-post-author-name::after { content: "·"; margin-left: 20px; }

body .tbs-list { max-width: 1040px; margin: 0 auto; padding: clamp(56px, 7vw, 96px) var(--tbs-gutter); box-sizing: content-box; }
body .tbs-list .wp-block-query-pagination { margin-top: 40px; font-family: var(--tbs-display); text-transform: uppercase; letter-spacing: 0.1em; }

/* Article */
body .tbs-article { padding: clamp(64px, 8vw, 112px) var(--tbs-gutter) 32px; margin: 0; }
body .tbs-article > p:first-child { font-size: clamp(1.375rem, 2.2vw, 1.6875rem); line-height: 1.55; }
body .tbs-article a { text-decoration: underline; text-underline-offset: 3px; }
body .tbs-article h2 { margin-top: 2.2em; font-size: clamp(2rem, 3.5vw, 2.625rem); }
body .tbs-article h3 { margin-top: 1.8em; }
.single .tbs-article { counter-reset: tbs-part; }
.single .tbs-article > h2:not(.is-style-plain) { counter-increment: tbs-part; }
.single .tbs-article > h2:not(.is-style-plain)::before { content: counter(tbs-part, upper-roman) "."; color: var(--tbs-rust); margin-right: 0.45em; }
body .tbs-article .wp-block-quote,
body .tbs-article .wp-block-pullquote {
  border: 0; border-top: 4px solid var(--tbs-rust); border-bottom: 4px solid var(--tbs-rust); border-radius: 0;
  padding: 36px 0; margin-block: 48px; text-align: left;
}
body .tbs-article .wp-block-quote p,
body .tbs-article .wp-block-pullquote p {
  font-family: var(--tbs-display); font-weight: 600; text-transform: uppercase; font-size: clamp(1.75rem, 3.4vw, 2.625rem); line-height: 1.15; margin: 0;
}
body .tbs-article .wp-block-quote cite,
body .tbs-article .wp-block-pullquote cite { display: block; margin-top: 16px; font-size: 1rem; font-style: normal; color: var(--tbs-muted); text-transform: none; }
body .tbs-article .wp-block-image img { height: auto; }

/* "Rather watch it?" block */
body .tbs-watch { background: var(--tbs-charcoal); color: var(--tbs-bone); padding: clamp(56px, 7vw, 96px) var(--tbs-gutter); margin-block: 56px; }
body .tbs-watch .wp-block-columns { max-width: 1040px; margin: 0 auto; gap: 56px; align-items: center; }
body .tbs-watch h2 { color: var(--tbs-bone); margin: 8px 0 12px; font-size: clamp(1.75rem, 3vw, 2.5rem); }
body .tbs-watch h2::before { content: none !important; }
body .tbs-watch p { color: var(--tbs-mist); font-size: 1.125rem; line-height: 1.6; margin: 0; }
body .tbs-watch .tbs-kicker { color: var(--tbs-rust-light); }

/* Author */
body .tbs-author { max-width: 720px; margin: 0 auto; padding: 32px var(--tbs-gutter) clamp(64px, 8vw, 96px); box-sizing: content-box; }
body .tbs-author .wp-block-post-author { border-top: 3px solid var(--tbs-charcoal); padding-top: 40px; gap: 28px; align-items: center; }
body .tbs-author .wp-block-post-author__avatar img { border-radius: 0; }
body .tbs-author .wp-block-post-author__byline { font-family: var(--tbs-display); font-size: 0.875rem; letter-spacing: 0.15em; text-transform: uppercase; color: var(--tbs-rust); }
body .tbs-author .wp-block-post-author__name { font-family: var(--tbs-display); font-size: 1.625rem; font-weight: 700; text-transform: uppercase; }
body .tbs-author .wp-block-post-author__bio { font-size: 1.125rem; line-height: 1.6; color: var(--tbs-muted); margin-top: 6px; }

/* Closing call + footer */
body .tbs-close { background: var(--tbs-charcoal); color: var(--tbs-bone); text-align: center; margin: 0; padding: clamp(88px, 10vw, 128px) var(--tbs-gutter) 56px; display: flex; flex-direction: column; align-items: center; gap: 28px; }
body .tbs-close > * { margin: 0; }
body .tbs-close::before { content: ""; width: 64px; height: 4px; background: var(--tbs-rust); }
body .tbs-close__title { color: var(--tbs-bone); font-size: clamp(3.4rem, 7vw, 6rem); line-height: 0.95; }
body .tbs-close .wp-block-buttons { justify-content: center; }
body .tbs-close__meta { margin-top: clamp(56px, 7vw, 96px) !important; display: flex; flex-wrap: wrap; justify-content: center; gap: 12px 32px; font-family: var(--tbs-display); font-size: 0.9375rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--tbs-ash); line-height: 1.4; }
body .tbs-close__meta a { color: var(--tbs-mist); }
body .tbs-close__meta a:hover { color: var(--tbs-bone); }

/* 404 */
body .tbs-404 { text-align: center; padding: clamp(72px, 9vw, 128px) var(--tbs-gutter); }

@media (prefers-reduced-motion: reduce) { * { scroll-behavior: auto !important; } }
html { scroll-behavior: smooth; }
body .tbs-narrow { max-width: 1040px; margin: 0 auto; }
body .tbs-404 .wp-block-search { max-width: 520px; margin: 32px auto 0; }
body .tbs-404 .wp-block-search__input { border: 2px solid var(--tbs-charcoal); border-radius: 0; font-size: 1rem; padding: 12px; }

/* Logo */
body .tbs-logo { margin: 0; flex-shrink: 0; }
body .tbs-logo img { display: block; width: clamp(150px, 16vw, 210px); height: auto; }
body .tbs-footer-logo { margin: clamp(56px, 7vw, 96px) 0 0 !important; }
body .tbs-footer-logo img { display: block; width: 220px; height: auto; margin: 0 auto; opacity: 0.9; }
body .tbs-close__meta { margin-top: 24px !important; }

/* Shop */
body .tbs-shop { margin: 0; padding: clamp(72px, 9vw, 112px) var(--tbs-gutter); border-top: 4px solid var(--tbs-charcoal); }
body .tbs-shop > * { margin: 0; }
body .tbs-shop__head { max-width: 1040px; margin: 0 auto !important; display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 24px 48px; }
body .tbs-shop__head > * { margin: 0; }
body .tbs-shop__intro > * { margin: 0 0 12px; }
body .tbs-shop__intro h2 { font-size: clamp(2.375rem, 5vw, 3.5rem); line-height: 1; }
body .tbs-shop__intro p:last-child { color: var(--tbs-muted); font-size: 1.25rem; margin: 0; }
body .tbs-shop__grid { max-width: 1280px; margin: 48px auto 0 !important; gap: 32px; }
body .tbs-shop__grid .wp-block-image { margin: 0 0 12px; }
body .tbs-shop__grid .wp-block-image img { width: 100%; aspect-ratio: 1; object-fit: cover; background: var(--tbs-stone); display: block; }
body .tbs-shop__grid h3 { font-size: 1.375rem; margin: 0; }
body .tbs-shop__grid h3 a { color: var(--tbs-charcoal); }
body .tbs-shop__grid h3 a:hover { color: var(--tbs-rust); }
@media (max-width: 781px) {
  body .tbs-shop__grid { display: grid !important; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
}

/* Contact */
body .tbs-contact-wrap { max-width: 640px; margin: 0 auto; padding: clamp(56px, 7vw, 96px) var(--tbs-gutter); box-sizing: content-box; }
body .tbs-contact-wrap > * { margin: 0 0 24px; }
body .tbs-contact__form p { margin: 0 0 22px; }
body .tbs-contact__form label { display: block; margin-bottom: 8px; font-family: var(--tbs-display); font-size: 0.9375rem; letter-spacing: 0.14em; text-transform: uppercase; }
body .tbs-contact__form input[type="text"],
body .tbs-contact__form input[type="email"],
body .tbs-contact__form textarea { width: 100%; box-sizing: border-box; padding: 14px 16px; border: 2px solid var(--tbs-charcoal); border-radius: 0; background: #fff; color: var(--tbs-charcoal); font-family: inherit; font-size: 1.0625rem; line-height: 1.5; }
body .tbs-contact__form input:focus,
body .tbs-contact__form textarea:focus { outline: 3px solid var(--tbs-rust-light); outline-offset: 2px; }
body .tbs-contact__form button { border: 0; cursor: pointer; }
body .tbs-contact__trap { position: absolute !important; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
body .tbs-contact__notice { padding: 16px 20px; border-left: 4px solid var(--tbs-rust); background: var(--tbs-sand); font-size: 1.0625rem; }
body .tbs-contact__notice.is-ok { border-left-color: #3F6B3A; }
body .tbs-contact-wrap .wp-block-post-content > * { margin-top: 0; margin-bottom: 20px; }
body .tbs-contact-wrap .wp-block-post-content > .tbs-contact { margin-top: 36px; margin-bottom: 0; }
body .tbs-contact-wrap p:empty { display: none; }

/* =====================================================================
   SCROLL VERSION
   ===================================================================== */
:root { --rail: 0px; --tbs-top-h: 72px; }
@media (min-width: 900px) { body.tbs-has-rail { --rail: 72px; } }

/* Fixed header over every page */
body .tbs-top { position: fixed; z-index: 40; top: 0; left: 0; right: 0; margin: 0; padding-top: env(safe-area-inset-top, 0px); transition: background .3s; }
body.admin-bar .tbs-top { top: 32px; }
@media (max-width: 782px) { body.admin-bar .tbs-top { top: 46px; } }
body .tbs-top.solid { background: rgba(30, 30, 28, 0.94); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
body .top__in { display: flex; align-items: center; justify-content: space-between; gap: 24px; height: var(--tbs-top-h); padding: 0 var(--tbs-gutter) 0 calc(var(--tbs-gutter) + var(--rail)); margin: 0; }
body .top__in > * { margin: 0; }
body .top__nav { display: flex; align-items: center; gap: 32px; margin: 0; }
body .top__nav > * { margin: 0; }
body .tbs-top .tbs-logo img { width: clamp(132px, 14vw, 180px); }
@media (max-width: 599px) { body .top__nav { gap: 12px; } }

/* Pages other than the homepage start below the fixed header */
body:not(.tbs-has-scroll) .tbs-page-head { padding-top: calc(var(--tbs-top-h) + clamp(64px, 8vw, 104px)); }

/* Course rail + phone progress bar */
.tbs-bar { position: fixed; z-index: 41; left: 0; right: 0; top: 0; height: 3px; background: var(--tbs-rust); transform-origin: left; transform: scaleX(var(--page, 0)); pointer-events: none; }
.tbs-rail { position: fixed; z-index: 35; left: 0; top: 0; bottom: 0; width: var(--rail); display: none; }
@media (min-width: 900px) { .tbs-bar { display: none; } .tbs-rail { display: block; } }
.tbs-rail__track { position: absolute; left: 35px; top: 14vh; bottom: 14vh; width: 2px; background: rgba(163, 155, 142, 0.35); }
.tbs-rail__fill { position: absolute; inset: 0; background: var(--tbs-rust); transform-origin: top; transform: scaleY(var(--page, 0)); }
.tbs-rail__cp { position: absolute; left: 50%; width: 30px; height: 30px; margin: -15px 0 0 -15px; border-radius: 50%; display: grid; place-items: center; background: var(--tbs-charcoal); border: 2px solid var(--tbs-ash); color: var(--tbs-mist); font-family: var(--tbs-display); font-size: 0.6875rem; font-weight: 600; text-decoration: none; transition: background .25s, border-color .25s, color .25s; }
.tbs-rail__cp:hover { color: var(--tbs-bone); }
.tbs-rail__cp.done { background: var(--tbs-rust); border-color: var(--tbs-rust); color: #fff; }
.tbs-rail__cp .tip { position: absolute; left: 40px; white-space: nowrap; font-size: 0.8125rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--tbs-bone); background: var(--tbs-charcoal); padding: 4px 10px; opacity: 0; pointer-events: none; transition: opacity .2s; }
.tbs-rail__cp:hover .tip, .tbs-rail__cp:focus-visible .tip { opacity: 1; }

/* Homepage wrapper */
body .tbs-s { padding-left: var(--rail); }
body .tbs-s :where(.wp-block-group, p, h1, h2, h3, ul, li, figure, hr, .wp-block-buttons, .wp-block-query) { margin-block: 0; }
body .tbs-s h1, body .tbs-s h2, body .tbs-s h3 { text-transform: uppercase; }

/* Scenes */
body .scene { position: relative; height: var(--len, 250vh); }
body .pin { position: sticky; top: 0; height: 100vh; height: 100svh; overflow: hidden; }
body.admin-bar .pin { top: 32px; height: calc(100svh - 32px); }
body .num { font-family: var(--tbs-display); font-weight: 700; color: var(--tbs-rust); font-size: clamp(5rem, 13vw, 11rem); line-height: 0.8; transform-origin: left top; }
body .scene .num { transform: scale(calc(0.78 + var(--p, 1) * 0.42)); will-change: transform; }
body .zoom-num { transform: scale(calc(0.8 + var(--v, 0.5) * 0.4)); }
body .zoom-h { transform-origin: left bottom; transform: scale(calc(0.86 + var(--v, 0.5) * 0.24)); }

body .chap { display: grid; grid-template-columns: minmax(96px, 200px) minmax(0, 1fr); gap: 0 clamp(24px, 5vw, 72px); align-content: center; max-width: 1160px; width: 100%; height: 100%; margin: 0 auto; padding: 104px var(--tbs-gutter) 48px; box-sizing: border-box; }
body .chap h2, body .shop h2, body .panel--intro h2 { font-size: clamp(2.6rem, 6vw, 4.75rem); line-height: 0.95; }
@media (max-width: 720px) { body .chap { grid-template-columns: minmax(0, 1fr); align-content: start; gap: 12px; padding-top: 96px; } body .num { font-size: 4.5rem; } }

/* Hero */
body .hero { --len: 190vh; background: var(--tbs-charcoal); color: var(--tbs-bone); }
body .hero .pin { display: grid; place-items: center; text-align: center; padding: 96px var(--tbs-gutter) 48px; box-sizing: border-box; }
body .hero__inner { display: flex; flex-direction: column; align-items: center; gap: 24px; max-width: 1200px; }
body .hero h1 { font-size: clamp(3.2rem, min(9.5vw, 16vh), 9rem); line-height: 0.9; color: var(--tbs-bone); transform: scale(calc(1.15 - var(--p, 1) * 0.2)); transform-origin: center 70%; will-change: transform; }
body .hero__step { font-family: var(--tbs-display); font-weight: 700; text-transform: uppercase; font-size: clamp(2rem, 5vw, 4.5rem); line-height: 1; letter-spacing: 0.04em; color: var(--tbs-rust-light); clip-path: inset(0 calc(100% - clamp(0, (var(--p, 1) - 0.04) * 400, 100) * 1%) 0 0); }
body .hero__verse { font-style: italic; color: var(--tbs-ash); max-width: 720px; font-size: clamp(1rem, 1.6vw, 1.25rem); line-height: 1.5; opacity: clamp(0, (var(--p, 1) - 0.18) * 5, 1); }
body .hero__lede { color: var(--tbs-mist); max-width: 720px; font-size: clamp(1.15rem, 2vw, 1.5rem); line-height: 1.5; opacity: clamp(0, (var(--p, 1) - 0.26) * 5, 1); }
body .hero__cta { justify-content: center; gap: 14px; opacity: clamp(0, (var(--p, 1) - 0.34) * 5, 1); }
body .hero__cta .is-style-outline .wp-block-button__link { color: var(--tbs-bone); border-color: var(--tbs-bone); }
body .hero__cta .is-style-outline .wp-block-button__link:hover { background: var(--tbs-bone); color: var(--tbs-charcoal); }
body .hero__hint { position: absolute; left: 50%; bottom: calc(28px + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%); display: flex; flex-direction: column; align-items: center; gap: 8px; font-family: var(--tbs-display); font-size: 0.8125rem; letter-spacing: 0.2em; text-transform: uppercase; color: var(--tbs-ash); opacity: calc(1 - var(--p, 1) * 8); }
body .hero__hint::after { content: ""; width: 2px; height: 36px; background: linear-gradient(var(--tbs-rust), transparent); }

/* I. Fine on paper */
body .paper { --len: 330vh; background: var(--tbs-bone); color: var(--tbs-charcoal); }
body .checks { list-style: none; margin-top: 32px !important; padding: 0; display: grid; gap: 10px; transition: opacity .5s; }
body .checks li { position: relative; padding-left: 52px; font-family: var(--tbs-display); font-weight: 600; font-size: clamp(1.4rem, 3vw, 2.1rem); text-transform: uppercase; line-height: 1.2; opacity: 0.18; transition: opacity .4s; }
body .checks li::before { content: ""; position: absolute; left: 0; top: 50%; width: 30px; height: 30px; margin-top: -17px; border: 2.5px solid currentColor; }
body .checks li::after { content: ""; position: absolute; left: 10px; top: 50%; width: 9px; height: 17px; margin-top: -16px; border: solid var(--tbs-rust); border-width: 0 3.5px 3.5px 0; transform: rotate(45deg) scale(0); transform-origin: center; transition: transform .35s cubic-bezier(.3,1.6,.5,1); }
body .checks li.on { opacity: 1; }
body .checks li.on::after { transform: rotate(45deg) scale(1); }
body .paper.hum .checks { opacity: 0.28; }
body .beats { margin-top: 32px !important; display: grid; gap: 16px; max-width: 640px; }
body .beat { font-size: clamp(1.1rem, 1.8vw, 1.35rem); line-height: 1.6; opacity: 0; transform: translateY(14px); transition: opacity .5s, transform .5s; }
body .beat.on { opacity: 1; transform: none; }
body .beat--turn { font-family: var(--tbs-display); font-weight: 700; text-transform: uppercase; font-size: clamp(1.7rem, 3.6vw, 2.8rem); line-height: 1.05; color: var(--tbs-rust); transform-origin: left center; transform: scale(0.85); transition: opacity .6s, transform 1.4s cubic-bezier(.2,.7,.2,1); }
body .beat--turn.on { transform: scale(1); }

/* II. Themes */
body .themes { --len: 330vh; background: var(--tbs-charcoal); color: var(--tbs-bone); }
body .themes h2 { color: var(--tbs-bone); }
body .themes__lede { color: var(--tbs-mist); max-width: 640px; margin-top: 20px !important; font-size: clamp(1.02rem, 1.5vw, 1.2rem); line-height: 1.65; }
body .words { position: relative; margin-top: clamp(24px, 5vh, 48px) !important; min-height: clamp(210px, 32vh, 300px); }
body .word { position: absolute; top: 0; left: 0; max-width: 720px; opacity: 0; transform: translateY(40px); transition: opacity .5s, transform .6s cubic-bezier(.2,.7,.2,1); }
body .word.on { opacity: 1; transform: none; }
body .word.past { opacity: 0; transform: translateY(-40px); }
body .word__big { font-family: var(--tbs-display); font-weight: 700; text-transform: uppercase; font-size: clamp(3rem, 9vw, 7.5rem); line-height: 0.9; color: var(--tbs-bone); transform-origin: left bottom; transition: transform .2s linear; }
body .word.on .word__big { transform: scale(calc(0.96 + var(--sp, 0) * 0.12)); }
body .word p:not(.word__big) { margin-top: 16px !important; color: var(--tbs-mist); font-size: clamp(1.05rem, 1.7vw, 1.3rem); line-height: 1.55; }
body .dots { display: flex; gap: 10px; margin-top: 8px; }
body .dots i { width: 36px; height: 3px; background: rgba(201, 193, 180, 0.3); }
body .dots i.on { background: var(--tbs-rust); }

/* III. Start here */
body .start { --len: 300vh; background: var(--tbs-sand); color: var(--tbs-charcoal); }
body .start .pin { display: flex; align-items: center; }
body .track { display: flex; gap: clamp(20px, 3vw, 40px); padding: 88px var(--tbs-gutter) 40px; will-change: transform; transform: translateX(calc(var(--shift, 0px) * -1)); }
body .panel { flex: none; width: min(78vw, 560px); display: flex; flex-direction: column; gap: 14px; }
body .panel--intro { width: min(84vw, 460px); justify-content: center; padding-right: 24px; }
body .panel--intro p:not(.num) { color: var(--tbs-muted); font-size: 1.2rem; }
body .panel .wp-block-embed { margin: 0; background: var(--tbs-charcoal); transform: scale(calc(1 - var(--c, 0) * 0.12)); transition: transform .1s linear; }
body .panel__why { font-family: var(--tbs-display); font-size: 0.9375rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--tbs-rust); }
body .panel h3 { font-size: clamp(1.6rem, 2.6vw, 2.2rem); line-height: 1.02; }
body .panel--end { width: min(70vw, 360px); justify-content: center; }
body .panel__q { font-family: var(--tbs-display); font-weight: 700; text-transform: uppercase; font-size: clamp(1.8rem, 3vw, 2.6rem); line-height: 1; }
body .ink .is-style-outline .wp-block-button__link { color: var(--tbs-charcoal); border-color: var(--tbs-charcoal); }
body .ink .is-style-outline .wp-block-button__link:hover { background: var(--tbs-charcoal); color: var(--tbs-bone); }

/* IV. About */
body .about { --len: 210vh; background: var(--tbs-bone); color: var(--tbs-charcoal); }
body .about__grid { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: clamp(24px, 5vw, 72px); align-items: center; }
body .about .photo { aspect-ratio: 7 / 9; max-height: 72svh; overflow: hidden; background: var(--tbs-stone); clip-path: inset(calc((1 - clamp(0, var(--p, 1) * 1.8, 1)) * 38%) calc((1 - clamp(0, var(--p, 1) * 1.8, 1)) * 22%)); }
body .about .photo img { width: 100%; height: 100%; object-fit: cover; transform: scale(calc(1.18 - clamp(0, var(--p, 1) * 1.8, 1) * 0.18)); }
body .about__text { display: grid; gap: 18px; font-size: clamp(1.05rem, 1.5vw, 1.2rem); line-height: 1.7; }
body .about__text > * { opacity: clamp(0, (var(--p, 1) - 0.28) * 4, 1); }
body .about h2 { transform-origin: left bottom; transform: scale(calc(1.2 - clamp(0, var(--p, 1) * 1.6, 1) * 0.2)); }
body .about .fight { font-weight: 600; }

/* V. Writing (still) */
body .plain { background: var(--tbs-sand); color: var(--tbs-charcoal); padding: clamp(88px, 12vh, 140px) 0; }
body .plain .chap { height: auto; padding-top: 0; padding-bottom: 0; align-content: start; }
body .plain .tbs-rows { margin-top: 28px !important; }
body .more { margin-top: 24px !important; font-family: var(--tbs-display); font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; }

/* Shop */
body .shop { background: var(--tbs-bone); color: var(--tbs-charcoal); padding: clamp(88px, 12vh, 140px) var(--tbs-gutter); }
body .shop__in { max-width: 1160px; margin: 0 auto !important; }
body .shop__head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 24px; }
body .shop__intro p { color: var(--tbs-muted); margin-top: 12px !important; font-size: 1.2rem; }
body .goods { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: clamp(14px, 2vw, 28px); margin-top: 40px !important; }
body .good { display: grid; gap: 12px; }
body .goods .sq { aspect-ratio: 1; background: var(--tbs-stone); display: grid; place-items: center; overflow: hidden; }
body .good h3 { font-size: 1.3rem; }
body .good h3 a { color: var(--tbs-charcoal); }
body .good h3 a:hover { color: var(--tbs-rust); }
@media (max-width: 720px) { body .goods { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* Finish */
body .finish { --len: 180vh; background: var(--tbs-charcoal); color: var(--tbs-bone); }
body .finish .pin { display: grid; place-items: center; text-align: center; padding: 88px var(--tbs-gutter) 40px; box-sizing: border-box; }
body .finish__in { display: flex; flex-direction: column; align-items: center; gap: 28px; width: 100%; }
body .tape.wp-block-separator { width: min(100%, 980px); max-width: none; height: 6px; border: 0; opacity: 1; background: repeating-linear-gradient(90deg, var(--tbs-bone) 0 22px, var(--tbs-charcoal) 22px 44px); transform-origin: left; transform: scaleX(clamp(0, var(--p, 1) * 2.2, 1)); }
body .finish h2 { font-size: clamp(3.8rem, 12vw, 10rem); line-height: 0.9; color: var(--tbs-bone); opacity: clamp(0.15, (var(--p, 1) - 0.15) * 3, 1); transform: scale(calc(1.2 - clamp(0, var(--p, 1) * 1.5, 1) * 0.2)); will-change: transform; }
body .finish__sign { font-style: italic; color: var(--tbs-mist); font-size: clamp(1.1rem, 1.8vw, 1.4rem); opacity: clamp(0, (var(--p, 1) - 0.35) * 4, 1); }
body .finish .wp-block-buttons { justify-content: center; opacity: clamp(0, (var(--p, 1) - 0.42) * 4, 1); }

/* Homepage footer bar */
body .foot { margin: 0; background: var(--tbs-charcoal); color: var(--tbs-ash); padding: 48px var(--tbs-gutter) calc(40px + env(safe-area-inset-bottom, 0px)) calc(var(--tbs-gutter) + var(--rail)); border-top: 1px solid rgba(163,155,142,0.25); display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 24px; }
body .foot > * { margin: 0; }
body .foot__logo img { width: 170px; opacity: 0.9; }
body .foot__nav { display: flex; flex-wrap: wrap; gap: 12px 28px; font-family: var(--tbs-display); font-size: 0.9375rem; letter-spacing: 0.12em; text-transform: uppercase; }
body .foot__nav a { color: var(--tbs-mist); }
body .foot__nav a:hover { color: var(--tbs-bone); }
body .foot__copy { font-size: 0.875rem; }

/* Phones: videos and about stack instead of pinning */
@media (max-width: 720px) {
  body .start, body .about { --len: auto; }
  body .start .pin, body .about .pin { position: relative; top: 0; height: auto; overflow: visible; display: block; }
  body .track { transform: none; flex-direction: column; padding-top: 88px; padding-bottom: 88px; }
  body .panel, body .panel--intro, body .panel--end { width: 100%; }
  body .panel .wp-block-embed { transform: none; }
  body .about .chap { height: auto; padding-bottom: 88px; }
  body .about__grid { grid-template-columns: minmax(0, 1fr); }
  body .about .photo { clip-path: none; max-height: none; }
  body .about .photo img { transform: none; }
  body .about__text > * { opacity: 1; }
  body .about h2 { transform: none; }
}

/* Reduced motion: no pinning, no zooms, everything visible */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  body .scene { height: auto; }
  body .pin { position: relative; top: 0; height: auto; overflow: visible; }
  body .hero .pin, body .finish .pin { min-height: 100svh; }
  body .chap { height: auto; padding-top: 96px; padding-bottom: 96px; }
  body .hero__step, body .hero__verse, body .hero__lede, body .hero__cta, body .about__text > *, body .finish h2, body .finish__sign, body .finish .wp-block-buttons { opacity: 1; clip-path: none; }
  body .hero__hint, body .dots { display: none; }
  body .checks li, body .beat { opacity: 1; transform: none; transition: none; }
  body .checks li::after { transform: rotate(45deg) scale(1); }
  body .paper.hum .checks { opacity: 1; }
  body .words { min-height: 0; display: grid; gap: 36px; }
  body .word { position: static; opacity: 1; transform: none; }
  body .start .pin { display: block; }
  body .track { transform: none; flex-direction: column; }
  body .panel, body .panel--intro, body .panel--end { width: 100%; max-width: 640px; }
  body .about .photo { clip-path: none; }
}

/* Block editor: show every scene flat and fully visible so it can be edited */
.editor-styles-wrapper .tbs-top { position: relative; top: 0; background: var(--tbs-charcoal); }
.editor-styles-wrapper .scene { height: auto; }
.editor-styles-wrapper .pin { position: relative; top: 0; height: auto; min-height: 0; overflow: visible; }
.editor-styles-wrapper .chap { height: auto; padding-top: 72px; padding-bottom: 72px; }
.editor-styles-wrapper .hero .pin, .editor-styles-wrapper .finish .pin { padding-top: 96px; padding-bottom: 96px; }
.editor-styles-wrapper .hero__step, .editor-styles-wrapper .hero__verse, .editor-styles-wrapper .hero__lede, .editor-styles-wrapper .hero__cta, .editor-styles-wrapper .about__text > *, .editor-styles-wrapper .finish h2, .editor-styles-wrapper .finish__sign, .editor-styles-wrapper .finish .wp-block-buttons, .editor-styles-wrapper .checks li, .editor-styles-wrapper .beat, .editor-styles-wrapper .word { opacity: 1 !important; clip-path: none !important; }
.editor-styles-wrapper .checks, .editor-styles-wrapper .beat, .editor-styles-wrapper .word { transform: none !important; }
.editor-styles-wrapper .hero__hint { position: static; transform: none; opacity: 1; }
.editor-styles-wrapper .words { min-height: 0; display: grid; gap: 32px; }
.editor-styles-wrapper .word { position: static; }
.editor-styles-wrapper .start .pin { display: block; }
.editor-styles-wrapper .track { transform: none !important; flex-wrap: wrap; }
.editor-styles-wrapper .about .photo { clip-path: none; }
.editor-styles-wrapper .tbs-s { padding-left: 0; }
body .tbs-top { color: var(--tbs-bone); }
body .tbs-top .tbs-header__cta .wp-block-button__link { color: var(--tbs-bone); }
body .tbs-s figure, body .foot figure, body .tbs-top figure { margin: 0; }

/* Letter-by-letter chapter headings */
body .split { position: relative; display: inline-block; }
body .split .w { display: inline-block; white-space: nowrap; }
body .split .ch { display: inline-block; --t: clamp(0, var(--v, 1) * 7.5 - var(--i) * 0.28, 1); opacity: var(--t); will-change: transform; }
body .split--drop .ch { transform: translateY(calc((1 - var(--t)) * -0.7em)) rotate(calc((1 - var(--t)) * 10deg)); }
body .split--rise .ch { transform: translateY(calc((1 - var(--t)) * 0.8em)) scale(calc(0.6 + var(--t) * 0.4)); transform-origin: 50% 100%; }
body .split--rise { letter-spacing: calc((1 - clamp(0, var(--v, 1) * 2, 1)) * 0.25em); }
/* "Fine on paper" gets struck through once the hum arrives */
body .paper .split::after { content: ""; position: absolute; left: -2%; right: -2%; top: 52%; height: 0.09em; background: var(--tbs-rust); transform-origin: left; transform: scaleX(clamp(0, (var(--p, 0) - 0.63) * 10, 1)) rotate(-1.5deg); }

/* Sketched "Latest writing" */
body .sketch.is-sketched { line-height: 1; color: var(--tbs-charcoal); }
body .sketch__svg { display: block; max-width: 100%; height: auto; overflow: visible; }
body .sketch__svg .sk-a, body .sketch__svg .sk-b { stroke-width: 1.3px; stroke-linejoin: round; stroke-linecap: round; }
body .sketch__svg .sk-b { opacity: 0.55; }

/* Big Contact button under Subscribe */
body .contact-big { justify-content: center; margin-top: -8px !important; }
body .contact-big .wp-block-button__link { font-size: clamp(2rem, 5.5vw, 3.75rem); font-weight: 700; letter-spacing: 0.08em; line-height: 1; padding: 0.35em 1.1em; border: 3px solid var(--tbs-bone); color: var(--tbs-bone); background: transparent; }
body .contact-big .wp-block-button__link:hover { background: var(--tbs-bone); color: var(--tbs-charcoal); border-color: var(--tbs-bone); }

@media (prefers-reduced-motion: reduce) {
  body .split .ch { opacity: 1; transform: none; }
  body .split--rise { letter-spacing: normal; }
  body .paper .split::after { display: none; }
}
.editor-styles-wrapper .paper .split::after { display: none; }

/* "Let's talk." under the Contact button */
body .finish .talk { margin-top: -10px !important; font-family: var(--tbs-serif, 'Source Serif 4', Georgia, serif); font-style: italic; font-weight: 400; font-size: clamp(1.25rem, 2.2vw, 1.75rem); letter-spacing: 0.02em; color: var(--tbs-mist); opacity: clamp(0, (var(--p, 1) - 0.5) * 4, 1); }
@media (prefers-reduced-motion: reduce) { body .finish .talk { opacity: 1; } }
.editor-styles-wrapper .finish .talk { opacity: 1 !important; }
body .contact-big .wp-block-button.is-style-outline .wp-block-button__link { border: 3px solid var(--tbs-rust); color: var(--tbs-bone); padding: calc(0.35em - 1px) calc(1.1em - 1px); }
body .contact-big .wp-block-button.is-style-outline .wp-block-button__link:hover { background: var(--tbs-rust); border-color: var(--tbs-rust); color: #fff; }

/* Shop product photos */
body .goods .sq a { display: block; width: 100%; height: 100%; }

/* Shop: cut-out product shots on stone squares */
body .goods .sq { position: relative; background: var(--tbs-stone); }
body .goods .sq::after { content: ""; position: absolute; left: 22%; right: 22%; bottom: 9%; height: 7%; border-radius: 50%; background: radial-gradient(closest-side, rgba(30,30,28,0.22), rgba(30,30,28,0)); pointer-events: none; }
body .goods .sq a { display: grid; place-items: center; width: 100%; height: 100%; position: relative; z-index: 1; }
body .good h3 { margin-top: 4px !important; }

/* Bigger products */
body .shop__in { max-width: 1280px; }
body .goods { gap: clamp(12px, 1.6vw, 24px); }
body .goods .sq::after { left: 18%; right: 18%; bottom: 4%; }

/* "Wear the story": folded in quarters, opens with scroll */
body .unfold.is-folded { transform: none; }
body .uf { position: relative; display: inline-block; max-width: 100%; perspective: 1400px;
  --a: clamp(0, (var(--v, 1) - 0.04) * 5, 1);
  --b: clamp(0, (var(--v, 1) - 0.26) * 5, 1); }
body .uf__ghost { display: block; visibility: hidden; }
body .uf__p { position: absolute; inset: 0; display: block; -webkit-backface-visibility: hidden; backface-visibility: hidden; will-change: transform; }
body .uf__tl { clip-path: inset(0 50% 50% 0); filter: brightness(calc(0.82 + var(--b) * 0.18)); }
body .uf__tr { clip-path: inset(0 0 50% 50%); transform: rotateY(calc((1 - var(--a)) * -180deg)); filter: brightness(calc(0.45 + var(--a) * 0.37 + var(--b) * 0.18)); }
body .uf__b { clip-path: inset(50% 0 0 0); transform: rotateX(calc((1 - var(--b)) * 180deg)); filter: brightness(calc(0.45 + var(--b) * 0.55)); }
body .uf::before, body .uf::after { content: ""; position: absolute; pointer-events: none; background: linear-gradient(var(--tbs-charcoal), var(--tbs-charcoal)); }
body .uf::before { left: 50%; top: 0; width: 2px; height: 50%; margin-left: -1px; opacity: calc((1 - var(--a)) * 0.35 + (1 - var(--b)) * 0.15); }
body .uf::after { left: 0; right: 0; top: 50%; height: 2px; margin-top: -1px; opacity: calc((1 - var(--b)) * 0.35); }

/* Product cards unfold down one after another */
body .goods .sq { transform-origin: 50% 0; transform: perspective(1000px) rotateX(calc((1 - clamp(0, (var(--v, 1) - var(--d, 0.08)) * 4, 1)) * -82deg)); }
body .good:nth-child(1) .sq { --d: 0.06; }
body .good:nth-child(2) .sq { --d: 0.11; }
body .good:nth-child(3) .sq { --d: 0.16; }
body .good:nth-child(4) .sq { --d: 0.21; }
body .good h3 { opacity: clamp(0, (var(--v, 1) - 0.2) * 5, 1); }

@media (prefers-reduced-motion: reduce) {
  body .uf__p { display: none; }
  body .uf__ghost { visibility: visible; }
  body .uf::before, body .uf::after { display: none; }
  body .goods .sq { transform: none; }
  body .good h3 { opacity: 1; }
}
.editor-styles-wrapper .goods .sq { transform: none !important; }
.editor-styles-wrapper .good h3 { opacity: 1 !important; }
body .goods .sq { transform: perspective(1000px) rotateX(calc((1 - clamp(0, (var(--v, 1) - var(--d, 0.06)) * 5, 1)) * -82deg)); }
body .good:nth-child(1) .sq { --d: 0.04; }
body .good:nth-child(2) .sq { --d: 0.08; }
body .good:nth-child(3) .sq { --d: 0.12; }
body .good:nth-child(4) .sq { --d: 0.16; }
@media (prefers-reduced-motion: reduce) { body .goods .sq { transform: none; } }


/* Shop product images: fill the square, whatever the image address looks like */
body .goods .sq > a, body .goods .sq > img { position: absolute; inset: 0; }
body .goods .sq > a { display: block; z-index: 1; }
body .goods .sq img,
body .goods .sq img[src],
body .goods .sq a img {
  position: absolute !important; inset: 2% !important;
  width: 96% !important; height: 96% !important; max-width: none !important; max-height: none !important;
  object-fit: contain !important; object-position: 50% 50%;
  margin: 0 !important; padding: 0; border: 0; background: none;
  transform: scale(calc(0.94 + var(--v, 1) * 0.06));
  filter: drop-shadow(0 14px 18px rgba(30, 30, 28, 0.16));
  transition: filter .3s, translate .3s;
}
body .goods .sq a:hover img { translate: 0 -6px; filter: drop-shadow(0 22px 22px rgba(30, 30, 28, 0.22)); }
@media (prefers-reduced-motion: reduce) { body .goods .sq img { transform: none; } body .goods .sq a:hover img { translate: none; } }
.editor-styles-wrapper .goods .sq img { transform: none !important; }
body .panel--end { width: min(84vw, 470px); }
body .panel--end .wp-block-button__link { white-space: nowrap; }
@media (max-width: 720px) { body .panel--end .wp-block-button__link { white-space: normal; } }

/* "Watched all three?" and its button share one width */
body .panel--end { width: max-content; max-width: min(84vw, 560px); gap: 16px; }
body .panel--end .panel__q { white-space: nowrap; }
body .panel--end .wp-block-buttons,
body .panel--end .wp-block-button { width: 100%; }
body .panel--end .wp-block-button__link { display: block; width: 100%; box-sizing: border-box; text-align: center; white-space: nowrap; padding-left: 1rem; padding-right: 1rem; letter-spacing: 0.1em; }
@media (max-width: 720px) {
  body .panel--end { width: 100%; max-width: none; }
  body .panel--end .panel__q { white-space: normal; }
}


/* =====================================================================
   Headline font: Archivo, extra bold, slightly narrow, plain and straight
   ===================================================================== */
body { font-stretch: 82%; }
body :where(p, li, blockquote, .tbs-article, .about__text, .themes__lede, .beat:not(.beat--turn), .word p, .hero__verse, .hero__lede, .finish__sign, .talk, .panel--intro p) { font-stretch: 100%; }
body h1, body h2, body h3,
body .num, body .word__big, body .beat--turn, body .panel__q, body .hero__step,
body .checks li, body .tbs-row__title, body .foot__logo + p { font-weight: 800; }
body h1, body h2, body .word__big, body .num { letter-spacing: -0.01em; }
body .wp-block-button__link, body .tbs-nav, body .tbs-kicker, body .panel__why, body .more, body .tbs-row__tag, body .foot__nav, body .tbs-rail__cp { font-weight: 700; }

/* Slightly smaller giant type so the wider letters keep the same fit */
body .hero h1 { font-size: clamp(3rem, min(8.6vw, 15vh), 8.25rem); }
body .finish h2 { font-size: clamp(3.4rem, 10vw, 8.75rem); }
body .word__big { font-size: clamp(2.8rem, 8vw, 6.75rem); }
body .chap h2, body .shop h2, body .panel--intro h2 { font-size: clamp(2.4rem, 5.4vw, 4.4rem); }
body .num { font-size: clamp(4.6rem, 12vw, 10rem); }
@media (max-width: 720px) { body .num { font-size: 4.2rem; } }
body .num, body .word__big, body .beat--turn, body .panel__q, body .hero__step, body .hero__hint,
body .tbs-kicker, body .panel__why, body .more, body .tbs-row__tag, body .foot__nav, body .tbs-close__meta,
body .checks li, body .tbs-page-head__tag, body .tbs-page-head__meta { font-stretch: 82%; }
body h1, body h2, body .word__big, body .hero__step, body .beat--turn, body .panel__q { word-spacing: 0.08em; }
body .word { max-width: min(100%, 860px); }

/* =====================================================================
   Landing candle
   ===================================================================== */
body .hero { --len: 240vh; }
body .hero .pin { position: sticky; }
body .hero__inner { position: relative; z-index: 1; }
body .hero__candle {
  --lit: clamp(0, (var(--p, 0) - 0.015) * 9, 1);
  --away: clamp(0, (var(--p, 0) - 0.15) * 4, 1);
  position: absolute; z-index: 0; left: 50%; top: 9vh; width: min(22vh, 34vw); height: 82vh; margin-left: calc(min(22vh, 34vw) / -2);
  pointer-events: none;
  opacity: calc((0.16 + var(--lit) * 0.22) * (1 - var(--away)));
  transform: translateY(calc(var(--away) * -38vh)) scale(calc(1 - var(--away) * 0.45));
  transform-origin: 50% 20%;
  will-change: transform, opacity;
}
body .hero__candle svg { width: 100%; height: 100%; overflow: visible; }
body .hero__candle .c-glow { opacity: calc(var(--lit) * 1.4); transform-box: fill-box; transform-origin: center; transform: scale(calc(0.4 + var(--lit) * 0.9)); }
body .hero__candle .c-ember { opacity: calc(clamp(0, var(--lit) * 4, 1) * (1 - var(--lit) * 0.6)); }
body .hero__candle .c-wick { stroke: color-mix(in srgb, #A39B8E calc((1 - var(--lit)) * 100%), #1E1E1C); }
body .hero__candle .c-flame { opacity: clamp(0, var(--lit) * 1.6, 1); transform-box: fill-box; transform-origin: 50% 100%; transform: scale(calc(0.15 + var(--lit) * 0.85)); }
body .hero__candle .c-flicker { transform-box: fill-box; transform-origin: 50% 100%; animation: tbs-flicker 2.6s ease-in-out infinite; }
@keyframes tbs-flicker {
  0%, 100% { transform: scale(1, 1) skewX(0deg); }
  20% { transform: scale(0.97, 1.05) skewX(1.8deg); }
  45% { transform: scale(1.02, 0.96) skewX(-1.2deg); }
  70% { transform: scale(0.98, 1.03) skewX(1deg); }
}
/* The flame warms the headline */
body .hero h1 { text-shadow: 0 0 calc(var(--lit-h, 0) * 1px) rgba(224, 138, 98, 0.35); }
body .hero { --lit-h: calc(clamp(0, (var(--p, 0) - 0.015) * 9, 1) * (1 - clamp(0, (var(--p, 0) - 0.15) * 4, 1)) * 60); }

/* Text now follows the candle */
body .hero__step { clip-path: inset(0 calc(100% - clamp(0, (var(--p, 1) - 0.2) * 420, 100) * 1%) 0 0); }
body .hero__verse { opacity: clamp(0, (var(--p, 1) - 0.3) * 6, 1); }
body .hero__lede { opacity: clamp(0, (var(--p, 1) - 0.37) * 6, 1); }
body .hero__cta { opacity: clamp(0, (var(--p, 1) - 0.44) * 6, 1); }
body .hero__hint { opacity: calc(1 - var(--p, 1) * 12); }

@media (max-width: 720px) { body .hero__candle { top: 10vh; height: 70vh; } }
@media (prefers-reduced-motion: reduce) {
  body .hero__candle { display: none; }
  body .hero h1 { text-shadow: none; }
  body .hero__step { clip-path: none; }
  body .hero__verse, body .hero__lede, body .hero__cta { opacity: 1; }
}

/* Candle sits in the space under the headline */
body .hero__candle {
  top: 42vh; width: min(26vh, 40vw); height: 66vh; margin-left: calc(min(26vh, 40vw) / -2);
  opacity: calc((0.24 + var(--lit) * 0.34) * (1 - var(--away)));
  transform: translateY(calc(var(--away) * 26vh)) scale(calc(1 - var(--away) * 0.3));
  transform-origin: 50% 15%;
}
body .hero h1 { text-shadow: 0 0 calc(var(--lit-h, 0) * 0.7px) rgba(224, 138, 98, 0.28); }
@media (max-width: 720px) { body .hero__candle { top: 46vh; height: 56vh; width: min(22vh, 40vw); margin-left: calc(min(22vh, 40vw) / -2); } }
body .hero__hint { z-index: 2; }

/* =====================================================================
   Landing candle: flat line version
   ===================================================================== */
body .hero__candle { opacity: calc((0.34 + var(--lit) * 0.4) * (1 - var(--away))); }
body .hero h1 { text-shadow: none; }
body .hero__candle .c-body, body .hero__candle .c-body * { stroke-width: 1.5px; }
body .hero__candle .c-wick { stroke-width: 2px; stroke: #F2EDE4; }
body .hero__candle .c-ring { stroke-width: 1px; stroke-dasharray: 1; stroke-dashoffset: 1; }
body .hero__candle .r1 { stroke-dashoffset: calc(1 - clamp(0, (var(--lit) - 0.25) * 2.4, 1)); stroke-opacity: .7; }
body .hero__candle .r2 { stroke-dashoffset: calc(1 - clamp(0, (var(--lit) - 0.45) * 2.4, 1)); stroke-opacity: .45; }
body .hero__candle .r3 { stroke-dashoffset: calc(1 - clamp(0, (var(--lit) - 0.62) * 2.6, 1)); stroke-opacity: .25; }
body .hero__candle .c-flame { opacity: clamp(0, var(--lit) * 2, 1); transform-box: fill-box; transform-origin: 50% 100%; transform: scale(calc(0.1 + clamp(0, var(--lit) * 1.4, 1) * 0.9)); }
body .hero__candle .c-sway { transform-box: fill-box; transform-origin: 50% 100%; animation: tbs-sway 3.4s ease-in-out infinite; }
@keyframes tbs-sway {
  0%, 100% { transform: rotate(0deg) scaleY(1); }
  30% { transform: rotate(-2.2deg) scaleY(1.03); }
  65% { transform: rotate(1.8deg) scaleY(0.98); }
}
@media (prefers-reduced-motion: reduce) { body .hero__candle .c-sway { animation: none; } }
body .hero__candle .c-ring { stroke-width: 0.9; }

/* =====================================================================
   Landing candle: single-line gold drawing
   ===================================================================== */
body .hero__candle {
  top: 38vh; width: min(32vh, 48vw); height: 58vh; margin-left: calc(min(32vh, 48vw) / -2);
  opacity: calc((0.62 + var(--lit) * 0.33) * (1 - var(--away)));
  transform: translateY(calc(var(--away) * 22vh)) scale(calc(1 - var(--away) * 0.25));
}
body .hero__candle .ln { stroke-width: 2.1; stroke-dasharray: 1; stroke-dashoffset: 1; animation: tbs-draw 2.2s cubic-bezier(.45,.05,.3,1) forwards; }
body .hero__candle .c-saucer { animation-delay: .2s; }
body .hero__candle .c-candle { animation-delay: .7s; animation-duration: 2.6s; }
body .hero__candle .c-handle { animation-delay: 1.5s; animation-duration: 1.6s; }
body .hero__candle .c-shine  { animation-delay: 2.2s; animation-duration: 1.2s; stroke-width: 1.2; stroke-opacity: .55; }
body .hero__candle .c-wick   { animation-delay: 2.4s; animation-duration: .8s; }
@keyframes tbs-draw { to { stroke-dashoffset: 0; } }
/* The flame is drawn by scrolling, not by time */
body .hero__candle .c-flame-line { animation: none; stroke-width: 2; stroke-dashoffset: calc(1 - clamp(0, var(--lit) * 1.15, 1)); }
body .hero__candle .c-flame-fill { opacity: calc(clamp(0, (var(--lit) - 0.55) * 2.2, 1) * 0.28); }
body .hero__candle .c-flame { transform-box: fill-box; transform-origin: 50% 100%; animation: tbs-sway 3.6s ease-in-out infinite; }
/* Floating dots appear with the flame and drift upward */
body .hero__candle .d { transform-box: fill-box; transform-origin: center; opacity: 0; animation: tbs-float 6s ease-in-out infinite; }
body .hero__candle .c-dots { opacity: clamp(0, (var(--lit) - 0.35) * 2.2, 1); }
body .hero__candle .d1 { --o: .55; animation-delay: -0.5s; }
body .hero__candle .d2 { --o: .45; animation-delay: -2s; animation-duration: 7s; }
body .hero__candle .d3 { --o: .5;  animation-delay: -3.5s; }
body .hero__candle .d4 { --o: .4;  animation-delay: -1.2s; animation-duration: 6.8s; }
body .hero__candle .d5 { --o: .5;  animation-delay: -4.4s; animation-duration: 7.4s; }
body .hero__candle .d6 { --o: .6;  animation-delay: -2.8s; }
body .hero__candle .d7 { --o: .6;  animation-delay: -5s; animation-duration: 5.4s; }
body .hero__candle .d8 { --o: .55; animation-delay: -1.8s; animation-duration: 6.4s; }
@keyframes tbs-float {
  0%   { opacity: 0; transform: translateY(10px); }
  25%  { opacity: var(--o); }
  75%  { opacity: var(--o); }
  100% { opacity: 0; transform: translateY(-16px); }
}
@media (max-width: 720px) { body .hero__candle { top: 42vh; height: 52vh; width: min(28vh, 56vw); margin-left: calc(min(28vh, 56vw) / -2); } }
@media (prefers-reduced-motion: reduce) {
  body .hero__candle .ln { animation: none; stroke-dashoffset: 0; }
  body .hero__candle .c-flame, body .hero__candle .d { animation: none; }
}
body .hero__candle .c-flame-fill { fill: #F6DDA8; opacity: calc(clamp(0, (var(--lit) - 0.55) * 2.2, 1) * 0.2); }
body .hero__candle .c-wick { stroke: #C8AE74; stroke-width: 2; }
body .hero__candle .c-flame-fill { display: none; }

/* Candle in bone white, flame and embers orange */
body .hero__candle .c-wick { stroke: #F2EDE4; }
body .hero__candle .c-flame-line { stroke: #E08A62; stroke-width: 2.3; }
body .hero__candle .c-shine { stroke-opacity: .4; }
body .hero__candle { opacity: calc((0.7 + var(--lit) * 0.3) * (1 - var(--away))); }
body .hero__candle .c-dots { opacity: clamp(0, (var(--lit) - 0.3) * 2.4, 1); }
@keyframes tbs-float {
  0%   { opacity: 0; transform: translate(0, 12px); }
  20%  { opacity: var(--o); }
  70%  { opacity: var(--o); }
  100% { opacity: 0; transform: translate(3px, -26px); }
}
body .foot__copy a, body .tbs-close__meta span a { color: inherit; text-decoration: underline; text-underline-offset: 3px; text-decoration-color: rgba(163,155,142,0.5); }
body .foot__copy a:hover, body .tbs-close__meta span a:hover { color: var(--tbs-bone); text-decoration-color: currentColor; }
