/* Shared header / footer / CTA / newsletter — used by Astro pages and PHP blog */

:root {
  --color-ivory: #f7f4ef;
  --color-fresh-gray: #f5f7f8;
  --color-light-sage: #f0f3f1;
  --color-smoky-blue: #56667a;
  --color-sage: #87937f;
  --color-warm-orange: #c77e4b;
  --color-earthy-orange: #b58b67;
  --font-display: "Century Gothic", CenturyGothic, sans-serif;
  --font-body: "Segoe UI", SegoeUI, sans-serif;
  --container: min(1120px, calc(100% - 2.5rem));
  --header-h: 4.5rem;
  --radius-pill: 999px;
  --radius-card: 1.25rem;
  --shadow-soft: 0 12px 40px rgb(86 102 122 / 0.12);
}

.container {
  width: var(--container);
  margin-inline: auto;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

body.nav-open {
  overflow: hidden;
}

button {
  font: inherit;
  cursor: pointer;
}

/* —— CTA —— */
.cta-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 2.75rem;
  padding: 0.7rem 1.5rem;
  border-radius: var(--radius-pill, 999px);
  background: var(--color-warm-orange);
  color: #fff;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.875rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  text-decoration: none;
  line-height: 1.2;
  white-space: nowrap;
  transition:
    background-color 0.2s ease,
    transform 0.2s ease,
    box-shadow 0.2s ease;
}

.cta-button:hover {
  background: var(--color-earthy-orange);
  color: #fff;
  transform: translateY(-1px);
  box-shadow: var(--shadow-soft, 0 12px 40px rgb(86 102 122 / 0.12));
}

.cta-button:active {
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  .cta-button,
  .cta-button:hover,
  .cta-button:active {
    transition: none;
    transform: none;
  }
}

/* —— Header —— */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--header-h);
  background: rgb(255 255 255 / 0.96);
  border-bottom: 1px solid rgb(86 102 122 / 0.08);
  backdrop-filter: blur(10px);
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  height: 100%;
}

.site-header__logo {
  flex-shrink: 0;
  text-decoration: none;
}

.site-header__logo img {
  width: auto;
  height: 2.6rem;
}

.site-header__nav {
  display: none;
}

.site-header__list {
  display: flex;
  align-items: center;
  gap: 0.35rem 1.35rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.site-header__link {
  position: relative;
  display: inline-block;
  padding: 0.35rem 0;
  color: var(--color-smoky-blue);
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-decoration: none;
}

.site-header__link:hover,
.site-header__link.is-active {
  color: var(--color-warm-orange);
}

.site-header__link.is-active::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0.1rem;
  height: 2px;
  border-radius: 999px;
  background: var(--color-warm-orange);
  transform-origin: center;
  animation: nav-underline 0.35s cubic-bezier(0.16, 1, 0.3, 1) both;
}

@keyframes nav-underline {
  from {
    transform: scaleX(0.4);
    opacity: 0;
  }

  to {
    transform: scaleX(1);
    opacity: 1;
  }
}

@media (prefers-reduced-motion: reduce) {
  .site-header__link.is-active::after {
    animation: none;
  }
}

.site-header__actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.site-header__actions .site-header__cta {
  display: none;
}

.site-header__toggle {
  display: inline-flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 2.75rem;
  height: 2.75rem;
  padding: 0.65rem;
  border: 1px solid rgb(86 102 122 / 0.15);
  border-radius: 0.75rem;
  background: #fff;
  cursor: pointer;
}

.site-header__toggle-bar {
  display: block;
  height: 2px;
  width: 100%;
  border-radius: 999px;
  background: var(--color-smoky-blue);
  transition:
    transform 0.2s ease,
    opacity 0.2s ease;
}

.site-header.is-open .site-header__toggle-bar:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.site-header.is-open .site-header__toggle-bar:nth-child(2) {
  opacity: 0;
}

.site-header.is-open .site-header__toggle-bar:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

.site-header__drawer {
  position: absolute;
  inset: var(--header-h) 0 auto;
  background: #fff;
  border-bottom: 1px solid rgb(86 102 122 / 0.08);
  box-shadow: var(--shadow-soft, 0 12px 40px rgb(86 102 122 / 0.12));
  padding: 1rem 1.25rem 1.5rem;
}

