/*
Theme Name: Copperplate Editorial
Theme URI: https://copperplategenealogy.com
Author: Copperplate Genealogy
Description: Light editorial look for Copperplate Genealogy. Keeps your pages, menu, and reviews.
Version: 3.0.0
Requires at least: 6.4
Tested up to: 6.8
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: copperplate
*/

:root {
  --paper: #f7f4ef;
  --paper-deep: #f1ebe3;
  --card: #fffcf9;
  --ink: #1c1917;
  --muted: #6d645c;
  --copper: #8f5a36;
  --copper-deep: #7a4c2e;
  --accent: #1c1917;
  --rule: #e4d9cc;
  --plate: #f3ece4;
  --font-display: "Instrument Serif", "Iowan Old Style", Palatino, Georgia, serif;
  --font-sans: "Instrument Sans", "Segoe UI", system-ui, sans-serif;
  --font-mark: "Tenor Sans", "Copperplate Gothic Light", "Copperplate", Palatino, serif;
  --tracking-mark: 0.16em;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

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

html {
  -webkit-font-smoothing: antialiased;
  background: var(--paper);
  color: var(--ink);
}

body {
  margin: 0;
  display: flex;
  flex-direction: column;
  min-height: 100dvh;
  font-family: var(--font-sans);
  background: var(--paper);
  color: var(--ink);
  line-height: 1.6;
  overflow-x: hidden;
}

main { flex: 1; }

::selection { background: var(--copper); color: #fff; }

a { color: inherit; text-decoration: none; }
img { max-width: 100%; height: auto; display: block; }
button, input, textarea { font: inherit; }
button { cursor: pointer; }

h1, h2, h3 {
  text-wrap: balance;
  font-weight: 400;
  font-family: var(--font-display);
}
p { text-wrap: pretty; }

.wrap {
  width: min(72rem, calc(100% - 2.5rem));
  margin-inline: auto;
}
@media (min-width: 768px) {
  .wrap { width: min(76rem, calc(100% - 5rem)); }
}

.accent,
.has-accent-color,
strong.accent {
  color: var(--accent, var(--ink));
  font-weight: 400;
  background: none;
}
.type-display .accent,
.type-display strong.accent {
  font-family: inherit;
  font-style: italic;
}

.type-display {
  font-family: var(--font-display);
  font-size: clamp(3.1rem, 1.2rem + 5.4vw, 6.15rem);
  line-height: 0.92;
  letter-spacing: -0.03em;
  font-weight: 400;
  margin: 0;
  color: var(--ink);
}

.type-title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 1.2rem + 2vw, 3.15rem);
  line-height: 1.05;
  letter-spacing: -0.025em;
  margin: 0.35rem 0 0;
  font-weight: 400;
}

.type-mark {
  font-family: var(--font-sans);
  font-size: 0.72rem;
  letter-spacing: var(--tracking-mark);
  text-transform: uppercase;
  font-weight: 500;
}

.font-display { font-family: var(--font-display); font-weight: 400; }
.text-copper { color: var(--copper); }
.text-muted { color: var(--muted); }
.lede {
  max-width: 38rem;
  font-size: 1.125rem;
  line-height: 1.65;
  color: var(--muted);
}

.link-underline {
  background-image: linear-gradient(currentColor, currentColor);
  background-position: 0 100%;
  background-repeat: no-repeat;
  background-size: 0 1px;
  transition: background-size 250ms var(--ease), color 150ms ease;
}
.link-underline:hover,
.link-underline:focus-visible {
  background-size: 100% 1px;
  color: var(--copper);
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  border-bottom: 1px solid var(--rule);
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  backdrop-filter: blur(14px);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
  min-height: 4.75rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  min-width: 0;
  color: var(--ink);
}

.cg-mark {
  display: block;
  flex: 0 0 auto;
  color: var(--copper);
  line-height: 0;
}
.cg-mark svg {
  display: block;
  height: 2.35rem;
  width: auto;
}

