/* ==========================================================================
   Tula Care — tulacareresidential.com
   Shared stylesheet
   ========================================================================== */

:root {
  /* Brand */
  --fir:        #16352C;
  --fir-deep:   #0E241D;
  --moss:       #1F4A3D;
  --moss-soft:  #2E6350;
  --river:      #5E7C84;
  --river-pale: #E3EBEA;
  --ochre:      #C08A2E;
  --ochre-pale: #F6EEDD;

  /* Neutrals — biased green so they sit with the brand */
  --ground:     #F4F5F1;
  --ground-alt: #ECEEE8;
  --surface:    #FFFFFF;
  --ink:        #16211D;
  --ink-soft:   #4A5A53;
  --ink-faint:  #71827A;
  --line:       #DCE1DA;
  --line-soft:  #E8EBE5;

  /* Semantic */
  --alert:      #8C2F22;
  --alert-pale: #FBEDEA;

  /* Type */
  --sans: "Libre Franklin", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --serif: "Source Serif 4", Georgia, "Times New Roman", serif;
  --mono: "IBM Plex Mono", "SFMono-Regular", Consolas, "Liberation Mono", monospace;

  /* Scale */
  --step--1: 0.875rem;
  --step-0:  1.0625rem;
  --step-1:  1.25rem;
  --step-2:  1.5rem;
  --step-3:  1.9375rem;
  --step-4:  2.5rem;
  --step-5:  3.25rem;

  --measure: 65ch;
  --wrap: 1120px;
  --gutter: clamp(1.25rem, 5vw, 3rem);
  --radius: 4px;
}

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font-family: var(--serif);
  font-size: var(--step-0);
  line-height: 1.65;
  font-synthesis-weight: none;
  -webkit-font-smoothing: antialiased;
}

img, svg, video { max-width: 100%; height: auto; }

h1, h2, h3, h4, .eyebrow, .btn, nav, th {
  font-family: var(--sans);
}

h1, h2, h3, h4 {
  color: var(--fir);
  line-height: 1.15;
  text-wrap: balance;
  margin: 0;
  font-weight: 650;
  letter-spacing: -0.015em;
}

h1 { font-size: var(--step-5); letter-spacing: -0.025em; }
h2 { font-size: var(--step-3); }
h3 { font-size: var(--step-1); }
h4 { font-size: var(--step-0); }

p, li { max-width: var(--measure); }

a { color: var(--moss); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--ochre); }

:focus-visible {
  outline: 3px solid var(--ochre);
  outline-offset: 2px;
  border-radius: 2px;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--fir);
  color: #fff;
  padding: 0.75rem 1.25rem;
  z-index: 200;
}
.skip-link:focus { left: 0; }

