/* Delta Internal Medicine Group - Self-hosted recreation
   Color scheme matched to original Squarespace site
   ADA / WCAG 2.1 AA friendly */

:root {
  --header-bg: #a8b5a0;          /* sage green from original header */
  --top-bar: #2c3a45;            /* dark slate top accent */
  --body-bg: #f8f6f1;            /* warm cream/off-white */
  --text: #2c3436;               /* near-black for high contrast */
  --text-muted: #4a5568;
  --link: #2c3a45;
  --link-hover: #1a252f;
  --white: #ffffff;
  --border: #d4d9d0;
  --focus: #2b6cb0;              /* visible focus ring */
  --font-serif: "Iowan Old Style", "Palatino Linotype", "Book Antiqua", Palatino, Georgia, serif;
  --font-sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 1.05rem;
  line-height: 1.65;
  color: var(--text);
  background-color: var(--body-bg);
}

/* Skip link for keyboard users */
.skip-link {
  position: absolute;
  top: -100px;
  left: 1rem;
  background: var(--top-bar);
  color: var(--white);
  padding: 0.75rem 1.25rem;
  z-index: 1000;
  border-radius: 0 0 4px 4px;
  text-decoration: none;
  font-weight: 600;
}
.skip-link:focus {
  top: 0;
  outline: 3px solid var(--focus);
  outline-offset: 2px;
}

/* Top dark bar */
.top-bar {
  background: var(--top-bar);
  height: 12px;
  width: 100%;
}

/* Header / Nav */
header {
  background: var(--header-bg);
  padding: 1.1rem 1.5rem;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}

.header-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.site-title {
  font-family: var(--font-serif);
  font-size: 1.35rem;
  font-weight: 400;
  color: var(--text);
  text-decoration: none;
  letter-spacing: 0.01em;
}
.site-title:hover,
.site-title:focus {
  text-decoration: underline;
  outline: none;
}

nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
}

nav a {
  color: var(--text);
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0.35rem 0;
  border-bottom: 2px solid transparent;
}
nav a:hover,
nav a:focus {
  border-bottom-color: var(--text);
  outline: none;
}
nav a[aria-current="page"] {
  border-bottom-color: var(--text);
  font-weight: 600;
}

.social {
  display: flex;
  gap: 0.5rem;
}
.social a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  background: rgba(255,255,255,0.7);
  border-radius: 4px;
  color: var(--text);
  text-decoration: none;
  font-size: 0.9rem;
}
.social a:hover,
.social a:focus {
  background: var(--white);
  outline: 2px solid var(--focus);
  outline-offset: 2px;
}

/* Main content */
main {
  max-width: 900px;
  margin: 0 auto;
  padding: 2.5rem 1.5rem 4rem;
}

h1, h2, h3 {
  font-family: var(--font-serif);
  font-weight: 400;
  color: var(--text);
  line-height: 1.3;
}

h1 {
  font-size: 1.9rem;
  margin: 0 0 1.5rem;
  text-align: center;
}

h2 {
  font-size: 1.55rem;
  margin: 0 0 1.25rem;
  padding-bottom: 0.4rem;
  border-bottom: 1px solid var(--border);
}

h3 {
  font-size: 1.2rem;
  margin: 1.5rem 0 0.6rem;
}

p {
  margin: 0 0 1rem;
}

a {
  color: var(--link);
}
a:hover {
  color: var(--link-hover);
}
a:focus {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
}

/* Home specific layout */
.home-nav {
  margin: 2.5rem 0 3rem;
  text-align: center;
}
.home-nav ol {
  list-style: none;
  padding: 0;
  margin: 0 auto;
  display: inline-block;
  text-align: left;
}
.home-nav li {
  margin: 0.85rem 0;
  font-size: 1.15rem;
}
.home-nav a {
  font-family: var(--font-serif);
  font-size: 1.25rem;
  color: var(--text);
  text-decoration: underline;
  text-underline-offset: 4px;
}
.home-nav .num {
  display: inline-block;
  width: 2.2rem;
  color: var(--text-muted);
  font-family: var(--font-serif);
}

.hero {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  max-width: 780px;
  margin: 0 auto;
  background: var(--white);
  box-shadow: 0 2px 12px rgba(0,0,0,0.06);
}
.hero img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  min-height: 320px;
}
.hero-caption {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  background: var(--white);
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 1.2rem;
  text-align: center;
}

/* Practice page */
.practice-content {
  max-width: 640px;
  margin: 0 auto;
}
.practice-photo {
  float: right;
  margin: 0 0 1.5rem 1.5rem;
  max-width: 260px;
  width: 100%;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}
.practice-photo img {
  width: 100%;
  height: auto;
  display: block;
}

/* Services */
.services-list {
  list-style: none;
  padding: 0;
  margin: 1rem 0 2rem;
}
.services-list li {
  padding: 0.55rem 0 0.55rem 1.5rem;
  position: relative;
  border-bottom: 1px solid var(--border);
}
.services-list li::before {
  content: "•";
  position: absolute;
  left: 0.35rem;
  color: var(--header-bg);
  font-weight: bold;
}

/* Contact */
.hours-grid {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.35rem 1.5rem;
  max-width: 280px;
  margin: 0.75rem 0 1.5rem;
}
.hours-grid dt {
  font-weight: 600;
}
.hours-grid dd {
  margin: 0;
}

.contact-block {
  margin-bottom: 1.75rem;
}
.contact-block strong {
  display: block;
  margin-bottom: 0.35rem;
  font-family: var(--font-serif);
  font-size: 1.1rem;
}

address {
  font-style: normal;
  line-height: 1.6;
}

/* Footer */
footer {
  background: var(--header-bg);
  color: var(--text);
  text-align: center;
  padding: 1.75rem 1.5rem;
  font-size: 0.9rem;
  margin-top: 2rem;
}
footer a {
  color: var(--text);
}

footer p {
 	margin: 0;
	line-height: 1.5;
}

/* Images gallery helper */
.img-row {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: center;
  margin: 2rem 0;
}
.img-row img {
  max-width: 280px;
  width: 100%;
  height: auto;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

/* Responsive */
@media (max-width: 700px) {
  .hero {
    grid-template-columns: 1fr;
  }
  .hero img {
    min-height: 260px;
  }
  .practice-photo {
    float: none;
    margin: 0 auto 1.5rem;
    display: block;
  }
  nav ul {
    gap: 1rem;
  }
  .header-inner {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* High contrast / reduced motion */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

/* Focus visible for all interactive */
:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
}
