/* Neotoma Hub — main stylesheet */

:root {
  --bg: rgb(240, 245, 255);
  --surface: rgb(225, 235, 250);
  --text: rgb(10, 15, 35);
  --muted: rgb(55, 65, 90);
  --border: rgb(200, 215, 240);
  --primary: rgb(37, 99, 235);
  --secondary: rgb(124, 58, 237);
  --accent: rgb(245, 158, 11);
  --white: #ffffff;
  --font-heading: 'Libre Baskerville', serif;
  --font-body: 'Inter', sans-serif;
}

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

html {
  scroll-behavior: smooth;
}

body {
  background-color: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-weight: 300;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 0.6em;
  color: var(--text);
}

h1 { font-size: clamp(2rem, 4vw, 3rem); }
h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); }
h3 { font-size: clamp(1.2rem, 2vw, 1.5rem); }

p { margin-bottom: 1rem; }
p:last-child { margin-bottom: 0; }

a { color: var(--primary); }

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

/* ── Layout ── */

.container {
  max-width: 1200px;
  margin-inline: auto;
  padding-inline: 2rem;
}

section {
  padding-block: 5rem;
}

/* ── Skip link ── */

.skip-link {
  position: absolute;
  top: -100%;
  left: 1rem;
  background: var(--primary);
  color: var(--white);
  padding: 0.5rem 1rem;
  border-radius: 0 0 4px 4px;
  text-decoration: none;
  font-weight: 600;
  z-index: 9999;
}

.skip-link:focus {
  top: 0;
}

/* ── Header / Nav ── */

.site-header {
  background: var(--white);
  border-bottom: 1px solid var(--border);
  padding-block: 1rem;
  position: sticky;
  top: 0;
  z-index: 100;
}

.site-header .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.brand {
  font-family: var(--font-heading);
  font-size: 1.4rem;
  text-decoration: none;
  color: var(--text);
  font-weight: 700;
}

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

.nav-links a {
  text-decoration: none;
  color: var(--muted);
  font-size: 0.9rem;
  transition: color 0.25s;
}

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

/* hamburger for mobile */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  color: var(--text);
}

/* ── Buttons ── */

.button {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  border-radius: 4px;
  text-decoration: none;
  font-weight: 500;
  font-size: 0.95rem;
  transition: all 0.25s ease;
  cursor: pointer;
  border: none;
  min-height: 44px;
}

.button-primary {
  background-color: var(--primary);
  color: var(--white);
}

.button-primary:hover {
  background-color: rgb(0, 145, 88);
  color: var(--white);
  transform: translateY(-1px);
}

.button-outline {
  background: transparent;
  color: var(--primary);
  border: 2px solid var(--primary);
}

.button-outline:hover {
  background: var(--primary);
  color: var(--white);
}

.button-ghost {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
}

.button-ghost:hover {
  border-color: var(--primary);
  color: var(--primary);
}

/* ── Breadcrumbs ── */

.breadcrumbs {
  padding-block: 1rem;
  font-size: 0.85rem;
  color: var(--muted);
}

.breadcrumbs a {
  color: var(--muted);
  text-decoration: none;
}

.breadcrumbs a:hover {
  color: var(--primary);
}

.breadcrumbs span {
  margin-inline: 0.4rem;
}

/* ── Hero layouts ── */

.hero-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: 4rem;
}

.hero-split img {
  width: 100%;
  height: auto;
  object-fit: cover;
  border-radius: 4px;
}

/* ── Service cards ── */

.service-card {
  background: var(--white);
  padding: 2.5rem;
  border-left: 4px solid var(--accent);
  box-shadow: 0 4px 8px rgba(0,0,0,0.05);
  transition: background-color 0.3s ease;
  border-radius: 2px;
}

.service-card:hover {
  background-color: var(--surface);
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
}

/* ── Offer blocks (alternate card style) ── */

.offer-block {
  background: var(--surface);
  padding: 2rem;
  border-radius: 4px;
  border-top: 3px solid var(--primary);
  transition: box-shadow 0.25s;
}

.offer-block:hover {
  box-shadow: 0 6px 20px rgba(0,0,0,0.08);
}

