/* ============================================
   Summit Support Living — Shared Styles
   ============================================ */

:root {
  /* Brand palette, pulled from the Summit Support Living logo */
  --navy: #15275A;
  --navy-deep: #0D1934;
  --blue: #2D62B0;
  --sky: #EAF2FB;
  --orange: #F1801F;
  --orange-light: #FBB04B;
  --gray: #5C6B7C;
  --ink: #1C2433;
  --ink-soft: #5A6675;
  --bg: #FFFFFF;
  --bg-alt: #F5F8FC;
  --border: #E2E8F1;

  --font-display: 'Poppins', 'Segoe UI', sans-serif;
  --font-body: 'Inter', 'Segoe UI', sans-serif;

  --max-width: 1160px;
  --radius: 14px;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: var(--blue);
  text-decoration: none;
}

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  color: var(--navy);
  font-weight: 700;
  line-height: 1.2;
}

h1 { font-size: clamp(2.2rem, 5vw, 3.4rem); font-weight: 800; }
h2 { font-size: clamp(1.7rem, 3.4vw, 2.4rem); }
h3 { font-size: 1.25rem; }

p { color: var(--ink-soft); }

.section {
  padding: 72px 0;
}

.section--alt {
  background: var(--bg-alt);
}

.section--navy {
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-deep) 100%);
  color: #fff;
}

.section--navy h2,
.section--navy h3 {
  color: #fff;
}

.section--navy p {
  color: #C8D3E6;
}

/* ---------- Eyebrow labels (echoes the "— SUPPORT LIVING —" wordmark style) ---------- */
.eyebrow {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  font-size: 0.78rem;
  color: var(--orange);
  margin-bottom: 14px;
}

.eyebrow::before,
.eyebrow::after {
  content: "";
  display: block;
  height: 1px;
  width: 32px;
  background: var(--orange);
  opacity: 0.55;
}

.eyebrow--left {
  justify-content: flex-start;
}
.eyebrow--left::after { display: none; }

.section-head {
  text-align: center;
  max-width: 720px;
  margin: 0 auto 48px;
}

.section-head p {
  margin-top: 12px;
}

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 14px;
  padding-bottom: 14px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand img {
  height: 92px;
  width: auto;
}

.brand-name {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.15rem;
  color: var(--navy);
  letter-spacing: 0.01em;
  line-height: 1.1;
}

.brand-name span {
  display: block;
  font-weight: 600;
  font-size: 0.62rem;
  letter-spacing: 0.28em;
  color: var(--orange);
  margin-top: 2px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 32px;
}

.nav-links a {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.92rem;
  color: var(--navy);
  position: relative;
  padding: 6px 0;
}

.nav-links a.active,
.nav-links a:hover {
  color: var(--orange);
}

.nav-links a.active::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -2px;
  height: 2px;
  background: var(--orange);
  border-radius: 2px;
}

.nav-cta {
  background: var(--orange);
  color: #fff !important;
  padding: 13px 28px;
  border-radius: 999px;
  font-weight: 700 !important;
  font-size: 1rem;
}

.nav-cta:hover {
  background: var(--navy);
  color: #fff !important;
}

/* Mobile nav toggle */
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}
.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--navy);
  border-radius: 2px;
}

/* ---------- Hero with ridgeline ---------- */
.hero {
  position: relative;
  overflow: hidden;
  background: var(--sky);
}

.hero-ridge {
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 100%;
  height: auto;
  z-index: 1;
  pointer-events: none;
}

.hero .container {
  position: relative;
  z-index: 2;
  padding-top: 90px;
  padding-bottom: 230px;
  text-align: center;
  max-width: 820px;
}

.hero-sub {
  margin: 22px auto 0;
  font-size: 1.2rem;
  font-weight: 500;
  line-height: 1.75;
  color: var(--navy);
  max-width: 640px;
}

.hero-actions {
  display: flex;
  justify-content: center;
  gap: 16px;
  margin-top: 34px;
  flex-wrap: wrap;
}

/* Page header (non-home hero, shorter) */
.page-hero {
  position: relative;
  overflow: hidden;
  background: var(--sky);
}

.page-hero .container {
  position: relative;
  z-index: 2;
  padding-top: 64px;
  padding-bottom: 210px;
  text-align: center;
  max-width: 760px;
}

.page-hero-ridge {
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 100%;
  z-index: 1;
  pointer-events: none;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.95rem;
  padding: 14px 30px;
  border-radius: 999px;
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease, color 0.15s ease;
}

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

.btn--primary {
  background: var(--orange);
  color: #fff;
  box-shadow: 0 8px 24px rgba(241, 128, 31, 0.28);
}

.btn--primary:hover {
  background: #d96e0f;
}

.btn--ghost {
  background: rgba(255, 255, 255, 0.92);
  border-color: var(--navy);
  color: var(--navy);
}

.btn--ghost:hover {
  background: var(--navy);
  color: #fff;
}

.btn--light {
  background: #fff;
  color: var(--navy);
}
.btn--light:hover {
  background: var(--orange-light);
  color: var(--navy-deep);
}