.site-header__drawer[hidden] {
  display: none;
}

.site-header__drawer-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.25rem;
}

.site-header__drawer-link {
  display: block;
  padding: 0.85rem 0.25rem;
  color: var(--color-smoky-blue);
  font-weight: 600;
  text-decoration: none;
  border-bottom: 1px solid rgb(86 102 122 / 0.08);
}

.site-header__drawer-link:hover,
.site-header__drawer-link.is-active {
  color: var(--color-warm-orange);
}

.site-header__drawer-cta {
  margin-top: 1.25rem;
}

.site-header__drawer-cta .cta-button {
  width: 100%;
}

@media (min-width: 960px) {
  .site-header__nav {
    display: block;
    flex: 1;
    margin-inline: 1.5rem;
  }

  .site-header__list {
    justify-content: center;
  }

  .site-header__actions .site-header__cta {
    display: inline-flex;
  }

  .site-header__toggle,
  .site-header__drawer {
    display: none;
  }
}

/* —— Social icons —— */
.icon-social {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 999px;
  color: var(--color-smoky-blue);
  background: #fff;
  border: 1px solid rgb(86 102 122 / 0.15);
  text-decoration: none;
  transition:
    color 0.2s ease,
    background-color 0.2s ease,
    border-color 0.2s ease,
    transform 0.2s ease;
}

.icon-social:hover {
  color: #fff;
  background: var(--color-warm-orange);
  border-color: var(--color-warm-orange);
  transform: translateY(-2px);
}

.icon-social svg {
  width: 1.15rem;
  height: 1.15rem;
}

/* —— Newsletter —— */
.newsletter-form {
  position: relative;
  display: grid;
  gap: 0.85rem;
}

.newsletter-form__input {
  width: 100%;
  min-height: 2.75rem;
  padding: 0.7rem 1rem;
  border: 1px solid rgb(86 102 122 / 0.18);
  border-radius: var(--radius-pill, 999px);
  background: #fff;
  color: var(--color-smoky-blue);
  font-family: var(--font-body);
}

.newsletter-form__input:focus-visible {
  outline: 2px solid var(--color-warm-orange);
  outline-offset: 2px;
}

.newsletter-form__submit:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

.newsletter-form__consent {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.65rem;
  align-items: start;
  font-size: 0.8rem;
  line-height: 1.45;
}

.newsletter-form__consent input {
  margin-top: 0.2rem;
  accent-color: var(--color-warm-orange);
}

.newsletter-form__consent a {
  color: var(--color-warm-orange);
}

.newsletter-form__submit {
  min-height: 2.75rem;
  padding: 0.7rem 1.25rem;
  border: 0;
  border-radius: var(--radius-pill, 999px);
  background: var(--color-warm-orange);
  color: #fff;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.875rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  cursor: pointer;
}

.newsletter-form__submit:not(:disabled):hover {
  filter: brightness(1.05);
}

.newsletter-form__status {
  font-size: 0.9rem;
  line-height: 1.45;
  padding: 0.65rem 0.85rem;
  border-radius: 0.65rem;
}

.newsletter-form__status[data-state='success'] {
  background: rgb(135 147 127 / 0.18);
  color: var(--color-smoky-blue);
}

.newsletter-form__status[data-state='error'] {
  background: rgb(199 126 75 / 0.16);
  color: var(--color-smoky-blue);
}

.newsletter-form__status[data-state='loading'] {
  background: rgb(86 102 122 / 0.08);
  color: var(--color-smoky-blue);
}