.brand-name {
  display: flex;
  flex-direction: column;
  font-family: var(--font-mark);
  text-transform: uppercase;
  line-height: 1.05;
  letter-spacing: 0.18em;
}
.brand-line {
  font-size: 0.78rem;
  color: var(--ink);
}
.brand-sub {
  margin-top: 0.22rem;
  font-size: 0.62rem;
  letter-spacing: 0.24em;
  color: var(--muted);
}

.header-end {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.nav-desktop { display: none; }
.nav-list {
  display: flex;
  gap: 1.65rem;
  list-style: none;
  margin: 0;
  padding: 0;
  flex-wrap: wrap;
}
.nav-desktop a {
  display: inline-flex;
  align-items: center;
  min-height: 2.5rem;
  color: var(--ink);
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-weight: 500;
}
.nav-desktop .current-menu-item > a,
.nav-desktop .current_page_item > a,
.nav-desktop a:hover {
  color: var(--copper);
}

.menu-toggle {
  width: 2.6rem;
  height: 2.6rem;
  border: 1px solid var(--rule);
  background: transparent;
  color: var(--ink);
  display: grid;
  place-items: center;
}

.nav-mobile {
  display: none;
  border-top: 1px solid var(--rule);
  padding: 0.25rem 0 1.25rem;
}
.nav-mobile.is-open { display: block; }
.nav-mobile .nav-list { display: block; }
.nav-mobile a {
  display: block;
  font-family: var(--font-display);
  font-size: 1.85rem;
  padding: 0.85rem 0;
  border-bottom: 1px solid var(--rule);
  letter-spacing: 0;
  text-transform: none;
}
.mobile-cta { margin-top: 1.1rem; }

@media (min-width: 1024px) {
  .nav-desktop { display: block; }
  .menu-toggle,
  .nav-mobile { display: none !important; }
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  min-height: 2.85rem;
  padding: 0.8rem 1.25rem;
  background: var(--copper);
  color: #fff;
  border: 1px solid var(--copper);
  border-radius: 2px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-size: 0.7rem;
  font-weight: 500;
  line-height: 1;
  transition: background 160ms ease, color 160ms ease, border-color 160ms ease;
}
.btn:hover,
.btn:focus-visible {
  background: var(--copper-deep);
  border-color: var(--copper-deep);
  color: #fff;
}
.btn-line {
  background: transparent;
  color: var(--copper);
  border-color: #d7c3b0;
}
.btn-line:hover,
.btn-line:focus-visible {
  background: var(--copper);
  border-color: var(--copper);
  color: #fff;
}
.header-cta { white-space: nowrap; }

@media (max-width: 720px) {
  .header-cta { display: none; }
  .brand-line { font-size: 0.68rem; letter-spacing: 0.12em; }
  .brand-sub { letter-spacing: 0.16em; }
  .cg-mark svg { height: 2rem; }
}

.hero {
  position: relative;
  padding: 4.25rem 0 1.5rem;
  min-height: 22rem;
}
@media (min-width: 900px) {
  .hero { padding-top: 5.5rem; min-height: 30rem; }
}
.hero::after {
  content: "";
  position: absolute;
  z-index: 0;
  top: 0.5rem;
  right: calc((100% - 100vw) / 2 + 0.5rem);
  width: min(48vw, 540px);
  aspect-ratio: 1;
  background: url("assets/ornament.svg") center / contain no-repeat;
  pointer-events: none;
}
.hero h1,
.hero .hero-actions {
  position: relative;
  z-index: 1;
}
.hero .type-display { max-width: 9.4em; }
.hero .type-display::after {
  content: "";
  display: block;
  width: 3.25rem;
  height: 2px;
  margin-top: 1.35rem;
  background: var(--copper);
}
.hero-actions { margin: 1.75rem 0 0; }
@media (max-width: 860px) {
  .hero { min-height: 0; }
  .hero::after { opacity: 0.35; width: 16rem; top: 1rem; }
  .hero .type-display { max-width: 10em; }
}

.wp-block-group { margin: 0; }
.wp-block-group.prose > .wp-block-group__inner-container,
.wp-block-group.points > .wp-block-group__inner-container,
.wp-block-group.hero > .wp-block-group__inner-container {
  display: contents;
}

.prose {
  font-size: 1.0625rem;
  line-height: 1.7;
  max-width: 42rem;
  padding-bottom: 1rem;
}
.prose h2 {
  font-family: var(--font-display);
  font-size: clamp(1.7rem, 1rem + 1.5vw, 2.35rem);
  font-weight: 400;
  letter-spacing: -0.02em;
  margin: 2.4rem 0 0.85rem;
}
.prose p { margin: 0 0 1.15rem; }

.home .prose {
  max-width: none;
  width: min(76rem, calc(100% - 2.5rem));
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
  padding: 0.5rem 0 3.5rem;
}
@media (min-width: 768px) {
  .home .prose { width: min(76rem, calc(100% - 5rem)); }
}
@media (min-width: 800px) {
  .home .prose { grid-template-columns: 1fr 1fr; }
}
.home .prose p:not(:has(strong)),
.home .prose h2 {
  grid-column: 1 / -1;
}
.home .prose p:not(:has(strong)) {
  max-width: 36rem;
  color: var(--muted);
  font-size: 1.05rem;
  margin: 0;
}
.home .prose h2:first-of-type {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.9rem;
  margin: 2.75rem 0 0.35rem;
  font-family: var(--font-sans);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--copper);
}
.home .prose h2:first-of-type::before,
.home .prose h2:first-of-type::after {
  content: "";
  width: 2.25rem;
  height: 1px;
  background: currentColor;
}
.home .prose p:has(strong) {
  margin: 0;
  background: var(--card);
  border: 1px solid var(--rule);
  padding: 1.45rem 1.35rem 1.3rem;
  transition: border-color 160ms ease;
}
.home .prose p:has(strong):hover { border-color: #d7b79a; }
.home .prose p:has(strong) strong {
  display: block;
  margin-bottom: 0.55rem;
  font-family: var(--font-sans);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink);
}

