/* ============================================================
   Survey Launch - slsite.css
   Fonts: Libre Baskerville (headings) + IBM Plex Sans (body)
   ============================================================ */

/* === Design Tokens === */
:root {
  --teal:        #015473;
  --teal-dark:   #003d54;
  --teal-mid:    #0a6b8f;
  --teal-light:  #e4f1f6;
  --red:         #C64936;
  --red-dark:    #8a3326;
  --warm-grey:   #9b958c;
  --text:        #2c3540;
  --text-muted:  #6b7280;
  --bg:          #ffffff;
  --bg-soft:     #f7f6f4;
  --border:      #e5e2dd;
  --nav-height:  72px;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: 'IBM Plex Sans', system-ui, -apple-system, sans-serif;
  font-size: 16px;
  line-height: 1.75;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

a { color: var(--teal); text-decoration: none; }
a:hover { color: var(--teal-dark); }

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

ul, ol { padding-left: 1.5em; margin-bottom: 1em; }
li { margin-bottom: 0.25em; }

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

/* === Typography Scale (keep legacy classes) === */
.fs1 {
  font-family: 'Libre Baskerville', Georgia, serif;
  font-size: clamp(2rem, 5vw, 3.25rem);
  line-height: 1.1;
  font-weight: 700;
}
.fs2 {
  font-family: 'Libre Baskerville', Georgia, serif;
  font-size: clamp(1.4rem, 3vw, 2rem);
  line-height: 1.2;
  font-weight: 700;
}
.fs3 {
  font-family: 'Libre Baskerville', Georgia, serif;
  font-size: clamp(1.05rem, 2vw, 1.25rem);
  line-height: 1.3;
  font-weight: 700;
}
.bold       { font-weight: 700; }
.grey-caps  { color: var(--warm-grey); text-transform: uppercase; font-size: 0.78rem; letter-spacing: 0.1em; }
.blue-font  { color: var(--teal); }
.red-font   { color: var(--red); }
.x-pad      { margin-top: 1.75rem; margin-bottom: 1.75rem; }

/* === Page Layout === */
.page        { display: flex; flex-direction: column; min-height: 100vh; }
.page-main   { flex: 1; padding-top: var(--nav-height); }

.container {
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 2rem;
}

.content-well {
  max-width: 760px;
  counter-reset: case-study;
}

/* === Navigation === */
.site-nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 200;
  height: var(--nav-height);
  background: var(--bg);
  border-bottom: 1px solid var(--border);
}

.nav-inner {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 2rem;
}

/* Logo */
.site-logo {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  text-decoration: none;
  line-height: 1;
  flex-shrink: 0;
}
.logo-accent {
  display: block;
  width: 3px;
  height: 34px;
  background: var(--red);
  flex-shrink: 0;
}
.logo-text {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.logo-survey {
  font-family: 'Libre Baskerville', Georgia, serif;
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--teal);
  line-height: 1;
}
.logo-launch {
  font-family: 'Libre Baskerville', Georgia, serif;
  font-size: 12.5px;
  font-weight: 400;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--text);
  line-height: 1;
}
.site-logo:hover .logo-survey { color: var(--teal-mid); }
.site-logo:hover .logo-launch { color: var(--teal); }

/* Nav links */
.nav-links {
  display: flex;
  align-items: center;
  gap: 2.25rem;
  list-style: none;
}
.nav-links a {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  white-space: nowrap;
  color: var(--text-muted);
  text-decoration: none;
  padding-bottom: 3px;
  border-bottom: 2px solid transparent;
  transition: color 0.18s, border-color 0.18s;
}
.nav-links a:hover,
.nav-links li.active a {
  color: var(--teal);
  border-bottom-color: var(--red);
}

/* Mobile hamburger toggle */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  color: var(--text);
  line-height: 1;
}