.offer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.5rem;
}

/* ── Program cards ── */

.program-card {
  background: var(--white);
  padding: 2rem 2.5rem;
  border-radius: 4px;
  border: 1px solid var(--border);
  transition: border-color 0.25s, box-shadow 0.25s;
}

.program-card:hover {
  border-color: var(--primary);
  box-shadow: 0 4px 14px rgba(0,171,104,0.1);
}

/* ── Bento grid ── */

.bento-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-template-rows: repeat(2, 280px);
  gap: 1.5rem;
}

.bento-card {
  background: var(--white);
  padding: 2rem;
  border-radius: 4px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  border: 1px solid var(--border);
  overflow: hidden;
  transition: box-shadow 0.25s;
}

.bento-card:hover {
  box-shadow: 0 6px 20px rgba(0,0,0,0.08);
}

.bento-card.large { grid-column: span 2; grid-row: span 2; }
.bento-card.wide  { grid-column: span 2; }

/* ── Icon box ── */

.icon-box {
  width: 48px;
  height: 48px;
  background: var(--surface);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.25rem;
  color: var(--primary);
  flex-shrink: 0;
}

/* ── Step list ── */

.step-list {
  display: flex;
  gap: 3rem;
  margin-top: 3rem;
}

.step-item { flex: 1; }

.step-number {
  width: 48px;
  height: 48px;
  background: var(--primary);
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  margin-bottom: 1.5rem;
  font-weight: 700;
  font-size: 1.1rem;
}

/* ── Testimonials ── */

.testimonial-section {
  background: var(--text);
  color: var(--white);
  padding-block: 5rem;
  text-align: center;
}

.testimonial-section h2 { color: var(--white); }

.testimonial-block {
  max-width: 800px;
  margin-inline: auto;
}

.testimonial-block blockquote {
  font-family: var(--font-heading);
  font-size: 1.4rem;
  font-style: italic;
  margin-bottom: 1.5rem;
  line-height: 1.5;
}

.testimonial-meta {
  color: rgba(255,255,255,0.7);
  font-size: 0.9rem;
}

.testimonial-disclaimer {
  font-size: 0.8rem;
  color: rgba(255,255,255,0.5);
  margin-top: 2.5rem;
}

.testimonial-divider {
  border: none;
  border-top: 1px solid rgba(255,255,255,0.1);
  margin-block: 3rem;
}

/* ── CTA sections ── */

.cta-section {
  background: var(--primary);
  color: var(--white);
  text-align: center;
  padding-block: 6rem;
}

.cta-section h2 { color: var(--white); }

.cta-section .button-white {
  background: var(--white);
  color: var(--primary);
  font-size: 1.1rem;
  padding: 1.2rem 2.5rem;
  margin-top: 1.5rem;
}

.cta-section .button-white:hover {
  background: var(--surface);
}

/* ── Forms ── */

.form-field {
  margin-bottom: 1.2rem;
}

.form-field label {
  display: block;
  font-size: 0.9rem;
  font-weight: 500;
  margin-bottom: 0.4rem;
  color: var(--text);
}

.form-field input,
.form-field textarea,
.form-field select {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1px solid var(--border);
  border-radius: 4px;
  font-family: var(--font-body);
  font-size: 1rem;
  background: var(--white);
  color: var(--text);
  transition: border-color 0.2s, box-shadow 0.2s;
  min-height: 44px;
}

.form-field input:focus,
.form-field textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(0,171,104,0.15);
}

.form-field input.error,
.form-field textarea.error {
  border-color: var(--accent);
}

.field-error {
  color: var(--accent);
  font-size: 0.82rem;
  margin-top: 0.3rem;
  display: none;
}

.field-error.visible {
  display: block;
}

.form-success {
  background: var(--surface);
  border-left: 4px solid var(--primary);
  padding: 1.5rem;
  border-radius: 2px;
  display: none;
}

.form-success.visible {
  display: block;
}

/* ── Sidebar layout ── */

.sidebar-layout {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 4rem;
  align-items: start;
}

.sidebar {
  position: sticky;
  top: 5rem;
}

.sidebar-card {
  background: var(--surface);
  padding: 2rem;
  border-radius: 4px;
  margin-bottom: 1.5rem;
}

