/* =========================================================
   Central Pharmacy — Aura-inspired design system
   Flat, precise, grayscale chrome. Photography carries color.
   ========================================================= */

:root {
  /* Soft clinical teal — calmer than black, clearer than blue for pharmacy */
  --bg: #f7fbfa;
  --surface: #eef7f4;
  --surface-2: #e3f0ec;
  --text: #14352e;
  --muted: #5a7a72;
  --border: #cfe3dc;
  --border-strong: #a8cfc3;
  --ink: #1a4d42;
  --focus-inner: #ffffff;
  --focus-outer: #1f7a66;
  --accent: #1f7a66;
  --accent-hover: #186556;
  --clinical: #1f7a66;
  --clinical-soft: #e8f5f1;
  --danger: #b42318;
  --ok: #067647;
  --radius: 8px;
  --radius-lg: 16px;
  --space: 8px;
  --max: 1120px;
  --header-h: 64px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --dur: 480ms;
  font-family: Inter, "Segoe UI", system-ui, sans-serif;
  font-feature-settings: "calt", "rlig", "salt", "ss01", "ss02";
  letter-spacing: -0.16px;
}

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

html {
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

body {
  margin: 0;
  color: var(--text);
  background: var(--bg);
  line-height: 1.55;
  font-size: 15px;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
}

img,
video {
  max-width: 100%;
  display: block;
}

a {
  color: var(--text);
  text-decoration: none;
}

a:hover {
  color: var(--muted);
}

h1, h2, h3, h4 {
  font-weight: 500;
  line-height: 1.15;
  color: var(--text);
  letter-spacing: -0.02em;
  margin: 0 0 0.5em;
}

h1 { font-size: clamp(2.25rem, 5vw, 3.75rem); line-height: 1; }
h2 { font-size: clamp(1.5rem, 3vw, 2rem); }
h3 { font-size: 1.05rem; }

p { margin: 0 0 1em; }
p:last-child { margin-bottom: 0; }

:focus-visible {
  outline: none;
  box-shadow:
    0 0 0 2px var(--focus-inner),
    0 0 0 4px var(--focus-outer);
}

/* --- Layout --- */
.container {
  width: min(var(--max), calc(100% - 40px));
  margin-inline: auto;
}

.container-wide {
  width: min(1280px, calc(100% - 40px));
  margin-inline: auto;
}

.section {
  padding: 80px 0;
}

.section-sm {
  padding: 48px 0;
}

.section-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: end;
  margin-bottom: 32px;
}

.section-head a {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--muted);
  border-bottom: 1px solid transparent;
  padding-bottom: 2px;
}

.section-head a:hover {
  color: var(--text);
  border-color: var(--text);
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.6875rem;
  color: var(--muted);
  font-weight: 500;
  margin: 0 0 12px;
}

.muted { color: var(--muted); }

.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.grid-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

/* --- Header --- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(247, 251, 250, 0.9);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(207, 227, 220, 0.8);
}

.header-inner {
  height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  font-weight: 500;
  font-size: 0.9375rem;
  text-decoration: none;
  flex-shrink: 0;
}

.brand:hover { color: var(--text); }

.brand img {
  width: 28px;
  height: 28px;
  border-radius: 6px;
}

.nav {
  display: flex;
  align-items: center;
  gap: 4px;
}

.nav a {
  color: var(--muted);
  text-decoration: none;
  padding: 8px 12px;
  border-radius: var(--radius);
  font-size: 0.875rem;
  font-weight: 500;
  transition: color 160ms ease, background 160ms ease;
}

.nav a:hover {
  color: var(--text);
  background: var(--surface-2);
}

.nav a.is-active {
  color: var(--text);
  background: var(--surface-2);
}

.menu-toggle {
  display: none;
  border: 1px solid var(--border);
  background: var(--bg);
  border-radius: var(--radius);
  padding: 8px 12px;
  cursor: pointer;
  color: var(--text);
  font: inherit;
  font-size: 0.8125rem;
  font-weight: 500;
}

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  padding: 11px 18px;
  font-weight: 500;
  cursor: pointer;
  text-decoration: none;
  font-size: 0.875rem;
  font-family: inherit;
  letter-spacing: -0.16px;
  transition: background 160ms ease, color 160ms ease, border-color 160ms ease;
}

.btn:hover { text-decoration: none; }

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

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

.btn-ghost {
  background: transparent;
  color: var(--text);
  border-color: var(--border);
}

.btn-ghost:hover {
  background: var(--surface-2);
  color: var(--text);
}

.btn-clinical {
  background: var(--clinical);
  color: #fff;
  border-color: var(--clinical);
}

.btn-clinical:hover {
  background: #1f4a3f;
  color: #fff;
}

.btn-sm {
  padding: 8px 12px;
  font-size: 0.8125rem;
}

/* --- Hero (signature) --- */
.hero {
  position: relative;
  min-height: min(88vh, 760px);
  display: flex;
  align-items: flex-end;
  overflow: hidden;
  background: var(--ink);
}