/* === Footer === */
.site-footer {
  background: var(--teal-dark);
  color: rgba(255, 255, 255, 0.65);
  padding: 1.25rem 0;
  font-size: 0.78rem;
  letter-spacing: 0.06em;
}
.footer-inner {
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.6rem;
}
.footer-left,
.footer-right {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  flex-wrap: wrap;
}
.site-footer a { color: rgba(255, 255, 255, 0.82); }
.site-footer a:hover { color: #e8a07a; }

/* Legacy footer (do not remove - may be cached) */
.footer {
  background-color: var(--teal-dark);
  color: rgba(255,255,255,0.65);
  padding: 10px;
  font-size: 80%;
  letter-spacing: 0.085em;
}
.footer-content { text-align: center; }
.footer a { color: white; }
.footer a:hover { color: var(--warm-grey); }

/* === Homepage === */
.hp-hero {
  background:
    linear-gradient(rgba(0, 37, 52, 0.72), rgba(0, 37, 52, 0.72)),
    url("../images/sp_home_wide.c84c8a8bf2bd.jpg") center center / cover no-repeat;
  background-color: var(--teal-dark);
  padding: 7rem 0 6rem;
}
.hp-hero-content h2 {
  font-family: 'Libre Baskerville', Georgia, serif;
  font-size: clamp(1.75rem, 4vw, 2.75rem);
  font-weight: 700;
  color: white;
  line-height: 1.2;
  margin-bottom: 1rem;
  max-width: 700px;
}
.hp-hero-content p {
  color: rgba(255, 255, 255, 0.85);
  font-size: 1.1rem;
  max-width: 560px;
  line-height: 1.65;
  margin-bottom: 0;
}

/* Legacy hero classes */
.hp-hero-title {
  color: white;
  margin-bottom: 1.25rem;
  max-width: 700px;
}
.hp-hero-text {
  color: rgba(255, 255, 255, 0.85);
  font-size: 1.1rem;
  max-width: 580px;
  line-height: 1.65;
}
.hp-hero-text p { margin-bottom: 0; color: inherit; }

/* Content sections */
.content-section { padding: 3.5rem 0; }
.content-section + .content-section { border-top: 1px solid var(--border); }
.content-section.bg-soft { background: var(--bg-soft); }
.content-section.bg-teal {
  background: var(--teal-dark);
  padding-bottom: 3rem;
}
.content-section.bg-teal .richtext p     { color: rgba(255, 255, 255, 0.88); }
.content-section.bg-teal .richtext h3    { color: #e8a07a; border-bottom-color: rgba(255,255,255,0.15); }
.content-section.bg-teal .richtext h4    { color: rgba(255, 255, 255, 0.95); }
.content-section.bg-teal .richtext b,
.content-section.bg-teal .richtext strong { color: #e8a07a; }

/* Section title accent (legacy + new use) */
.section-title,
.hp-section-title {
  font-family: 'Libre Baskerville', Georgia, serif;
  font-size: 1.15rem;
  color: var(--teal);
  border-left: 4px solid var(--red);
  padding-left: 0.75rem;
  margin-bottom: 1.5rem;
}

/* Legacy feature boxes */
.hp-feature { padding: 12px 15px; }
.hp-feature img { margin-bottom: 12px; }
.hp-feature-title { color: var(--teal); margin-top: 8px; font-weight: 600; }

/* Legacy who/why bands */
.hp-who-band { background-color: var(--bg-soft); padding: 2rem 0; }
.hp-why-band { background-color: var(--teal-dark); padding: 2rem 0; }
.hp-why-title { color: white; }
.hp-why-content { color: rgba(255,255,255,0.9); }
.hp-why-content p > b { color: #e8a07a; font-size: 17px; display: block; margin-top: 16px; }
.hp-who-content p > b { color: var(--teal); font-size: 17px; }

/* Hero legacy */
.hp-hero-overlay { background: rgba(0,37,52,0.68); padding: 80px 0 70px; }
.hp-hero-content { color: white; }
.hp-hero-content .fs1 { color: white; margin-bottom: 20px; }
.hp-tagline { color: white; }

/* Feature links */
.fplink a { color: var(--warm-grey); }
.fplink a:hover { color: var(--red-dark); text-decoration: none; }

/* === Sub-page Heroes (Commercial, Government) === */
.sp-hero {
  background-size: cover;
  background-repeat: no-repeat;
  background-color: var(--teal-dark);
  padding: 7rem 0 6rem;
  position: relative;
}
.sp-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(0, 37, 52, 0.72);
}
.sp-hero .container { position: relative; z-index: 1; }

body.page-commercial .sp-hero {
  background-image: url("../images/sp_commercial_wide.3a4136810b0d.jpg");
  background-position: center center;
}
body.page-government .sp-hero {
  background-image: url("../images/sp_government_wide.de14f3b52e01.jpg");
  background-position: center center;
}

/* === Standard Pages === */
.page-header {
  padding: 3rem 0 2rem;
  border-bottom: 1px solid var(--border);
  margin-bottom: 0;
}
.page-header h1 {
  font-family: 'Libre Baskerville', Georgia, serif;
  font-size: clamp(1.6rem, 3.5vw, 2.25rem);
  color: var(--teal);
  line-height: 1.2;
  margin-bottom: 1rem;
}
.page-header-bar {
  width: 36px;
  height: 3px;
  background: var(--red);
}

.page-body-section {
  padding: 2rem 0;
}
.page-body-section + .page-body-section {
  border-top: 1px solid var(--border);
}

/* === Rich Text === */
.richtext h2 {
  font-family: 'Libre Baskerville', Georgia, serif;
  font-size: 1.5rem;
  color: var(--teal);
  margin-top: 2rem;
  margin-bottom: 0.6rem;
}
.richtext h3 {
  font-family: 'Libre Baskerville', Georgia, serif;
  font-size: 1.2rem;
  color: var(--teal);
  margin-top: 2rem;
  margin-bottom: 0.5rem;
  padding-bottom: 0.4rem;
  border-bottom: 1px solid var(--border);
}
.richtext h4 {
  font-family: 'IBM Plex Sans', system-ui, sans-serif;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text);
  margin-top: 1.25rem;
  margin-bottom: 0.35rem;
  letter-spacing: 0.02em;
}
.richtext h2:first-child,
.richtext h3:first-child,
.richtext h4:first-child { margin-top: 0; }

.richtext b,
.richtext strong { color: var(--teal); font-weight: 600; }
.richtext em, .richtext i { font-style: italic; }

.richtext a {
  color: var(--teal);
  border-bottom: 1px solid var(--border);
  transition: color 0.15s, border-color 0.15s;
}
.richtext a:hover {
  color: var(--red);
  border-bottom-color: var(--red);
}

.richtext ul {
  list-style: none;
  padding-left: 0;
}
.richtext ul li {
  padding-left: 1.3em;
  position: relative;
  margin-bottom: 0.3em;
}
.richtext ul li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.68em;
  width: 5px;
  height: 5px;
  background: var(--red);
  border-radius: 0;
}
.richtext ol {
  padding-left: 1.5em;
  counter-reset: none;
}

/* === Case Study Cards === */
.page-body-section:has(.case-study-card) {
  padding: 0;
}
.page-body-section:has(.case-study-card) + .page-body-section:has(.case-study-card) {
  border-top: none;
}
.page-body-section:has(.case-study-card) + .page-body-section:has(.case-study-card) .case-study-card {
  border-top: none;
}
.case-study-card {
  counter-increment: case-study;
  display: grid;
  grid-template-columns: 2.75rem 1fr;
  gap: 0 1.5rem;
  padding: 1.25rem 0;
  border-bottom: 1px solid var(--border);
  margin-bottom: 0;
}
.case-study-card:first-of-type {
  border-top: 1px solid var(--border);
}
.case-study-card::before {
  content: counter(case-study, decimal-leading-zero);
  font-family: 'IBM Plex Sans', system-ui, sans-serif;
  font-size: 1.5rem;
  font-weight: 300;
  color: var(--teal);
  opacity: 0.45;
  line-height: 1.3;
  padding-top: 0.1rem;
  text-align: right;
}
.case-study-title {
  font-family: 'Libre Baskerville', Georgia, serif;
  font-size: 1.05rem;
  color: var(--teal);
  font-weight: 700;
  margin-bottom: 0.65rem;
  line-height: 1.3;
}
.case-study-body .richtext p { margin-bottom: 0.7em; }

/* === Articles === */
.article-header {
  padding: 3rem 0 2rem;
  border-bottom: 1px solid var(--border);
  margin-bottom: 2rem;
}
.article-header h1 {
  font-family: 'Libre Baskerville', Georgia, serif;
  font-size: clamp(1.6rem, 3.5vw, 2.25rem);
  color: var(--teal);
  line-height: 1.2;
  margin-bottom: 0.75rem;
}
.article-meta {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: var(--warm-grey);
  font-size: 0.78rem;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}
.article-meta-sep { color: var(--border); }

/* Article index list */
.article-list {
  list-style: none;
  padding: 0;
  margin-top: 1.5rem;
}
.article-list li {
  display: grid;
  grid-template-columns: 9rem 1fr;
  gap: 1rem;
  padding: 1rem 0;
  border-bottom: 1px solid var(--border);
  align-items: start;
  margin-bottom: 0;
}
.article-list li:first-child {
  border-top: 1px solid var(--border);
}
.article-date {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.07em;
  color: var(--warm-grey);
  text-transform: uppercase;
  padding-top: 0.2rem;
  font-family: 'IBM Plex Sans', system-ui, sans-serif;
}
.article-list a {
  color: var(--text);
  font-weight: 500;
}
.article-list a:hover { color: var(--teal); }
.article-list .article-author {
  color: var(--warm-grey);
  font-size: 0.8rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  display: block;
  margin-top: 0.2rem;
}

/* === Search === */
.search-wrap { padding: 3rem 0; }
.search-form {
  display: flex;
  gap: 0.75rem;
  margin-bottom: 2.5rem;
  max-width: 520px;
}
.search-form input[type="text"] {
  flex: 1;
  padding: 0.65rem 1rem;
  border: 1px solid var(--border);
  border-radius: 2px;
  font-family: inherit;
  font-size: 1rem;
  color: var(--text);
  outline: none;
  transition: border-color 0.18s, box-shadow 0.18s;
  background: var(--bg);
}
.search-form input[type="text"]:focus {
  border-color: var(--teal);
  box-shadow: 0 0 0 3px var(--teal-light);
}
.btn {
  display: inline-block;
  padding: 0.65rem 1.5rem;
  background: var(--teal);
  color: white;
  border: none;
  border-radius: 2px;
  font-family: inherit;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 0.18s;
}
.btn:hover { background: var(--teal-dark); color: white; }

.search-results { list-style: none; padding: 0; }
.search-results li {
  padding: 1.1rem 0;
  border-bottom: 1px solid var(--border);
}
.search-results li:first-child { border-top: 1px solid var(--border); }
.search-results a {
  color: var(--text);
  font-weight: 600;
  font-size: 1.05rem;
}
.search-results a:hover { color: var(--teal); }
.search-results p {
  margin-top: 0.3rem;
  color: var(--text-muted);
  font-size: 0.9rem;
}
.search-pagination {
  display: flex;
  gap: 1.5rem;
  margin-top: 2rem;
}
.search-pagination a {
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--teal);
}
.search-empty {
  color: var(--text-muted);
  font-style: italic;
  padding: 1rem 0;
}

