/*
Theme Name: Happy Bridging
Theme URI: https://happybridging.com/
Author: Happy Bridging
Description: A lightweight custom theme for Happy Bridging lessons, resources, and content.
Version: 1.0.6
Requires at least: 6.4
Requires PHP: 7.4
Text Domain: happy-bridging
*/

:root {
  --ink: #171717;
  --muted: #62615d;
  --paper: #fffdf8;
  --panel: #ffffff;
  --line: #ded8cb;
  --pink: #b84f78;
  --pink-dark: #873452;
  --pink-soft: #f7e5ed;
  --green: #1f6f5b;
  --green-dark: #12483d;
  --red: #b33a35;
  --gold: #c49135;
  --blue: #235f8f;
  --soft: #f2eee5;
  --shadow: 0 18px 45px rgba(24, 22, 18, 0.12);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
}

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

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

a {
  color: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: grid;
  grid-template-columns: max-content minmax(0, 1fr);
  align-items: center;
  column-gap: clamp(18px, 4vw, 44px);
  row-gap: 10px;
  padding: 12px clamp(18px, 4vw, 52px);
  background: rgba(255, 253, 248, 0.94);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(12px);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  text-decoration: none;
  font-weight: 900;
}

.brand span {
  font-family: Georgia, "Iowan Old Style", "Palatino Linotype", serif;
  font-size: 1.12rem;
  line-height: 1.05;
  white-space: nowrap;
}

.brand img {
  flex: 0 0 auto;
  width: 48px;
  height: 48px;
  object-fit: contain;
}

.nav {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
  min-width: 0;
}

.nav .menu {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
  margin: 0;
  padding: 0;
  list-style: none;
}

.nav a,
.button {
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  text-decoration: none;
  font-weight: 800;
}

.nav a {
  padding: 0 10px;
  color: #383632;
  line-height: 1.1;
  white-space: nowrap;
}

.nav a[aria-current="page"],
.nav .current-menu-item > a,
.nav .current_page_item > a {
  color: var(--pink-dark);
  background: var(--pink-soft);
}

.custom-page-content {
  max-width: 780px;
  color: var(--muted);
  line-height: 1.65;
}

.custom-page-content > *:first-child {
  margin-top: 0;
}

.custom-page-content > *:last-child {
  margin-bottom: 0;
}

.booking-area,
.contact-form-area,
.social-feed-area {
  min-height: 220px;
  display: grid;
  place-items: center;
  padding: 22px;
  border: 1px dashed #b9b0a0;
  border-radius: 8px;
  background: #fff;
  color: var(--muted);
  text-align: center;
}

.social-feed-area {
  min-height: 520px;
}

.button {
  padding: 0 16px;
  background: var(--pink);
  color: #fff;
  border: 1px solid var(--pink);
}

.button.secondary {
  color: var(--green-dark);
  background: #fff;
  border-color: var(--line);
}

.hero {
  min-height: min(720px, calc(100vh - 78px));
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(300px, 0.95fr);
  align-items: center;
  gap: clamp(26px, 5vw, 70px);
  padding: clamp(36px, 7vw, 86px) clamp(18px, 5vw, 72px);
  background:
    linear-gradient(115deg, rgba(255, 253, 248, 0.94), rgba(255, 253, 248, 0.68)),
    radial-gradient(circle at 85% 25%, rgba(196, 145, 53, 0.18), transparent 30%),
    var(--soft);
}

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

.eyebrow {
  margin: 0 0 12px;
  font-weight: 900;
  color: var(--red);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.78rem;
}

h1,
h2,
h3,
p {
  overflow-wrap: anywhere;
}

h1 {
  margin: 0;
  max-width: 11ch;
  font-family: Georgia, "Iowan Old Style", "Palatino Linotype", serif;
  font-weight: 700;
  font-size: clamp(3.2rem, 9vw, 7.8rem);
  line-height: 1.04;
  letter-spacing: 0;
}

