/* =============================================
   BIGELOW COOPERATIVE — SHARED STYLES
   Design tokens, typography, nav, footer, buttons
   ============================================= */

/* --- Google Fonts --- */
@import url("https://fonts.googleapis.com/css2?family=Fraunces:ital,wght@0,400;0,600;0,700;1,400;1,600&family=DM+Sans:wght@300;400;500&display=swap");

/* --- Design Tokens --- */
:root {
  /* Colors */
  --terracotta: #c05a42;
  --terracotta-hover: #a84d38;
  --terracotta-wash: #f5ede9;
  --cream: #faf7f2;
  --cream-dark: #f0ebe2;
  --charcoal: #282828;
  --charcoal-mid: #4a4a4a;
  --charcoal-light: #6a6a6a;
  --slate: #3e5a72;
  --white: #ffffff;

  /* Typography */
  --font-display: "Fraunces", Georgia, serif;
  --font-body: "DM Sans", system-ui, -apple-system, sans-serif;

  /* Spacing scale */
  --sp-xs: 0.5rem;
  --sp-sm: 1rem;
  --sp-md: 1.5rem;
  --sp-lg: 2.5rem;
  --sp-xl: 4rem;
  --sp-2xl: 6rem;

  /* Layout */
  --container-max: 1200px;
  --container-pad: 2rem;
  --nav-height: 84px;

  /* Radii */
  --r-sm: 6px;
  --r-md: 12px;
  --r-lg: 20px;
  --r-xl: 28px;
  --r-2xl: 40px;
}

/* --- Reset --- */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  color: var(--charcoal);
  background-color: var(--white);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

a {
  text-decoration: none;
  color: inherit;
}

/* --- Container --- */
.container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--container-pad);
}

/* --- Eyebrow label --- */
.label {
  display: block;
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--terracotta);
}

/* =============================================
   BUTTONS
   ============================================= */

.btn {
  display: inline-block;
  font-family: var(--font-body);
  font-size: 0.9375rem;
  font-weight: 500;
  letter-spacing: 0.01em;
  padding: 0.8rem 1.875rem;
  border-radius: var(--r-sm);
  cursor: pointer;
  line-height: 1;
  transition:
    background-color 0.2s ease,
    color 0.2s ease,
    border-color 0.2s ease,
    transform 0.15s ease;
  border: 2px solid transparent;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn-primary {
  background-color: var(--terracotta);
  color: var(--white);
  border-color: var(--terracotta);
}

.btn-primary:hover {
  background-color: var(--terracotta-hover);
  border-color: var(--terracotta-hover);
}

.btn-outline {
  background-color: transparent;
  color: var(--terracotta);
  border-color: var(--terracotta);
}

.btn-outline:hover {
  background-color: var(--terracotta);
  color: var(--white);
}

/* Inline text link with arrow */
.text-link {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-family: var(--font-body);
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--terracotta);
  transition: gap 0.2s ease;
}

.text-link:hover {
  gap: 0.6rem;
}

/* =============================================
   ANNOUNCEMENT BANNER
   (set display: flex to activate for open houses)
   ============================================= */

.announcement-banner {
  display: none; /* → change to flex when active */
  align-items: center;
  justify-content: center;
  gap: 1rem;
  background-color: var(--terracotta);
  color: var(--white);
  padding: 0.6rem var(--sp-sm);
  font-size: 0.875rem;
  font-weight: 500;
  text-align: center;
}

.announcement-banner a {
  color: var(--white);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.banner-close {
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.75);
  font-size: 1.125rem;
  line-height: 1;
  cursor: pointer;
  padding: 0 0 0 0.5rem;
  transition: color 0.15s;
}

.banner-close:hover {
  color: var(--white);
}

/* =============================================
   NAVIGATION
   ============================================= */

.site-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background-color: var(--white);
  border-bottom: 1px solid rgba(40, 40, 40, 0.07);
  height: var(--nav-height);
}

#site-nav-placeholder {
  position: sticky;
  top: 0;
  z-index: 100;
}

.site-nav .container {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 100%;
  padding: 0 2.5rem;
}