/* === Call to Action === */
.cta-section {
  background: var(--teal-dark);
  padding: 3.5rem 0;
}
.cta-heading {
  font-family: 'Libre Baskerville', Georgia, serif;
  font-size: clamp(1.4rem, 3vw, 1.9rem);
  color: white;
  font-weight: 700;
  line-height: 1.25;
  margin-bottom: 0.75rem;
}
.cta-body {
  color: rgba(255, 255, 255, 0.78);
  font-size: 1.05rem;
  line-height: 1.65;
  margin-bottom: 1.75rem;
  max-width: 600px;
}
.cta-actions {
  display: flex;
  align-items: center;
  gap: 1.75rem;
  flex-wrap: wrap;
}
.btn-cta {
  display: inline-block;
  padding: 0.7rem 1.75rem;
  background: var(--red);
  color: white;
  border: none;
  border-radius: 2px;
  font-family: inherit;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  transition: background 0.18s;
  text-decoration: none;
}
.btn-cta:hover { background: var(--red-dark); color: white; }
.cta-contact {
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.88rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.25);
  padding-bottom: 1px;
  transition: color 0.15s, border-color 0.15s;
}
.cta-contact:hover {
  color: white;
  border-bottom-color: rgba(255, 255, 255, 0.65);
}

/* === Scroll Reveal === */
.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.55s ease, transform 0.55s ease;
}
.reveal.is-visible {
  opacity: 1;
  transform: none;
}