.hero p {
  max-width: 62ch;
  color: #33312d;
  font-size: 1.13rem;
  line-height: 1.7;
}

.hero-actions,
.inline-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 24px;
}

.hero-media {
  align-self: stretch;
  display: grid;
  align-items: end;
}

.hero-media img {
  width: min(520px, 100%);
  margin-inline: auto;
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.home-practice {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 430px);
  align-items: center;
  gap: clamp(30px, 7vw, 96px);
  padding: clamp(50px, 8vw, 92px) clamp(18px, 5vw, 72px);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.home-practice-copy {
  max-width: 650px;
}

.home-practice-copy h2 {
  max-width: 12ch;
  margin: 0 0 14px;
  font-family: Georgia, "Iowan Old Style", "Palatino Linotype", serif;
  font-size: clamp(2.2rem, 5vw, 4.6rem);
  line-height: 1;
}

.home-practice-copy > p:not(.eyebrow) {
  max-width: 56ch;
  color: var(--muted);
  line-height: 1.7;
}

.mini-flashcard {
  position: relative;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 18px;
  min-height: 390px;
  padding: 26px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow);
  color: var(--ink);
  text-decoration: none;
  transition: border-color 180ms ease, transform 180ms ease, box-shadow 180ms ease;
}

.mini-flashcard:hover,
.mini-flashcard:focus-visible {
  border-color: var(--pink);
  transform: translateY(-3px);
  box-shadow: 0 22px 48px rgba(184, 79, 120, 0.17);
}

.mini-flashcard:focus-visible {
  outline: 3px solid var(--pink-soft);
  outline-offset: 4px;
}

.mini-flashcard-label,
.mini-question,
.mini-flashcard-cta {
  grid-column: 1 / -1;
  text-align: center;
}

.mini-flashcard-label {
  align-self: start;
  color: var(--pink-dark);
  font-size: 0.76rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.mini-hand {
  display: grid;
  gap: 8px;
  text-align: center;
}

.mini-hand span {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
}

.mini-hand strong {
  font-family: Georgia, "Iowan Old Style", "Palatino Linotype", serif;
  font-size: clamp(1.1rem, 2.5vw, 1.55rem);
  white-space: nowrap;
}

.mini-suit {
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(3.6rem, 7vw, 5.4rem);
  line-height: 1;
}

.mini-flashcard.is-red-suit .mini-suit {
  color: var(--red);
}

.mini-question {
  padding: 20px 10px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  font-family: Georgia, "Iowan Old Style", "Palatino Linotype", serif;
  font-size: 1.15rem;
  font-weight: 700;
}

.mini-flashcard-cta {
  align-self: end;
  color: var(--green-dark);
  font-weight: 900;
}

.band {
  padding: clamp(42px, 7vw, 78px) clamp(18px, 5vw, 72px);
}

.band.alt {
  background: var(--soft);
}

.section-head {
  max-width: 780px;
  margin-bottom: 28px;
}

.section-head h1,
.section-head h2 {
  margin: 0 0 12px;
  font-family: Georgia, "Iowan Old Style", "Palatino Linotype", serif;
  font-weight: 700;
  font-size: clamp(2rem, 5vw, 4.2rem);
  line-height: 1;
  letter-spacing: 0;
}

.section-head p,
.copy p,
.card p,
.contact-list {
  color: var(--muted);
  line-height: 1.65;
}

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

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

.card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 22px;
  box-shadow: 0 8px 22px rgba(24, 22, 18, 0.06);
}

