/* Shared public page surfaces and interaction styles. */
.paper-surface {
  --muted: var(--paper-muted);
  --red-text: var(--paper-accent);
  --border: var(--paper-border);
  --control-border: var(--paper-control);
  background: var(--off-white);
  color: var(--black);
  color-scheme: light;
}
.paper-surface :focus-visible {
  outline-color: var(--paper-focus);
}
.paper-surface a[href]:not(.button):hover {
  color: var(--paper-accent);
}
.paper-surface a.text-link {
  text-decoration: underline;
  text-underline-offset: .23em;
}
.paper-surface .section-index,
.paper-surface .section-heading > p,
.paper-surface .demo-note {
  color: var(--paper-muted);
}
.paper-surface .heading-accent,
.paper-surface .red-ink {
  color: var(--paper-accent);
}

.header-inner {
  gap: clamp(12px, 3vw, 40px);
}
.site-header .brand-logo img,
.site-footer .brand-logo img {
  min-width: 120px;
}
.desktop-nav {
  gap: clamp(14px, 2vw, 28px);
}
.desktop-nav > a {
  font-size: .875rem;
  border-bottom: 2px solid transparent;
}
.desktop-nav > a[aria-current] {
  border-color: var(--red);
}
.site-header,
.site-header.scrolled {
  background: var(--black);
}
.button {
  gap: 1rem;
  min-height: 48px;
  padding: .75rem 1.125rem;
  font-size: .875rem;
  background: var(--red);
  transition: background-color var(--transition);
}
.button:hover {
  transform: none;
  background: var(--red-hover);
}
.button-small {
  min-height: 44px;
}
.section-heading > p,
.text-link {
  font-size: .875rem;
}
.site-footer {
  background: var(--black);
}
.footer-top nav a,
.footer-contact a {
  min-height: 44px;
}
@media (max-width: 999px) {
  html:not(.js) .header-inner { flex-wrap: wrap; padding-block: .75rem; }
  html:not(.js) .desktop-nav { flex-basis: 100%; }
  html:not(.js) .site-header { position: static; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .01ms !important;
    transition-duration: .01ms !important;
  }
}

