/* Blanca Robson / Cowboy Charlie — split stage, denim on hay */
@font-face { font-family: "Gambarino"; src: url("fonts/gambarino-400.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "General Sans"; src: url("fonts/general-sans-400.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "General Sans"; src: url("fonts/general-sans-500.woff2") format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "General Sans"; src: url("fonts/general-sans-600.woff2") format("woff2"); font-weight: 600; font-display: swap; }

:root {
  --bg: #e9ddc4;
  --surface: #ddcfb2;
  --surface-2: #d2c29f;
  --ink: #12306f;
  --muted: #34518f;
  --accent: #12306f;
  --accent-ink: #eeece6;

  --display: "Gambarino", Georgia, serif;
  --text: "General Sans", system-ui, sans-serif;

  --step-small: clamp(0.8125rem, 0.79rem + 0.1vw, 0.875rem);
  --step-body: clamp(1.0625rem, 1rem + 0.25vw, 1.1875rem);
  --step-lead: clamp(1.25rem, 1.1rem + 0.7vw, 1.625rem);
  --step-sub: clamp(1.5rem, 1.1rem + 1.2vw, 2.25rem);
  --step-head: clamp(2rem, 1.3rem + 3.2vw, 4rem);
  --step-display: clamp(3.5rem, 11.2vw, 14rem);

  --margin: clamp(20px, 2.4vw, 32px);
  --split: 47vw;
  --inset: 20px;
  --pad: clamp(24px, 4vw, 64px);
  --gap-section: clamp(120px, 14vw, 200px);

  --ease: cubic-bezier(.2, .7, .2, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
html[data-motion="none"] { scroll-behavior: auto; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font-family: var(--text); font-size: var(--step-body); line-height: 1.5;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
img, video { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
p { margin: 0 0 1em; }
h1, h2, h3 { font-family: var(--display); font-weight: 400; letter-spacing: -0.02em; line-height: 0.92; margin: 0; }
::selection { background: var(--ink); color: var(--accent-ink); }
:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: var(--margin); top: -60px; background: var(--ink); color: var(--accent-ink); padding: 10px 16px; z-index: 50; }
.skip:focus { top: 12px; }

/* ---------- buttons & links ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5em;
  min-height: 52px; padding: 0 26px; border: 0; border-radius: 0;
  background: var(--ink); color: var(--accent-ink);
  font: 500 var(--step-body)/1 var(--text); text-decoration: none; cursor: pointer;
  transition: transform .18s var(--ease), background-color .18s var(--ease);
}
.btn:hover { background: #0b2459; transform: translateY(-2px); }
.btn:active { transform: translateY(1px) scale(.98); }
.btn--paper { background: var(--accent-ink); color: var(--ink); }
.btn--paper:hover { background: #fff8e8; }
.btn--soft { background: var(--surface-2); color: var(--ink); }
.btn--soft:hover { background: #c8b690; }
.link { text-decoration: underline; text-underline-offset: .2em; text-decoration-thickness: 1px; transition: text-underline-offset .18s var(--ease); }
.link:hover { text-underline-offset: .35em; }

/* ---------- page split ---------- */
.page { display: grid; grid-template-columns: var(--split) 1fr; position: relative; }
.stage { position: sticky; top: 0; height: 100svh; padding: var(--inset) 0 var(--inset) var(--inset); display: flex; flex-direction: column; }
.stage__frame { position: relative; flex: 1; overflow: hidden; background: var(--surface); }
.stage__item { position: absolute; inset: 0; margin: 0; opacity: 0; transition: opacity .6s var(--ease); }
.stage__item.is-on { opacity: 1; }
.stage__item img, .stage__item video { width: 100%; height: 100%; object-fit: cover; }
.stage__item--cover { background: var(--surface); display: grid; place-items: center; padding: 8%; }
.stage__item--cover img { width: auto; height: 100%; max-height: 100%; object-fit: contain; }
.stage__item.is-on img { animation: drift 18s var(--ease) both; }
@keyframes drift { from { transform: scale(1.06); } to { transform: scale(1); } }
.stage__item--cover.is-on img { animation: none; }
.stage__cap { min-height: 44px; padding: 14px 0 0; font-size: var(--step-small); color: var(--muted); }

.read { min-width: 0; }
.sec { padding: 0 var(--pad) 0 clamp(32px, 5vw, 88px); margin-bottom: var(--gap-section); }
.sec h2 { font-size: var(--step-head); margin-bottom: 48px; }
.measure { max-width: 46ch; }
.m-only { display: none; }

/* ---------- hero ---------- */
.hero { position: relative; min-height: 100svh; margin-bottom: var(--gap-section); padding: 0 var(--margin) 0 clamp(32px, 5vw, 88px); }
.nav { display: flex; justify-content: flex-end; align-items: center; gap: clamp(14px, 1.6vw, 26px); padding-top: var(--margin); font-size: var(--step-small); }
.nav a:not(.btn) { text-decoration: none; padding: 6px 0; transition: transform .18s var(--ease); display: inline-block; }
.nav a:not(.btn):hover { transform: translateY(-2px); text-decoration: underline; text-underline-offset: .3em; }
.nav .btn { min-height: 44px; padding: 0 18px; font-size: var(--step-small); }
.nav__lang { margin-right: auto; }
.nav__home { font-weight: 500; }
.hero__say { position: absolute; top: 40%; left: clamp(32px, 5vw, 88px); right: var(--margin); }
.hero__say p { font-size: var(--step-lead); line-height: 1.3; max-width: 24ch; margin-bottom: 18px; }
.hero__say .hero__facts { font-size: var(--step-body); line-height: 1.5; max-width: 34ch; color: var(--ink); margin-bottom: 28px; }
.mark {
  position: absolute; left: 0; right: 0; top: 0; height: 100svh; pointer-events: none; z-index: 4;
}
.mark__line {
  position: absolute; right: var(--margin); bottom: 40px; margin: 0;
  font-family: var(--display); font-weight: 400; font-size: var(--step-display);
  letter-spacing: -0.04em; line-height: .8; white-space: nowrap; transform-origin: 100% 100%;
}
.mark__clip { position: absolute; inset: 0; }
.mark__clip--paper .mark__line::before { content: attr(data-text); }
.mark__clip--paper { color: var(--accent-ink); clip-path: inset(0 calc(100% - var(--split)) var(--inset) var(--inset)); }
.mark__clip--ink { color: var(--ink); clip-path: inset(0 0 0 var(--split)); }

/* ---------- books: big names, fixed preview ---------- */
.books__item { padding: 10px 0 56px; }
.books__name { display: block; font-family: var(--display); font-size: var(--step-head); line-height: .98; letter-spacing: -0.02em; color: var(--muted); text-decoration: none; transition: color .25s var(--ease), transform .25s var(--ease); }
.books__item.is-active .books__name { color: var(--ink); }
.books__name:hover { transform: translateX(8px); }
.books__meta { display: block; font-size: var(--step-small); color: var(--muted); margin: 12px 0 18px; }
.books__item p { max-width: 46ch; }
.buy { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 22px; }
.buy .btn { min-height: 48px; padding: 0 20px; }

/* ---------- reading sample ---------- */
.tabs { display: flex; gap: 22px; margin: -24px 0 36px; font-size: var(--step-body); }
.tabs button { background: none; border: 0; padding: 6px 0; font: inherit; color: var(--muted); cursor: pointer; text-decoration: none; transition: color .2s var(--ease); }
.tabs button[aria-selected="true"] { color: var(--ink); font-weight: 500; text-decoration: underline; text-underline-offset: .3em; text-decoration-thickness: 2px; }
.tabs button:hover { color: var(--ink); }
.sample { max-width: 40ch; }
.sample h3 { font-size: var(--step-lead); line-height: 1.1; margin-bottom: 8px; }
.sample .sample__src { font-size: var(--step-small); color: var(--muted); margin-bottom: 28px; }
.sample p { line-height: 1.6; }
.sample p:first-of-type { font-weight: 500; }
.js .sample[hidden] { display: none; }

/* ---------- characters: active list ---------- */
.cast { list-style: none; margin: 0; padding: 0; max-width: 560px; }
.cast__row { padding: 0; }
.cast__btn {
  width: 100%; display: flex; justify-content: space-between; align-items: baseline; gap: 16px;
  min-height: 58px; padding: 14px 0; background: none; border: 0; cursor: pointer; text-align: left;
  font: 400 var(--step-lead)/1.2 var(--text); color: var(--muted); transition: color .2s var(--ease), padding .25s var(--ease);
}
.cast__btn small { font-size: var(--step-small); color: var(--muted); font-weight: 400; }
.cast__row.is-active .cast__btn { color: var(--ink); font-weight: 500; padding-left: 10px; }
.cast__btn:hover { color: var(--ink); }
.cast__text { max-width: 40ch; font-size: var(--step-body); line-height: 1.55; padding: 0 0 18px 10px; }
.js .cast__row:not(.is-active) .cast__text { display: none; }

/* ---------- rules: the plate ---------- */
.rules__plate {
  background: var(--surface); padding: clamp(28px, 3.4vw, 52px); min-height: min(560px, 74svh);
  display: flex; flex-direction: column; justify-content: space-between; gap: 32px;
}
.rules__tabs { display: flex; flex-wrap: wrap; gap: 22px; font-size: var(--step-body); }
.rules__tabs button { background: none; border: 0; padding: 4px 0; font: inherit; color: var(--muted); cursor: pointer; }
.rules__tabs button[aria-pressed="true"] { color: var(--ink); font-weight: 500; text-decoration: underline; text-underline-offset: .3em; text-decoration-thickness: 2px; }
.rules__card { min-height: 9em; }
.rules__no { font-size: var(--step-small); color: var(--muted); margin: 18px 0 0; }
.rules__text { font-family: var(--display); font-size: var(--step-sub); line-height: 1.1; letter-spacing: -0.015em; max-width: 22ch; margin: 0; }
.rules__text.is-long { font-size: var(--step-lead); line-height: 1.2; max-width: 30ch; }
.rules__card.is-new .rules__text, .rules__card.is-new .rules__no { animation: rise .5s var(--ease) both; }
@keyframes rise { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
.rules__acts { display: grid; grid-template-columns: 1fr 1fr; gap: 0; }
.rules__acts .btn { min-height: 72px; width: 100%; }
.rules__all { margin-top: 40px; }
.rules__all:not([open]) > :not(summary) { display: none; }
.rules__all summary { cursor: pointer; font-weight: 500; padding: 10px 0; list-style: none; text-decoration: underline; text-underline-offset: .3em; }
.rules__all summary::-webkit-details-marker { display: none; }
.rules__all h3 { font-family: var(--text); font-weight: 500; font-size: var(--step-body); letter-spacing: 0; line-height: 1.4; margin: 28px 0 10px; }
.rules__all ol { margin: 0; padding-left: 2.2em; max-width: 46ch; }
.rules__all li { margin-bottom: .7em; line-height: 1.5; }

/* ---------- about: letter on a sheet ---------- */
.letter { background: var(--accent-ink); padding: clamp(28px, 3.6vw, 60px); max-width: 640px;
  clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%); }
.letter__face { width: 96px; height: 96px; border-radius: 50%; object-fit: cover; margin-bottom: 28px; }
.letter p { font-size: var(--step-body); line-height: 1.6; }
.letter mark { background: var(--surface-2); color: var(--ink); padding: 0 .15em; }
.letter .letter__sign { font-family: var(--display); font-size: var(--step-lead); margin: 28px 0 2px; }
.letter .letter__role { font-size: var(--step-small); color: var(--muted); margin: 0; }
.letter__note { margin-top: 28px; padding-top: 0; }

/* ---------- cta: last picture ---------- */
.cta { position: relative; height: 90svh; min-height: 560px; overflow: hidden; background: #3a2412; }
.cta__img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 30% 50%; filter: brightness(.62); }
.cta__text { position: absolute; left: 58%; right: var(--margin); bottom: 14%; color: var(--accent-ink); max-width: 560px; }
.cta__text h2 { font-size: var(--step-head); margin-bottom: 24px; }
.cta__text p { font-size: var(--step-body); max-width: 40ch; margin-bottom: 28px; }

/* ---------- footer ---------- */
.foot { display: grid; grid-template-columns: 1fr 1fr; min-height: 100svh; background: var(--ink); color: var(--accent-ink); }
.foot__img { position: relative; overflow: hidden; }
.foot__img img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 22%; }
.foot__side { padding: 80px var(--margin) 28px clamp(32px, 5vw, 88px); display: flex; flex-direction: column; }
.foot__word { font-family: var(--display); font-size: var(--step-lead); margin: 0 0 40px; }
.foot__menu { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.foot__menu a { font-family: var(--display); font-size: var(--step-sub); line-height: 1.05; text-decoration: none; display: inline-block; transition: transform .2s var(--ease), color .2s var(--ease); }
.foot__menu:hover a { color: #b9c3dc; }
.foot__menu a:hover, .foot__menu a:focus-visible { transform: translateX(12px); color: var(--accent-ink); }
.foot__blocks { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; margin-top: 64px; font-size: var(--step-small); }
.foot__blocks p { margin: 0 0 .4em; }
.foot__blocks b { font-weight: 500; }
.foot__ai { margin-top: 40px; font-size: var(--step-small); max-width: 52ch; }
.foot__legal { margin-top: auto; padding-top: 40px; display: flex; flex-wrap: wrap; gap: 8px 22px; align-items: center; font-size: var(--step-small); }
.foot__legal button { background: none; border: 0; padding: 6px 0; color: inherit; font: inherit; cursor: pointer; text-decoration: underline; text-underline-offset: .25em; }
.foot__legal a:hover, .foot__legal button:hover { text-underline-offset: .4em; }

/* ---------- motion layer ---------- */
html[data-motion="full"] .js-rv { opacity: 0; transform: translateY(24px); transition: opacity .7s var(--ease), transform .7s var(--ease); transition-delay: calc(var(--i, 0) * 80ms); }
html[data-motion="fade"] .js-rv { opacity: 0; transition: opacity .8s ease; transition-delay: calc(var(--i, 0) * 80ms); }
html[data-motion] .js-rv.in { opacity: 1; transform: none; }
html[data-motion="none"] *, html[data-motion="none"] *::before { animation: none !important; transition: none !important; }
html[data-motion="fade"] .stage__item.is-on img { animation: none; }
html[data-motion="fade"] .btn:hover, html[data-motion="fade"] .books__name:hover, html[data-motion="fade"] .foot__menu a:hover { transform: none; }

@supports (animation-timeline: scroll()) {
  html[data-motion="full"] .mark__line { animation: shrink linear both; animation-timeline: scroll(root); animation-range: 0 100svh; }
  @keyframes shrink { from { scale: 1; } to { scale: .93; } }
}

/* ---------- phone & tablet ---------- */
@media (max-width: 899px) {
  :root { --split: 100vw; }
  .page { display: block; }
  .stage { position: relative; height: 58svh; padding: 12px 12px 0; }
  .stage__cap { display: none; }
  .stage__item:not([data-key="hochhaus"]) { display: none; }
  .hero { position: static; min-height: 0; padding: 0 20px; margin-bottom: 96px; }
  .nav { position: absolute; top: 12px; left: 12px; right: 12px; padding: 12px; z-index: 6; justify-content: space-between; }
  .nav a:not(.btn):not(.nav__lang):not(.nav__home) { display: none; }
  .nav:has(.nav__home) .nav__lang { display: none; }
  .nav__lang, .nav__home { background: var(--accent-ink); padding: 8px 12px !important; }
  .mark { position: relative; height: auto; margin-top: 10px; padding: 0 20px; }
  .mark__line { position: static; font-size: 13.4vw; line-height: .9; text-align: left; transform-origin: 0 100%; }
  .mark__clip--paper { display: none; }
  .mark__clip--ink { clip-path: none; position: static; }
  .hero__say { position: static; padding-top: 24px; }
  .hero__say p { font-size: var(--step-lead); max-width: 30ch; }
  .sec { padding: 0 20px; margin-bottom: 120px; }
  .sec h2 { margin-bottom: 32px; }
  .m-only { display: block; }
  .m-img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; margin-bottom: 20px; }
  .m-img--cover { aspect-ratio: auto; width: 62%; height: auto; object-fit: contain; }
  .books__name { font-size: 9.5vw; color: var(--ink); }
  .books__item { padding-bottom: 64px; }
  .cast__text img { width: 100%; aspect-ratio: 4 / 5; max-height: 62svh; object-fit: cover; object-position: 50% 12%; margin: 6px 0 14px; }
  .rules__acts { grid-template-columns: 1fr; }
  .rules__acts .btn { min-height: 60px; }
  .letter { margin: 0 -20px; }
  .cta { height: auto; min-height: 0; background: var(--ink); }
  .cta__img { position: static; height: auto; aspect-ratio: 4 / 3; object-position: 22% 30%; filter: none; }
  .cta__text { position: static; padding: 40px 20px 8px; max-width: none; }
  .cta__text h2 { font-size: var(--step-sub); }
  .foot { display: block; min-height: 0; }
  .foot__img { height: auto; aspect-ratio: 4 / 5; max-height: 70svh; width: 100%; }
  .foot__img img { object-position: 50% 30%; }
  .foot__side { padding: 48px 20px 28px; }
  .foot__menu a { font-size: 8vw; }
  .foot__blocks { grid-template-columns: 1fr; }
}
@media (min-width: 900px) {
  .books__list { position: relative; }
}