/* ---------- Layout primitives ---------- */

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.band { padding-block: clamp(3rem, 7vw, 5.5rem); }
.band--tight { padding-block: clamp(2.25rem, 5vw, 3.5rem); }
.band--surface { background: var(--surface); border-block: 1px solid var(--line-soft); }
.band--alt { background: var(--ground-alt); }
.band--dark { background: var(--fir); color: #E7EDE8; }
.band--dark h2, .band--dark h3 { color: #FFFFFF; }
.band--dark a { color: var(--ochre); }

.eyebrow {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--river);
  margin: 0 0 0.75rem;
  display: block;
}
.band--dark .eyebrow { color: #9FBDB2; }

.lede {
  font-size: var(--step-1);
  line-height: 1.5;
  color: var(--ink-soft);
}

.section-head { margin-bottom: 2.5rem; }
.section-head p { margin-bottom: 0; }

.stack > * + * { margin-top: 1rem; }
.stack-lg > * + * { margin-top: 2.5rem; }

.grid { display: grid; gap: 1.5rem; }
.grid--2 { grid-template-columns: repeat(auto-fit, minmax(19rem, 1fr)); }
.grid--3 { grid-template-columns: repeat(auto-fit, minmax(17rem, 1fr)); }
.grid--form {
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
  gap: clamp(2rem, 5vw, 3.5rem);
  align-items: start;
}
@media (max-width: 860px) {
  .grid--form { grid-template-columns: 1fr; }
}

hr.rule { border: 0; border-top: 1px solid var(--line); margin: 0; }

/* ---------- Regulation tag — the recurring structural device ---------- */

.reg {
  display: inline-block;
  font-family: var(--mono);
  font-size: 0.6875rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--moss);
  background: var(--river-pale);
  border: 1px solid #CBDAD6;
  border-radius: 2px;
  padding: 0.15rem 0.45rem;
  white-space: nowrap;
}
.band--dark .reg {
  color: #CFE3DA;
  background: rgba(255,255,255,0.08);
  border-color: rgba(255,255,255,0.2);
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-size: 0.9375rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  padding: 0.8rem 1.4rem;
  border-radius: var(--radius);
  border: 1px solid transparent;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
.btn--primary { background: var(--ochre); color: var(--ink); }
.btn--primary:hover { background: #A9791F; color: var(--ink); }
.btn--solid { background: var(--fir); color: #fff; }
.btn--solid:hover { background: var(--moss-soft); color: #fff; }
.btn--ghost { background: transparent; color: var(--fir); border-color: var(--fir); }
.btn--ghost:hover { background: var(--fir); color: #fff; }
/* On dark grounds the link color rule would otherwise win over the button
   colors, so these are scoped tightly enough to beat `.band--dark a`. */
.band--dark a.btn--primary, .hero a.btn--primary { color: var(--ink); }
.band--dark a.btn--solid, .hero a.btn--solid { color: #fff; }
.band--dark .btn--ghost, .hero .btn--ghost,
.band--dark a.btn--ghost, .hero a.btn--ghost {
  color: #fff;
  border-color: rgba(255,255,255,0.55);
  background: transparent;
}
.band--dark .btn--ghost:hover, .hero .btn--ghost:hover,
.band--dark a.btn--ghost:hover, .hero a.btn--ghost:hover {
  background: #fff;
  color: var(--fir);
}

.btn-row { display: flex; flex-wrap: wrap; gap: 0.75rem; }

/* ---------- Header ---------- */

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

.header-inner {
  display: flex;
  align-items: center;
  gap: 1rem;
  min-height: 76px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  text-decoration: none;
  margin-right: auto;
}
.brand:hover { color: inherit; }

.brand-mark {
  width: 38px;
  height: 38px;
  flex: none;
}

.brand-text { display: flex; flex-direction: column; line-height: 1.1; }
.brand-name {
  font-family: var(--sans);
  font-weight: 700;
  font-size: 1.0625rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--fir);
}
.brand-tag {
  font-family: var(--sans);
  font-size: 0.6875rem;
  letter-spacing: 0.04em;
  color: var(--ink-faint);
}

.nav-toggle {
  display: none;
  font-family: var(--sans);
  font-size: 0.875rem;
  font-weight: 600;
  align-items: center;
  gap: 0.5rem;
  background: transparent;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0.55rem 0.8rem;
  color: var(--fir);
  cursor: pointer;
}

.site-nav ul {
  display: flex;
  align-items: center;
  gap: 1.4rem;
  list-style: none;
  margin: 0;
  padding: 0;
}
.site-nav li { max-width: none; }
.site-nav a {
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--ink-soft);
  text-decoration: none;
  padding-block: 0.35rem;
  border-bottom: 2px solid transparent;
  white-space: nowrap;
}
.site-nav a:hover { color: var(--fir); border-bottom-color: var(--ochre); }
.site-nav a[aria-current="page"] { color: var(--fir); font-weight: 600; border-bottom-color: var(--fir); }
.site-nav .nav-cta { margin-left: 0.6rem; }
.site-nav .nav-cta a {
  border: 1px solid var(--fir);
  border-radius: var(--radius);
  padding: 0.55rem 1rem;
  color: var(--fir);
  font-weight: 600;
}
.site-nav .nav-cta a:hover { background: var(--fir); color: #fff; border-bottom-color: var(--fir); }

@media (max-width: 940px) {
  .nav-toggle { display: inline-flex; }
  .site-nav {
    display: none;
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    background: var(--surface);
    border-bottom: 1px solid var(--line);
    box-shadow: 0 12px 24px -18px rgba(14, 36, 29, 0.5);
  }
  .site-nav.is-open { display: block; }
  .site-nav ul {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 0.5rem var(--gutter) 1.25rem;
  }
  .site-nav a {
    display: block;
    padding: 0.85rem 0;
    border-bottom: 1px solid var(--line-soft);
  }
  .site-nav a[aria-current="page"] { border-bottom-color: var(--line-soft); }
  .site-nav .nav-cta { margin: 0.9rem 0 0; }
  .site-nav .nav-cta a { text-align: center; border-bottom: 1px solid var(--fir); }
}

/* ---------- Hero ---------- */

.hero {
  background:
    linear-gradient(180deg, rgba(22,53,44,0.96) 0%, rgba(14,36,29,0.98) 100%);
  color: #E7EDE8;
  padding-block: clamp(3.25rem, 8vw, 6rem);
}
.hero h1 { color: #fff; }
.hero .lede { color: #C3D4CB; max-width: 34rem; }

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
  gap: clamp(2rem, 5vw, 4rem);
  align-items: start;
}
@media (max-width: 860px) {
  .hero-grid { grid-template-columns: 1fr; }
}

.facts {
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.16);
  border-radius: var(--radius);
  padding: 1.5rem;
}
.facts h2 {
  font-size: 0.75rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #9FBDB2;
  margin-bottom: 1rem;
}
.facts dl { margin: 0; display: grid; gap: 0.9rem; }
.facts dt {
  font-family: var(--sans);
  font-size: 0.75rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #9FBDB2;
}
.facts dd {
  margin: 0.1rem 0 0;
  color: #FFFFFF;
  font-size: 1.0625rem;
  line-height: 1.35;
}
.facts dd .sub { display: block; color: #B8CCC2; font-size: 0.875rem; }

/* ---------- Page header (interior pages) ---------- */

.page-head {
  background: var(--fir);
  color: #DCE7E0;
  padding-block: clamp(2.5rem, 6vw, 4rem);
}
.page-head h1 { color: #fff; font-size: var(--step-4); }
.page-head p { color: #BCD0C6; margin-bottom: 0; }

/* ---------- Cards & panels ---------- */

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.6rem;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}
.card h3 { margin-bottom: 0.1rem; }
.card p { margin: 0; color: var(--ink-soft); }
.card .reg { align-self: flex-start; margin-top: auto; }

.panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-left: 3px solid var(--moss);
  border-radius: var(--radius);
  padding: 1.5rem 1.6rem;
}
.panel h3 { margin-bottom: 0.5rem; }
.panel p:last-child { margin-bottom: 0; }

.notice {
  background: var(--ochre-pale);
  border: 1px solid #E4D2AB;
  border-radius: var(--radius);
  padding: 1rem 1.2rem;
  font-size: var(--step--1);
  color: #5C4715;
}
.notice strong { color: #4A390F; }
.notice p { max-width: none; margin: 0; }

.notice--alert {
  background: var(--alert-pale);
  border-color: #E8C4BC;
  color: #6E2419;
}
.notice--alert strong { color: var(--alert); }

/* Quote */
.quote {
  border-left: 3px solid var(--ochre);
  padding: 0.4rem 0 0.4rem 1.5rem;
  margin: 0;
}
.quote p {
  font-size: var(--step-2);
  line-height: 1.45;
  font-style: italic;
  color: var(--fir);
  margin: 0 0 0.9rem;
  max-width: 42ch;
}
.quote footer {
  font-family: var(--sans);
  font-size: 0.8125rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-faint);
}

/* Definition rows (insurance, contact details) */
.rows { border-top: 1px solid var(--line); margin: 0; }
.rows > div {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 1.5rem;
  justify-content: space-between;
  align-items: baseline;
  padding: 0.95rem 0;
  border-bottom: 1px solid var(--line);
}
.rows dt { font-family: var(--sans); font-weight: 600; font-size: 0.9375rem; color: var(--fir); }
.rows dd {
  margin: 0;
  color: var(--ink-soft);
  font-variant-numeric: tabular-nums;
  font-size: 0.9375rem;
}

/* ---------- Careers ---------- */

.job {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}
.job + .job { margin-top: 1rem; }

.job-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 1rem;
  padding: 1.25rem 1.5rem;
  background: none;
  border: 0;
  width: 100%;
  text-align: left;
  cursor: pointer;
  font-family: var(--sans);
}
.job-head:hover { background: var(--ground); }
.job-title { font-size: var(--step-1); font-weight: 650; color: var(--fir); margin-right: auto; }
.job-meta {
  font-family: var(--sans);
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-faint);
}
.job-chevron { color: var(--moss); flex: none; transition: transform 0.2s ease; }
.job-head[aria-expanded="true"] .job-chevron { transform: rotate(180deg); }

.job-body {
  padding: 0 1.5rem 1.5rem;
  border-top: 1px solid var(--line-soft);
  padding-top: 1.25rem;
}
.job-body[hidden] { display: none; }
.job-body h4 {
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--river);
  margin: 1.25rem 0 0.4rem;
}
.job-body h4:first-child { margin-top: 0; }
.job-body ul { margin: 0; padding-left: 1.15rem; }
.job-body li { margin-bottom: 0.35rem; }

/* ---------- Forms ---------- */

.form {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: clamp(1.4rem, 3vw, 2rem);
}
.field { display: flex; flex-direction: column; gap: 0.4rem; margin-bottom: 1.1rem; }
.field label {
  font-family: var(--sans);
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--fir);
}
.field .hint { font-size: 0.8125rem; color: var(--ink-faint); margin: 0; max-width: none; }
.field .req { color: var(--alert); }

input[type="text"], input[type="email"], input[type="tel"], input[type="password"],
select, textarea {
  font-family: var(--serif);
  font-size: var(--step-0);
  color: var(--ink);
  background: var(--surface);
  border: 1px solid #C6CFC7;
  border-radius: var(--radius);
  padding: 0.7rem 0.8rem;
  width: 100%;
}
select { font-family: var(--sans); font-size: 0.9375rem; }
textarea { min-height: 9rem; resize: vertical; line-height: 1.55; }
input:focus, select:focus, textarea:focus { border-color: var(--moss); }

input[type="file"] {
  font-family: var(--sans);
  font-size: 0.875rem;
  border: 1px dashed #C6CFC7;
  border-radius: var(--radius);
  padding: 0.8rem;
  width: 100%;
  background: var(--ground);
}

.form-status {
  margin-top: 1rem;
  padding: 0.9rem 1.1rem;
  border-radius: var(--radius);
  font-size: var(--step--1);
  border: 1px solid var(--line);
  background: var(--ground);
}
.form-status[hidden] { display: none; }
.form-status p { max-width: none; margin: 0; }
.form-status.is-error { background: var(--alert-pale); border-color: #E8C4BC; color: #6E2419; }
.form-status.is-ok { background: var(--river-pale); border-color: #CBDAD6; color: var(--fir); }

/* ---------- Staff portal ---------- */

.portal {
  min-height: 100%;
  background: var(--fir-deep);
  color: #D6E2DA;
  padding-block: clamp(2.5rem, 7vw, 5rem);
}
.portal h1 { color: #fff; font-size: var(--step-3); }
.portal a { color: var(--ochre); }
.portal-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
  gap: clamp(2rem, 5vw, 3.5rem);
  align-items: start;
}
@media (max-width: 880px) { .portal-grid { grid-template-columns: 1fr; } }

.portal .form { background: rgba(255,255,255,0.05); border-color: rgba(255,255,255,0.16); }
.portal .form label { color: #CFE0D6; }
.portal .form input {
  background: rgba(255,255,255,0.94);
  border-color: rgba(255,255,255,0.2);
}
.portal .form-status { background: rgba(255,255,255,0.07); border-color: rgba(255,255,255,0.2); color: #E7EDE8; }

.module-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.85rem; }
.module-list li {
  max-width: none;
  border: 1px solid rgba(255,255,255,0.14);
  border-radius: var(--radius);
  padding: 1.1rem 1.25rem;
  background: rgba(255,255,255,0.04);
}
.module-list strong { display: block; font-family: var(--sans); color: #fff; margin-bottom: 0.25rem; }
.module-list span { font-size: var(--step--1); color: #AFC6BB; }

/* ---------- Footer ---------- */

.site-footer {
  background: var(--fir-deep);
  color: #A9C0B5;
  padding-block: 3rem 2rem;
  font-size: var(--step--1);
}
.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr));
  gap: 2rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid rgba(255,255,255,0.12);
}
.site-footer h2 {
  font-size: 0.75rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #7E9A8D;
  margin-bottom: 0.9rem;
}
.site-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.5rem; }
.site-footer li { max-width: none; }
.site-footer a { color: #D5E3DB; text-decoration: none; }
.site-footer a:hover { color: var(--ochre); text-decoration: underline; }
.site-footer p { color: #A9C0B5; }
.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 2rem;
  justify-content: space-between;
  padding-top: 1.5rem;
  font-size: 0.8125rem;
  color: #7E9A8D;
}
.footer-bottom p { margin: 0; max-width: 52ch; color: #7E9A8D; }

/* ---------- Utilities ---------- */

.tag-row { display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: center; }
.muted { color: var(--ink-soft); }
.no-measure { max-width: none; }
.center-narrow { max-width: 44rem; margin-inline: auto; }
.visually-hidden {
  position: absolute; width: 1px; height: 1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap;
}

/* ---------- Staff portal launcher (/staffportal) ---------- */

.portal-single { max-width: 42rem; }
.portal-intro { color: #B6CBC0; font-size: var(--step-1); line-height: 1.5; max-width: 34rem; }

.launch { display: grid; gap: 0.9rem; margin: 2.25rem 0 2.5rem; }

.launch-btn {
  display: flex;
  align-items: center;
  gap: 1rem;
  min-height: 78px;
  padding: 1.1rem 1.25rem;
  border-radius: 6px;
  background: var(--surface);
  color: var(--fir);
  text-decoration: none;
  border: 1px solid rgba(255,255,255,0.18);
}
.launch-btn:hover { background: var(--ochre-pale); color: var(--fir); }
.launch-main { display: flex; flex-direction: column; gap: 0.15rem; margin-right: auto; }
.launch-title { font-family: var(--sans); font-weight: 650; font-size: 1.125rem; line-height: 1.25; }
.launch-sub { font-size: 0.875rem; color: var(--ink-soft); line-height: 1.35; }
.launch-icon { color: var(--moss); flex: none; }

.launch-btn.is-pending {
  background: rgba(255,255,255,0.05);
  border-style: dashed;
  border-color: rgba(255,255,255,0.22);
  cursor: default;
}
.launch-btn.is-pending .launch-title { color: #D6E2DA; }
.launch-btn.is-pending .launch-sub { color: #8FA89C; }
.launch-badge {
  font-family: var(--sans);
  font-size: 0.6875rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  border: 1px solid rgba(255,255,255,0.25);
  border-radius: 999px;
  padding: 0.25rem 0.65rem;
  color: #9FBDB2;
  flex: none;
}

.portal-note { border-top: 1px solid rgba(255,255,255,0.14); padding-top: 1.5rem; }
.portal-note h2 { color: #fff; font-size: var(--step-1); margin-bottom: 0.75rem; }
.portal-note ul { padding-left: 1.15rem; margin: 0 0 1.1rem; }
.portal-note li { color: #AFC6BB; margin-bottom: 0.4rem; max-width: 46ch; }
.portal-note p { color: #AFC6BB; max-width: 46ch; }

/* Honeypot — a field real people never see or fill */
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* Coverage types (no dollar limits published) */
.coverage {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.5rem;
  max-width: 34rem;
  border-top: 1px solid var(--line);
}
.coverage li {
  padding: 0.85rem 0 0.35rem;
  border-bottom: 1px solid var(--line);
  font-family: var(--sans);
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--fir);
  max-width: none;
}

/* Launcher links sit on a white card inside the dark portal page, so they
   take the card's own ink colors rather than the page's link color. */
.portal a.launch-btn, .portal a.launch-btn .launch-title { color: var(--fir); }
.portal a.launch-btn:hover .launch-title { color: var(--moss); }
