/* Olympic Community Pharmacy — design system
   Accessible (WCAG 2.1 AA) + modern. Theme: teal green. */

:root {
  --accent: #0f766e;
  --accent-dark: #115e59;
  --accent-tint: #f0fdfa;
  --accent-mid: #ccfbf1;
  --text: #0f172a;
  --text-muted: #475569;
  --bg: #ffffff;
  --bg-alt: #f8fafc;
  --border: #e2e8f0;
  --footer-bg: #0f172a;
  --footer-text: #e2e8f0;
  --radius: 1.25rem;
  --shadow-sm: 0 1px 3px rgba(15, 23, 42, 0.08);
  --shadow-lg: 0 16px 40px -12px rgba(15, 23, 42, 0.18);
  --max-width: 72rem;
}

*,
*::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;
  font-family: 'Inter', 'Segoe UI', system-ui, Arial, sans-serif;
  font-size: 1rem;
  line-height: 1.65;
  color: var(--text);
  background: var(--bg);
}

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

/* --- Focus visibility (WCAG 2.4.7) --- */
a:focus-visible,
button:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}

/* --- Skip link (WCAG 2.4.1) --- */
.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 100;
  background: var(--footer-bg);
  color: #ffffff;
  padding: 0.75rem 1.5rem;
  font-weight: 600;
  text-decoration: none;
  border-radius: 0 0 0.5rem 0.5rem;
}

.skip-link:focus {
  left: 0.5rem;
  top: 0;
}

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

/* --- Header --- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 4.5rem;
  flex-wrap: wrap;
  padding-top: 0.5rem;
  padding-bottom: 0.5rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  font-family: 'Plus Jakarta Sans', 'Inter', system-ui, sans-serif;
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--text);
  text-decoration: none;
  letter-spacing: -0.01em;
}

.brand img {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 50%;
  box-shadow: var(--shadow-sm);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.nav-toggle {
  display: none;
  background: none;
  border: 2px solid var(--text);
  border-radius: 0.5rem;
  padding: 0.5rem 0.9rem;
  font: inherit;
  font-weight: 600;
  color: var(--text);
  cursor: pointer;
  min-height: 44px;
}

.site-nav ul {
  display: flex;
  gap: 0.25rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.site-nav a {
  display: inline-block;
  padding: 0.6rem 1rem;
  color: var(--text);
  text-decoration: none;
  border-radius: 999px;
  font-weight: 500;
  transition: background-color 0.15s ease;
}

.site-nav a:hover {
  background: var(--accent-tint);
  color: var(--accent-dark);
}

.site-nav a[aria-current="page"] {
  background: var(--accent-tint);
  color: var(--accent-dark);
  font-weight: 700;
}

.header-call {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--accent);
  color: #ffffff;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  padding: 0.6rem 1.2rem;
  border-radius: 999px;
  min-height: 44px;
  transition: background-color 0.15s ease;
}

.header-call:hover {
  background: var(--accent-dark);
}

.header-call svg {
  width: 1rem;
  height: 1rem;
  flex-shrink: 0;
}

@media (max-width: 56em) {
  .header-call {
    display: none;
  }
}

@media (max-width: 40em) {
  .nav-toggle {
    display: inline-block;
  }

  .site-nav {
    flex-basis: 100%;
  }

  .site-nav[hidden] {
    display: none;
  }

  .site-nav ul {
    flex-direction: column;
    padding-bottom: 0.75rem;
  }

  .site-nav a {
    display: block;
    padding: 0.85rem 1rem;
    border-radius: 0.75rem;
  }
}

/* --- Typography --- */
h1, h2, h3 {
  font-family: 'Plus Jakarta Sans', 'Inter', system-ui, sans-serif;
  line-height: 1.15;
  margin: 0 0 1rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

h1 { font-size: clamp(2.3rem, 5.5vw, 3.6rem); }
h2 { font-size: clamp(1.7rem, 4vw, 2.4rem); }
h3 { font-size: 1.25rem; }

p {
  margin: 0 0 1rem;
}

a {
  color: var(--accent-dark);
  text-underline-offset: 0.2em;
}

.eyebrow {
  display: inline-block;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--accent-dark);
  background: var(--accent-tint);
  border: 1px solid var(--accent-mid);
  padding: 0.35rem 0.9rem;
  border-radius: 999px;
  margin-bottom: 1rem;
}

