/*
Theme Name: Onward Philosophy Press Live 2
Theme URI: https://www.onwardphilosophypress.com
Author: Onward Philosophy Press
Description: Static publisher homepage for Onward Philosophy Press.
Version: 1.0.2
Text Domain: onward-philosophy-press-live-2
*/

:root {
  --font-en-serif: "Source Serif 4", Georgia, "Times New Roman", serif;
  --font-en-sans: "Source Sans 3", Arial, Helvetica, sans-serif;
  --font-zh-hans-serif: "Noto Serif SC", "Source Han Serif SC", "Songti SC", "SimSun", serif;
  --font-zh-hans-sans: "Noto Sans SC", "Source Han Sans SC", "Microsoft YaHei", "PingFang SC", sans-serif;
  --font-zh-hant-serif: "Noto Serif TC", "Source Han Serif TC", "Songti TC", "PMingLiU", serif;
  --font-zh-hant-sans: "Noto Sans TC", "Source Han Sans TC", "Microsoft JhengHei", "PingFang TC", sans-serif;
  --paper: #fbfaf6;
  --paper-alt: #f4f1eb;
  --ink: #171614;
  --muted: #6b655e;
  --line: #e2dbd0;
  --accent: #665038;
  --card: #fffefb;
  --max: 1180px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: var(--font-en-serif);
  font-size: 17px;
  line-height: 1.7;
}

body.lang-en {
  font-family: var(--font-en-serif);
}

body.lang-zh-hans {
  font-family: var(--font-zh-hans-serif);
}

body.lang-zh-hant {
  font-family: var(--font-zh-hant-serif);
}

a {
  color: inherit;
  text-decoration-color: rgba(111, 89, 64, 0.55);
  text-underline-offset: 3px;
}

a:hover {
  color: var(--accent);
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: grid;
  grid-template-columns: minmax(190px, auto) minmax(0, 1fr) auto;
  gap: 24px;
  align-items: center;
  padding: 12px clamp(18px, 4vw, 48px);
  border-bottom: 1px solid var(--line);
  background: rgba(251, 250, 246, 0.96);
  backdrop-filter: blur(12px);
}

.brand {
  display: inline-flex;
  width: max-content;
  text-decoration: none;
}

.wordmark {
  display: inline-flex;
  flex-direction: column;
  align-items: flex-start;
  font-family: var(--font-en-sans);
  font-weight: 800;
  line-height: 0.94;
  letter-spacing: 0.08em;
  color: var(--ink);
}

.wordmark span:first-child {
  font-size: 18px;
}

.wordmark span:last-child {
  font-size: 18px;
}

.nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px 18px;
  font-family: var(--font-en-sans);
  font-size: 14px;
}

.nav a {
  text-decoration: none;
  color: #27231f;
}

.language-switcher {
  display: inline-flex;
  border: 1px solid var(--line);
  background: var(--card);
}

.lang-button {
  min-width: 38px;
  border: 0;
  border-right: 1px solid var(--line);
  padding: 6px 9px;
  color: var(--muted);
  background: transparent;
  cursor: pointer;
  font-family: var(--font-en-sans);
}

.lang-button:last-child {
  border-right: 0;
}

.lang-button.active {
  color: var(--card);
  background: var(--ink);
}

h1,
h2,
h3,
.kicker,
.panel-label,
.nav,
.brand,
button,
.site-footer {
  font-family: var(--font-en-sans);
}

body.lang-zh-hans h1,
body.lang-zh-hans h2,
body.lang-zh-hans h3,
body.lang-zh-hans .kicker,
body.lang-zh-hans .panel-label,
body.lang-zh-hans .nav,
body.lang-zh-hans button {
  font-family: var(--font-zh-hans-sans);
}

body.lang-zh-hant h1,
body.lang-zh-hant h2,
body.lang-zh-hant h3,
body.lang-zh-hant .kicker,
body.lang-zh-hant .panel-label,
body.lang-zh-hant .nav,
body.lang-zh-hant button {
  font-family: var(--font-zh-hant-sans);
}

.hero,
.section {
  max-width: var(--max);
  margin: 0 auto;
  padding-inline: clamp(18px, 4vw, 48px);
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: clamp(32px, 5vw, 72px);
  align-items: end;
  min-height: 500px;
  padding-top: clamp(52px, 7vw, 92px);
  padding-bottom: clamp(52px, 6vw, 76px);
}

.hero h1 {
  max-width: 780px;
  margin: 0 0 20px;
  font-size: clamp(36px, 4.8vw, 62px);
  line-height: 1.06;
  letter-spacing: 0;
}

.hero p {
  max-width: 720px;
  font-size: 18px;
}

.kicker,
.panel-label {
  margin: 0 0 13px;
  color: var(--accent);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.075em;
  text-transform: uppercase;
}

.notice-panel,
.series-card,
.book-series,
.contact-card {
  background: var(--card);
  border: 1px solid var(--line);
}

.notice-panel {
  padding: 24px;
}

.notice-panel h2 {
  margin: 0 0 12px;
  font-size: 25px;
  line-height: 1.15;
}

.notice-panel p {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 13.5px;
  line-height: 1.68;
}

.section {
  padding-top: 68px;
  padding-bottom: 68px;
  border-top: 1px solid var(--line);
}

.section-heading {
  display: grid;
  grid-template-columns: 230px minmax(0, 1fr);
  gap: 38px;
  align-items: start;
  margin-bottom: 26px;
}