.hero-media {
  position: absolute;
  inset: 0;
}

.hero-media img,
.hero-media video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 30%;
}

.hero-scrim {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(26, 77, 66, 0.2) 0%, rgba(26, 77, 66, 0.5) 45%, rgba(20, 53, 46, 0.88) 100%);
}

.hero-content {
  position: relative;
  z-index: 1;
  width: min(var(--max), calc(100% - 40px));
  margin: 0 auto;
  padding: 0 0 64px;
  color: #fafafa;
}

.hero-content .eyebrow { color: rgba(250, 250, 250, 0.65); }

.hero-content h1 {
  color: #fff;
  max-width: 12ch;
  margin-bottom: 16px;
  font-size: clamp(2.75rem, 7vw, 4.5rem);
}

.hero-content .lede {
  max-width: 42ch;
  color: rgba(250, 250, 250, 0.78);
  font-size: 1.0625rem;
  margin-bottom: 28px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.hero-actions .btn-ghost {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.35);
}

.hero-actions .btn-ghost:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

.hero-actions .btn-primary {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

.hero-actions .btn-primary:hover {
  background: var(--accent-hover);
  border-color: var(--accent-hover);
  color: #fff;
}

/* Page-load orchestration — one moment only */
.hero-content > * {
  opacity: 0;
  transform: translateY(14px);
  animation: rise-in var(--dur) var(--ease) forwards;
}

.hero-content > *:nth-child(1) { animation-delay: 60ms; }
.hero-content > *:nth-child(2) { animation-delay: 140ms; }
.hero-content > *:nth-child(3) { animation-delay: 220ms; }
.hero-content > *:nth-child(4) { animation-delay: 300ms; }

@keyframes rise-in {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* --- Search strip --- */
.search-strip {
  border-bottom: 1px solid var(--border);
  background: var(--bg);
  padding: 24px 0;
}

.search-row {
  display: flex;
  gap: 8px;
  max-width: 560px;
}

.search-row input,
.field input,
.field select,
.field textarea,
.select,
.input {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 11px 14px;
  font: inherit;
  background: var(--bg);
  color: var(--text);
  transition: border-color 120ms ease;
}

.search-row input:focus,
.field input:focus,
.field select:focus,
.field textarea:focus,
.select:focus,
.input:focus {
  outline: none;
  border-color: var(--border-strong);
  box-shadow:
    0 0 0 2px var(--focus-inner),
    0 0 0 4px var(--focus-outer);
}

.search-row input { flex: 1; }

.field { margin-bottom: 14px; }
.field label {
  display: block;
  font-weight: 500;
  margin-bottom: 6px;
  font-size: 0.8125rem;
}
.field textarea { min-height: 120px; resize: vertical; }

.help {
  font-size: 0.75rem;
  color: var(--muted);
  margin-top: 6px;
}

/* --- Cards (interaction containers only) --- */
.card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
}

.category-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.category-item {
  background: var(--bg);
  padding: 20px;
  text-decoration: none;
  color: var(--text);
  transition: background 160ms ease;
}

.category-item:hover {
  background: var(--surface);
  color: var(--text);
}

.category-item h3 {
  margin: 0 0 4px;
  font-size: 0.9375rem;
}

.category-item p {
  margin: 0;
  font-size: 0.8125rem;
  color: var(--muted);
}

/* --- Product cards --- */
.product-card {
  display: flex;
  flex-direction: column;
  padding: 0;
  overflow: hidden;
  text-decoration: none;
  color: var(--text);
  transition: border-color 160ms ease;
}

.product-card:hover {
  border-color: var(--border-strong);
  color: var(--text);
}

.product-card .thumb {
  aspect-ratio: 1;
  background: var(--surface-2);
  overflow: hidden;
}

.product-card .thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 500ms var(--ease);
}