.card-link {
  display: block;
  color: inherit;
  text-decoration: none;
  transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.card-link:hover,
.card-link:focus-visible {
  border-color: var(--pink);
  box-shadow: 0 14px 30px rgba(184, 79, 120, 0.16);
  transform: translateY(-2px);
}

.card-link:focus-visible {
  outline: 3px solid var(--pink-soft);
  outline-offset: 3px;
}

.card h3 {
  margin: 0 0 8px;
  font-size: 1.2rem;
}

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

.feature {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: clamp(22px, 5vw, 58px);
  align-items: center;
}

.feature img {
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.copy {
  max-width: 820px;
}

.copy h2 {
  font-family: Georgia, "Iowan Old Style", "Palatino Linotype", serif;
  font-weight: 700;
  font-size: clamp(1.8rem, 4vw, 3.4rem);
  line-height: 1;
  margin: 0 0 16px;
}

.about-social {
  margin-top: 30px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
}

.copy .about-social h2 {
  margin-bottom: 8px;
  font-family: inherit;
  font-size: 1.15rem;
  line-height: 1.2;
}

.about-social > p {
  margin-top: 0;
}

.social-icon-links a {
  gap: 9px;
}

.social-icon-links img {
  flex: 0 0 28px;
  width: 28px;
  height: 28px;
  object-fit: contain;
}

.content-feed {
  display: grid;
  grid-template-columns: minmax(280px, 0.8fr) minmax(0, 1.2fr);
  gap: 18px;
  align-items: start;
}

.content-feed-wide {
  grid-template-columns: 1fr;
}

.social-follow-row {
  display: grid;
  grid-template-columns: 1fr minmax(240px, auto) 1fr;
  align-items: center;
  gap: clamp(18px, 4vw, 48px);
  margin: 10px 0 34px;
  padding: 24px clamp(14px, 3vw, 34px);
  border-top: 1px solid #e7bdcd;
  border-bottom: 1px solid #e7bdcd;
  background: var(--pink-soft);
}

.social-follow-row h2 {
  margin: 0;
  text-align: center;
  font-family: Georgia, "Iowan Old Style", "Palatino Linotype", serif;
  font-size: clamp(1.25rem, 2.5vw, 2rem);
  line-height: 1.2;
}

.social-follow-row h2 strong {
  color: var(--pink-dark);
}

.social-pair {
  display: flex;
  align-items: center;
  gap: clamp(16px, 3vw, 30px);
}

.social-pair:first-child {
  justify-content: flex-end;
}

.social-pair:last-child {
  justify-content: flex-start;
}

.social-icon-link {
  position: relative;
  z-index: 0;
  display: grid;
  width: 52px;
  height: 52px;
  place-items: center;
  text-decoration: none;
}

.social-icon-link img {
  position: relative;
  z-index: 2;
  width: 40px;
  height: 40px;
  object-fit: contain;
  transition: transform 180ms ease;
}

.social-icon-link::before,
.social-icon-link::after {
  content: "";
  position: absolute;
  z-index: 1;
  top: 50%;
  left: 50%;
  width: 4px;
  height: 7px;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, -50%) scale(0.45) rotate(0);
  transition: opacity 140ms ease, transform 220ms ease;
}

.social-icon-link::before {
  background: var(--pink);
  box-shadow:
    -25px -22px var(--gold),
    22px -24px var(--green),
    28px 4px var(--red),
    -27px 12px var(--blue);
}

.social-icon-link::after {
  background: var(--blue);
  box-shadow:
    -9px -30px var(--red),
    31px -12px var(--pink),
    17px 27px var(--gold),
    -20px 26px var(--green);
}

.social-icon-link:hover img,
.social-icon-link:focus-visible img {
  transform: translateY(-2px) scale(1.08);
}

.social-icon-link:hover::before,
.social-icon-link:focus-visible::before {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1) rotate(18deg);
  animation: confetti-flow 1.25s ease-out forwards;
}

.social-icon-link:hover::after,
.social-icon-link:focus-visible::after {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1) rotate(-14deg);
  animation: confetti-flow 1.35s 80ms ease-out forwards;
}

.social-icon-link:focus-visible {
  outline: 3px solid var(--pink);
  outline-offset: 4px;
}

@keyframes confetti-flow {
  0% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.35) rotate(0);
  }
  18% {
    opacity: 1;
  }
  72% {
    opacity: 0.8;
  }
  100% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(1.4) rotate(30deg);
  }
}

