/* Graphic Mundi: static pages (home, about, contact)
   FileMaker pages use /static/css/; these files are only for the static pages. */

:root {
  --gray: #626266;
  --text-gray: #626265;
  --orange: #ff8331;
  --rust: #d8562e;
  --cream: #f3f1e6;
  --light-gray: #d4d4d4;
  --black: #000;
  --white: #fff;
  --sans: "Source Sans 3", "Source Sans Pro", system-ui, sans-serif;
  --serif: "Brawler", Georgia, serif;
  --wrap: 1200px;
  --gutter: clamp(20px, 3vw, 40px);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--sans);
  font-weight: 300;
  font-size: 18px;
  line-height: 1.5;
  color: var(--text-gray);
  background: var(--white);
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--orange); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { margin: 0; }
p { margin: 0 0 1em; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link { position: absolute; left: -9999px; top: 0; z-index: 100; background: #000; color: #fff; padding: 8px 12px; }
.skip-link:focus { left: 8px; top: 8px; }

/* ---------- Header ---------- */
.site-header {
  position: absolute; top: 0; left: 0; right: 0; z-index: 20;
  display: flex; align-items: center; justify-content: space-between;
  padding: 28px var(--gutter);
}
.site-header .logo img { width: 338px; max-width: 52vw; }
.site-nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 28px; }
.site-nav a {
  font-family: var(--serif); font-size: 24px; line-height: 1;
  color: var(--orange);
}
.site-nav a:hover { color: var(--white); text-decoration: none; }
.site-nav a[aria-current="page"] { color: var(--black); }
.nav-toggle { display: none; }

@media (max-width: 800px) {
  .site-header { padding: 18px var(--gutter); }
  .nav-toggle {
    display: block; background: none; border: 0; padding: 8px; cursor: pointer;
    width: 44px; height: 44px; position: relative; z-index: 2;
  }
  .nav-toggle span, .nav-toggle span::before, .nav-toggle span::after {
    display: block; position: absolute; left: 10px; width: 24px; height: 2px; background: var(--orange);
    transition: transform .2s, background .2s;
  }
  .nav-toggle span { top: 21px; }
  .nav-toggle span::before { content: ""; left: 0; top: -7px; }
  .nav-toggle span::after { content: ""; left: 0; top: 7px; }
  .nav-open .nav-toggle span { background: transparent; }
  .nav-open .nav-toggle span::before { transform: translateY(7px) rotate(45deg); }
  .nav-open .nav-toggle span::after { transform: translateY(-7px) rotate(-45deg); }
  .site-nav {
    display: none; position: absolute; top: 100%; left: 0; right: 0;
    background: var(--black); padding: 12px var(--gutter) 20px;
  }
  .nav-open .site-nav { display: block; }
  .site-nav ul { flex-direction: column; gap: 0; }
  .site-nav a { display: block; padding: 12px 0; font-size: 22px; }
  .site-nav a[aria-current="page"] { color: var(--white); }
}

/* ---------- Shared section bits ---------- */
.section { padding: clamp(60px, 8vw, 100px) 0; }
.section-title {
  font-family: var(--sans); font-weight: 700; font-size: clamp(34px, 4vw, 48px);
  line-height: 1; text-align: center; color: var(--gray); margin-bottom: 40px;
}
.bg-gray { background: var(--gray); color: var(--white); }
.bg-cream { background: var(--cream); }
.bg-light { background: var(--light-gray); }
.bg-black { background: var(--black); color: var(--white); }
.serif { font-family: var(--serif); font-weight: 400; }

/* Gray hero used on all three pages */
.hero {
  position: relative; min-height: 100vh;
  display: flex; align-items: flex-end;
  padding: 140px var(--gutter) 12vh;
  background-repeat: no-repeat; background-position: right center; background-size: auto 100%;
}
.hero-text { max-width: 560px; position: relative; z-index: 1; }
.hero h1 {
  font-weight: 700; font-size: clamp(30px, 3vw, 40px); line-height: 1.2;
  color: var(--orange); margin-bottom: 24px;
}
.hero .lede { font-size: clamp(22px, 2.2vw, 32px); line-height: 1.5; font-weight: 300; margin: 0; }
.jump-links { margin-top: 48px; font-size: 15px; font-weight: 400; }
.jump-links a { color: var(--white); }

@media (max-width: 800px) {
  .hero { padding-top: 70vw; }
}

/* ---------- Home ---------- */

.feature {
  position: relative; display: flex; align-items: center; justify-content: center;
  min-height: 100vh; background-size: cover; background-position: center;
}
.feature-btn {
  display: inline-block; background: var(--black); color: var(--white);
  font-weight: 600; font-size: 18px; line-height: 1.2;
  padding: 13px 30px; border: 3px solid #6b6b6b;
}
.feature-btn:hover { background: #222; text-decoration: none; }

.stories { min-height: 100vh; display: flex; align-items: center; }
.stories-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 40px 60px; align-items: center;
}
.stories h2 {
  font-weight: 700; font-size: clamp(44px, 5.5vw, 74px); line-height: 1; color: var(--text-gray);
}
.stories .heydoc { justify-self: center; width: min(365px, 100%); }
.stories .piano { justify-self: center; width: min(420px, 100%); }
.stories p { font-size: clamp(20px, 1.8vw, 24px); line-height: 1.5; margin: 0; }

.spotlight { min-height: 100vh; display: flex; align-items: center; }
/* Live layout: 1248px container split into two equal columns, no gap */
.spotlight .wrap { max-width: 1248px; }
@media (min-width: 1329px) { .spotlight .wrap { padding: 0; } }
.spotlight-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0; align-items: center; }
.spotlight-grid > div { padding: 0 24px; }
@media (max-width: 1328px) { .spotlight-grid > div { padding: 0; } }
@media (max-width: 900px) { .spotlight-grid > div { padding: 0 10px; } }
.spotlight h2 { font-weight: 700; font-size: clamp(26px, calc(3vw + 14px), 40px); line-height: 1; color: var(--rust); margin-bottom: 24px; }
.spotlight blockquote { margin: 0; font-size: clamp(20px, 1.8vw, 24px); line-height: 1.5; }
.spotlight cite { font-style: italic; }
/* As on the live site, the 3D cover fills its whole half of the layout */
.spotlight .cover-3d { justify-self: stretch; width: 100%; max-width: 846px; }
.spotlight .cover-3d img { width: 100%; }
@media (max-width: 900px) {
  /* Live mobile: cover sits left, with ~17% clear space on the right */
  .spotlight .cover-3d { justify-self: stretch; width: auto; max-width: none; margin: 30px 17% 0 2%; }
}