/* === Error Pages === */
.error-page {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  min-height: calc(100vh - var(--nav-height) - 60px);
  padding: max(3rem, 15vh) 2rem 3rem;
  text-align: center;
}
.error-code {
  font-family: 'Libre Baskerville', Georgia, serif;
  font-size: clamp(4rem, 12vw, 8rem);
  font-weight: 700;
  color: var(--teal-light);
  line-height: 1;
  margin-bottom: 0.25rem;
}
.error-title {
  font-family: 'Libre Baskerville', Georgia, serif;
  font-size: 1.5rem;
  color: var(--teal);
  margin-bottom: 0.75rem;
}
.error-msg {
  color: var(--text-muted);
  margin-bottom: 1.75rem;
}
.error-home {
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--teal);
  border-bottom: 2px solid var(--red);
  padding-bottom: 2px;
}
.error-home:hover { color: var(--teal-dark); }

/* === Auth Pages === */
.auth-page {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  min-height: calc(100vh - var(--nav-height));
  padding: max(3rem, 15vh) 2rem 3rem;
}

.auth-box {
  width: 100%;
  max-width: 420px;
}

.auth-box h1 {
  font-family: 'Libre Baskerville', Georgia, serif;
  font-size: clamp(1.4rem, 3vw, 1.85rem);
  color: var(--teal);
  line-height: 1.2;
  margin-bottom: 0.75rem;
}

