/*
Theme Name: Cornerstone Press
Theme URI: https://cornerstonepress.org/
Author: Altha Technology
Author URI: https://althatech.com/
Description: Editorial single-book landing page for Cornerstone Press.
Version: 1.0.3
Requires at least: 6.6
Requires PHP: 8.2
Text Domain: cornerstone-press
*/

:root {
  --paper: #dbe9f5;
  --paper-light: #eef5fb;
  --ink: #172f5d;
  --ink-deep: #102346;
  --red: #d92525;
  --red-dark: #ad1d1d;
  --text: #24272c;
  --muted: #56616f;
  --rule: rgba(23, 47, 93, 0.18);
  --white: #fff;
  --serif: Georgia, "Times New Roman", serif;
  --sans: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --shadow: 0 24px 70px rgba(16, 35, 70, 0.2);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--paper-light);
  color: var(--text);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.7;
  text-rendering: optimizeLegibility;
}

body::before {
  background-image: linear-gradient(rgba(23, 47, 93, 0.025) 1px, transparent 1px);
  background-size: 100% 34px;
  content: "";
  inset: 0;
  pointer-events: none;
  position: fixed;
  z-index: -1;
}

a {
  color: inherit;
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible {
  outline: 3px solid rgba(217, 37, 37, 0.42);
  outline-offset: 3px;
}

img {
  display: block;
  height: auto;
  max-width: 100%;
}

.site-header {
  background: rgba(238, 245, 251, 0.94);
  border-bottom: 1px solid var(--rule);
  position: relative;
  z-index: 10;
}

.header-inner,
.hero-inner,
.book-inner,
.footer-inner {
  margin: 0 auto;
  max-width: 1180px;
  padding-left: 32px;
  padding-right: 32px;
}

.header-inner {
  align-items: center;
  display: flex;
  justify-content: space-between;
  min-height: 92px;
}

.brand {
  text-decoration: none;
}

.brand-name {
  color: var(--ink-deep);
  display: block;
  font-family: var(--serif);
  font-size: 1.3rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  line-height: 1.1;
}

.brand-note {
  color: var(--muted);
  display: block;
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  margin-top: 7px;
  text-transform: uppercase;
}

.site-nav {
  align-items: center;
  display: flex;
  gap: 30px;
}

.site-nav a {
  color: var(--ink);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-decoration: none;
  text-transform: uppercase;
}

.site-nav a::after {
  background: var(--red);
  content: "";
  display: block;
  height: 2px;
  margin-top: 5px;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 180ms ease;
}

.site-nav a:hover::after {
  transform: scaleX(1);
}

.hero {
  background:
    radial-gradient(circle at 78% 22%, rgba(217, 37, 37, 0.11), transparent 24rem),
    linear-gradient(135deg, var(--paper) 0%, var(--paper-light) 65%);
  border-bottom: 1px solid var(--rule);
  overflow: hidden;
  position: relative;
}

.hero::after {
  border: 1px solid rgba(23, 47, 93, 0.08);
  border-radius: 50%;
  content: "";
  height: 520px;
  position: absolute;
  right: -210px;
  top: -245px;
  width: 520px;
}

.hero-inner {
  align-items: center;
  display: grid;
  gap: clamp(50px, 8vw, 108px);
  grid-template-columns: minmax(280px, 0.78fr) minmax(360px, 1.22fr);
  min-height: 720px;
  padding-bottom: 80px;
  padding-top: 80px;
  position: relative;
  z-index: 1;
}

.cover-wrap {
  justify-self: end;
  max-width: 355px;
  position: relative;
  width: 100%;
}

.cover-wrap::before {
  border: 1px solid rgba(23, 47, 93, 0.26);
  content: "";
  inset: 18px -18px -18px 18px;
  position: absolute;
}

.book-cover {
  background: var(--red);
  box-shadow: var(--shadow);
  position: relative;
  width: 100%;
  z-index: 1;
}

.hero-copy {
  max-width: 670px;
}

.eyebrow {
  align-items: center;
  color: var(--red-dark);
  display: flex;
  font-size: 0.73rem;
  font-weight: 900;
  gap: 13px;
  letter-spacing: 0.17em;
  margin: 0 0 24px;
  text-transform: uppercase;
}

.eyebrow::before {
  background: var(--red);
  content: "";
  height: 3px;
  width: 42px;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

.hero h1 {
  color: var(--ink-deep);
  font-family: var(--serif);
  font-size: clamp(3.25rem, 6.1vw, 6.35rem);
  font-weight: 700;
  letter-spacing: -0.048em;
  line-height: 0.92;
  margin-bottom: 30px;
}

.hero h1 span,
.hero h1 em {
  display: block;
}

.hero h1 em {
  color: var(--red);
  font-size: 0.72em;
  font-weight: 400;
  letter-spacing: -0.025em;
  margin-top: 13px;
}

.hero-lead {
  border-left: 1px solid var(--ink);
  color: #404348;
  font-family: var(--serif);
  font-size: clamp(1.12rem, 2vw, 1.35rem);
  line-height: 1.65;
  margin-bottom: 34px;
  max-width: 610px;
  padding-left: 24px;
}

.hero-actions {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 22px;
}

.button {
  background: var(--red);
  border: 2px solid var(--red);
  color: var(--white);
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.12em;
  padding: 15px 24px;
  text-decoration: none;
  text-transform: uppercase;
  transition: background 180ms ease, color 180ms ease, transform 180ms ease;
}

.button:hover {
  background: transparent;
  color: var(--red-dark);
  transform: translateY(-2px);
}

.edition-note {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.feature-band {
  background: var(--ink-deep);
  color: var(--white);
}

.feature-list {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  list-style: none;
  margin: 0 auto;
  max-width: 1180px;
  padding: 0 32px;
}

.feature-list li {
  align-items: center;
  display: flex;
  font-family: var(--serif);
  font-size: 1.05rem;
  gap: 14px;
  justify-content: center;
  min-height: 102px;
  padding: 22px 28px;
  text-align: center;
}

.feature-list li + li {
  border-left: 1px solid rgba(255, 255, 255, 0.2);
}

.feature-number {
  color: #ef7a73;
  font-family: var(--sans);
  font-size: 0.7rem;
  font-weight: 900;
  letter-spacing: 0.1em;
}

.book-section {
  background: var(--white);
  padding: 112px 0;
}

.book-inner {
  display: grid;
  gap: clamp(55px, 9vw, 120px);
  grid-template-columns: 1.15fr 0.85fr;
}

.section-kicker {
  color: var(--red-dark);
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.16em;
  margin-bottom: 18px;
  text-transform: uppercase;
}

.book-copy h2,
.contact-card h2 {
  color: var(--ink-deep);
  font-family: var(--serif);
  font-size: clamp(2.4rem, 4.5vw, 4.4rem);
  letter-spacing: -0.04em;
  line-height: 1.03;
  margin-bottom: 30px;
}

.book-copy > p {
  max-width: 680px;
}

.disclaimer {
  border-bottom: 1px solid var(--rule);
  border-top: 1px solid var(--rule);
  color: var(--muted);
  font-size: 0.88rem;
  margin-top: 36px;
  padding: 22px 0;
}

.author-card {
  align-self: start;
  background: var(--paper);
  border-top: 5px solid var(--red);
  padding: 42px;
  position: relative;
}

.author-card::after {
  border-bottom: 1px solid rgba(23, 47, 93, 0.2);
  border-right: 1px solid rgba(23, 47, 93, 0.2);
  content: "";
  inset: 14px -14px -14px 14px;
  pointer-events: none;
  position: absolute;
}

.author-card h3 {
  color: var(--ink-deep);
  font-family: var(--serif);
  font-size: 1.75rem;
  line-height: 1.15;
  margin-bottom: 20px;
}

.author-card p:last-child {
  margin-bottom: 0;
}

.premise {
  color: var(--ink);
  font-family: var(--serif);
  font-size: 1.18rem;
  font-style: italic;
  line-height: 1.55;
}

.contact-section {
  background:
    linear-gradient(rgba(16, 35, 70, 0.96), rgba(16, 35, 70, 0.96)),
    var(--ink-deep);
  padding: 112px 24px;
}

.contact-card {
  background: var(--paper-light);
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.24);
  margin: 0 auto;
  max-width: 790px;
  padding: clamp(34px, 7vw, 72px);
}

.contact-card .section-kicker,
.contact-card h2,
.contact-intro {
  text-align: center;
}

.contact-intro {
  color: var(--muted);
  margin: -12px auto 42px;
  max-width: 570px;
}

.fluentform label,
.ff-el-input--label label {
  color: var(--ink-deep) !important;
  font-size: 0.75rem !important;
  font-weight: 900 !important;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.fluentform input[type="text"],
.fluentform input[type="email"],
.fluentform textarea,
.ff-el-form-control {
  background: var(--white) !important;
  border: 1px solid rgba(23, 47, 93, 0.28) !important;
  border-radius: 0 !important;
  color: var(--text) !important;
  font-family: var(--sans) !important;
  font-size: 1rem !important;
  padding: 14px 16px !important;
}

.fluentform textarea,
.ff-el-form-control[name="message"] {
  min-height: 170px;
  resize: vertical;
}

.fluentform input:focus,
.fluentform textarea:focus,
.ff-el-form-control:focus {
  border-color: var(--red) !important;
  box-shadow: 0 0 0 3px rgba(217, 37, 37, 0.12) !important;
}

.fluentform .ff-btn-submit,
.fluentform button[type="submit"] {
  background: var(--red) !important;
  border: 2px solid var(--red) !important;
  border-radius: 0 !important;
  color: var(--white) !important;
  cursor: pointer;
  font-size: 0.8rem !important;
  font-weight: 900 !important;
  letter-spacing: 0.11em;
  min-width: 180px;
  padding: 15px 24px !important;
  text-transform: uppercase;
}

.fluentform .ff-btn-submit:hover,
.fluentform button[type="submit"]:hover {
  background: var(--red-dark) !important;
  border-color: var(--red-dark) !important;
}

.form-placeholder {
  display: grid;
  gap: 22px;
}

.form-placeholder label {
  color: var(--ink-deep);
  display: grid;
  font-size: 0.75rem;
  font-weight: 900;
  gap: 8px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.form-placeholder input,
.form-placeholder textarea {
  background: var(--white);
  border: 1px solid rgba(23, 47, 93, 0.28);
  border-radius: 0;
  font: inherit;
  padding: 14px 16px;
}

.form-placeholder textarea {
  min-height: 170px;
}

.site-footer {
  background: #0b1830;
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.82rem;
}

.footer-inner {
  align-items: center;
  display: flex;
  justify-content: space-between;
  min-height: 92px;
}

.site-footer p {
  margin-bottom: 0;
}

.site-footer a {
  color: var(--white);
  text-underline-offset: 4px;
}

.hero-contact-note {
  color: var(--muted);
  font-size: 0.95rem;
  margin: 18px 0 0;
  max-width: 520px;
}

.book-side {
  align-self: start;
  display: grid;
  gap: 56px;
}

.back-cover {
  box-shadow: var(--shadow);
  justify-self: center;
  max-width: 300px;
  width: 100%;
}

.downloads-section {
  background: var(--paper);
  border-top: 1px solid var(--rule);
  padding: 96px 0;
}

.downloads-inner {
  margin: 0 auto;
  max-width: 790px;
  padding-left: 32px;
  padding-right: 32px;
}

.downloads-inner h2 {
  color: var(--ink-deep);
  font-family: var(--serif);
  font-size: clamp(2.2rem, 4vw, 3.4rem);
  letter-spacing: -0.04em;
  line-height: 1.05;
  margin-bottom: 20px;
}

.downloads-intro {
  color: var(--muted);
  margin-bottom: 36px;
}

.download-list {
  border-top: 1px solid var(--rule);
  list-style: none;
  margin: 0;
  padding: 0;
}

.download-list li {
  align-items: baseline;
  border-bottom: 1px solid var(--rule);
  display: flex;
  flex-wrap: wrap;
  gap: 6px 18px;
  justify-content: space-between;
  padding: 18px 0;
}

.download-list a {
  color: var(--ink-deep);
  font-family: var(--serif);
  font-size: 1.2rem;
  font-weight: 700;
  text-decoration-color: var(--red);
  text-underline-offset: 5px;
}

.download-list a:hover {
  color: var(--red-dark);
}

.download-list span {
  color: var(--muted);
  font-size: 0.85rem;
}

.fluentform .ff-el-form-check-label,
.fluentform .ff-el-form-check label {
  color: var(--text) !important;
  font-size: 0.95rem !important;
  font-weight: 400 !important;
  letter-spacing: 0;
  text-transform: none;
}

.pdf-dialog {
  background: transparent;
  border: 0;
  height: 100%;
  max-height: none;
  max-width: none;
  padding: 0;
  width: 100%;
}

.pdf-dialog::backdrop {
  background: rgba(11, 24, 48, 0.72);
}

.pdf-dialog-panel {
  background: var(--paper-light);
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.4);
  display: flex;
  flex-direction: column;
  height: calc(100% - 64px);
  margin: 32px auto;
  max-width: 980px;
  width: calc(100% - 32px);
}

.pdf-dialog-bar {
  align-items: center;
  border-bottom: 1px solid var(--rule);
  display: flex;
  gap: 16px;
  padding: 12px 16px 12px 24px;
}

.pdf-dialog-bar h2 {
  color: var(--ink-deep);
  flex: 1;
  font-family: var(--serif);
  font-size: 1.15rem;
  margin: 0;
}

.pdf-dialog-download {
  background: var(--red);
  color: var(--white);
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.1em;
  padding: 10px 16px;
  text-decoration: none;
  text-transform: uppercase;
}

.pdf-dialog-download:hover {
  background: var(--red-dark);
}

.pdf-dialog-close {
  background: transparent;
  border: 0;
  color: var(--ink-deep);
  cursor: pointer;
  font-size: 2rem;
  line-height: 1;
  padding: 0 6px;
}

.pdf-dialog-frame {
  border: 0;
  flex: 1;
  width: 100%;
}

@media (max-width: 840px) {
  .hero-contact-note {
    margin-left: auto;
    margin-right: auto;
  }

  .hero-inner {
    gap: 58px;
    grid-template-columns: 1fr;
    padding-bottom: 72px;
    padding-top: 64px;
  }

  .cover-wrap {
    justify-self: center;
    max-width: 310px;
  }

  .hero-copy {
    margin: 0 auto;
    max-width: 680px;
    text-align: center;
  }

  .eyebrow,
  .hero-actions {
    justify-content: center;
  }

  .hero-lead {
    border-left: 0;
    padding-left: 0;
  }

  .feature-list {
    padding: 0;
  }

  .feature-list li {
    padding-left: 16px;
    padding-right: 16px;
  }

  .book-inner {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 620px) {
  .pdf-dialog-panel {
    height: calc(100% - 24px);
    margin: 12px auto;
    width: calc(100% - 24px);
  }

  .pdf-dialog-bar {
    flex-wrap: wrap;
    padding-left: 16px;
  }

  body {
    font-size: 16px;
  }

  .header-inner,
  .hero-inner,
  .book-inner,
  .footer-inner {
    padding-left: 20px;
    padding-right: 20px;
  }

  .header-inner {
    align-items: flex-start;
    flex-direction: column;
    gap: 18px;
    padding-bottom: 20px;
    padding-top: 20px;
  }

  .site-nav {
    gap: 24px;
  }

  .hero-inner {
    min-height: 0;
  }

  .hero h1 {
    font-size: clamp(2.9rem, 15vw, 4.2rem);
  }

  .cover-wrap {
    max-width: 250px;
  }

  .feature-list {
    grid-template-columns: 1fr;
  }

  .feature-list li {
    min-height: 78px;
  }

  .feature-list li + li {
    border-left: 0;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
  }

  .book-section,
  .contact-section {
    padding-bottom: 76px;
    padding-top: 76px;
  }

  .author-card {
    padding: 32px 26px;
  }

  .contact-section {
    padding-left: 14px;
    padding-right: 14px;
  }

  .contact-card {
    padding: 40px 22px;
  }

  .footer-inner {
    align-items: flex-start;
    flex-direction: column;
    gap: 8px;
    justify-content: center;
    padding-bottom: 24px;
    padding-top: 24px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition: none !important;
  }
}