.new-releases .section-title { margin-bottom: 50px; }
.book-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 70px 60px;
  max-width: 1080px; margin: 0 auto;
}
.book a { color: var(--black); display: block; }
.book a:hover { text-decoration: none; }
.book a:hover .book-title { text-decoration: underline; }
.book img { width: 100%; max-width: 320px; box-shadow: 2px 3px 8px rgba(0,0,0,.25); margin-bottom: 18px; }
.book-title { display: block; font-size: 20px; font-weight: 600; line-height: 1.2; margin-bottom: 4px; }
.book-sub { display: block; font-size: 15px; font-weight: 300; line-height: 1.2; }
.book-by { display: block; font-size: 14px; font-weight: 600; line-height: 1.2; margin-top: 2px; }

@media (max-width: 900px) {
  .stories-grid, .spotlight-grid { grid-template-columns: 1fr; }
  .stories .piano { order: 4; }
  .stories p { order: 3; }
  .book-grid { grid-template-columns: repeat(2, 1fr); gap: 50px 30px; }
  .stories, .spotlight, .feature { min-height: auto; }
  .feature { aspect-ratio: 4 / 3; }
}
@media (max-width: 520px) {
  .book-grid { grid-template-columns: 1fr; max-width: 320px; }
}

/* ---------- About ---------- */
/* Sizes measured from the live About page */
.about-hero { padding-left: 60px; }
.about-hero .hero-text { max-width: max(410px, calc(50vw - 146px)); }
.about-hero .lede { font-size: clamp(22px, 5.7vw, 32px); line-height: 1.5; }
.about-hero { padding-bottom: calc(12vh + 12px); }
.about-hero .jump-links { font-size: 20px; font-weight: 300; line-height: 1; margin-top: 20px; }
.about-hero .parallax-bg { background-position: 100% 50%; }
/* Live stacks the anchor links below 1280px */
@media (max-width: 1279px) {
  .about-hero .jump-links .sep { display: none; }
  .about-hero .jump-links a { display: block; margin-bottom: 20px; }
}
@media (max-width: 800px) {
  .about-hero { padding-left: 30px; padding-right: 30px; padding-top: calc(165px + min(61vw, 402px)); }
  .about-hero .hero-text { max-width: none; }
  /* Phones: a centered version of the blot (the desktop image cuts it off at the right edge) */
  .about-hero .parallax-bg {
    background-image: url(../img/about-hero-mobile.png) !important;
    background-size: min(80vw, 420px) auto;
    background-position: 50% calc(var(--ext, 0px) + 90px);
  }
}