.rule-top {
  border-top: 1px solid var(--rule);
  background: var(--paper-deep);
}
.rule-top > .wp-block-group,
.rule-top .wrap {
  padding-top: 3.75rem;
  padding-bottom: 1rem;
}

.page-intro { padding: 4rem 0 1.75rem; }
@media (min-width: 768px) { .page-intro { padding: 5.25rem 0 2rem; } }

.points {
  display: grid;
  gap: 1rem;
  padding: 0.5rem 0 4.5rem;
}
@media (min-width: 800px) {
  .points { grid-template-columns: repeat(3, 1fr); }
}
.points > .wp-block-group,
.points > .wp-block-group__inner-container > .wp-block-group {
  background: var(--card);
  border: 1px solid var(--rule);
  padding: 1.5rem 1.3rem 1.4rem;
}
.points h2,
.points .font-display {
  font-size: 1.7rem;
  line-height: 1.15;
  margin: 0.35rem 0 0.65rem;
}

.display-md,
.display-lg {
  font-family: var(--font-display);
  font-weight: 400;
  line-height: 1.2;
  margin: 0;
}
.display-md { font-size: clamp(1.7rem, 1rem + 1.4vw, 2.2rem); }
.display-lg { font-size: clamp(1.85rem, 1rem + 2vw, 2.8rem); }

.site-footer { border-top: 1px solid var(--rule); background: var(--paper); }
.footer-inner {
  display: grid;
  gap: 2.25rem;
  padding: 3.25rem 0;
}
@media (min-width: 768px) {
  .footer-inner { grid-template-columns: 1.4fr 0.8fr 0.8fr; align-items: start; }
  .footer-meta { text-align: right; }
}

.form-grid { display: grid; gap: 1.15rem; }
.inquiry-form { max-width: 36rem; padding-bottom: 4.5rem; }
label .type-mark { display: block; margin-bottom: 0.45rem; }