.auth-box > p {
  color: var(--text-muted);
  margin-bottom: 0.6rem;
}

.auth-box form {
  margin-top: 1.5rem;
}

.field {
  margin-bottom: 1.25rem;
}

.field label {
  display: block;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 0.4rem;
}

.field input[type="text"],
.field input[type="password"] {
  display: block;
  width: 100%;
  padding: 0.65rem 1rem;
  border: 1px solid var(--border);
  border-radius: 2px;
  font-family: inherit;
  font-size: 1rem;
  color: var(--text);
  background: var(--bg);
  outline: none;
  transition: border-color 0.18s, box-shadow 0.18s;
}

.field input[type="text"]:focus,
.field input[type="password"]:focus {
  border-color: var(--teal);
  box-shadow: 0 0 0 3px var(--teal-light);
}

.field-errors {
  list-style: none;
  padding: 0;
  margin: 0.4rem 0 0;
}

.field-errors li {
  font-size: 0.82rem;
  color: var(--red);
  margin-bottom: 0;
}

.field-help {
  margin-top: 0.35rem;
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.5;
}

.auth-box .btn {
  width: 100%;
  margin-top: 0.25rem;
  text-align: center;
}

/* === Responsive === */
@media (max-width: 768px) {
  :root { --nav-height: 60px; }

  /* Mobile nav overlay */
  .nav-links {
    display: none;
    position: absolute;
    top: var(--nav-height);
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: var(--bg);
    border-bottom: 2px solid var(--border);
    padding: 0.5rem 2rem 1rem;
    box-shadow: 0 4px 12px rgba(0,0,0,0.06);
  }
  .nav-links a {
    display: block;
    padding: 0.65rem 0;
    font-size: 0.85rem;
    border-bottom: none;
    border-top: 1px solid var(--border);
  }
  .nav-links li:first-child a { border-top: none; }
  body.nav-open .nav-links { display: flex; }
  .nav-toggle { display: block; }

  /* Sections */
  .hp-hero,
  .sp-hero { padding: 4rem 0 3.5rem; }
  .hp-hero-text { font-size: 1rem; }
  .content-section { padding: 2.5rem 0; }
  .page-header { padding: 2rem 0 1.5rem; }
  .page-body-section { padding: 1.5rem 0; }

  /* Article index */
  .article-list li { grid-template-columns: 1fr; gap: 0.2rem; }
  .article-date { font-size: 0.7rem; }

  /* Case studies */
  .case-study-card { grid-template-columns: 1fr; padding: 1.25rem 0; }
  .case-study-card::before { text-align: left; padding-bottom: 0.5rem; }

  /* CTA */
  .cta-section { padding: 2.5rem 0; }
  .cta-actions { flex-direction: column; align-items: flex-start; gap: 1rem; }

  /* Footer */
  .footer-inner { flex-direction: column; align-items: flex-start; gap: 0.5rem; }

  /* Error page */
  .error-code { font-size: clamp(3rem, 18vw, 6rem); }

  /* Auth pages */
  .auth-page { padding: 2rem 1.25rem; }
}
