/* ============================================================
   Hills & Associates Design System — Web (Dark)
   Matches internal Kanban / client-portal dark theme. 
   Tokens inherited from ~/Ash/kanban/kanban/static/css/kanban.css
   ============================================================ */

:root {
  /* Brand tokens (dark mode) */
  --brand-navy:      #0d1f2b;   /* header/footer bars */
  --brand-navy-soft: #1d4a5f;
  --accent:          #3D6B99;   /* links/actions — corporate steel blue, serious & professional */
  --accent-dark:     #2F5580;
  --bg:              #0f151b;   /* page background */
  --card-bg:         #1a222b;   /* cards / raised surfaces */
  --text:            #e5e9f0;
  --muted:           #9aa7b8;
  --border:          #2a3544;
  --table-hover:     rgba(255,255,255,0.02);
  --danger:          #dc2626;
  --danger-bg:       #fee2e2;
  --success:         #10B981;
  --warning:         #F59E0B;

  --shadow:     0 12px 30px rgba(0,0,0,0.4);
  --shadow-sm:  0 4px 20px rgba(0,0,0,0.4);
  --radius:     16px;
  --radius-sm:  12px;
  --radius-pill:999px;

  --font:      'Jost', system-ui, -apple-system, "Segoe UI", sans-serif;

  /* Type scale */
  --fs-xs:  0.75rem;
  --fs-sm:  0.875rem;
  --fs-base:0.95rem;
  --fs-lg:  1.125rem;
  --fs-xl:  1.25rem;
  --fs-2xl: 1.6rem;
  --fs-3xl: 2.1rem;
  --fs-4xl: 3rem;

  /* Spacing */
  --sp-1: 0.25rem; --sp-2: 0.5rem; --sp-3: 0.75rem; --sp-4: 1rem;
  --sp-5: 1.5rem; --sp-6: 2rem; --sp-8: 3rem; --sp-10: 4rem; --sp-12: 6rem;

  --container: 1180px;
  --trans: 200ms cubic-bezier(0.22,1,0.36,1);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  font-family: var(--font);
  font-size: var(--fs-base);
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  transition: background 0.2s ease, color 0.2s ease;
}
main { flex: 1; }

img { max-width: 100%; display: block; }
a { color: var(--accent); text-decoration: none; transition: color var(--trans); }
a:hover { color: var(--text); }
ul, ol { list-style: none; }

h1, h2, h3, h4 {
  font-family: var(--font);
  font-weight: 600;
  line-height: 1.2;
  color: var(--text);
  letter-spacing: -0.01em;
}
h1 { font-size: var(--fs-4xl); }
h2 { font-size: var(--fs-3xl); }
h3 { font-size: var(--fs-xl); }
h4 { font-size: var(--fs-lg); }

.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 var(--sp-5); }
.section { padding: var(--sp-12) 0; }
.section--tint { background: var(--brand-navy); }

/* Section with a background image + dark overlay so text stays readable */
.section--bg {
  position: relative;
  background-size: cover !important;
  background-position: center center !important;
  background-repeat: no-repeat !important;
  background-attachment: scroll !important;
}
.section--bg::before {
  content: '';
  position: absolute;
  inset: 0;
  /* Darker overlay so text is clearly legible over the image */
  background: linear-gradient(180deg, rgba(10,22,30,0.85) 0%, rgba(10,22,30,0.72) 40%, rgba(10,22,30,0.85) 100%);
  z-index: 0;
}
.section--bg > .container { position: relative; z-index: 1; }

.eyebrow {
  font-size: var(--fs-xs);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: var(--sp-3);
  font-weight: 600;
}
.lead { font-size: var(--fs-lg); color: var(--muted); }
.section-title { margin-bottom: var(--sp-5); }

