/* The Donovan Company — site styles */

:root {
  --bg: #fbfaf7;
  --surface: #ffffff;
  --text: #1f2933;
  --text-muted: #5a6573;
  --rule: #e3e0d8;
  --accent: #1f3a5f;
  --accent-soft: #e8eef5;
  --max-width: 920px;
  --radius: 4px;
  --serif: "Source Serif 4", "Source Serif Pro", "Georgia", "Times New Roman", serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  --ease: 150ms ease;
  --shadow-photo: 0 1px 0 0 var(--rule), 0 14px 28px -16px rgba(31, 58, 95, 0.18);
  --shadow-card: 0 1px 2px rgba(31, 58, 95, 0.04), 0 8px 20px -12px rgba(31, 58, 95, 0.14);
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
}

::selection {
  background: var(--accent-soft);
  color: var(--accent);
}

a {
  color: var(--accent);
  text-decoration: none;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  transition: color var(--ease), text-decoration-color var(--ease);
}
a:hover {
  text-decoration: underline;
  text-decoration-color: var(--accent);
}

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

h1, h2, h3, h4 {
  font-family: var(--serif);
  font-weight: 600;
  color: var(--text);
  letter-spacing: -0.01em;
  text-wrap: balance;
}

h1 {
  font-size: 2.25rem;
  line-height: 1.18;
  letter-spacing: -0.015em;
  margin: 0 0 0.5rem;
}
h2 { font-size: 1.5rem; margin: 2.5rem 0 0.875rem; }
h3 { font-size: 1.15rem; margin: 1.5rem 0 0.5rem; }

p { margin: 0 0 1rem; }

hr {
  border: 0;
  border-top: 1px solid var(--rule);
  width: 4rem;
  margin: 3rem auto;
}

/* Focus states — visible only for keyboard users */
:focus { outline: none; }
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 2px;
}

/* Layout */
.wrap {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* Header */
.site-header {
  border-bottom: 1px solid var(--rule);
  background: var(--surface);
}

.header-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.5rem;
  max-width: var(--max-width);
  margin: 0 auto;
}

.brand-mark {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  color: inherit;
}

.brand-mark:hover { text-decoration: none; }

.brand-d {
  height: 46px;
  width: auto;
  display: block;
  flex-shrink: 0;
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.05;
}

.brand {
  font-family: var(--serif);
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.brand-tag {
  font-family: var(--serif);
  font-size: 0.62rem;
  font-weight: 400;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.22em;
  margin: 0.2rem 0 0;
}

.utility-nav {
  font-size: 0.9rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
}

.utility-nav a {
  color: var(--text-muted);
}

.utility-nav .btn {
  display: inline-block;
  padding: 0.45rem 0.9rem;
  border: 1px solid var(--accent);
  border-radius: var(--radius);
  color: var(--accent);
  font-weight: 500;
  background: var(--surface);
  transition: background-color var(--ease), color var(--ease), border-color var(--ease);
}

.utility-nav .btn:hover { background: var(--accent); color: var(--surface); text-decoration: none; }

.utility-nav .btn.btn-primary { background: var(--accent); color: var(--surface); }
.utility-nav .btn.btn-primary:hover { background: #16294a; border-color: #16294a; }

.utility-nav .text-link { color: var(--text-muted); margin-left: 0.5rem; }

/* Primary nav */
.primary-nav {
  border-bottom: 1px solid var(--rule);
  background: var(--surface);
}

.primary-nav-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
  display: flex;
  flex-wrap: wrap;
  gap: 1.75rem;
}

.primary-nav a {
  display: inline-block;
  padding: 0.85rem 0;
  color: var(--text);
  font-size: 0.95rem;
  font-weight: 500;
  border-bottom: 2px solid transparent;
  transition: border-bottom-color var(--ease), color var(--ease);
}

.primary-nav a:hover { text-decoration: none; border-bottom-color: var(--accent); }
.primary-nav a.active { border-bottom-color: var(--accent); color: var(--accent); }

/* Main content */
main { padding: 3.5rem 0; }

.lede {
  font-size: 1.25rem;
  color: var(--text-muted);
  font-family: var(--serif);
  line-height: 1.5;
  margin: 0 0 2rem;
  max-width: 38em;
  text-wrap: pretty;
}

.hero-photo {
  width: 100%;
  border-radius: var(--radius);
  margin: 2rem 0 1rem;
  box-shadow: var(--shadow-photo);
}

.photo-caption {
  text-align: center;
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 0;
}

/* Cards / list items */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.5rem;
  margin: 1.5rem 0;
}