.section h2 {
  margin: 0 0 14px;
  font-size: clamp(28px, 3.4vw, 42px);
  line-height: 1.12;
  letter-spacing: 0;
}

.section p {
  max-width: 780px;
}

.series-card-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.series-card {
  padding: 22px;
}

.series-card h3,
.book-series h3,
.contact-card h3 {
  margin: 0 0 14px;
  font-size: 19px;
  line-height: 1.22;
}

.series-card h3 span,
.book-series h3 span {
  display: block;
  margin-top: 5px;
  color: var(--muted);
  font-family: var(--font-en-sans);
  font-size: 14px;
  font-weight: 500;
}

.series-card p {
  color: var(--muted);
  font-size: 14px;
}

.series-card ul {
  display: grid;
  gap: 6px;
  margin: 18px 0 0;
  padding: 14px 0 0;
  border-top: 1px solid var(--line);
  list-style: none;
  color: #312c27;
  font-size: 14px;
}

.books-section {
  background: var(--paper-alt);
}

.catalogue-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.book-series {
  padding: 22px;
}

.book-series ol {
  display: grid;
  gap: 11px;
  margin: 0;
  padding-left: 24px;
}

.book-series li::marker {
  color: var(--accent);
  font-family: var(--font-en-sans);
}

.book-series strong,
.book-series li span {
  display: block;
}

.book-series strong {
  line-height: 1.45;
  font-weight: 600;
}

.book-series li span {
  margin-top: 2px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.45;
}

.catalogue-note {
  color: var(--muted);
  font-size: 15px;
}

.text-section {
  max-width: 920px;
}

.text-section h2 {
  max-width: 720px;
}

.subsection,
.author-subsection {
  margin-top: 30px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
}

.subsection h3,
.author-subsection h3 {
  margin: 0 0 12px;
  font-size: 21px;
  line-height: 1.25;
}

.quiet-list {
  display: grid;
  gap: 6px;
  max-width: 620px;
  margin: 18px 0 0;
  padding-left: 20px;
  color: var(--muted);
  font-size: 15px;
}

.email-line {
  margin-top: 24px;
  font-family: var(--font-en-sans);
}

.two-column {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: clamp(28px, 5vw, 68px);
  align-items: start;
}

.contact-card {
  padding: 20px;
}

.contact-card p {
  margin-bottom: 0;
  overflow-wrap: anywhere;
  font-family: var(--font-en-sans);
  font-size: 15px;
}

.contact-section {
  background: var(--paper-alt);
}

.contact-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  margin: 22px 0 28px;
}

.meta-line {
  margin: 5px 0;
  color: var(--muted);
  font-family: var(--font-en-sans);
  font-size: 15px;
}

.book-template-main {
  max-width: var(--max);
  margin: 0 auto;
  padding: clamp(46px, 7vw, 84px) clamp(18px, 4vw, 48px) 76px;
}

.book-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: clamp(28px, 5vw, 68px);
  align-items: start;
  padding-bottom: 54px;
  border-bottom: 1px solid var(--line);
}

.book-hero h1 {
  max-width: 760px;
  margin: 0 0 12px;
  font-size: clamp(34px, 4.2vw, 54px);
  line-height: 1.08;
}

.book-hero p {
  max-width: 720px;
}

.metadata-grid,
.template-section-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.metadata-grid {
  margin-top: 28px;
}

.metadata-item,
.template-box {
  padding: 18px;
  border: 1px solid var(--line);
  background: var(--card);
}

.metadata-item dt {
  margin: 0 0 5px;
  color: var(--accent);
  font-family: var(--font-en-sans);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.075em;
  text-transform: uppercase;
}

.metadata-item dd {
  margin: 0;
}

.template-section {
  padding-top: 48px;
  border-top: 1px solid var(--line);
}

.template-section:first-of-type {
  border-top: 0;
}

.template-section h2 {
  margin: 0 0 14px;
  font-size: clamp(26px, 3vw, 36px);
  line-height: 1.16;
}

.template-box h3 {
  margin-top: 0;
}

.site-footer {
  padding: 32px clamp(18px, 4vw, 48px);
  border-top: 1px solid var(--line);
  color: var(--muted);
  background: var(--paper);
  font-size: 14px;
}

.site-footer p {
  max-width: var(--max);
  margin: 0 auto 6px;
}

.site-footer strong {
  color: var(--ink);
}

@media (max-width: 1020px) {
  .site-header {
    grid-template-columns: 1fr auto;
  }

  .nav {
    grid-column: 1 / -1;
    justify-content: flex-start;
  }

  .hero,
  .book-hero,
  .section-heading,
  .two-column,
  .series-card-grid,
  .catalogue-grid,
  .contact-grid,
  .metadata-grid,
  .template-section-grid {
    grid-template-columns: 1fr;
  }

  .hero {
    min-height: 0;
  }
}

@media (max-width: 660px) {
  body {
    font-size: 16px;
  }

  .site-header {
    gap: 12px;
    padding-top: 12px;
    padding-bottom: 12px;
  }

  .wordmark span:first-child,
  .wordmark span:last-child {
    font-size: 16px;
  }

  .nav {
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: 4px;
  }

  .hero {
    padding-top: 40px;
    padding-bottom: 46px;
  }

  .hero h1 {
    font-size: 34px;
  }

  .hero p {
    font-size: 17px;
  }

  .section {
    padding-top: 54px;
    padding-bottom: 54px;
  }
}