.section-lead {
  color: var(--text-muted);
  font-size: 1.1rem;
  max-width: 40rem;
  margin-bottom: 0;
}

/* --- Buttons --- */
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  background: var(--accent);
  color: #ffffff;
  padding: 0.95rem 2rem;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 600;
  min-height: 48px;
  transition: background-color 0.15s ease, transform 0.15s ease;
}

.button:hover {
  background: var(--accent-dark);
  transform: translateY(-1px);
}

.button--outline {
  background: transparent;
  color: var(--accent-dark);
  border: 2px solid var(--accent);
}

.button--outline:hover {
  background: var(--accent-tint);
  transform: translateY(-1px);
}

.button svg {
  width: 1.1rem;
  height: 1.1rem;
  flex-shrink: 0;
}

/* --- Sections --- */
.section {
  padding: 4.5rem 0;
}

.section--alt {
  background: var(--bg-alt);
}

/* --- Hero --- */
.hero {
  background: linear-gradient(160deg, var(--accent-tint) 0%, var(--bg) 55%);
  padding: 4.5rem 0 5rem;
}

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

.hero p.hero-lead {
  font-size: 1.2rem;
  color: var(--text-muted);
  max-width: 32rem;
  margin: 0 0 2rem;
}

.hero-ctas {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
  margin-bottom: 2rem;
}

.hero-points {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.6rem;
}

.hero-points li {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--text-muted);
  font-weight: 500;
}

.hero-points svg {
  width: 1.25rem;
  height: 1.25rem;
  color: var(--accent);
  flex-shrink: 0;
}

.hero-media {
  position: relative;
}

.hero-media img {
  width: 100%;
  border-radius: calc(var(--radius) * 1.4);
  box-shadow: var(--shadow-lg);
  aspect-ratio: 10 / 9;
  object-fit: cover;
}

.hero-badge {
  position: absolute;
  left: -1rem;
  bottom: 1.5rem;
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: 1rem;
  box-shadow: var(--shadow-lg);
  padding: 0.9rem 1.25rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.95rem;
}

.hero-badge svg {
  width: 2rem;
  height: 2rem;
  color: var(--accent);
  background: var(--accent-tint);
  border-radius: 50%;
  padding: 0.4rem;
  flex-shrink: 0;
}

.hero-badge strong {
  display: block;
}

.hero-badge span {
  color: var(--text-muted);
  font-size: 0.85rem;
}

@media (max-width: 56em) {
  .hero .container {
    grid-template-columns: 1fr;
  }

  .hero-media img {
    aspect-ratio: 16 / 10;
  }

  .hero-badge {
    left: 1rem;
  }
}

/* --- Service cards --- */
.cards {
  display: grid;
  gap: 1.75rem;
  grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr));
  margin-top: 2.5rem;
}

.card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.card img {
  width: 100%;
  aspect-ratio: 400 / 260;
  object-fit: cover;
}

.card-body {
  padding: 1.5rem;
}

.card-body h3 {
  margin-bottom: 0.5rem;
}

.card-body p {
  color: var(--text-muted);
  margin-bottom: 0;
}

/* --- Feature strip --- */
.features {
  display: grid;
  gap: 1.75rem;
  grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr));
  margin-top: 2.5rem;
}