/* The catalog uses the same composition with no entrance animation. */
.editorial-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, .98fr);
  align-items: center;
  gap: clamp(20px, 5vw, 80px);
  padding-block: clamp(38px, 6.3vw, 94px);
}
.editorial-intro h1 {
  font-size: clamp(2.65rem, 5.3vw, 4.75rem);
  line-height: .99;
  max-width: 12ch;
}
.editorial-intro .page-intro { margin-top: 1.25rem; }
.editorial-intro .page-actions { margin-top: 1.5rem; }
.editorial-book-stage {
  isolation: isolate;
  position: relative;
  display: flex;
  justify-content: center;
  align-items: end;
  min-width: 0;
  padding: 1.1rem clamp(1rem, 3vw, 2.75rem) 2rem;
}
.editorial-book-stage::before {
  position: absolute;
  inset: auto 0 0;
  height: 30%;
  background: #211e1d;
  clip-path: polygon(7% 0, 95% 0, 100% 43%, 100% 100%, 0 100%, 0 43%);
  z-index: -1;
  content: "";
}
.editorial-book {
  position: relative;
  flex: 0 0 30%;
  margin: 0;
  min-width: 0;
  --book-angle: -7deg;
  transform: rotate(var(--book-angle));
  transform-origin: 50% 90%;
}
.editorial-book img {
  width: 100%;
  aspect-ratio: 3 / 4.25;
  object-fit: contain;
  filter: drop-shadow(7px 8px 8px #0009);
}
.editorial-book-stage[data-cover-count="1"] .editorial-book {
  flex-basis: 53%;
  --book-angle: 0deg;
}
.editorial-book-stage[data-cover-count="2"] .editorial-book { flex-basis: 40%; }
.editorial-book:nth-child(2) { z-index: 1; --book-angle: 0deg; }
.editorial-book-stage[data-cover-count="3"] .editorial-book:nth-child(2) {
  flex-basis: 38%;
  margin-inline: -2.5%;
}
.editorial-book:last-child:not(:first-child) { --book-angle: 7deg; }
@media (prefers-reduced-motion: no-preference) {
  .js .home-hero .editorial-book { animation: book-arrival 800ms cubic-bezier(.2,.72,.3,1) both; }
  .js .home-hero .editorial-book:nth-child(2) { animation-delay: 65ms; }
  .js .home-hero .editorial-book:nth-child(3) { animation-delay: 130ms; }
}
@keyframes book-arrival {
  from { transform: translateY(11px) rotate(calc(var(--book-angle) + 3deg)); }
  to { transform: translateY(0) rotate(var(--book-angle)); }
}
.orientation-grid {
  display: grid;
  grid-template-columns: 1.2fr repeat(4, minmax(0, 1fr));
  padding-block: 1.6rem;
}
.orientation-grid h2 { font-size: clamp(1.45rem, 2.5vw, 2.125rem); padding-right: 1rem; }
.orientation-grid a {
  padding: .35rem clamp(.75rem, 2vw, 1.5rem);
  border-inline-start: 1px solid var(--border);
}
.orientation-grid strong {
  display: flex;
  justify-content: space-between;
  gap: .4rem;
  font-family: var(--font-display);
  font-size: 1.125rem;
}
.orientation-grid strong span { color: var(--paper-accent); }
.orientation-grid small { color: var(--muted); font-size: .875rem; line-height: 1.35; display: block; margin-top: .35rem; }
.home-course { background: var(--dark); }
.home-course-grid {
  display: grid;
  grid-template-columns: 1fr minmax(120px, .55fr);
  gap: clamp(1.25rem, 5vw, 4rem);
  align-items: center;
}
.home-course-grid h2 { margin: .6rem 0 1rem; }
.home-course-grid .button { margin-top: 1.3rem; }
.home-course-grid img { width: min(175px, 100%); justify-self: center; }
.home-editorial-grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(24px, 6vw, 72px); }
.home-editorial-grid > section { width: 100%; min-width: 0; margin: 0; }
.home-editorial-grid h2 { font-size: clamp(2rem, 3.3vw, 3rem); }
.home-editorial-grid .latest-guide-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  column-gap: .65rem;
  row-gap: .2rem;
  padding: .85rem 0;
  color: var(--black);
}
.home-editorial-grid .latest-guide-row h3 { grid-area: 1 / 1; font-size: 1rem; letter-spacing: -.025em; }
.home-editorial-grid .latest-guide-row small { grid-area: 2 / 1; color: var(--paper-muted); }
.home-editorial-grid .latest-guide-row span:first-child { display: none; }
.home-editorial-grid .section-heading { align-items: start; display: grid; gap: .65rem; margin-bottom: 1rem; }
.home-editorial-grid .latest-guides > h2 { margin-bottom: 1.2rem; }
.page-home .upcoming-grid { margin-top: 2rem; }
.page-home .upcoming-product { background: transparent; color: var(--black); grid-template-columns: 1fr; padding: 1.1rem 0; border-inline: 0; border-bottom: 0; }
.page-home .upcoming-product > div { padding: 0; }
.page-home .upcoming-product h3 { margin-block: .25rem; }
.page-home .upcoming-product p { color: var(--paper-muted); }
.paper-surface .book-choice { border-radius: var(--radius-sm); min-height: 44px; }
.paper-surface .feature { padding-top: .75rem; }
.paper-surface .feature h4 { margin-top: 0; }
.paper-surface .feature p { font-size: .875rem; }
@media (max-width: 767px) {
  .editorial-hero { grid-template-columns: 1fr; gap: 1.5rem; padding-block: 2.75rem 1.75rem; }
  .editorial-intro h1 { font-size: clamp(2.5rem, 8vw, 3.6rem); }
  .editorial-book-stage { width: min(100%, 26rem); justify-self: center; padding-block: .45rem 1.15rem; }
  .editorial-book img { max-height: 190px; }
  .orientation-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .85rem .65rem; }
  .orientation-grid h2 { grid-column: 1 / -1; }
  .orientation-grid h2 br { display: none; }
  .home-editorial-grid { grid-template-columns: 1fr; gap: 0; }
  .home-editorial-grid > section + section { padding-top: 0; }
}