.nav-logo {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.nav-logo img {
  height: 62px;
  width: auto;
}

.nav-hamburger {
  display: none;
}

.nav-links {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 2.25rem;
}

.nav-links a {
  font-family: var(--font-body);
  font-size: 0.9375rem;
  font-weight: 400;
  color: var(--charcoal-mid);
  transition: color 0.2s ease;
}

.nav-links a:hover {
  color: var(--terracotta);
}

.nav-links a[aria-current="page"] {
  color: var(--terracotta);
  font-weight: 500;
}

.nav-links .nav-cta a {
  background-color: var(--terracotta);
  color: var(--white) !important;
  padding: 0.6rem 1.25rem;
  border-radius: var(--r-sm);
  font-weight: 500;
  transition:
    background-color 0.2s ease,
    transform 0.15s ease;
}

.nav-links .nav-cta a:hover {
  background-color: var(--terracotta-hover);
  transform: translateY(-1px);
}

/* =============================================
   FOOTER
   ============================================= */

/* browsers render <address> italic by default — reset it */
address {
  font-style: normal;
}

.site-footer {
  background-color: #222222;
  color: rgba(255, 255, 255, 0.65);
  padding: var(--sp-xl) 0 var(--sp-lg);
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: var(--sp-xl);
  padding-bottom: var(--sp-lg);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  margin-bottom: var(--sp-md);
}

.footer-brand .footer-name {
  font-family: var(--font-display);
  font-size: 1.1875rem;
  font-weight: 600;
  color: var(--white);
  margin-bottom: var(--sp-sm);
  display: block;
}

.footer-brand .footer-name a {
  color: var(--white);
}

.footer-brand p {
  font-size: 0.875rem;
  line-height: 1.8;
  color: rgba(255, 255, 255, 0.55);
}

.footer-brand a {
  color: rgba(255, 255, 255, 0.55);
  transition: color 0.2s;
}

.footer-brand a:hover {
  color: var(--white);
}

.footer-contact {
  margin-top: var(--sp-sm);
}

.footer-social {
  display: flex;
  gap: 1.25rem;
  margin-top: var(--sp-sm);
}

.footer-social a {
  font-size: 0.875rem;
  color: rgba(255, 255, 255, 0.5);
  transition: color 0.2s;
}

.footer-social a:hover {
  color: var(--white);
}

.footer-col h4 {
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.35);
  margin-bottom: var(--sp-sm);
}

.footer-col ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.625rem;
}

.footer-col ul a {
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.55);
  transition: color 0.2s;
}

.footer-col ul a:hover {
  color: var(--white);
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.8125rem;
  color: rgba(255, 255, 255, 0.28);
}

.footer-bottom p {
  margin: 0;
}

.footer-credit-link {
  color: inherit;
  text-decoration: none;
  transition: color 0.2s;
}

.footer-credit-link:hover {
  color: var(--white);
}

/* =============================================
   RESPONSIVE — SHARED
   ============================================= */

@media (max-width: 860px) {
  :root {
    --container-pad: 1.75rem;
    --sp-xl: 3rem;
    --sp-2xl: 4.5rem;
  }

  .site-nav .container {
    padding: 0 1.75rem;
  }

  /* Hamburger button */
  .nav-hamburger {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 2rem;
    height: 2rem;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 200;
  }

  .nav-hamburger span {
    display: block;
    width: 22px;
    height: 2px;
    background-color: var(--charcoal);
    border-radius: 2px;
    transition:
      transform 0.25s,
      opacity 0.25s;
  }

  /* X state when open */
  .nav-hamburger.is-open span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
  }
  .nav-hamburger.is-open span:nth-child(2) {
    opacity: 0;
  }
  .nav-hamburger.is-open span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
  }

  /* Mobile nav dropdown */
  .nav-links {
    display: none;
    position: absolute;
    top: var(--nav-height);
    left: 0;
    right: 0;
    background: var(--white);
    border-top: 1px solid rgba(0, 0, 0, 0.07);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
    flex-direction: column;
    padding: 1rem 1.5rem 1.5rem;
    gap: 0;
    z-index: 100;
  }

  .nav-links.is-open {
    display: flex;
  }

  .nav-links li {
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
  }

  .nav-links li:last-child {
    border-bottom: none;
    margin-top: 0.75rem;
  }

  .nav-links a {
    display: block;
    padding: 0.875rem 0;
    font-size: 1rem;
  }

  .nav-links .nav-cta a {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    width: 100%;
    text-align: center;
  }

  .footer-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: var(--sp-lg);
  }
}

@media (max-width: 600px) {
  :root {
    --sp-xl: 2.5rem;
    --sp-2xl: 3.5rem;
  }

  .site-nav .container {
    padding: 0 1rem;
  }

  .footer-bottom {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.25rem;
  }

  .footer-grid {
    grid-template-columns: 1fr;
  }

  .cta-actions {
    flex-direction: column;
  }
}

/* =============================================
   SHARED CTA SECTION
   Used on enrollment, programs, about, etc.
   ============================================= */

.cta-section {
  padding: var(--sp-2xl) 0;
  background-color: var(--white);
  text-align: center;
}

.cta-section .label {
  margin-bottom: 1rem;
}

.cta-heading {
  font-family: var(--font-display);
  font-size: clamp(2.25rem, 3vw, 3.25rem);
  font-weight: 600;
  color: var(--charcoal);
  margin-bottom: 1rem;
  letter-spacing: -0.01em;
}