.feed-embed {
  min-height: 520px;
  border: 1px dashed #b9b0a0;
  border-radius: 8px;
  background: #fff;
  display: grid;
  place-items: center;
  padding: 22px;
}

.feed-embed p {
  max-width: 46ch;
  text-align: center;
  color: var(--muted);
}

.social-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding: 0;
  list-style: none;
}

.social-links a {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  text-decoration: none;
  font-weight: 800;
  background: #fff;
}

.contact-social .social-links {
  align-items: stretch;
  flex-direction: column;
  gap: 16px;
}

.contact-social .social-links li,
.contact-social .social-links a {
  width: 100%;
}

.contact-social .social-links a {
  justify-content: flex-start;
  gap: 14px;
  min-height: auto;
  padding: 4px 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  font-size: 1.05rem;
}

.contact-social .social-links a:hover,
.contact-social .social-links a:focus-visible {
  color: var(--pink-dark);
}

.contact-social .social-links img {
  flex: 0 0 32px;
  width: 32px;
  height: 32px;
  object-fit: contain;
}

.contact-layout {
  grid-template-columns: minmax(0, 1fr) minmax(190px, 230px);
  gap: clamp(28px, 5vw, 64px);
}

.contact-social {
  width: 100%;
  justify-self: end;
}

.social-description {
  max-width: 22ch;
  color: var(--muted);
  line-height: 1.55;
  white-space: normal;
}

.contact-form-wrap {
  max-width: 920px;
}

.contact-follow-row {
  margin-top: 34px;
  margin-bottom: 0;
}

.flashcard-frame {
  display: block;
  width: 100%;
  height: 940px;
  min-height: 940px;
  border: 0;
  border-radius: 0;
  background: var(--paper);
  overflow: hidden;
}

.flashcard-band {
  padding: 0 clamp(18px, 5vw, 72px) clamp(72px, 9vw, 112px);
  background: var(--paper);
}

.contact-list {
  padding-left: 20px;
}

.contact-email {
  font-weight: 800;
}

.contact-email a {
  color: var(--pink-dark);
  text-underline-offset: 4px;
}

.booking-hero {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(360px, 1.1fr);
  gap: clamp(28px, 6vw, 80px);
  align-items: center;
  padding: clamp(48px, 8vw, 96px) clamp(18px, 5vw, 72px);
  background: var(--soft);
}

.booking-intro h1 {
  max-width: 10ch;
  font-size: clamp(3rem, 7vw, 6.6rem);
}

.booking-intro > p:not(.eyebrow) {
  max-width: 58ch;
  color: var(--muted);
  font-size: 1.08rem;
  line-height: 1.7;
}

.consultation-points {
  display: grid;
  gap: 10px;
  margin: 24px 0;
  padding: 0;
  list-style: none;
  font-weight: 750;
}

.consultation-points li {
  position: relative;
  padding-left: 24px;
}

.consultation-points li::before {
  content: "";
  position: absolute;
  top: 0.45em;
  left: 0;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--green);
}

.booking-embed {
  padding: clamp(22px, 4vw, 36px);
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow);
}

.booking-embed h2 {
  margin: 0 0 20px;
  font-family: Georgia, "Iowan Old Style", "Palatino Linotype", serif;
  font-size: clamp(1.8rem, 3vw, 2.8rem);
}

.booking-placeholder {
  min-height: 480px;
  display: grid;
  place-items: center;
  padding: 22px;
  border: 1px dashed #b9b0a0;
  border-radius: 6px;
  color: var(--muted);
  text-align: center;
}

.booking-placeholder .integration-widget,
.booking-placeholder .calendly-inline-widget {
  width: 100%;
}

.booking-alternative {
  margin-top: 18px;
  text-align: center;
  font-weight: 800;
}