/* ---------- 24/7 strip ---------- */
.strip {
  background: var(--navy);
  color: #fff;
  margin-top: -160px;
  position: relative;
  z-index: 3;
}

.strip .container {
  display: flex;
  align-items: center;
  gap: 28px;
  padding-top: 36px;
  padding-bottom: 36px;
  border-radius: var(--radius);
}

.strip-badge {
  flex-shrink: 0;
  width: 86px;
  height: 86px;
  border-radius: 50%;
  border: 3px solid var(--orange);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.3rem;
  color: var(--orange);
}

.strip h3 {
  color: #fff;
  margin-bottom: 4px;
}

.strip p {
  color: #C8D3E6;
  margin: 0;
}

.strip strong {
  color: var(--orange-light);
}

/* ---------- Cards / grids ---------- */
.grid {
  display: grid;
  gap: 28px;
}

.grid--5 {
  grid-template-columns: repeat(5, 1fr);
}

.grid--4 {
  grid-template-columns: repeat(4, 1fr);
}

.grid--3 {
  grid-template-columns: repeat(3, 1fr);
}

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

.card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 22px;
  text-align: center;
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.card:hover {
  box-shadow: 0 12px 30px rgba(21, 39, 90, 0.08);
  transform: translateY(-4px);
}

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

.card p {
  font-size: 0.93rem;
}

.icon-badge {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: var(--navy);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto;
}

.icon-badge svg {
  width: 30px;
  height: 30px;
}

.icon-badge--orange {
  background: var(--orange);
}

/* Service rows (about page) */
.service-row {
  display: flex;
  gap: 24px;
  align-items: flex-start;
  padding: 28px 0;
  border-bottom: 1px solid var(--border);
}

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

.service-row .icon-badge {
  flex-shrink: 0;
  margin: 0;
}

.service-row h3 {
  margin-bottom: 6px;
}

/* ---------- Promise card ---------- */
.promise-list {
  display: flex;
  flex-direction: column;
  gap: 22px;
  margin-top: 28px;
}

.promise-item {
  display: flex;
  gap: 18px;
  align-items: center;
}

.promise-item .icon-badge {
  flex-shrink: 0;
  width: 50px;
  height: 50px;
  background: var(--orange);
}

.promise-item .icon-badge svg {
  width: 24px;
  height: 24px;
}

.promise-item p {
  margin: 0;
  color: #DCE5F5;
}

.promise-tile {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #fff;
  border-radius: 24px;
  padding: 56px 48px;
  box-shadow: 0 28px 64px rgba(8, 18, 45, 0.45);
  overflow: hidden;
}

/* Soft halo behind the logo for depth */
.promise-tile::after {
  content: "";
  position: absolute;
  width: 360px;
  height: 360px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(45, 98, 176, 0.10), transparent 70%);
}

.promise-tile img {
  position: relative;
  width: 100%;
  max-width: 380px;
  height: auto;
}

@media (max-width: 640px) {
  .promise-tile {
    padding: 40px 32px;
  }
}

/* ---------- CTA banner ---------- */
.cta-banner {
  background: linear-gradient(120deg, var(--orange) 0%, var(--orange-light) 100%);
  border-radius: var(--radius);
  padding: 48px;
  text-align: center;
  color: #fff;
}

.cta-banner h2 {
  color: #fff;
}

.cta-banner p {
  color: rgba(255,255,255,0.92);
  max-width: 560px;
  margin: 10px auto 0;
}

.cta-banner .btn {
  margin-top: 26px;
}

/* ---------- Footer ---------- */
.site-footer {
  background: var(--navy-deep);
  color: #C8D3E6;
  position: relative;
  overflow: hidden;
}

.footer-ridge {
  display: block;
  width: 100%;
  position: relative;
  z-index: 1;
}

.footer-content {
  padding: 48px 0 32px;
  position: relative;
  z-index: 2;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 36px;
  padding-bottom: 32px;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.footer-brand img {
  height: 46px;
}

.footer-brand-name {
  font-family: var(--font-display);
  font-weight: 800;
  color: #fff;
  font-size: 1.05rem;
  line-height: 1.1;
}

.footer-brand-name span {
  display: block;
  font-weight: 600;
  font-size: 0.6rem;
  letter-spacing: 0.28em;
  color: var(--orange);
  margin-top: 2px;
}

.site-footer h4 {
  color: #fff;
  font-size: 0.95rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin-bottom: 14px;
}

.site-footer ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.site-footer a {
  color: #C8D3E6;
  font-size: 0.93rem;
}

.site-footer a:hover {
  color: var(--orange-light);
}

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.08);
  padding-top: 22px;
  font-size: 0.82rem;
  color: #8C9BBE;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
}

/* ---------- Forms ---------- */
.form-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 40px;
  box-shadow: 0 16px 40px rgba(21, 39, 90, 0.06);
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.field {
  margin-bottom: 20px;
}

.field label {
  display: block;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.88rem;
  color: var(--navy);
  margin-bottom: 7px;
}

.field .required {
  color: var(--orange);
}