/* ---- Buttons ---- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.4rem;
  padding: 0.6rem 1.4rem;
  border-radius: var(--radius-pill);
  background: var(--accent); color: #fff; text-decoration: none;
  font-family: var(--font); font-size: var(--fs-sm); font-weight: 500;
  border: none; cursor: pointer;
  transition: background 0.15s, transform 0.05s, border-color 0.15s;
  line-height: 1.4; white-space: nowrap;
}
.btn:hover { background: var(--accent-dark); transform: translateY(-1px); color: #fff; }
.btn--solid { background: var(--accent); color: #fff; }
.btn--ghost { background: transparent; color: var(--accent); border: 1px solid var(--accent); }
.btn--ghost:hover { background: var(--accent); color: #fff; }

/* ============================================================
   Header / topbar (mirrors kanban .topbar)
   ============================================================ */
#site-header {
  position: sticky; top: 0; z-index: 100;
  background: var(--brand-navy);
  color: #fff;
}
.nav {
  display: flex; align-items: center; justify-content: space-between;
  min-height: 68px; gap: 1rem;
}
.brand { display: flex; align-items: center; gap: var(--sp-3); }
.brand__logo { height: 38px; width: auto; display: block; }
.brand__name { font-size: var(--fs-xl); font-weight: 600; color: #fff; letter-spacing: 0.01em; }

.nav__list { display: flex; align-items: center; gap: 0.75rem; }
.nav__link {
  color: rgba(255,255,255,0.9); font-size: var(--fs-sm); font-weight: 500;
  padding: 0.4rem 0.9rem; border-radius: var(--radius-pill);
  transition: background 0.15s;
}
.nav__link:hover, .nav__link.is-active { background: rgba(255,255,255,0.12); color: #fff; }
.nav__cta { margin-left: 0.25rem; }

/* Mobile nav */
.nav__toggle {
  display: none; background: none; border: 0; cursor: pointer;
  width: 40px; height: 40px; flex-direction: column; align-items: center;
  justify-content: center; gap: 5px;
}
.nav__toggle span { display: block; width: 22px; height: 2px; background: #fff; transition: all var(--trans); }
.nav__toggle.is-open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav__toggle.is-open span:nth-child(2) { opacity: 0; }
.nav__toggle.is-open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ============================================================
   Hero
   ============================================================ */
.hero {
  position: relative;
  padding: var(--sp-12) 0;
  border-bottom: 1px solid var(--border);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  overflow: hidden;
}
/* Hero slideshow layers */
.hero__slide {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  opacity: 0;
  animation: heroFade 18s infinite;
  z-index: 0;
}
.hero__slide--1 { animation-delay: 0s; }
.hero__slide--2 { animation-delay: 6s; }
.hero__slide--3 { animation-delay: 12s; }
@keyframes heroFade {
  0%   { opacity: 0; }
  8%   { opacity: 1; }
  33%  { opacity: 1; }
  41%  { opacity: 0; }
  100% { opacity: 0; }
}
/* Dark overlay sits above slides, below content */
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(13,31,43,0.92) 0%, rgba(13,31,43,0.72) 45%, rgba(15,21,27,0.4) 100%);
  z-index: 2;
}
.hero > .container { position: relative; z-index: 3; }
.hero__inner { max-width: 760px; padding: var(--sp-8) 0; }
.hero__title { font-size: clamp(2.4rem, 6vw, 4rem); margin-bottom: var(--sp-5); }
.hero__lead { font-size: var(--fs-xl); color: #cfd6e0; margin-bottom: var(--sp-6); line-height: 1.5; }
.hero__actions { display: flex; gap: var(--sp-4); flex-wrap: wrap; }

/* Hero slide indicators */
.hero__indicators {
  position: relative;
  z-index: 3;
  display: flex;
  gap: 0.5rem;
  margin-top: var(--sp-5);
}
.hero__dot {
  width: 26px; height: 3px; border-radius: 2px;
  background: rgba(255,255,255,0.35);
  position: relative;
  overflow: hidden;
}
.hero__dot::after {
  content: '';
  position: absolute; inset: 0;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
}
.hero__dot--1::after { animation: dotFill 18s infinite; }
.hero__dot--2::after { animation: dotFill 18s infinite; animation-delay: 6s; }
.hero__dot--3::after { animation: dotFill 18s infinite; animation-delay: 12s; }
@keyframes dotFill {
  0% { transform: scaleX(0); }
  6% { transform: scaleX(1); }
  33% { transform: scaleX(1); }
  39% { transform: scaleX(0); }
  100% { transform: scaleX(0); }
}

/* ============================================================
   Grids / cards
   ============================================================ */
.grid { display: grid; gap: 1.25rem; }
.grid--2 { grid-template-columns: repeat(2, 1fr); }
.grid--3 { grid-template-columns: repeat(3, 1fr); }
.grid--4 { grid-template-columns: repeat(4, 1fr); }

.card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: var(--sp-6);
  box-shadow: var(--shadow-sm);
  transition: transform 0.12s, box-shadow 0.12s, border-color 0.12s;
}
.card:hover { transform: translateY(-2px); box-shadow: var(--shadow); border-color: var(--accent); }
.card__icon { color: var(--accent); margin-bottom: var(--sp-4); font-size: var(--fs-xl); }
.card h3 { margin-bottom: var(--sp-2); font-size: var(--fs-lg); }
.card p { color: var(--muted); }

/* ============================================================
   Split / quotes / portfolio
   ============================================================ */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: var(--sp-8); align-items: center; }