.feature {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.feature-icon {
  width: 3rem;
  height: 3rem;
  border-radius: 0.9rem;
  background: var(--accent-tint);
  border: 1px solid var(--accent-mid);
  color: var(--accent-dark);
  display: flex;
  align-items: center;
  justify-content: center;
}

.feature-icon svg {
  width: 1.4rem;
  height: 1.4rem;
}

.feature h3 {
  font-size: 1.05rem;
  margin: 0;
}

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

/* --- Location --- */
.location-grid {
  display: grid;
  gap: 2.5rem;
  grid-template-columns: 1fr 1.2fr;
  margin-top: 2.5rem;
  align-items: start;
}

@media (max-width: 56em) {
  .location-grid {
    grid-template-columns: 1fr;
  }
}

.location-info h3 {
  font-size: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent-dark);
  margin: 1.75rem 0 0.5rem;
}

.location-info h3:first-child {
  margin-top: 0;
}

address {
  font-style: normal;
}

.map-frame {
  width: 100%;
  aspect-ratio: 4 / 3;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}

/* --- Hours --- */
.hours {
  margin: 0;
  max-width: 24rem;
}

.hours div {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.45rem 0.6rem;
  border-bottom: 1px solid var(--border);
  border-radius: 0.4rem;
}

.hours dt {
  font-weight: 600;
}

.hours dd {
  margin: 0;
  text-align: right;
  color: var(--text-muted);
}

.hours div.today {
  background: var(--accent-tint);
  border-bottom-color: var(--accent-mid);
}

.hours div.today dt::after {
  content: " · Today";
  color: var(--accent-dark);
  font-weight: 700;
  font-size: 0.85em;
}

.hours div.today dd {
  color: var(--accent-dark);
  font-weight: 600;
}

/* --- Prose pages: narrow reading column, centered --- */
.prose {
  max-width: 46rem;
  margin-left: auto;
  margin-right: auto;
}

.prose h2 {
  margin-top: 2.5rem;
  font-size: 1.4rem;
}

.prose p {
  color: var(--text-muted);
}

.prose ul {
  padding-left: 1.4rem;
  color: var(--text-muted);
}

.prose li {
  margin-bottom: 0.4rem;
}

/* --- Download panel --- */
.download-panel {
  background: var(--accent-tint);
  border: 1px solid var(--accent-mid);
  border-radius: var(--radius);
  padding: 2rem;
  margin: 2rem auto;
  max-width: 46rem;
}

.download-panel h2 {
  margin-top: 0;
}

.download-panel p {
  color: var(--text-muted);
}

/* --- Page hero (inner pages) --- */
.page-hero {
  background: linear-gradient(160deg, var(--accent-tint) 0%, var(--bg) 70%);
  padding: 3.5rem 0 1rem;
}

.page-hero .container {
  max-width: 46rem;
}

/* --- Footer --- */
.site-footer {
  background: var(--footer-bg);
  color: var(--footer-text);
  padding: 3.5rem 0 2rem;
  margin-top: 4rem;
  border-top: 4px solid var(--accent);
}

.site-footer a {
  color: #ffffff;
}

.site-footer h2 {
  font-size: 0.95rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 0.9rem;
  color: #ffffff;
}

.footer-grid {
  display: grid;
  gap: 2.5rem;
  grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr));
}

.footer-brand .brand {
  color: #ffffff;
  margin-bottom: 0.75rem;
}

.footer-brand p {
  color: #94a3b8;
  max-width: 20rem;
}

.site-footer .hours div {
  border-bottom-color: #1e293b;
}

.site-footer .hours dd {
  color: #cbd5e1;
}

.site-footer .hours div.today {
  background: rgba(255, 255, 255, 0.06);
}

.site-footer .hours div.today dt::after,
.site-footer .hours div.today dd {
  color: #ffffff;
}

.footer-legal {
  margin-top: 2.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid #1e293b;
  font-size: 0.9rem;
  color: #94a3b8;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
  justify-content: space-between;
}

.footer-legal a {
  color: #ffffff;
}