.cta-sub {
  font-size: 1.0625rem;
  color: var(--charcoal-mid);
  line-height: 1.7;
  max-width: 460px;
  margin: 0 auto 2rem;
}

.cta-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.75rem;
  flex-wrap: wrap;
}

/* =============================================
   SECTION TYPOGRAPHY
   Shared heading/body/label used across interior pages.
   ============================================= */

.section-heading {
  font-family: var(--font-display);
  font-size: clamp(1.875rem, 2.5vw, 2.5rem);
  font-weight: 600;
  line-height: 1.15;
  color: var(--charcoal);
  letter-spacing: -0.01em;
  margin-bottom: 1.25rem;
}

.section-body {
  font-size: 1rem;
  line-height: 1.8;
  color: var(--charcoal-mid);
  max-width: 640px;
  margin-bottom: 1rem;
}

/* Wrapper-div pattern: section text with multiple paragraphs */
.section-body-wrap p {
  font-size: 1rem;
  line-height: 1.8;
  color: var(--charcoal-mid);
  margin-bottom: 1rem;
}

.section-body-wrap p:last-of-type {
  margin-bottom: 1.875rem;
}

/* =============================================
   SPLIT LAYOUT UTILITY
   Two-column content grid used on index, about, and programs.
   Add alongside a page-specific class that provides gap.
   ============================================= */

.split-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
}

/* =============================================
   PARTNER BLOCK
   Shared layout for partner/org callouts.
   Used on enrollment (SPYC) and programs (HipKids).
   ============================================= */

.partner-block {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
  background: var(--white);
  border-radius: var(--r-xl);
  padding: 2.5rem 3rem;
  box-shadow: 0 2px 16px rgba(40, 40, 40, 0.06);
}

.partner-text .label {
  margin-bottom: 0.75rem;
}

.partner-text .section-body,
.partner-text p {
  margin-bottom: 1.25rem;
}

.partner-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  background: var(--cream);
  border-radius: var(--r-lg);
}

.partner-logo img {
  max-width: 180px;
  max-height: 150px;
  width: 100%;
  object-fit: contain;
}

@media (max-width: 860px) {
  .partner-block {
    grid-template-columns: 1fr;
    gap: 2rem;
    padding: 2rem;
  }

  .partner-logo {
    display: none;
  }
}

/* =============================================
   PAGE HEADER
   Shared terracotta-wash header used on all
   interior pages (programs, enrollment, tour).
   ============================================= */

.page-header {
  background-color: var(--terracotta-wash);
  padding: var(--sp-xl) 0;
  border-bottom: 1px solid rgba(192, 90, 66, 0.12);
}

.page-header .label {
  margin-bottom: 1rem;
}

.page-heading {
  font-family: var(--font-display);
  font-size: clamp(2.25rem, 4vw, 3.5rem);
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: -0.02em;
  color: var(--charcoal);
  margin-bottom: 1rem;
  max-width: 640px;
}

.page-sub {
  font-size: 1.0625rem;
  line-height: 1.75;
  color: var(--charcoal-mid);
  max-width: 560px;
}

@media (max-width: 860px) {
  .page-header {
    padding: var(--sp-lg) 0;
  }
}

/* =============================================
   FORM STYLES
   Shared between tour and application pages.
   ============================================= */

.form-heading {
  font-family: var(--font-display);
  font-size: 1.375rem;
  font-weight: 600;
  color: var(--charcoal);
  margin-bottom: 0.375rem;
}

.form-sub {
  font-size: 0.9375rem;
  color: var(--charcoal-mid);
  line-height: 1.6;
  margin-bottom: 2rem;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-bottom: 1.25rem;
}

.form-group:last-of-type {
  margin-bottom: 0;
}

.form-group label {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--charcoal);
  letter-spacing: 0.01em;
}

.form-group label .optional {
  font-weight: 400;
  color: var(--charcoal-mid);
  margin-left: 0.25rem;
}

.form-group input:not([type="checkbox"]):not([type="radio"]),
.form-group select,
.form-group textarea {
  font-family: var(--font-body);
  font-size: 0.9375rem;
  color: var(--charcoal);
  background: var(--cream);
  border: 1.5px solid rgba(40, 40, 40, 0.12);
  border-radius: var(--r-md);
  padding: 0.75rem 1rem;
  width: 100%;
  transition:
    border-color 0.2s,
    box-shadow 0.2s;
  outline: none;
  -webkit-appearance: none;
  appearance: none;
}

.form-group select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23282828' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  padding-right: 2.5rem;
  cursor: pointer;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: var(--terracotta);
  box-shadow: 0 0 0 3px rgba(192, 90, 66, 0.1);
}

.form-group textarea {
  resize: vertical;
  min-height: 110px;
  line-height: 1.6;
}

