/*
Theme Name: HerGuide Pattern Library
Theme URI: https://learn.myherguide.com
Author: HerGuide
Description: Minimal front-end for the MyHerGuide Pattern Library.
Version: 1.0.0
Text Domain: herguide-pattern-library
*/

:root {
  --hg-ink: #312521;
  --hg-muted: #75665f;
  --hg-soft: #fbf6f1;
  --hg-cream: #fffaf5;
  --hg-rose: #ead7cf;
  --hg-rose-strong: #c8877a;
  --hg-mauve: #8b6f76;
  --hg-clay: #9c6657;
  --hg-line: rgba(78, 55, 47, 0.14);
  --hg-card: rgba(255, 252, 248, 0.84);
  --hg-shadow: 0 24px 70px rgba(76, 45, 36, 0.11);
  --hg-radius-lg: 34px;
  --hg-radius-md: 22px;
  --hg-body: "Manrope", "Avenir Next", "Segoe UI", sans-serif;
  --hg-display: "Fraunces", Georgia, serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background:
    radial-gradient(circle at top left, rgba(232, 197, 187, 0.42), transparent 34rem),
    linear-gradient(180deg, #fffaf5 0%, #f7ede6 48%, #fffaf5 100%);
  color: var(--hg-ink);
  font-family: var(--hg-body);
  font-size: 16px;
  line-height: 1.7;
  text-rendering: optimizeLegibility;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(128, 91, 78, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(128, 91, 78, 0.03) 1px, transparent 1px);
  background-size: 42px 42px;
  mask-image: linear-gradient(to bottom, rgba(0,0,0,0.45), transparent 78%);
}

a {
  color: inherit;
  text-decoration-thickness: 0.08em;
  text-underline-offset: 0.18em;
}

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

.hg-site {
  min-height: 100vh;
}

.hg-wrap {
  margin: 0 auto;
  max-width: 1120px;
  padding: 0 20px;
}

.hg-header {
  margin: 0 auto;
  max-width: 1180px;
  padding: 18px 20px 10px;
}

.hg-header-inner {
  align-items: center;
  background: rgba(255, 252, 248, 0.72);
  border: 1px solid var(--hg-line);
  border-radius: 999px;
  box-shadow: 0 14px 42px rgba(83, 54, 45, 0.08);
  display: flex;
  gap: 16px;
  justify-content: space-between;
  padding: 10px 12px 10px 18px;
  backdrop-filter: blur(16px);
}

.hg-brand {
  display: inline-flex;
  flex-direction: column;
  font-family: var(--hg-display);
  font-size: 1.18rem;
  font-weight: 650;
  letter-spacing: -0.03em;
  line-height: 1;
  text-decoration: none;
}

.hg-brand span {
  color: var(--hg-muted);
  font-family: var(--hg-body);
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  margin-top: 5px;
  text-transform: uppercase;
}

.hg-nav {
  align-items: center;
  display: flex;
  gap: 6px;
}

.hg-nav a {
  border-radius: 999px;
  color: var(--hg-muted);
  font-size: 0.82rem;
  font-weight: 700;
  padding: 8px 11px;
  text-decoration: none;
}

.hg-nav a:hover,
.hg-nav a:focus {
  background: rgba(229, 205, 195, 0.55);
  color: var(--hg-ink);
}

.hg-nav .hg-nav-primary {
  background: var(--hg-ink);
  color: #fffaf5;
  padding-inline: 14px;
}

.hg-main {
  padding-bottom: 56px;
}

.hg-hero {
  padding: 62px 0 34px;
}

.hg-hero-grid {
  align-items: end;
  display: grid;
  gap: 28px;
}

.hg-kicker {
  color: var(--hg-clay);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  margin: 0 0 14px;
  text-transform: uppercase;
}

.hg-hero h1,
.hg-pattern-hero h1,
.hg-section-title,
.hg-listing-title {
  font-family: var(--hg-display);
  font-weight: 650;
  letter-spacing: -0.045em;
  line-height: 0.98;
}

.hg-hero h1 {
  font-size: clamp(3rem, 13vw, 7.5rem);
  margin: 0;
  max-width: 930px;
}

.hg-hero-copy {
  color: var(--hg-muted);
  font-size: clamp(1rem, 3vw, 1.18rem);
  margin: 22px 0 0;
  max-width: 650px;
}

.hg-hero-note {
  background: rgba(255, 252, 248, 0.74);
  border: 1px solid var(--hg-line);
  border-radius: var(--hg-radius-md);
  box-shadow: var(--hg-shadow);
  color: var(--hg-muted);
  padding: 20px;
}

.hg-hero-note strong {
  color: var(--hg-ink);
  display: block;
  font-family: var(--hg-display);
  font-size: 1.2rem;
  line-height: 1.15;
  margin-bottom: 8px;
}

.hg-section {
  padding: 28px 0;
}

.hg-panel {
  background: var(--hg-card);
  border: 1px solid var(--hg-line);
  border-radius: var(--hg-radius-lg);
  box-shadow: var(--hg-shadow);
  padding: clamp(22px, 5vw, 42px);
}

.hg-search-panel {
  display: grid;
  gap: 22px;
}

.hg-section-title {
  font-size: clamp(2rem, 7vw, 4.2rem);
  margin: 0 0 10px;
}

.hg-section-copy {
  color: var(--hg-muted);
  margin: 0;
  max-width: 680px;
}

.hg-search-form {
  display: grid;
  gap: 12px;
  margin-top: 4px;
}

.hg-search-form input {
  appearance: none;
  background: #fffaf6;
  border: 1px solid rgba(98, 64, 54, 0.18);
  border-radius: 999px;
  color: var(--hg-ink);
  font: 600 1rem/1.2 var(--hg-body);
  outline: none;
  padding: 16px 18px;
  width: 100%;
}

.hg-search-form input:focus {
  border-color: rgba(156, 102, 87, 0.52);
  box-shadow: 0 0 0 4px rgba(200, 135, 122, 0.13);
}

.hg-button {
  align-items: center;
  appearance: none;
  background: var(--hg-ink);
  border: 0;
  border-radius: 999px;
  color: #fffaf5;
  cursor: pointer;
  display: inline-flex;
  font: 800 0.92rem/1 var(--hg-body);
  justify-content: center;
  min-height: 50px;
  padding: 15px 22px;
  text-decoration: none;
}

.hg-button-soft {
  background: #fffaf6;
  border: 1px solid var(--hg-line);
  color: var(--hg-ink);
}

.hg-card-grid {
  display: grid;
  gap: 16px;
  margin-top: 22px;
}

.hg-topic-grid {
  display: grid;
  gap: 14px;
  margin-top: 22px;
}

.hg-topic-card {
  background: rgba(255, 252, 248, 0.76);
  border: 1px solid var(--hg-line);
  border-radius: 24px;
  box-shadow: 0 13px 38px rgba(80, 50, 42, 0.06);
  min-height: 150px;
  padding: 20px;
  text-decoration: none;
}

.hg-topic-card span {
  color: var(--hg-ink);
  display: block;
  font-family: var(--hg-display);
  font-size: 1.7rem;
  font-weight: 650;
  letter-spacing: -0.04em;
  line-height: 1;
  margin-bottom: 12px;
}

.hg-topic-card p {
  color: var(--hg-muted);
  margin: 0;
}

.hg-list-kicker {
  margin-top: 34px;
}

.hg-pattern-card {
  background: rgba(255, 252, 248, 0.84);
  border: 1px solid var(--hg-line);
  border-radius: 26px;
  box-shadow: 0 15px 45px rgba(80, 50, 42, 0.075);
  display: flex;
  flex-direction: column;
  min-height: 100%;
  overflow: hidden;
  text-decoration: none;
}

.hg-card-image {
  aspect-ratio: 1.72 / 1;
  background:
    linear-gradient(135deg, rgba(232, 197, 187, 0.72), rgba(255, 247, 239, 0.96)),
    radial-gradient(circle at 24% 20%, rgba(255,255,255,0.85), transparent 12rem);
  overflow: hidden;
}

.hg-card-image img {
  height: 100%;
  object-fit: cover;
  width: 100%;
}

.hg-card-body {
  padding: 20px;
}

.hg-pill {
  background: rgba(200, 135, 122, 0.13);
  border: 1px solid rgba(200, 135, 122, 0.22);
  border-radius: 999px;
  color: var(--hg-clay);
  display: inline-flex;
  font-size: 0.7rem;
  font-weight: 900;
  letter-spacing: 0.12em;
  padding: 7px 10px;
  text-transform: uppercase;
}

.hg-pattern-card h3 {
  font-family: var(--hg-display);
  font-size: clamp(1.55rem, 5vw, 2.05rem);
  letter-spacing: -0.04em;
  line-height: 1.04;
  margin: 14px 0 10px;
}

.hg-pattern-card p {
  color: var(--hg-muted);
  margin: 0;
}

.hg-card-link {
  color: var(--hg-clay);
  display: inline-block;
  font-size: 0.86rem;
  font-weight: 900;
  margin-top: 18px;
}

.hg-cta {
  align-items: center;
  display: grid;
  gap: 20px;
}

.hg-cta h2 {
  font-family: var(--hg-display);
  font-size: clamp(2rem, 7vw, 4rem);
  letter-spacing: -0.045em;
  line-height: 1;
  margin: 0;
}

.hg-cta p {
  color: var(--hg-muted);
  margin: 10px 0 0;
  max-width: 640px;
}

.hg-pattern-page {
  margin: 0 auto;
  max-width: 910px;
  padding: 42px 20px 72px;
}

.hg-pattern-hero {
  text-align: left;
}

.hg-back-link {
  color: var(--hg-clay);
  display: inline-flex;
  font-size: 0.82rem;
  font-weight: 900;
  letter-spacing: 0.1em;
  margin-bottom: 20px;
  text-decoration: none;
  text-transform: uppercase;
}

.hg-pattern-hero h1 {
  font-size: clamp(2.8rem, 11vw, 6.25rem);
  margin: 0;
}

.hg-lead {
  color: var(--hg-muted);
  font-size: clamp(1.08rem, 3vw, 1.28rem);
  margin: 20px 0 0;
  max-width: 750px;
}

.hg-featured-image {
  border: 1px solid var(--hg-line);
  border-radius: 30px;
  box-shadow: var(--hg-shadow);
  margin: 28px 0 0;
  overflow: hidden;
}

.hg-featured-image img {
  aspect-ratio: 16 / 9;
  object-fit: cover;
  width: 100%;
}

.hg-direct-answer {
  background: rgba(255, 252, 248, 0.82);
  border: 1px solid var(--hg-line);
  border-left: 5px solid rgba(156, 102, 87, 0.42);
  border-radius: 26px;
  box-shadow: 0 14px 44px rgba(80, 50, 42, 0.07);
  margin: 24px 0 0;
  padding: clamp(20px, 4vw, 30px);
}

.hg-direct-answer span {
  color: var(--hg-clay);
  display: block;
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.14em;
  margin-bottom: 8px;
  text-transform: uppercase;
}

.hg-direct-answer p {
  color: var(--hg-ink);
  font-size: clamp(1.08rem, 3vw, 1.24rem);
  font-weight: 650;
  line-height: 1.55;
  margin: 0;
}

.hg-quote {
  background: linear-gradient(135deg, rgba(255, 252, 248, 0.94), rgba(242, 225, 216, 0.76));
  border: 1px solid var(--hg-line);
  border-radius: 28px;
  box-shadow: 0 16px 48px rgba(80, 50, 42, 0.08);
  color: var(--hg-ink);
  font-family: var(--hg-display);
  font-size: clamp(1.35rem, 5vw, 2.25rem);
  letter-spacing: -0.035em;
  line-height: 1.12;
  margin: 26px 0;
  padding: clamp(22px, 5vw, 34px);
}

.hg-pattern-content {
  background: rgba(255, 252, 248, 0.76);
  border: 1px solid var(--hg-line);
  border-radius: 32px;
  box-shadow: var(--hg-shadow);
  margin-top: 28px;
  padding: clamp(24px, 5vw, 44px);
}

.hg-pattern-content > *:first-child {
  margin-top: 0;
}

.hg-pattern-content h2 {
  color: var(--hg-ink);
  font-family: var(--hg-display);
  font-size: clamp(1.65rem, 5vw, 2.55rem);
  letter-spacing: -0.04em;
  line-height: 1.04;
  margin: 1.55em 0 0.42em;
}

.hg-pattern-content p,
.hg-pattern-content li {
  color: #5f5049;
  font-size: 1.03rem;
}

.hg-pattern-content p {
  margin: 0 0 1.12em;
}

.hg-pattern-content a {
  color: var(--hg-clay);
  font-weight: 800;
}

.hg-soft-cta {
  background: #2f2521;
  border-radius: 30px;
  color: #fff8f1;
  margin-top: 26px;
  padding: clamp(24px, 5vw, 38px);
}

.hg-soft-cta h2 {
  font-family: var(--hg-display);
  font-size: clamp(2rem, 7vw, 3.4rem);
  letter-spacing: -0.045em;
  line-height: 1;
  margin: 0;
}

.hg-soft-cta p {
  color: rgba(255, 248, 241, 0.76);
  margin: 12px 0 20px;
  max-width: 620px;
}

.hg-soft-cta .hg-button {
  background: #fffaf5;
  color: var(--hg-ink);
}

.hg-listing {
  margin: 0 auto;
  max-width: 1060px;
  padding: 48px 20px 72px;
}

.hg-listing-title {
  font-size: clamp(2.6rem, 10vw, 5.6rem);
  margin: 0;
}

.hg-listing-copy {
  color: var(--hg-muted);
  margin: 16px 0 26px;
}

.hg-empty {
  background: rgba(255, 252, 248, 0.76);
  border: 1px solid var(--hg-line);
  border-radius: 28px;
  color: var(--hg-muted);
  padding: 24px;
}

.hg-footer {
  color: var(--hg-muted);
  padding: 34px 20px 42px;
}

.hg-footer-inner {
  border-top: 1px solid var(--hg-line);
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin: 0 auto;
  max-width: 1120px;
  padding-top: 22px;
}

.hg-footer a {
  color: var(--hg-ink);
  font-weight: 800;
  text-decoration: none;
}

.hg-footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 18px;
}