/* ── Checklist ── */

.checklist {
  list-style: none;
  padding: 0;
}

.checklist li {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  margin-bottom: 1rem;
  line-height: 1.5;
}

.checklist li::before {
  content: '';
  width: 20px;
  height: 20px;
  background: var(--primary);
  border-radius: 50%;
  flex-shrink: 0;
  margin-top: 0.1rem;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E");
  background-size: 60%;
  background-repeat: no-repeat;
  background-position: center;
}

/* ── FAQ ── */

.faq-list {
  max-width: 800px;
}

details.faq-item {
  border-bottom: 1px solid var(--border);
  padding-block: 1.25rem;
}

details.faq-item summary {
  cursor: pointer;
  font-weight: 600;
  font-size: 1.05rem;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}

details.faq-item summary::-webkit-details-marker { display: none; }

details.faq-item summary::after {
  content: '+';
  font-size: 1.4rem;
  color: var(--primary);
  flex-shrink: 0;
  transition: transform 0.2s;
}

details.faq-item[open] summary::after {
  transform: rotate(45deg);
}

details.faq-item p {
  margin-top: 0.75rem;
  color: var(--muted);
  line-height: 1.7;
}

/* ── Stats bar ── */

.stats-bar {
  background: var(--surface);
  padding-block: 3rem;
}

.stats-grid {
  display: flex;
  justify-content: space-around;
  flex-wrap: wrap;
  gap: 2rem;
  text-align: center;
}

.stat-item .stat-number {
  display: block;
  font-size: 2.2rem;
  font-weight: 700;
  color: var(--primary);
  font-family: var(--font-heading);
}

/* ── Policy pages ── */

.policy-content {
  max-width: 860px;
}

.policy-content h2 {
  margin-top: 2.5rem;
  padding-top: 2.5rem;
  border-top: 1px solid var(--border);
}

.policy-content h2:first-child {
  margin-top: 0;
  padding-top: 0;
  border-top: none;
}

.policy-content ul {
  margin: 1rem 0 1rem 1.5rem;
  line-height: 1.8;
}

.policy-meta {
  color: var(--muted);
  font-size: 0.9rem;
  margin-bottom: 2.5rem;
}

/* ── Cookie table ── */

.cookie-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
  margin-block: 1.5rem;
}

.cookie-table th {
  background: var(--surface);
  padding: 0.75rem 1rem;
  text-align: left;
  font-weight: 600;
  border: 1px solid var(--border);
}

.cookie-table td {
  padding: 0.75rem 1rem;
  border: 1px solid var(--border);
  vertical-align: top;
}

.cookie-table tr:nth-child(even) td {
  background: var(--bg);
}

/* ── Footer ── */

.site-footer {
  background: var(--text);
  color: rgba(255,255,255,0.75);
  padding-block: 4rem 2rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 3rem;
  margin-bottom: 3rem;
}

.footer-grid h4 {
  color: var(--white);
  font-size: 1rem;
  margin-bottom: 1rem;
}

.footer-grid a {
  color: rgba(255,255,255,0.65);
  text-decoration: none;
  transition: color 0.2s;
  font-size: 0.9rem;
}

.footer-grid a:hover {
  color: var(--primary);
}

.footer-grid ul {
  list-style: none;
  padding: 0;
}

.footer-grid ul li {
  margin-bottom: 0.6rem;
}

.footer-grid address {
  font-style: normal;
  line-height: 1.7;
  font-size: 0.9rem;
}

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding-top: 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  font-size: 0.85rem;
}

.footer-bottom a {
  color: rgba(255,255,255,0.5);
  text-decoration: none;
}

.footer-bottom a:hover {
  color: var(--primary);
}

/* ── Cookie consent banner ── */

#cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--text);
  color: var(--white);
  padding: 1.5rem 2rem;
  z-index: 9000;
  box-shadow: 0 -4px 20px rgba(0,0,0,0.2);
  display: none;
}

#cookie-banner.visible {
  display: block;
}

.cookie-banner-inner {
  max-width: 1200px;
  margin-inline: auto;
  display: flex;
  align-items: flex-start;
  gap: 2rem;
  flex-wrap: wrap;
}