.checkbox-group {
  display: flex;
  flex-wrap: wrap;
  gap: 0.625rem 1.5rem;
  margin-top: 0.25rem;
}

.checkbox-label {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  font-size: 0.9375rem;
  color: var(--charcoal);
  cursor: pointer;
  user-select: none;
}

.checkbox-label input[type="checkbox"] {
  width: 1.125rem;
  height: 1.125rem;
  min-width: 1.125rem;
  border-radius: 4px;
  border: 1.5px solid rgba(40, 40, 40, 0.2);
  background: var(--cream);
  cursor: pointer;
  accent-color: var(--terracotta);
  margin: 0;
  padding: 0;
}

.form-divider {
  border: none;
  border-top: 1px solid rgba(40, 40, 40, 0.08);
  margin: 1.75rem 0;
}

.form-submit {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  margin-top: 1.75rem;
}

.form-note {
  font-size: 0.875rem;
  color: var(--charcoal-mid);
  line-height: 1.5;
}

.form-group label .req {
  color: var(--terracotta);
  margin-left: 0.125rem;
}

.form-note .req {
  color: var(--terracotta);
}

/* Validation error states */
.form-group input.is-invalid,
.form-group select.is-invalid,
.form-group textarea.is-invalid {
  border-color: #c0392b;
  box-shadow: 0 0 0 3px rgba(192, 57, 43, 0.1);
}

.form-group .error-msg {
  font-size: 0.8125rem;
  color: #c0392b;
  margin-top: -0.25rem;
}

/* Success state — full bleed replacement */
.form-success {
  display: none;
  background-color: var(--terracotta);
  border-radius: var(--r-2xl);
  padding: 4rem 3rem;
  text-align: center;
  min-height: 480px;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  scroll-margin-top: calc(var(--nav-height) + 1.5rem);
}

.form-success::before {
  content: "";
  position: absolute;
  top: -80px;
  right: -80px;
  width: 280px;
  height: 280px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.07);
  pointer-events: none;
}

.form-success::after {
  content: "";
  position: absolute;
  bottom: -60px;
  left: -60px;
  width: 200px;
  height: 200px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.05);
  pointer-events: none;
}

.form-success.is-visible {
  display: flex;
}

.form-success-inner {
  position: relative;
  z-index: 1;
  max-width: 460px;
  margin: 0 auto;
}

.form-success-check {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.35);
  background: rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.75rem;
  color: white;
}

.form-success-check svg {
  width: 24px;
  height: 24px;
}

.form-success-eyebrow {
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.55);
  margin-bottom: 1rem;
}

.form-success-heading {
  font-family: var(--font-display);
  font-size: clamp(2rem, 3vw, 2.75rem);
  font-weight: 600;
  line-height: 1.1;
  color: white;
  letter-spacing: -0.02em;
  margin-bottom: 1.25rem;
}

.form-success-heading em {
  font-style: italic;
  color: rgba(255, 255, 255, 0.75);
}

.form-success-body {
  font-size: 0.9375rem;
  line-height: 1.8;
  color: rgba(255, 255, 255, 0.72);
  margin-bottom: 2.25rem;
}

.form-success-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.form-success-actions .btn-primary {
  background-color: white;
  color: var(--terracotta);
}

.form-success-actions .btn-primary:hover {
  background-color: rgba(255, 255, 255, 0.9);
}

.form-success-actions .text-link {
  color: rgba(255, 255, 255, 0.8);
}

.form-success-actions .text-link:hover {
  color: white;
}

@media (max-width: 600px) {
  .form-row {
    grid-template-columns: 1fr;
    gap: 1.25rem;
  }

  .form-row .form-group {
    margin-bottom: 0;
  }

  .form-row .form-group:last-child {
    margin-bottom: 1.25rem;
  }

  .checkbox-group {
    flex-direction: column;
    gap: 0.75rem;
  }

  .form-submit {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* =============================================
   INFO BLOCK (SIDEBAR)
   Shared between tour and application pages.
   ============================================= */

.info-block {
  background: var(--white);
  border-radius: var(--r-xl);
  padding: 1.625rem;
  box-shadow: 0 2px 12px rgba(40, 40, 40, 0.05);
}

.info-block-heading {
  font-family: var(--font-display);
  font-size: 1.0625rem;
  font-weight: 600;
  color: var(--charcoal);
  margin-bottom: 1rem;
}

.info-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.info-list li {
  display: flex;
  gap: 0.75rem;
  font-size: 0.9375rem;
  color: var(--charcoal-mid);
  line-height: 1.5;
}

.info-list .icon {
  flex-shrink: 0;
  width: 1.25rem;
  color: var(--terracotta);
  margin-top: 0.1em;
}

.info-contact a {
  color: var(--terracotta);
  text-decoration: none;
}

.info-contact a:hover {
  text-decoration: underline;
}