.news { text-align: center; }
.news-list { list-style: none; margin: 0; padding: 0; }
.news-list li { font-size: 20px; line-height: 1.3; margin-bottom: 26px; }
.news-list a { display: block; }

.publisher-grid { display: grid; grid-template-columns: 2fr 3fr; gap: 50px; align-items: start; max-width: 960px; margin: 0 auto; }
.publisher-photo { border-radius: 50%; width: min(400px, 100%); justify-self: center; }
.publisher-letter { font-family: var(--serif); font-size: 18px; line-height: 1.6; color: #e6e6e6; }
.publisher-letter .first { color: var(--orange); }
.publisher-letter .signoff { text-align: right; font-style: italic; }

.board-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 40px 50px; max-width: 960px; margin: 0 auto; }
.board-member { display: grid; grid-template-columns: 160px 1fr; gap: 20px; align-items: start; }
.board-member img { border-radius: 50%; width: 160px; }
.board-member p { font-family: var(--serif); font-size: 17px; line-height: 1.6; margin: 0; color: var(--gray); }
.board-member a { font-style: italic; }

.narrow { max-width: 560px; margin: 0 auto; }
.prose { font-family: var(--serif); font-size: 17px; line-height: 1.6; color: #333; }
.prose ul { padding-left: 1.6em; margin: 0 0 1em; }
.prose ul ul { list-style: circle; margin: 0; }

@media (max-width: 800px) {
  .publisher-grid, .board-grid { grid-template-columns: 1fr; }
  .publisher-photo { width: 260px; }
}
@media (max-width: 480px) {
  .board-member { grid-template-columns: 100px 1fr; }
  .board-member img { width: 100px; }
}

/* ---------- Contact ---------- */
.contact-hero { align-items: center; }
.contact-hero-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 40px 60px;
  max-width: 1000px; width: 100%; margin: 0 auto; align-items: center;
}
.contact-groups { font-size: 18px; line-height: 1.45; }
.contact-groups h2 { font-size: 18px; font-weight: 600; margin: 0; }
.contact-groups p { margin: 0 0 18px; }
.contact-hero a { color: var(--orange); }
.contact-hero .jump-links { margin-top: 30px; }
.contact-hero .jump-links a { color: var(--white); }
.contact-office { font-size: 18px; line-height: 1.45; }
.contact-office img { border-radius: 50%; width: min(300px, 70%); margin-bottom: 30px; }

.reps-sub { font-family: var(--serif); text-align: center; font-size: 20px; margin: -20px 0 40px; }
.reps-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0 40px; font-size: 18px; line-height: 1.45; }
.rep { margin-bottom: 24px; }
.rep h3 { font-size: 18px; font-weight: 600; font-style: italic; }
.rep a { color: var(--black); }
.bulk-title { font-family: var(--serif); text-align: center; font-size: 20px; margin: 30px 0; }
.bulk-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 40px; font-size: 18px; line-height: 1.45; }
.bulk-grid a { color: var(--black); }
.bulk-grid .newsletter { font-family: var(--serif); font-size: 26px; color: var(--orange); }