input[type="text"],
input[type="email"],
input[type="tel"],
select,
textarea {
  width: 100%;
  min-height: 2.85rem;
  border: 1px solid var(--rule);
  background: var(--card);
  color: var(--ink);
  padding: 0.55rem 0.75rem;
  border-radius: 2px;
  outline: none;
}
textarea { min-height: 8rem; padding: 0.75rem; resize: vertical; }
input:focus,
select:focus,
textarea:focus { border-color: var(--copper); }

.notice {
  border: 1px solid var(--rule);
  background: var(--card);
  padding: 1.75rem 1.4rem;
  font-family: var(--font-display);
  font-size: 1.45rem;
  line-height: 1.3;
}

.reviews-page { padding-bottom: 3rem; }
.reviews-page > p:first-child {
  max-width: 38rem;
  color: var(--muted);
  font-size: 1.05rem;
  margin-top: 3.5rem;
}

body .cpr-list { display: grid; gap: 0.85rem; padding: 0 0 2rem; }
body .cpr-card {
  background: var(--card);
  border: 1px solid var(--rule);
  border-top: 1px solid var(--rule);
  padding: 1.35rem 1.3rem 1.2rem;
}
body .cpr-card:first-child { padding-top: 1.35rem; }
body .cpr-text { font-size: 1.05rem; line-height: 1.65; margin: 0; }
body .cpr-meta {
  margin: 0.8rem 0 0;
  color: var(--muted);
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
body .cpr-form-wrap {
  border-top: 0;
  max-width: 36rem;
  padding: 1.5rem 0 4rem;
}
body .cpr-form-wrap h1 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(2.1rem, 4vw, 3.1rem) !important;
  letter-spacing: -0.03em;
  line-height: 1.05;
}
body .cpr-sub { color: var(--muted); font-size: 1.05rem; }
body .cpr-home {
  width: min(76rem, calc(100% - 2.5rem));
  margin: 0.5rem auto 4rem;
  padding: 1.6rem 1.35rem 1.45rem;
  border: 1px solid var(--rule);
  background: var(--card);
  box-sizing: border-box;
}
@media (min-width: 768px) {
  body .cpr-home { width: min(76rem, calc(100% - 5rem)); }
}
body .cpr-home-kicker {
  color: var(--copper);
  letter-spacing: 0.18em;
  font-size: 0.72rem;
}
body .cpr-arrow {
  border: 1px solid var(--rule);
  background: transparent;
  color: var(--ink);
}
body .cpr-arrow:hover { border-color: var(--copper); color: var(--copper); }
body .cpr-home .cpr-text {
  font-family: var(--font-display);
  font-size: clamp(1.35rem, 2vw, 1.8rem);
  line-height: 1.3;
}

.thanks {
  max-width: 40rem;
  margin: 4.5rem auto 5rem;
  padding: 0 0 2rem;
}
.thanks-kicker,
.thanks p:first-child {
  color: var(--copper);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-size: 0.72rem;
  font-family: var(--font-sans);
}
.thanks h1 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(2.4rem, 5vw, 4rem);
  letter-spacing: -0.03em;
  line-height: 1.02;
  margin: 0.4rem 0 0.8rem;
}
.thanks-line { color: var(--muted); font-size: 1.1rem; }

.plate,
figure.wp-block-image.plate,
figure.wp-block-image.plate-wide,
figure.wp-block-image.plate-card {
  background: var(--plate);
  border: 1px solid var(--rule);
  overflow: hidden;
  margin: 0;
}
.plate img,
.plate svg,
figure.wp-block-image.plate img { width: 100%; height: 100%; object-fit: cover; }

.screen-reader-text {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--ink);
  color: var(--paper);
  padding: 0.5rem 0.75rem;
  z-index: 100;
}
.skip-link:focus { left: 1rem; top: 1rem; }

.admin-bar .site-header { top: 32px; }
@media (max-width: 782px) {
  .admin-bar .site-header { top: 46px; }
}

:focus-visible {
  outline: 2px solid var(--copper);
  outline-offset: 3px;
}