.field input,
.field select,
.field textarea {
  width: 100%;
  padding: 13px 14px;
  border: 1.5px solid var(--border);
  border-radius: 10px;
  font-family: var(--font-body);
  font-size: 0.95rem;
  color: var(--ink);
  background: var(--bg-alt);
  transition: border-color 0.15s ease, background 0.15s ease;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--orange);
  background: #fff;
}

.field textarea {
  resize: vertical;
  min-height: 130px;
}

.field-hint {
  font-size: 0.8rem;
  color: var(--ink-soft);
  margin-top: 6px;
}

.file-field {
  border: 1.5px dashed var(--border);
  border-radius: 10px;
  padding: 18px;
  background: var(--bg-alt);
  text-align: center;
}

.file-field input[type="file"] {
  border: none;
  background: transparent;
  padding: 6px 0 0;
}

.form-submit {
  text-align: center;
  margin-top: 8px;
}

/* ---------- Open positions list ---------- */
.positions {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.position {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px 26px;
  flex-wrap: wrap;
}

.position h3 {
  margin-bottom: 4px;
}

.position .tag {
  display: inline-block;
  font-family: var(--font-display);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--blue);
  background: var(--sky);
  padding: 4px 12px;
  border-radius: 999px;
  margin-top: 6px;
}

/* ---------- Contact info list ---------- */
.contact-list {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.contact-list .item {
  display: flex;
  gap: 16px;
  align-items: flex-start;
}

.contact-list .icon-badge {
  flex-shrink: 0;
  width: 48px;
  height: 48px;
}

.contact-list .icon-badge svg {
  width: 22px;
  height: 22px;
}

.contact-list h4 {
  color: var(--navy);
  margin-bottom: 4px;
}

.contact-list p, .contact-list a {
  font-size: 0.95rem;
}

/* ---------- Contact cards grid ---------- */
.contact-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-bottom: 8px;
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
}

.contact-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 14px;
  background: #fff;
  border: 1px solid rgba(21,39,90,0.10);
  border-radius: 12px;
  padding: 28px 24px;
  box-shadow: 0 2px 12px rgba(21,39,90,0.06);
}

.contact-card .icon-badge {
  flex-shrink: 0;
  width: 48px;
  height: 48px;
}

.contact-card .icon-badge svg {
  width: 22px;
  height: 22px;
}

.contact-card h4 {
  color: var(--navy);
  margin-bottom: 4px;
}

.contact-card p, .contact-card a {
  font-size: 0.95rem;
  margin: 0;
}

@media (max-width: 900px) {
  .contact-cards { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 540px) {
  .contact-cards { grid-template-columns: 1fr; }
}

/* ---------- Responsive ---------- */
@media (max-width: 980px) {
  .grid--5 { grid-template-columns: repeat(2, 1fr); }
  .grid--4 { grid-template-columns: repeat(2, 1fr); }
  .grid--3 { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }
}

@media (max-width: 760px) {
  .nav-links {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #fff;
    flex-direction: column;
    align-items: flex-start;
    padding: 16px 24px 24px;
    border-bottom: 1px solid var(--border);
    gap: 16px;
    display: none;
  }
  .nav-links.open {
    display: flex;
  }
  .nav-toggle {
    display: flex;
  }
  .grid--5, .grid--4, .grid--3, .grid--2 {
    grid-template-columns: 1fr;
  }
  .form-row {
    grid-template-columns: 1fr;
  }
  .footer-grid {
    grid-template-columns: 1fr;
  }
  .strip .container {
    flex-direction: column;
    text-align: center;
  }
  .position {
    flex-direction: column;
    align-items: flex-start;
    text-align: left;
  }
  .hero .container {
    padding-bottom: 180px;
  }
  .page-hero .container {
    padding-bottom: 150px;
  }
  .strip {
    margin-top: -120px;
  }
}

/* ============================================
   Scroll engine (see scroll.js)
   ============================================ */

/* Thin progress bar that tracks the rendered scroll position. */
.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  z-index: 200;
  transform: scaleX(0);
  transform-origin: 0 50%;
  background: linear-gradient(90deg, var(--orange-light), var(--orange));
  pointer-events: none;
}

/* When the smooth engine is active the content is rendered through a
   transformed layer; the header is lifted out and pinned so it is never
   dragged by that transform. The browser must not also smooth-scroll. */
.has-smooth {
  scroll-behavior: auto;
}

.has-smooth .site-header {
  position: fixed;
  left: 0;
  right: 0;
}

.smooth-wrapper {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  will-change: transform;
}

.smooth-content {
  will-change: transform;
}

/* Keep layered elements composited for smooth scrubbing. */
.has-smooth .hero-ridge,
.has-smooth .page-hero-ridge,
.has-smooth .promise-tile img {
  will-change: transform;
}

@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
    scroll-behavior: auto !important;
  }
  /* The scroll engine bails out entirely under reduced-motion, but make sure
     nothing it would have touched is left hidden. */
  .scroll-progress {
    display: none;
  }
}

/* Focus visibility */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
  outline: 3px solid var(--orange);
  outline-offset: 2px;
}
