/* ─────────────────────────────────────────
   Upland's Eye Place — site.css
   ───────────────────────────────────────── */

:root {
  --bg: #eef1fa;
  --panel: #ffffff;
  --ink: #13123c;
  --muted: #5a587e;
  --brand: #4878c8;
  --brand-dark: #2b2870;
  --line: #c8cee8;
  --max: 1100px;
  --radius: 16px;
  --font-head: "DM Serif Display", serif;
  --font-body: "DM Sans", sans-serif;
}

/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
img { max-width: 100%; height: auto; display: block; }

/* ── Base ── */
body {
  font-family: var(--font-body);
  color: var(--ink);
  background:
    radial-gradient(circle at 10% 10%, #d5e4ff 0, transparent 38%),
    radial-gradient(circle at 90% 90%, #e0deff 0, transparent 36%),
    var(--bg);
  line-height: 1.65;
}

h1, h2, h3, h4 {
  font-family: var(--font-head);
  line-height: 1.2;
  margin-top: 0;
}

p { margin-top: 0; }

a { color: var(--brand); }

.container {
  width: min(92%, var(--max));
  margin-inline: auto;
}

/* ── Nav ── */
.topbar {
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(8px);
  background: rgb(255 255 255 / 90%);
}

.nav-wrap {
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand {
  color: var(--ink);
  text-decoration: none;
  font-family: var(--font-head);
  font-size: 1.2rem;
  font-weight: 700;
  white-space: nowrap;
}

.site-nav {
  display: flex;
  gap: 1.5rem;
  align-items: center;
}

.site-nav a {
  color: var(--muted);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.95rem;
  transition: color 0.15s;
}

.site-nav a:hover,
.site-nav a[aria-current="page"] {
  color: var(--brand);
}

.menu-btn {
  display: none;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  padding: 0.55rem 0.9rem;
  min-height: 44px;
  min-width: 44px;
  cursor: pointer;
  font: inherit;
  font-size: 0.9rem;
  color: var(--ink);
}

/* ── Buttons ── */
.btn {
  display: inline-block;
  border: 2px solid transparent;
  border-radius: 999px;
  padding: 0.65rem 1.4rem;
  text-decoration: none;
  font-weight: 600;
  font-family: var(--font-body);
  cursor: pointer;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
  line-height: 1.3;
  font-size: 0.95rem;
}

.btn-primary {
  background: var(--brand);
  color: #fff;
  border-color: var(--brand);
}
.btn-primary:hover { background: var(--brand-dark); border-color: var(--brand-dark); color: #fff; }

.btn-ghost {
  background: transparent;
  border-color: var(--ink);
  color: var(--ink);
}
.btn-ghost:hover { background: var(--ink); color: #fff; }

.btn-white {
  background: #fff;
  border-color: #fff;
  color: var(--brand-dark);
}
.btn-white:hover { background: #e8eeff; border-color: #e8eeff; }

.btn-outline-white {
  background: transparent;
  border-color: rgba(255,255,255,0.7);
  color: #fff;
}
.btn-outline-white:hover { background: rgba(255,255,255,0.15); }

/* ── Hero ── */
.hero {
  padding: 5rem 0 4rem;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.25fr 1fr;
  gap: 3rem;
  align-items: center;
}

.eyebrow {
  display: block;
  text-transform: uppercase;
  letter-spacing: 0.13em;
  color: var(--brand);
  font-size: 0.78rem;
  font-weight: 600;
  margin-bottom: 0.6rem;
}

.hero h1 {
  font-size: clamp(2rem, 4.5vw, 3.25rem);
  margin-bottom: 0.8rem;
  color: var(--ink);
}

.hero-lead {
  font-size: 1.05rem;
  color: var(--muted);
  margin-bottom: 0;
}

.hero-actions {
  margin-top: 1.6rem;
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.hero-photo {
  width: 100%;
  border-radius: var(--radius);
  aspect-ratio: 4 / 3;
  object-fit: cover;
  box-shadow: 0 12px 40px rgb(0 0 0 / 0.14);
}

/* ── Info card ── */
.info-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.6rem;
}

.info-card h2 {
  font-size: 0.78rem;
  font-family: var(--font-body);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted);
  margin-bottom: 0.6rem;
}

.info-card p { margin: 0.25rem 0; font-size: 0.95rem; }
.info-card hr { border: none; border-top: 1px solid var(--line); margin: 1.1rem 0; }
.info-card a { color: var(--ink); text-decoration: none; }
.info-card a:hover { color: var(--brand); }

/* ── Generic sections ── */
.section { padding: 4.5rem 0; }

.section-alt {
  background: rgb(255 255 255 / 65%);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.section-label {
  display: block;
  text-transform: uppercase;
  letter-spacing: 0.13em;
  color: var(--brand);
  font-size: 0.78rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.section h2 { font-size: clamp(1.5rem, 3vw, 2.2rem); margin-bottom: 1rem; }

/* ── Cards (service overview grid) ── */
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
}

.cards article {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.6rem;
}

.cards article h3 {
  font-size: 1.05rem;
  margin-bottom: 0.4rem;
}

.cards article p { font-size: 0.93rem; color: var(--muted); margin: 0; }

/* ── Page banner (inner pages) ── */
.page-banner {
  padding: 5rem 0;
  background:
    linear-gradient(rgba(4, 22, 44, 0.62), rgba(4, 22, 44, 0.62)),
    var(--banner-img, linear-gradient(135deg, var(--brand-dark) 0%, var(--brand) 100%))
    center / cover no-repeat;
  color: #fff;
  text-align: center;
}

.page-banner h1 {
  color: #fff;
  font-size: clamp(2rem, 5vw, 3rem);
  margin: 0;
}

.page-banner p {
  color: rgba(255 255 255 / 0.82);
  margin: 0.7rem 0 0;
  font-size: 1.05rem;
}

/* ── Two-column split ── */
.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3.5rem;
  align-items: center;
}

.split img {
  width: 100%;
  border-radius: var(--radius);
  box-shadow: 0 6px 24px rgb(0 0 0 / 0.1);
}

/* Reverse: text first in DOM, image appears on left visually */
.split.flip {
  direction: rtl;
}
.split.flip > * {
  direction: ltr;
}

/* ── Service rows ── */
.service-item {
  padding: 3.5rem 0;
  border-bottom: 1px solid var(--line);
}
.service-item:last-child { border-bottom: none; }

.service-item img {
  width: 100%;
  border-radius: var(--radius);
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

.service-item h2 { font-size: 1.6rem; margin-bottom: 0.7rem; }
.service-item p  { color: var(--muted); font-size: 1rem; }

/* ── Doctor bios ── */
.bio-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem;
}

.bio {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.bio-photo {
  width: 100%;
  aspect-ratio: 3 / 2;
  object-fit: cover;
  object-position: top center;
}

.bio-body {
  padding: 1.3rem 1.5rem 1.5rem;
  flex: 1;
}

.bio-body h3 { font-size: 1.25rem; margin-bottom: 0.2rem; }

.bio-role {
  display: block;
  font-size: 0.78rem;
  color: var(--brand);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  margin-bottom: 0.75rem;
}

.bio-body p { font-size: 0.95rem; color: var(--muted); margin: 0; }

/* ── Staff cards ── */
.staff-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1rem;
}

.staff-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.4rem 1.6rem;
}

.staff-card h3 { font-size: 1.1rem; margin-bottom: 0.15rem; }
.staff-card .bio-role { margin-bottom: 0.5rem; }
.staff-card p { font-size: 0.93rem; color: var(--muted); margin: 0; }

/* ── Insurance logo row ── */
.logo-row {
  display: flex;
  flex-wrap: wrap;
  gap: 1.2rem;
  align-items: center;
  margin-top: 2rem;
}

.logo-row img {
  height: 64px;
  width: auto;
  object-fit: contain;
  border-radius: 10px;
  border: 1px solid var(--line);
  padding: 0.5rem 0.75rem;
  background: var(--panel);
}

/* ── CTA strip ── */
.cta-strip {
  background: var(--brand);
  color: #fff;
  padding: 4.5rem 0;
  text-align: center;
}

.cta-strip h2 {
  color: #fff;
  font-size: clamp(1.6rem, 3.5vw, 2.4rem);
  margin-bottom: 0.6rem;
}

.cta-strip p {
  color: rgba(255 255 255 / 0.85);
  margin-bottom: 1.8rem;
  font-size: 1.05rem;
}

.cta-strip .actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

/* ── Contact page layout ── */
.contact-layout {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 4rem;
  align-items: start;
}

/* ── Form ── */
.form-stack {
  display: grid;
  gap: 1rem;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.field {
  display: grid;
  gap: 0.3rem;
}

.field label {
  font-weight: 500;
  font-size: 0.92rem;
}

input, textarea, select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0.7rem 0.9rem;
  font: inherit;
  font-size: max(16px, 0.95rem); /* prevents iOS auto-zoom */
  background: var(--panel);
  transition: border-color 0.15s, box-shadow 0.15s;
  color: var(--ink);
}

input:focus, textarea:focus, select:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgb(72 120 200 / 0.18);
}

/* ── Contact info block ── */
.contact-info-block {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.8rem 2rem;
}

.info-group { margin-bottom: 1.4rem; }
.info-group:last-child { margin-bottom: 0; }

.info-group h3 {
  font-size: 0.78rem;
  font-family: var(--font-body);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--brand);
  margin-bottom: 0.3rem;
}

.info-group p { margin: 0.15rem 0; font-size: 0.95rem; color: var(--muted); }
.info-group a { color: var(--ink); text-decoration: none; }
.info-group a:hover { color: var(--brand); }

/* ── Quilt caption ── */
.caption {
  font-size: 0.83rem;
  color: var(--muted);
  margin-top: 0.5rem;
  font-style: italic;
}

/* ── Footer ── */
.footer {
  background: var(--panel);
  border-top: 1px solid var(--line);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.8fr 1fr 1fr 1fr;
  gap: 2.5rem;
  padding: 3.5rem 0 2rem;
}

.footer-brand p {
  font-size: 0.9rem;
  color: var(--muted);
  margin-top: 0.5rem;
  max-width: 22ch;
}

.footer-col h4 {
  font-size: 0.75rem;
  font-family: var(--font-body);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted);
  margin-bottom: 0.8rem;
}

.footer-col a {
  display: block;
  color: var(--ink);
  text-decoration: none;
  margin-bottom: 0.45rem;
  font-size: 0.92rem;
}

.footer-col a:hover { color: var(--brand); }

.footer-col p {
  font-size: 0.9rem;
  margin: 0.2rem 0;
  color: var(--muted);
}

.footer-bottom {
  border-top: 1px solid var(--line);
  padding: 1.2rem 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.83rem;
  color: var(--muted);
}

.footer-bottom a { color: var(--muted); text-decoration: none; }
.footer-bottom a:hover { color: var(--brand); }

/* ── Utility ── */
.hidden { display: none; }

.text-center { text-align: center; }

.mt-sm { margin-top: 1rem; }
.mt-md { margin-top: 2rem; }
.mt-lg { margin-top: 3rem; }

/* ── Animations ── */
@keyframes rise {
  from { opacity: 0; transform: translateY(18px); }
  to   { opacity: 1; transform: translateY(0); }
}

.hero-grid > * {
  animation: rise 550ms ease both;
}
.hero-grid > :nth-child(2) { animation-delay: 100ms; }

/* ── Responsive ── */
@media (max-width: 900px) {
  .hero-grid,
  .split,
  .split.flip,
  .contact-layout {
    grid-template-columns: 1fr;
    direction: ltr;
  }

  .split.flip > * { direction: ltr; }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
  }

  .menu-btn { display: inline-block; }

  .site-nav {
    position: absolute;
    left: 0;
    right: 0;
    top: 72px;
    display: none;
    flex-direction: column;
    border-bottom: 1px solid var(--line);
    background: var(--panel);
    padding: 1rem 4%;
    gap: 0.8rem;
    z-index: 100;
    align-items: flex-start;
  }

  .site-nav.open { display: flex; }
}

@media (max-width: 600px) {
  .hero { padding: 2.5rem 0 2rem; }
  .section { padding: 2.5rem 0; }
  .page-banner { padding: 3rem 0; }
  .cta-strip { padding: 2.5rem 0; }

  /* Landscape crop so the hero photo doesn't dominate on phones */
  .hero-photo { aspect-ratio: 16 / 9; }

  .split { gap: 2rem; }
  .service-item { padding: 2.5rem 0; }

  .cards { grid-template-columns: 1fr; }
  .bio-grid { grid-template-columns: 1fr; }
  .staff-grid { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }

  /* Bigger touch targets for nav links on mobile */
  .site-nav a { min-height: 44px; display: flex; align-items: center; }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
    padding: 2rem 0 1.5rem;
  }

  .footer-bottom { flex-direction: column; gap: 0.4rem; text-align: center; }
}