.librarians-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; max-width: 800px; margin: 0 auto; align-items: start; }
.librarians-grid .prose { color: #ccc; }
.librarians-grid .prose a { color: var(--white); font-weight: 700; }
.librarians-grid .prose a.newsletter { color: var(--orange); font-weight: 400; }
.librarians-grid img { border-radius: 50%; width: min(400px, 100%); }

@media (max-width: 900px) {
  .contact-hero-grid, .librarians-grid { grid-template-columns: 1fr; }
  .contact-hero { padding-top: 130px; background: var(--gray); }
  .reps-grid, .bulk-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 560px) {
  .reps-grid, .bulk-grid { grid-template-columns: 1fr; }
}

/* ---------- Motion ---------- */
/* Hidden only when JS is running (the .js class is set in <head>), so no-JS visitors see everything */
.js [data-anim] { opacity: 0; }
.js [data-anim].is-in { animation-fill-mode: both; animation-timing-function: ease; }
[data-anim="fadeIn"].is-in { animation-name: gmFadeIn; }
[data-anim="fadeInUp"].is-in { animation-name: gmFadeInUp; }
[data-anim="fadeInLeft"].is-in { animation-name: gmFadeInLeft; }
[data-anim="fadeInRight"].is-in { animation-name: gmFadeInRight; }
@keyframes gmFadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes gmFadeInUp { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: none; } }
@keyframes gmFadeInLeft { from { opacity: 0; transform: translateX(-20px); } to { opacity: 1; transform: none; } }
@keyframes gmFadeInRight { from { opacity: 0; transform: translateX(20px); } to { opacity: 1; transform: none; } }

.parallax { position: relative; overflow: hidden; }
.parallax > :not(.parallax-bg) { position: relative; z-index: 1; }
.parallax-bg {
  position: absolute; top: 0; right: 0; bottom: 0; left: 0; z-index: 0;
  background-repeat: no-repeat; background-size: cover; background-position: center;
  will-change: transform; pointer-events: none;
}
/* Full-bleed parallax images are cover + center (as in Avada); the ink blots are placed */
.news .parallax-bg { background-size: auto 170px; background-position: 4% center; }
.rights .parallax-bg { background-size: auto 170px; background-position: 92% 85%; }
@media (max-width: 800px) {
  .home-hero .parallax-bg { background-size: 130% auto; background-position: 40% 90px; }
  .news .parallax-bg, .rights .parallax-bg { opacity: .35; }
}
@media (prefers-reduced-motion: reduce) {
  .js [data-anim] { opacity: 1; animation: none !important; }
  html { scroll-behavior: auto; }
}

.to-top {
  position: fixed; right: 75px; bottom: 0; z-index: 30;
  width: 48px; height: 35px; border-radius: 6px 6px 0 0;
  background: #333; color: var(--white);
  display: flex; align-items: center; justify-content: center;
  opacity: 0; visibility: hidden; transition: opacity .3s, visibility .3s;
}
.to-top.is-visible { opacity: 1; visibility: visible; }
.to-top:hover { background: #555; text-decoration: none; }
.to-top svg { width: 16px; height: 16px; }
@media (max-width: 700px) { .to-top { right: 20px; } }

/* ---------- Footer ---------- */
.site-footer { background: var(--black); color: var(--white); padding: 30px var(--gutter); }
.footer-inner { display: flex; align-items: center; justify-content: space-between; gap: 30px; flex-wrap: wrap; }
.footer-psu img { width: 200px; }
.footer-right { display: flex; align-items: flex-start; gap: 40px; flex-wrap: wrap; }
.footer-social { display: flex; gap: 8px; padding-top: 4px; }
.footer-social img { width: 34px; height: 34px; }
.footer-imprint { font-size: 15px; font-weight: 400; line-height: 1.4; }
.footer-imprint strong { font-weight: 700; }
.footer-imprint a, .footer-address a { color: var(--white); }
.footer-address { font-size: 13px; line-height: 1.6; }
.footer-address a { font-size: 15px; }

@media (max-width: 700px) {
  .footer-inner { flex-direction: column; align-items: flex-start; }
}
@media (max-width: 600px) { .br-wide { display: none; } }