.paper-surface .edition-list {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.paper-surface .edition-item {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(84px, .52fr) minmax(0, 1fr);
  align-items: start;
  gap: clamp(.75rem, 2vw, 1.5rem);
  background: var(--paper-white);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: clamp(1rem, 2vw, 1.5rem);
}
.paper-surface .edition-cover {
  display: grid;
  place-items: center;
  background: #e9e4dc;
  min-width: 0;
  padding: clamp(.5rem, 2vw, .9rem);
}
.paper-surface .edition-cover img {
  height: auto;
  width: min(100%, 150px);
  aspect-ratio: 3 / 4.25;
  object-fit: contain;
  box-shadow: 4px 6px 10px #211f1b28;
}
.paper-surface .edition-item h3 { font-size: clamp(1.25rem, 2vw, 1.7rem); margin: .4rem 0 .65rem; }
.paper-surface .edition-item p:not(.eyebrow):not(.price) { color: var(--paper-muted); }
.paper-surface .edition-item .price { color: var(--black); margin-top: .75rem; font-size: 1.1rem; }
.paper-surface .edition-item .page-actions { gap: .4rem .85rem; margin-top: .55rem; }
.paper-surface .edition-item .page-actions > a { max-width: 100%; }
.product-page .product-hero .hero-art {
  min-height: 0;
  height: auto;
  padding-block: clamp(1rem, 4vw, 3.5rem);
  background: #191719;
  border: 1px solid #343137;
}
.product-page .product-hero .book-object {
  width: clamp(135px, 17vw, 240px);
  margin: 0;
  transform: rotate(-5deg);
}
.product-page .product-hero .book-object img { max-height: 385px; object-fit: contain; }
.product-page .product-hero h1,
.ai-kit .ai-kit-hero h1 { font-size: clamp(2.5rem, 5.4vw, 4.65rem); }
.page-product .product-scope {
  width: 100%;
  padding-inline: max(var(--gutter), calc((100% - var(--container)) / 2));
}
.page-product .product-scope p { color: var(--paper-muted); }
@media (max-width: 767px) {
  .paper-surface .edition-list { grid-template-columns: 1fr; gap: .8rem; }
  .product-page .product-hero .book-object { width: min(42vw, 185px); }
  .product-page .product-hero .hero-art { min-height: 0; }
}
@media (max-width: 390px) {
  .paper-surface .edition-item { grid-template-columns: minmax(62px, .43fr) minmax(0, 1fr); }
  .paper-surface .edition-item .page-actions { flex-direction: column; align-items: start; }
}

.editorial-heading { padding-block: clamp(2.75rem, 6vw, 5rem); }
.editorial-heading h1 { font-size: clamp(2.5rem, 5.4vw, 4.65rem); line-height: 1; }
.editorial-library { padding-block: clamp(1.75rem, 5vw, 4.5rem); }
.editorial-library > .section { padding-block: clamp(1.5rem, 3vw, 3rem); }
.editorial-library .featured-guide,
.editorial-library .guide-card {
  background: var(--paper-white);
  color: var(--black);
  border-color: var(--paper-border);
}
.editorial-library .guide-card h3 a,
.editorial-library .featured-guide h2 a { color: inherit; }
.editorial-library .guide-card p,
.editorial-library .featured-guide p:not(.eyebrow) { color: var(--paper-muted); }
.editorial-library .featured-guide:not(:has(.featured-guide-image)) { grid-template-columns: minmax(0, 1fr); }
.editorial-library .guide-meta { color: var(--paper-muted); }
.editorial-library .free-library-card { border-color: var(--paper-border); padding-block: clamp(1.5rem, 5vw, 3.5rem); }
.editorial-library .free-library-card img { width: min(235px, 100%); margin-inline: auto; }
.editorial-contact { padding-block: var(--section-space); }
.editorial-contact :is(input:not([type=checkbox]), textarea, select) {
  color: var(--black);
  background: var(--paper-white);
  border-color: var(--paper-control);
}
.editorial-contact .contact-aside { border-color: var(--paper-border); }
.lab-hero-photo { margin: 0; }
.lab-hero-photo img { width: 100%; height: auto; border-radius: var(--radius-sm); }
.lab-hero-photo figcaption { color: var(--muted); font-size: .875rem; margin-top: .5rem; }
.lab-intro .lab-principles { list-style: none; padding: 0; gap: .5rem 1.25rem; flex-wrap: wrap; }
.lab-intro .lab-principles li + li::before { content: "→"; color: var(--red-text); margin-right: .8rem; }
.lab-list > h2 { margin-top: var(--section-space); }
.lab-feature h3 { font-size: clamp(1.6rem, 3vw, 2.75rem); }
.paper-surface .prompt-tool { margin-block: 0; border: 0; padding: var(--section-space) 0; }
.paper-surface .prompt-tool > .page-intro { color: var(--paper-muted); }
.paper-surface .prompt-tool :is(input, textarea, select) { background: var(--paper-white); color: var(--black); border-color: var(--paper-control); min-height: 44px; }
.paper-surface .prompt-tool .button-outline { background: transparent; color: var(--black); }
.paper-surface .prompt-tool .button-outline:hover { background: var(--paper-accent); color: var(--white); }
.paper-surface .prompt-tool .lab-ideas h4::before { color: var(--paper-accent); }
.paper-surface .prompt-tool .lab-status { color: var(--paper-muted); }

.purchase-price-note { display: block; font-size: .8rem; color: var(--muted); }
.mobile-cta .purchase-price-note { display: none; }

.light-section .page-intro { color: var(--paper-muted); }
.guide-paper .guide-body a,
.guide-paper .guide-newsletter .small a { color: var(--paper-accent); }
.lab-hero-photo img { max-height: 315px; object-fit: contain; object-position: center; }
.lab-hero-photo figcaption { text-align: center; }
@media (max-width: 767px) {
  .lab-hero-photo img { max-height: 195px; }
}