.screen-reader-text {
  clip: rect(1px, 1px, 1px, 1px);
  height: 1px;
  overflow: hidden;
  position: absolute !important;
  width: 1px;
}

@media (min-width: 720px) {
  .hg-wrap {
    padding: 0 28px;
  }

  .hg-header {
    padding-top: 24px;
  }

  .hg-hero-grid {
    grid-template-columns: minmax(0, 1fr) 300px;
  }

  .hg-search-panel {
    grid-template-columns: minmax(0, 0.92fr) minmax(320px, 1.08fr);
  }

  .hg-search-form {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .hg-card-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .hg-topic-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .hg-cta {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .hg-footer-inner {
    align-items: center;
    flex-direction: row;
    justify-content: space-between;
  }
}

@media (min-width: 1020px) {
  .hg-card-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .hg-topic-grid {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }
}

@media (max-width: 560px) {
  .hg-header-inner {
    align-items: flex-start;
    border-radius: 24px;
    flex-direction: column;
  }

  .hg-nav {
    flex-wrap: wrap;
    width: 100%;
  }

  .hg-nav a {
    background: rgba(255, 250, 246, 0.76);
  }

  .hg-nav .hg-nav-primary {
    flex: 1;
  }

  .hg-hero {
    padding-top: 44px;
  }

  .hg-pattern-page {
    padding-top: 34px;
  }
}