.booking-alternative a {
  color: var(--pink-dark);
  text-underline-offset: 4px;
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  border-top: 1px solid var(--line);
}

.service-item {
  padding: 28px 28px 28px 0;
  border-bottom: 1px solid var(--line);
}

.service-item:nth-child(even) {
  padding-left: 28px;
  border-left: 1px solid var(--line);
}

.service-number {
  color: var(--pink);
  font-size: 0.8rem;
  font-weight: 900;
}

.service-item h3 {
  margin: 10px 0 8px;
}

.service-item p {
  max-width: 58ch;
  margin-bottom: 0;
  color: var(--muted);
  line-height: 1.65;
}

.testimonials-band {
  padding: clamp(42px, 7vw, 78px) clamp(18px, 5vw, 72px);
  background: var(--green-dark);
  color: #fff;
}

.testimonial-heading {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 24px;
  margin-bottom: 30px;
}

.testimonial-heading h2 {
  max-width: 12ch;
  margin: 0;
  font-family: Georgia, "Iowan Old Style", "Palatino Linotype", serif;
  font-size: clamp(2.2rem, 5vw, 4.5rem);
  line-height: 1;
}

.testimonials-band .eyebrow {
  color: #f3b8ce;
}

.carousel-controls {
  display: flex;
  gap: 8px;
}

.carousel-button {
  width: 46px;
  height: 46px;
  border: 1px solid rgba(255, 255, 255, 0.55);
  border-radius: 6px;
  background: transparent;
  color: #fff;
  font-size: 1.3rem;
  cursor: pointer;
}

.carousel-button:hover,
.carousel-button:focus-visible {
  background: var(--pink);
  border-color: var(--pink);
}

.testimonial-slide {
  max-width: 960px;
}

.testimonial-slide blockquote {
  margin: 0 0 24px;
  font-family: Georgia, "Iowan Old Style", "Palatino Linotype", serif;
  font-size: clamp(1.6rem, 3.5vw, 3rem);
  line-height: 1.25;
}

.testimonial-slide blockquote p {
  margin: 0;
}

.testimonial-source {
  font-weight: 900;
}

.testimonial-source span {
  display: block;
  margin-top: 5px;
  color: #bdd6ce;
  font-size: 0.86rem;
  font-weight: 600;
}

.site-footer {
  padding: 28px clamp(18px, 5vw, 72px);
  border-top: 1px solid var(--line);
  background: #171717;
  color: #fff;
  display: flex;
  justify-content: space-between;
  gap: 18px;
  flex-wrap: wrap;
}

.site-footer a {
  color: #fff;
}

@media (max-width: 980px) {
  .site-header {
    grid-template-columns: 1fr;
    align-items: start;
  }

  .nav {
    justify-content: flex-start;
  }

  .nav .menu {
    justify-content: flex-start;
  }
}

@media (max-width: 860px) {
  .hero,
  .feature,
  .content-feed,
  .booking-hero,
  .home-practice,
  .services-grid,
  .grid,
  .grid.two {
    grid-template-columns: 1fr;
  }

  .service-item,
  .service-item:nth-child(even) {
    padding: 24px 0;
    border-left: 0;
  }

  .mini-flashcard {
    width: min(100%, 430px);
    margin-inline: auto;
  }

  h1 {
    max-width: 9ch;
  }
}

@media (max-width: 520px) {
  .nav a,
  .button {
    width: 100%;
  }

  .nav .menu,
  .nav .menu li {
    width: 100%;
  }

  .hero-actions,
  .inline-actions {
    flex-direction: column;
  }

  .testimonial-heading {
    align-items: start;
    flex-direction: column;
  }

  .social-follow-row {
    grid-template-columns: 1fr;
  }

  .social-pair:first-child,
  .social-pair:last-child {
    justify-content: center;
  }
}

@media (prefers-reduced-motion: reduce) {
  .social-icon-link img,
  .social-icon-link::before,
  .social-icon-link::after {
    transition: none;
  }

}