.card {
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  padding: 1.25rem 1.4rem;
  transition: transform var(--ease), box-shadow var(--ease), border-color var(--ease);
}

.card:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-card);
  border-color: #d6d2c7;
}

.card h3 { margin-top: 0; font-size: 1.05rem; }
.card p { margin: 0; font-size: 0.95rem; color: var(--text-muted); }

/* Client CTA cards (Portal / Payment / Upload on home) */
.client-ctas {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
  margin: 2rem 0;
}

.cta-card {
  display: block;
  padding: 1.25rem 1.4rem;
  background: var(--surface);
  border: 1px solid var(--rule);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius);
  color: var(--text);
  transition: background-color var(--ease), transform var(--ease), box-shadow var(--ease);
}

.cta-card:hover {
  text-decoration: none;
  background: var(--accent-soft);
  border-left-color: var(--accent);
  box-shadow: var(--shadow-card);
}

.cta-card .cta-title {
  font-family: var(--serif);
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--accent);
  margin-bottom: 0.25rem;
}

.cta-arrow {
  display: inline-block;
  margin-left: 0.15em;
  transition: transform var(--ease);
}

.cta-card:hover .cta-arrow {
  transform: translateX(3px);
}

.cta-card .cta-sub {
  color: var(--text-muted);
  font-size: 0.9rem;
}

.client-band {
  background: var(--accent-soft);
  border-radius: var(--radius);
  padding: 1.5rem 1.75rem;
  margin: 2rem 0 0;
}

.client-band h2 { margin-top: 0; }
.client-band p { color: var(--text-muted); margin-bottom: 0.5rem; }

/* External link list (tax links) */
.link-list {
  list-style: none;
  padding: 0;
  margin: 1.5rem 0;
}

.link-list li {
  padding: 1rem 0;
  border-top: 1px solid var(--rule);
}

.link-list li:last-child { border-bottom: 1px solid var(--rule); }

.link-list a {
  font-family: var(--serif);
  font-size: 1.1rem;
  font-weight: 600;
}

.link-list .link-desc {
  display: block;
  color: var(--text-muted);
  font-size: 0.95rem;
  margin-top: 0.15rem;
}

/* Team bios */
.bio {
  padding: 1.75rem 0;
  border-top: 1px solid var(--rule);
}

.bio:first-of-type { border-top: 0; padding-top: 0; }

.bio-header {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.5rem 1rem;
  margin-bottom: 0.5rem;
}

.bio-name {
  font-family: var(--serif);
  font-size: 1.35rem;
  font-weight: 600;
  margin: 0;
}

.bio-meta {
  color: var(--text-muted);
  font-size: 0.95rem;
}

.bio p { margin: 0.5rem 0 0; max-width: 42em; }

.bio-retired {
  border-left: 3px solid var(--rule);
  padding-left: 1rem;
  margin-left: -1rem;
}
.bio-retired .bio-meta { font-style: italic; }

.alumni {
  margin: 2.5rem 0 1rem;
  color: var(--text-muted);
}
.alumni h2 {
  font-family: var(--serif);
  font-size: 1.15rem;
  font-weight: 600;
  margin: 0 0 0.5rem;
  color: var(--text);
}
.alumni p { margin: 0 0 0.75rem; max-width: 42em; }
.alumni-list {
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: 0.35rem 1.5rem;
  margin: 0;
  font-size: 0.95rem;
}
.alumni-list dt {
  font-weight: 600;
  color: var(--text);
}
.alumni-list dd { margin: 0; }

/* Definition lists for hours, contact */
.facts {
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: 0.5rem 2rem;
  margin: 1.5rem 0;
  max-width: 36em;
}

.facts dt {
  font-weight: 600;
  color: var(--text);
}

.facts dd {
  margin: 0;
  color: var(--text-muted);
}

