/* =========================================================
   U Save MD — Design System
   Palette: deep harbor teal + Florida amber, warm sand ground
   Type: Newsreader (headlines) + IBM Plex Sans (body/UI)
   ========================================================= */

:root {
  --ink: #1A2420;
  --ink-soft: #45564F;
  --sand: #FAF6EF;
  --sand-deep: #F1EADA;
  --card: #FFFFFF;
  --line: #E3DCC8;
  --teal-900: #10302F;
  --teal-700: #1B4E4C;
  --teal-600: #226663;
  --teal-500: #2C817C;
  --amber-600: #C97A24;
  --amber-500: #DE8F35;
  --amber-100: #FBE7CB;

  --radius-sm: 6px;
  --radius-md: 12px;
  --shadow-1: 0 1px 2px rgba(16, 48, 47, 0.06), 0 6px 20px -8px rgba(16, 48, 47, 0.18);

  --max-w: 1180px;
  --font-display: "Newsreader", Georgia, "Times New Roman", serif;
  --font-body: "IBM Plex Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

*, *::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(--sand);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--teal-700); text-decoration-color: rgba(27,78,76,0.35); text-underline-offset: 3px; }
a:hover { text-decoration-color: currentColor; }

:focus-visible {
  outline: 2px solid var(--amber-600);
  outline-offset: 2px;
}

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

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  color: var(--teal-900);
  line-height: 1.18;
  margin: 0 0 0.5em;
}
h1 { font-size: clamp(2.1rem, 1.6rem + 2vw, 3.3rem); font-weight: 560; }
h2 { font-size: clamp(1.5rem, 1.25rem + 1vw, 2.1rem); }
h3 { font-size: clamp(1.15rem, 1.05rem + 0.4vw, 1.4rem); }
p { max-width: 68ch; }
.lede { font-size: 1.2rem; color: var(--ink-soft); max-width: 60ch; }

ul.list, .content-body ul { padding-left: 1.2em; }
.content-body li { margin-bottom: 0.4em; }
.content-body p { margin: 0 0 1.1em; }
.content-body h2 { margin-top: 1.6em; }
.content-body img { border-radius: var(--radius-md); margin: 1.2em 0; }

/* ---------- Skip link ---------- */
.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--teal-900);
  color: #fff;
  padding: 10px 16px;
  z-index: 1000;
  border-radius: 0 0 var(--radius-sm) 0;
}
.skip-link:focus { left: 0; }

/* ---------- Top bar ---------- */
.topbar {
  background: var(--teal-900);
  color: #E9F1EE;
  font-size: 0.85rem;
}
.topbar .wrap {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 8px;
  padding-bottom: 8px;
  gap: 16px;
  flex-wrap: wrap;
}
.topbar a { color: #E9F1EE; text-decoration: none; }
.topbar a:hover { text-decoration: underline; }
.topbar .phone { font-weight: 600; letter-spacing: 0.02em; }

/* ---------- Header / nav ---------- */
header.site-header {
  background: var(--sand);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 100;
}
.nav-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 0;
  gap: 20px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--teal-900);
}
.brand-mark {
  width: 40px; height: 40px;
  border-radius: 10px;
  background: linear-gradient(155deg, var(--teal-600), var(--teal-900));
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-family: var(--font-display); font-weight: 600; font-size: 1.15rem;
  flex-shrink: 0;
}
.brand-text {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.25rem;
  line-height: 1.1;
}
.brand-text small { display: block; font-family: var(--font-body); font-weight: 400; font-size: 0.68rem; letter-spacing: 0.06em; color: var(--ink-soft); }

nav.primary-nav { display: none; }
nav.primary-nav ul { list-style: none; display: flex; gap: 2px; margin: 0; padding: 0; }
nav.primary-nav > ul > li { position: relative; }
nav.primary-nav > ul > li > a {
  display: block;
  padding: 10px 14px;
  color: var(--ink);
  text-decoration: none;
  font-size: 0.95rem;
  border-radius: var(--radius-sm);
}
nav.primary-nav > ul > li > a:hover,
nav.primary-nav > ul > li:hover > a { background: var(--sand-deep); color: var(--teal-900); }
nav.primary-nav .dropdown {
  display: none;
  position: absolute;
  top: 100%; left: 0;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-1);
  min-width: 220px;
  padding: 6px;
  list-style: none;
  margin: 4px 0 0;
}
nav.primary-nav li:hover > .dropdown,
nav.primary-nav li:focus-within > .dropdown { display: block; }
nav.primary-nav .dropdown li a {
  display: block;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  color: var(--ink);
  text-decoration: none;
  font-size: 0.92rem;
  white-space: nowrap;
}
nav.primary-nav .dropdown li a:hover { background: var(--sand-deep); }