.product-card:hover .thumb img {
  transform: scale(1.03);
}

.product-card .body {
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
}

.product-card .cat {
  font-size: 0.6875rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted);
  font-weight: 500;
}

.product-card h3 {
  margin: 0;
  font-size: 0.9375rem;
  line-height: 1.35;
}

.product-card .blurb {
  font-size: 0.8125rem;
  color: var(--muted);
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.product-card .price {
  font-weight: 500;
  font-size: 0.9375rem;
  margin-top: auto;
  padding-top: 10px;
}

.product-actions {
  display: flex;
  gap: 8px;
  margin-top: 12px;
}

.product-actions .btn { flex: 1; }

/* --- Product detail --- */
.product-detail {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: start;
  padding: 40px 0 80px;
}

.product-detail .media {
  aspect-ratio: 1;
  background: var(--surface-2);
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border);
}

.product-detail .media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.product-detail .price {
  font-size: 1.25rem;
  font-weight: 500;
  margin: 16px 0 24px;
}

/* --- Services --- */
.service-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  border-top: 1px solid var(--border);
}

.service-item {
  padding: 28px 24px 28px 0;
  border-bottom: 1px solid var(--border);
}

.service-item + .service-item {
  padding-left: 24px;
  border-left: 1px solid var(--border);
}

.service-item h3 { margin-bottom: 8px; }
.service-item p {
  margin: 0;
  font-size: 0.875rem;
  color: var(--muted);
}

/* --- Split band --- */
.split-band {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 48px;
  align-items: center;
}

.split-band .visual {
  position: relative;
  aspect-ratio: 4 / 3;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--surface-2);
  border: 1px solid var(--border);
}

.split-band .visual img,
.split-band .visual video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: var(--surface-2);
}

/* --- Beauty masonry --- */
.beauty-masonry {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-auto-rows: 180px;
  gap: 12px;
}

.beauty-tile {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--surface-2);
  text-decoration: none;
  color: #fff;
}

.beauty-tile:nth-child(1) { grid-column: span 2; grid-row: span 2; }
.beauty-tile:nth-child(2) { grid-row: span 2; }
.beauty-tile:nth-child(5) { grid-column: span 2; }
.beauty-tile:nth-child(8) { grid-column: span 2; grid-row: span 2; }
.beauty-tile:nth-child(11) { grid-row: span 2; }
.beauty-tile:nth-child(14) { grid-column: span 2; }

.beauty-tile img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 600ms var(--ease);
}

.beauty-tile:hover img {
  transform: scale(1.04);
}

.beauty-tile .caption {
  position: absolute;
  inset: auto 0 0 0;
  padding: 20px 16px 16px;
  background: linear-gradient(transparent, rgba(23, 23, 23, 0.75));
  font-size: 0.8125rem;
  font-weight: 500;
}

.beauty-tile .caption span {
  display: block;
  font-size: 0.6875rem;
  font-weight: 400;
  color: rgba(255, 255, 255, 0.7);
  margin-top: 2px;
}

.beauty-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

/* --- Team --- */
.team-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.team-card {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--bg);
}

.team-card .photo {
  aspect-ratio: 4 / 5;
  background: var(--surface-2);
  overflow: hidden;
}

.team-card .photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
}

.team-card .meta {
  padding: 16px 18px 20px;
}

.team-card .meta h3 {
  margin: 0 0 4px;
  font-size: 1rem;
}

.team-card .role {
  margin: 0;
  font-size: 0.8125rem;
  color: var(--muted);
}

.team-feature {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 32px;
  align-items: center;
  margin-bottom: 48px;
}

.team-feature .photo {
  aspect-ratio: 16 / 10;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--surface-2);
}

.team-feature .photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* --- Steps / forms --- */
.steps {
  display: flex;
  gap: 8px;
  margin-bottom: 24px;
}