.cookie-banner-text {
  flex: 1;
  min-width: 280px;
  font-size: 0.9rem;
  line-height: 1.6;
  color: rgba(255,255,255,0.85);
}

.cookie-banner-text a {
  color: var(--primary);
}

.cookie-banner-actions {
  display: flex;
  gap: 0.75rem;
  align-items: center;
  flex-wrap: wrap;
  flex-shrink: 0;
}

.cookie-btn {
  padding: 0.6rem 1.2rem;
  border-radius: 4px;
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  border: none;
  min-height: 44px;
  transition: all 0.2s;
}

.cookie-btn-accept {
  background: var(--primary);
  color: var(--white);
}

.cookie-btn-accept:hover { background: rgb(0, 145, 88); }

.cookie-btn-reject {
  background: transparent;
  color: rgba(255,255,255,0.75);
  border: 1px solid rgba(255,255,255,0.3);
}

.cookie-btn-reject:hover {
  border-color: rgba(255,255,255,0.6);
  color: var(--white);
}

.cookie-btn-prefs {
  background: transparent;
  color: rgba(255,255,255,0.6);
  font-size: 0.8rem;
  text-decoration: underline;
  padding: 0.4rem;
  min-height: auto;
}

/* Preferences panel */
#cookie-prefs-panel {
  display: none;
  margin-top: 1rem;
  background: rgba(255,255,255,0.06);
  border-radius: 4px;
  padding: 1.25rem 1.5rem;
}

#cookie-prefs-panel.visible {
  display: block;
}

.pref-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-block: 0.75rem;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  gap: 1rem;
}

.pref-row:last-child { border-bottom: none; }

.pref-label {
  font-size: 0.875rem;
  font-weight: 500;
}

.pref-desc {
  font-size: 0.8rem;
  color: rgba(255,255,255,0.5);
  margin-top: 0.2rem;
}

.toggle-switch {
  position: relative;
  width: 44px;
  height: 24px;
  flex-shrink: 0;
}

.toggle-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.toggle-slider {
  position: absolute;
  inset: 0;
  background: rgba(255,255,255,0.2);
  border-radius: 24px;
  cursor: pointer;
  transition: background 0.2s;
}

.toggle-slider::before {
  content: '';
  position: absolute;
  left: 3px;
  top: 3px;
  width: 18px;
  height: 18px;
  background: white;
  border-radius: 50%;
  transition: transform 0.2s;
}

.toggle-switch input:checked + .toggle-slider {
  background: var(--primary);
}

.toggle-switch input:checked + .toggle-slider::before {
  transform: translateX(20px);
}

.toggle-switch input:disabled + .toggle-slider {
  cursor: not-allowed;
  opacity: 0.6;
}

/* ── Responsive ── */

@media (max-width: 1024px) {
  .bento-grid {
    grid-template-columns: repeat(2, 1fr);
    grid-template-rows: auto;
  }
  .bento-card.large { grid-column: span 2; grid-row: auto; }
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 768px) {
  section { padding-block: 3rem; }

  .hero-split {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .step-list {
    flex-direction: column;
    gap: 2rem;
  }

  .sidebar-layout {
    grid-template-columns: 1fr;
  }

  .sidebar { position: static; }

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

  .bento-card.large,
  .bento-card.wide {
    grid-column: span 1;
  }

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

  .nav-links {
    display: none;
    flex-direction: column;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--white);
    padding: 1.5rem 2rem;
    border-top: 1px solid var(--border);
    box-shadow: 0 8px 20px rgba(0,0,0,0.1);
    gap: 1.5rem;
  }

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

  .nav-toggle { display: block; }

  .cookie-banner-inner {
    flex-direction: column;
    gap: 1rem;
  }

  .stats-grid {
    flex-direction: column;
    align-items: center;
  }
}

/* ── Print ── */

@media print {
  .site-header,
  .site-footer,
  #cookie-banner,
  .button,
  nav {
    display: none !important;
  }

  body {
    color: #000;
    background: #fff;
    font-size: 12pt;
  }

  a { color: #000; text-decoration: underline; }
}