.header-cta {
  display: none;
}
.header-cta .btn { white-space: nowrap; }

.nav-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--teal-900);
  color: #fff;
  border: none;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-size: 0.9rem;
  cursor: pointer;
}
.nav-toggle svg { width: 18px; height: 18px; }

#mobile-menu {
  display: none;
  border-top: 1px solid var(--line);
  padding: 8px 0 18px;
}
#mobile-menu.open { display: block; }
#mobile-menu ul { list-style: none; margin: 0; padding: 0; }
#mobile-menu > ul > li { border-bottom: 1px solid var(--line); }
#mobile-menu a { display: block; padding: 12px 4px; color: var(--ink); text-decoration: none; }
#mobile-menu .sub { padding-left: 16px; display: none; }
#mobile-menu li.expanded > .sub { display: block; }
#mobile-menu .group-toggle { display: flex; justify-content: space-between; align-items: center; width: 100%; background: none; border: none; font: inherit; cursor: pointer; padding: 12px 4px; color: var(--ink); text-align: left; }

@media (min-width: 980px) {
  nav.primary-nav { display: block; }
  .header-cta { display: block; }
  .nav-toggle { display: none; }
  #mobile-menu { display: none !important; }
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 22px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
  font-family: var(--font-body);
}
.btn-primary { background: var(--amber-600); color: #241304; }
.btn-primary:hover { background: var(--amber-500); }
.btn-outline { background: transparent; border-color: var(--teal-900); color: var(--teal-900); }
.btn-outline:hover { background: var(--teal-900); color: #fff; }
.btn-ghost { background: rgba(255,255,255,0.08); border-color: rgba(255,255,255,0.4); color: #fff; }
.btn-ghost:hover { background: rgba(255,255,255,0.18); }

/* ---------- Hero ---------- */
.hero {
  background: linear-gradient(180deg, var(--sand) 0%, var(--sand-deep) 100%);
  border-bottom: 1px solid var(--line);
}
.hero .wrap {
  padding: 56px 24px 64px;
  display: grid;
  gap: 40px;
  grid-template-columns: 1fr;
  align-items: center;
}
.hero-eyebrow {
  color: var(--amber-600);
  font-weight: 600;
  font-size: 0.85rem;
  letter-spacing: 0.02em;
  margin-bottom: 10px;
}
.hero h1 { margin-bottom: 0.4em; }
.hero .lede { margin-bottom: 1.6em; }
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; }
.hero-art {
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-1);
}
@media (min-width: 900px) {
  .hero .wrap { grid-template-columns: 1.1fr 0.9fr; padding: 84px 24px 90px; }
}

/* simple page hero (inner pages) */
.page-hero {
  background: var(--teal-900);
  color: #EFF5F2;
}
.page-hero .wrap { padding: 46px 24px; }
.page-hero .breadcrumb { font-size: 0.85rem; color: #B9CFC9; margin-bottom: 14px; }
.page-hero .breadcrumb a { color: #DCEAE6; }
.page-hero h1 { color: #fff; margin-bottom: 0.3em; }
.page-hero p { color: #CFE1DB; }

/* ---------- Sections ---------- */
section { padding: 64px 0; }
.section-tight { padding: 40px 0; }
.section-head { max-width: 640px; margin-bottom: 36px; }
.section-head .eyebrow { color: var(--amber-600); font-weight: 600; font-size: 0.85rem; }

.bg-alt { background: var(--sand-deep); }
.bg-dark { background: var(--teal-900); color: #EAF2EF; }
.bg-dark h2, .bg-dark h3 { color: #fff; }
.bg-dark a:not(.btn) { color: #BFE0D9; }

/* ---------- Cards / grids ---------- */
.grid { display: grid; gap: 24px; }
.grid-3 { grid-template-columns: 1fr; }
.grid-4 { grid-template-columns: 1fr; }
@media (min-width: 680px) {
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 980px) {
  .grid-3 { grid-template-columns: repeat(3, 1fr); }
  .grid-4 { grid-template-columns: repeat(4, 1fr); }
}

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 26px;
  box-shadow: var(--shadow-1);
}
.card h3 { margin-bottom: 0.4em; }
.card p { margin: 0; color: var(--ink-soft); }
.card a.card-link { text-decoration: none; color: inherit; display: block; }
.card a.card-link:hover h3 { color: var(--teal-700); }

.service-icon {
  width: 44px; height: 44px;
  border-radius: 10px;
  background: var(--amber-100);
  color: var(--amber-600);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 14px;
}
.service-icon svg { width: 22px; height: 22px; }

/* topic/blog card with image */
.post-card { display: flex; flex-direction: column; overflow: hidden; padding: 0; }
.post-card img { aspect-ratio: 16/10; object-fit: cover; width: 100%; }
.post-card .post-body { padding: 20px 22px 24px; }
.post-card .post-cat { font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--amber-600); font-weight: 600; }

/* steps */
.steps { counter-reset: step; }
.step { display: flex; gap: 16px; }
.step-num {
  counter-increment: step;
  flex-shrink: 0;
  width: 38px; height: 38px;
  border-radius: 50%;
  background: var(--teal-700);
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display); font-weight: 600;
}
.step-num::before { content: counter(step); }

/* stat strip */
.stats { display: grid; gap: 24px; grid-template-columns: repeat(2,1fr); }
@media (min-width: 720px) { .stats { grid-template-columns: repeat(4,1fr); } }
.stat b { display: block; font-family: var(--font-display); font-size: 2rem; color: var(--amber-500); }
.stat span { color: #CFE1DB; font-size: 0.9rem; }

/* callout / CTA band */
.cta-band {
  background: var(--amber-600);
  color: #241304;
  border-radius: var(--radius-md);
  padding: 36px;
  display: flex; flex-wrap: wrap; gap: 20px;
  align-items: center; justify-content: space-between;
}
.cta-band h3 { color: #241304; margin-bottom: 0.2em; }
.cta-band .btn-primary { background: #241304; color: #FBE7CB; }
.cta-band .btn-primary:hover { background: #37220c; }

/* two-col content layout with sidebar */
.layout-2col { display: grid; gap: 40px; grid-template-columns: 1fr; }
@media (min-width: 940px) { .layout-2col { grid-template-columns: 2fr 1fr; } }
aside.sidebar .card + .card { margin-top: 20px; }
aside.sidebar h4 { font-size: 1rem; }
aside.sidebar ul { list-style: none; padding: 0; margin: 0; }
aside.sidebar li { border-bottom: 1px solid var(--line); }
aside.sidebar li:last-child { border-bottom: none; }
aside.sidebar a { display: block; padding: 9px 0; text-decoration: none; font-size: 0.94rem; }

/* article meta */
.article-meta { color: var(--ink-soft); font-size: 0.9rem; margin-bottom: 1.6em; }

/* blog index filters */
.blog-hero { padding-bottom: 30px; }
.tag-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.tag-row a {
  border: 1px solid rgba(255,255,255,0.35);
  color: #DCEAE6;
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 0.85rem;
  text-decoration: none;
}
.tag-row a:hover, .tag-row a.active { background: rgba(255,255,255,0.12); }

/* pagination */
.pagination { display: flex; gap: 8px; justify-content: center; margin-top: 40px; flex-wrap: wrap; }
.pagination a, .pagination span {
  min-width: 38px; text-align: center;
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  text-decoration: none;
  color: var(--ink);
}
.pagination a:hover { background: var(--sand-deep); }
.pagination .current { background: var(--teal-900); color: #fff; border-color: var(--teal-900); }

/* contact form */
.form-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-md); padding: 28px; box-shadow: var(--shadow-1); }
.form-row { margin-bottom: 16px; }
.form-row label { display: block; font-size: 0.88rem; font-weight: 600; margin-bottom: 6px; color: var(--teal-900); }
.form-row input, .form-row select, .form-row textarea {
  width: 100%;
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-size: 0.96rem;
  background: #fff;
  color: var(--ink);
}
.form-row textarea { resize: vertical; min-height: 120px; }
.form-note { font-size: 0.82rem; color: var(--ink-soft); margin-top: 14px; }

/* footer */
footer.site-footer { background: var(--teal-900); color: #CFE1DB; padding-top: 56px; }
footer.site-footer a { color: #E4F0EC; text-decoration: none; }
footer.site-footer a:hover { text-decoration: underline; }
.footer-grid { display: grid; gap: 32px; grid-template-columns: 1fr; padding-bottom: 40px; }
@media (min-width: 780px) { .footer-grid { grid-template-columns: 1.3fr 1fr 1fr 1fr; } }
.footer-grid h4 { color: #fff; font-family: var(--font-body); font-size: 0.9rem; letter-spacing: 0.03em; margin-bottom: 14px; }
.footer-grid ul { list-style: none; margin: 0; padding: 0; }
.footer-grid li { margin-bottom: 8px; font-size: 0.92rem; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,0.12); padding: 18px 0 28px; font-size: 0.82rem; color: #9FBAB2; display: flex; flex-wrap: wrap; gap: 10px 24px; justify-content: space-between; }

/* utility */
.center { text-align: center; }
.mt-0 { margin-top: 0; }
.text-sand { color: #CFE1DB; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