.newsletter-form__hp {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.newsletter-form[data-state='success'] .newsletter-form__input,
.newsletter-form[data-state='success'] .newsletter-form__consent,
.newsletter-form[data-state='success'] .newsletter-form__submit {
  display: none;
}

/* —— Footer —— */
.site-footer {
  margin-top: auto;
  background: var(--color-fresh-gray);
  color: var(--color-smoky-blue);
}

.site-footer__main {
  display: grid;
  gap: 2.5rem;
  padding: 3.5rem 0 2.5rem;
  text-align: center;
  justify-items: center;
}

.site-footer__brand,
.site-footer__newsletter {
  width: 100%;
  max-width: 28rem;
}

.site-footer__brand {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.site-footer__blurb {
  margin: 0;
  margin-inline: auto;
  max-width: 28ch;
  font-size: 0.95rem;
  line-height: 1.65;
  text-align: center;
}

.site-footer__socials {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin-top: 1.25rem;
  justify-content: center;
}

.site-footer__links,
.site-footer__contact {
  justify-items: center;
}

.site-footer__bottom-inner {
  text-align: center;
  align-items: center;
}

.site-footer__legal {
  justify-content: center;
}

.site-footer__logo {
  display: block;
  width: min(180px, 100%);
  margin: 0 auto 1rem;
  text-decoration: none;
}

.site-footer__logo img {
  display: block;
  width: 100%;
  height: auto;
}

.site-footer__mail {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 999px;
  color: var(--color-smoky-blue);
  background: #fff;
  border: 1px solid rgb(86 102 122 / 0.15);
  text-decoration: none;
  transition:
    color 0.2s ease,
    background-color 0.2s ease,
    border-color 0.2s ease,
    transform 0.2s ease;
}

.site-footer__mail:hover {
  color: #fff;
  background: var(--color-warm-orange);
  border-color: var(--color-warm-orange);
  transform: translateY(-2px);
}

.site-footer__mail svg {
  width: 1.15rem;
  height: 1.15rem;
}

.site-footer__heading {
  margin: 0 0 1rem;
  font-family: var(--font-display);
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-smoky-blue);
}

.site-footer__links,
.site-footer__contact,
.site-footer__legal {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.65rem;
}

.site-footer__links a,
.site-footer__contact a,
.site-footer__legal a {
  color: var(--color-smoky-blue);
  text-decoration: none;
}

.site-footer__links a:hover,
.site-footer__contact a:hover,
.site-footer__legal a:hover {
  color: var(--color-warm-orange);
}

.site-footer__newsletter-intro {
  margin: 0 0 1rem;
  font-size: 0.95rem;
}

.site-footer__newsletter .newsletter-form {
  width: 100%;
  max-width: 22rem;
  margin-inline: auto;
}

.site-footer__bottom {
  border-top: 1px solid rgb(86 102 122 / 0.12);
}

.site-footer__bottom-inner {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  padding: 1.25rem 0 1.75rem;
}

.site-footer__copy,
.site-footer__credit {
  margin: 0;
  font-size: 0.85rem;
  max-width: none;
}

.site-footer__credit {
  color: var(--color-smoky-blue);
  opacity: 0.85;
}

.site-footer__legal {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.25rem;
}

.site-footer__legal a {
  font-size: 0.85rem;
}

@media (min-width: 720px) {
  .site-footer__main {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 1024px) {
  .site-footer__main {
    grid-template-columns: 1.4fr 1fr 1fr 1.3fr;
    gap: 2rem;
    padding-block: 4rem 3rem;
    text-align: left;
    justify-items: stretch;
  }

  .site-footer__brand,
  .site-footer__newsletter {
    max-width: none;
  }

  .site-footer__brand {
    align-items: flex-start;
    text-align: left;
  }

  .site-footer__blurb {
    margin: 0;
    text-align: left;
  }

  .site-footer__logo {
    width: 180px;
    max-width: 100%;
    margin: 0 0 1rem;
    align-self: flex-start;
  }

  .site-footer__logo img {
    width: 100%;
    height: auto;
  }

  .site-footer__socials {
    justify-content: flex-start;
  }

  .site-footer__links,
  .site-footer__contact {
    justify-items: start;
  }

  .site-footer__bottom-inner {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 1rem;
    text-align: left;
  }

  .site-footer__copy {
    justify-self: start;
  }

  .site-footer__credit {
    justify-self: center;
    text-align: center;
  }

  .site-footer__legal {
    justify-self: end;
    justify-content: flex-end;
  }

  .site-footer__newsletter .newsletter-form {
    margin-inline: 0;
    max-width: none;
  }
}