.split__media { border-radius: var(--radius); overflow: hidden; }
.split__media img { width: 100%; height: 100%; object-fit: cover; }

/* Clients page — smaller, proportionate portrait/contained images */
.clients-media { border-radius: var(--radius); overflow: hidden; display: flex; align-items: center; }
.clients-media img {
  width: auto;
  max-width: 100%;
  height: 300px;
  object-fit: cover;
  object-position: center;
  aspect-ratio: 4 / 3;
}

/* Founder / person photo on About — contained, not full column width */
.person-photo { border-radius: var(--radius); overflow: hidden; display: flex; align-items: center; }
.person-photo img {
  width: auto;
  max-width: 100%;
  height: 320px;
  object-fit: cover;
  object-position: top center;
  aspect-ratio: 4 / 5;
}

/* Card image */
.card__image { width: 100%; height: 180px; object-fit: cover; border-radius: 10px; margin-bottom: var(--sp-4); }

/* Person / avatar card image */
.person-image {
  width: 84px; height: 84px; border-radius: 50%;
  object-fit: cover; margin-bottom: var(--sp-4);
  border: 2px solid var(--accent);
}

.quote-list { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--sp-6); }
.quote {
  font-size: var(--fs-lg); font-style: italic; color: var(--text); line-height: 1.5;
  border-left: 3px solid var(--accent); padding-left: var(--sp-5);
}
.quote__author { display: block; margin-top: var(--sp-4); font-style: normal; font-size: var(--fs-sm); color: var(--muted); font-weight: 600; }

.portfolio-item { border-bottom: 1px solid var(--border); padding: var(--sp-8) 0; }
.portfolio-item:last-child { border-bottom: 0; }
.portfolio-item__meta { color: var(--accent); font-size: var(--fs-sm); font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; margin-bottom: var(--sp-3); }

/* ============================================================
   Contact
   ============================================================ */
.contact { border-top: 1px solid var(--border); background: var(--brand-navy); }
.contact__grid { display: grid; grid-template-columns: 1fr 1fr; gap: var(--sp-8); }
.contact__method { display: flex; align-items: baseline; gap: var(--sp-3); margin-bottom: var(--sp-4); }
.contact__method strong { color: #fff; }
.contact-page-form {
  background: var(--card-bg); border: 1px solid var(--border);
  border-radius: var(--radius); padding: var(--sp-6); box-shadow: var(--shadow-sm);
}
.contact-details li { color: var(--muted); margin-bottom: var(--sp-4); }
.contact-details strong { color: var(--text); display: block; font-weight: 600; }

/* ---- Forms (mirrors kanban .field/.input) ---- */
.form { display: grid; gap: var(--sp-5); }
.form__field { display: flex; flex-direction: column; gap: 0.3rem; }
.form__label { font-size: var(--fs-sm); font-weight: 500; color: var(--muted); }
.form__input {
  width: 100%; padding: 0.6rem 0.9rem;
  border: 1px solid var(--border); border-radius: 10px;
  font-family: var(--font); font-size: 0.9rem;
  background: var(--bg); color: var(--text);
  transition: border 0.15s, box-shadow 0.15s;
}
.form__input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(61,107,153,0.18); }
textarea.form__input { min-height: 130px; resize: vertical; }
.form__note { font-size: var(--fs-sm); color: var(--muted); }
.form__status { font-size: var(--fs-sm); margin-top: var(--sp-2); min-height: 1.2em; }
.form__status.is-error { color: var(--danger); }
.form__status.is-ok { color: var(--success); }