.step {
  flex: 1;
  padding: 12px;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--border);
  font-size: 0.8125rem;
  text-align: center;
  font-weight: 500;
  color: var(--muted);
}

.step.is-active {
  border-color: var(--text);
  background: var(--bg);
  color: var(--text);
}

.alert {
  border-radius: var(--radius);
  padding: 16px;
  margin: 12px 0;
  border: 1px solid var(--border);
}

.alert-ok {
  background: #f0fdf4;
  border-color: #bbf7d0;
  color: var(--ok);
}

.alert-info {
  background: var(--clinical-soft);
  border-color: #c5ddd4;
  color: var(--clinical);
}

.alert-warn {
  background: #fffbeb;
  border-color: #fde68a;
  color: #92400e;
}

/* --- Visit / contact --- */
.visit-panel {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  padding: 32px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
}

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

.hours-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.hours-list li {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.875rem;
}

.hours-list li:last-child { border-bottom: 0; }

/* --- Page hero (inner pages) --- */
.page-hero {
  padding: 56px 0 24px;
}

.page-hero h1 { margin-bottom: 12px; }

.page-hero .lede {
  max-width: 52ch;
  color: var(--muted);
  font-size: 1.0625rem;
}

.filters {
  display: flex;
  gap: 8px;
  margin: 28px 0 32px;
  max-width: 640px;
}

.filters input { flex: 1; }
.filters select { width: 200px; flex-shrink: 0; }

/* --- Footer --- */
.site-footer {
  background: var(--surface);
  border-top: 1px solid var(--border);
  color: var(--muted);
  padding: 48px 0 28px;
  margin-top: 64px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 32px;
}

.site-footer h3 {
  color: var(--text);
  font-size: 0.8125rem;
  font-weight: 500;
  margin: 0 0 12px;
}

.site-footer a {
  color: var(--muted);
  font-size: 0.875rem;
  display: inline-block;
  margin-bottom: 8px;
}

.site-footer a:hover { color: var(--text); }

.site-footer .brand-blurb {
  font-size: 0.875rem;
  max-width: 32ch;
  margin: 8px 0 0;
}

.legal {
  border-top: 1px solid var(--border);
  margin-top: 32px;
  padding-top: 20px;
  font-size: 0.75rem;
}

/* --- Reveal on scroll (subtle, gated) --- */
[data-reveal] {
  opacity: 0;
  transform: translateY(12px);
  transition: opacity var(--dur) var(--ease), transform var(--dur) var(--ease);
}

[data-reveal].is-visible {
  opacity: 1;
  transform: none;
}

/* --- Responsive --- */
@media (max-width: 960px) {
  .grid-3,
  .grid-4,
  .service-row,
  .team-grid,
  .beauty-grid,
  .footer-grid,
  .product-detail,
  .split-band,
  .team-feature,
  .visit-panel,
  .beauty-masonry {
    grid-template-columns: 1fr 1fr;
  }

  .service-item + .service-item {
    border-left: 0;
    padding-left: 0;
  }

  .beauty-tile:nth-child(n) {
    grid-column: span 1;
    grid-row: span 1;
  }

  .beauty-tile:nth-child(1),
  .beauty-tile:nth-child(8) {
    grid-column: span 2;
    grid-row: span 2;
  }
}

@media (max-width: 720px) {
  .grid-2,
  .grid-3,
  .grid-4,
  .service-row,
  .team-grid,
  .beauty-grid,
  .footer-grid,
  .product-detail,
  .split-band,
  .team-feature,
  .visit-panel,
  .beauty-masonry {
    grid-template-columns: 1fr;
  }

  .beauty-tile:nth-child(n) {
    grid-column: span 1 !important;
    grid-row: span 1 !important;
    min-height: 240px;
  }

  .menu-toggle { display: inline-flex; }

  .nav {
    display: none;
    position: absolute;
    top: calc(var(--header-h) + 8px);
    left: 20px;
    right: 20px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    flex-direction: column;
    padding: 8px;
    z-index: 50;
  }

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

  .header-inner { position: relative; }

  .filters {
    flex-direction: column;
  }

  .filters select { width: 100%; }

  .hero { min-height: 72vh; }
  .hero-content { padding-bottom: 40px; }

  .section { padding: 56px 0; }
}