/* Holiday list */
.holiday-list {
  columns: 2;
  column-gap: 2.5rem;
  list-style: none;
  padding: 0;
  margin: 0.5rem 0 1.5rem;
  max-width: 30em;
}

.holiday-list li {
  padding: 0.25rem 0;
  color: var(--text-muted);
}

/* Login form (Client Portal) */
.login-form {
  max-width: 22rem;
  margin: 2rem 0 1.5rem;
}

.login-form label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text);
  margin: 0 0 0.35rem;
}

.login-form input[type="email"],
.login-form input[type="text"],
.login-form input[type="password"] {
  width: 100%;
  padding: 0.6rem 0.75rem;
  font: inherit;
  font-size: 1rem;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  margin: 0 0 1.1rem;
  transition: border-color var(--ease), box-shadow var(--ease);
}

.login-form input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(31, 58, 95, 0.14);
}

.login-form .btn-submit {
  display: inline-block;
  padding: 0.6rem 1.4rem;
  background: var(--accent);
  color: var(--surface);
  border: 1px solid var(--accent);
  border-radius: var(--radius);
  font-family: var(--sans);
  font-size: 1rem;
  font-weight: 500;
  cursor: pointer;
  transition: background-color var(--ease), border-color var(--ease);
}

.login-form .btn-submit:hover {
  background: #16294a;
  border-color: #16294a;
}

.login-form .forgot {
  display: inline-block;
  margin-left: 1rem;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.login-form .forgot:hover { color: var(--accent); }

/* Big standalone CTA button (Pay, Upload pages) */
.btn-cta {
  display: inline-block;
  padding: 0.9rem 1.7rem;
  background: var(--accent);
  color: var(--surface);
  border: 1px solid var(--accent);
  border-radius: var(--radius);
  font-family: var(--serif);
  font-size: 1.15rem;
  font-weight: 600;
  text-decoration: none;
  transition: background-color var(--ease), border-color var(--ease), box-shadow var(--ease);
}

.btn-cta:hover {
  background: #16294a;
  border-color: #16294a;
  text-decoration: none;
  box-shadow: var(--shadow-card);
}

.btn-cta .cta-arrow {
  color: inherit;
  margin-left: 0.3em;
}

.btn-cta:hover .cta-arrow {
  transform: translateX(3px);
}

.cta-row {
  margin: 2rem 0;
}

/* Callout */
.callout {
  background: var(--accent-soft);
  border-left: 3px solid var(--accent);
  padding: 1.1rem 1.4rem;
  margin: 2rem 0;
  border-radius: 0 var(--radius) var(--radius) 0;
}

.callout p { margin: 0; }
.callout p + p { margin-top: 0.5rem; }

/* Map */
.map-wrap {
  margin: 2rem 0;
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  overflow: hidden;
}

.map-wrap iframe {
  display: block;
  width: 100%;
  height: 380px;
  border: 0;
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--rule);
  background: var(--surface);
  padding: 2.5rem 0 2rem;
  margin-top: 4rem;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.footer-grid {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 2rem;
}

.footer-grid h4 {
  font-family: var(--sans);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text);
  margin: 0 0 0.5rem;
}

.footer-grid a { color: var(--text-muted); display: block; padding: 0.15rem 0; }
.footer-grid a:hover { color: var(--accent); }

.footer-bottom {
  max-width: var(--max-width);
  margin: 2rem auto 0;
  padding: 1.5rem 1.5rem 0;
  border-top: 1px solid var(--rule);
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* Responsive */
@media (max-width: 600px) {
  body { font-size: 16px; }
  h1 { font-size: 1.85rem; }
  h2 { font-size: 1.3rem; margin-top: 2rem; }
  .lede { font-size: 1.15rem; }
  main { padding: 2.5rem 0; }
  .holiday-list { columns: 1; }
  .facts { grid-template-columns: 1fr; gap: 0.25rem; }
  .facts dt { margin-top: 0.75rem; }
  .header-inner { padding: 1rem 1.5rem; }
  .primary-nav-inner { gap: 1.25rem; overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .primary-nav a { white-space: nowrap; }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    transition: none !important;
    animation: none !important;
  }
}