/* ============================================================
   Footer (navy, mirrors client-portal H&A style)
   ============================================================ */
#site-footer { background: var(--brand-navy); color: rgba(255,255,255,0.85); padding: var(--sp-8) 0 var(--sp-6); }
.footer__inner {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: var(--sp-6);
}
.footer__brand { display: flex; flex-direction: column; align-items: flex-start; gap: var(--sp-2); }
.footer__logo { height: 42px; width: auto; margin-bottom: var(--sp-1); }
.footer__company { color: #fff; font-weight: 600; font-size: var(--fs-lg); }
.footer__tagline { color: rgba(255,255,255,0.5); font-size: var(--fs-xs); letter-spacing: 0.08em; text-transform: uppercase; }
.footer__nav { display: flex; flex-direction: column; gap: var(--sp-2); }
.footer__nav a { color: rgba(255,255,255,0.85); font-size: var(--fs-sm); }
.footer__nav a:hover { color: #fff; }
.footer__contact { display: flex; flex-direction: column; gap: var(--sp-2); font-size: var(--fs-sm); }
.footer__contact a { color: rgba(255,255,255,0.85); }
.footer__contact a:hover { color: #fff; }
.footer__copy { color: rgba(255,255,255,0.5); font-size: var(--fs-sm); width: 100%; margin-top: var(--sp-5); border-top: 1px solid rgba(255,255,255,0.1); padding-top: var(--sp-4); }

/* ============================================================
   Embedded form (OpenForm) — skill/wrapper so it blends into the
   dark design system
   ============================================================ */
.form-embed {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: var(--sp-2);
}
.form-embed iframe {
  border: none;
  width: 100%;
  min-height: 560px;
  display: block;
  border-radius: calc(var(--radius) - 4px);
  background: var(--card-bg);
}

/* ============================================================
   Page head (inner pages)
   ============================================================ */
.page-head { padding: var(--sp-10) 0 var(--sp-8); border-bottom: 1px solid var(--border); }
.page-head h1 { margin-bottom: var(--sp-3); }

/* Inner-page hero with a background image + overlay */
.page-head--hero {
  position: relative;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  padding: clamp(8rem, 22vh, 13rem) 0;
  min-height: 380px;
  display: flex;
  align-items: center;
}
.page-head--hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(13,31,43,0.9) 0%, rgba(13,31,43,0.7) 55%, rgba(15,21,27,0.45) 100%);
  z-index: 0;
}
.page-head--hero > .container { position: relative; z-index: 1; width: 100%; }
.page-head--hero .lead { color: #cfd6e0; }

/* ============================================================
   Accessibility / reduced motion
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  html { scroll-behavior: auto; }
}
::selection { background: var(--accent); color: #fff; }

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 960px) {
  .grid--3, .grid--4 { grid-template-columns: repeat(2, 1fr); }
  .quote-list { grid-template-columns: 1fr; }
  .split, .contact__grid { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
  .grid--2, .grid--3, .grid--4 { grid-template-columns: 1fr; }
  .section { padding: var(--sp-8) 0; }

  .nav__toggle { display: flex; }
  .nav__menu {
    position: fixed; inset: 68px 0 0 0; background: var(--brand-navy);
    transform: translateX(100%); transition: transform var(--trans);
    display: flex; flex-direction: column; padding: var(--sp-8) var(--sp-6); gap: var(--sp-5);
    z-index: 100; /* keep above later-in-DOM stacking elements e.g. the hero slideshow */
  }
  .nav__menu.is-open { transform: translateX(0); }
  .nav__list { flex-direction: column; align-items: flex-start; gap: var(--sp-5); width: 100%; }
  .nav__link { font-size: var(--fs-xl); }
  .nav__cta { margin-left: 0; }
}
