/* NZ Naturopaths — premium healthcare directory */

:root {
  --bg: #f3ecdf;
  --bg-mesh: #eadfce;
  --surface: #fffaf1;
  --text: #29251f;
  --muted: #71685c;
  --border: #d9cdbb;
  --border-soft: #e8dece;
  --accent: #795b3e;
  --accent-hover: #4d3928;
  --accent-mid: #a27a52;
  --accent-soft: #eee2d0;
  --sage: #ad9a7e;
  --sage-soft: #f6eee2;
  --link: #62472f;
  --focus: #a27a52;
  --shadow-sm: 0 1px 2px rgba(75, 61, 44, 0.05);
  --shadow: 0 4px 16px rgba(75, 61, 44, 0.07), 0 1px 3px rgba(75, 61, 44, 0.04);
  --shadow-lg: 0 12px 40px rgba(75, 61, 44, 0.1), 0 4px 12px rgba(75, 61, 44, 0.05);
  --shadow-lift: 0 16px 40px rgba(75, 61, 44, 0.12), 0 6px 16px rgba(121, 91, 62, 0.08);
  --radius: 14px;
  --radius-sm: 10px;
  --radius-pill: 999px;
  --max: 1100px;
  --header-h: 68px;
  --font: "DM Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-display: "Fraunces", "Source Serif 4", Georgia, serif;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--font);
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: var(--link);
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
}

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

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--accent);
  color: #fff;
  padding: 0.55rem 1rem;
  z-index: 200;
  border-radius: var(--radius-sm);
  font-weight: 600;
}

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

/* ——— Header ——— */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: saturate(1.4) blur(14px);
  -webkit-backdrop-filter: saturate(1.4) blur(14px);
  background: rgba(255, 255, 255, 0.78);
  border-bottom: 1px solid rgba(215, 226, 219, 0.85);
  padding: 0 1.25rem;
  min-height: var(--header-h);
  display: flex;
  align-items: center;
}

.site-header-inner {
  width: 100%;
  max-width: var(--max);
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 1.25rem;
  padding: 0.65rem 0;
}

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

.brand-mark {
  width: 40px;
  height: 40px;
  flex-shrink: 0;
  border-radius: 10px;
  object-fit: contain;
  background: var(--sage-soft);
}

.brand-mark--svg {
  padding: 4px;
}

.brand-text {
  display: flex;
  flex-direction: column;
  gap: 0.05rem;
  line-height: 1.2;
}

.brand-title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.15rem;
  color: var(--accent-hover);
  letter-spacing: -0.02em;
}

.brand-sub {
  font-size: 0.72rem;
  color: var(--muted);
  font-weight: 500;
  letter-spacing: 0.01em;
}

.nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  font-size: 0.9rem;
}

.nav a {
  color: var(--muted);
  text-decoration: none;
  font-weight: 500;
  padding: 0.4rem 0.85rem;
  border-radius: var(--radius-pill);
  transition: background 0.2s var(--ease), color 0.2s var(--ease);
}

.nav a:hover {
  color: var(--accent-hover);
  background: var(--accent-soft);
}

.nav a[aria-current="page"] {
  color: var(--accent-hover);
  background: var(--accent-soft);
  font-weight: 600;
}

/* ——— Layout ——— */
main {
  flex: 1;
  width: 100%;
}

.main-inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 1.25rem 3rem;
}

.main-inner--narrow {
  max-width: 760px;
}

/* ——— Hero ——— */
.hero {
  position: relative;
  overflow: hidden;
  padding: 2.75rem 1.25rem 2.25rem;
  margin-bottom: 0;
  background:
    radial-gradient(ellipse 80% 60% at 15% 20%, rgba(64, 145, 108, 0.18), transparent 55%),
    radial-gradient(ellipse 70% 50% at 85% 10%, rgba(123, 168, 148, 0.22), transparent 50%),
    radial-gradient(ellipse 60% 45% at 50% 90%, rgba(45, 106, 79, 0.1), transparent 55%),
    linear-gradient(165deg, #eef5f0 0%, #f4f7f4 45%, #e8f0ea 100%);
  border-bottom: 1px solid var(--border-soft);
}

.hero-inner {
  max-width: var(--max);
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

.hero h1 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(1.85rem, 4.5vw, 2.65rem);
  letter-spacing: -0.03em;
  line-height: 1.15;
  color: var(--accent-hover);
  margin: 0 0 0.85rem;
  max-width: 16ch;
}

.hero-lead {
  margin: 0 0 1.35rem;
  color: var(--muted);
  font-size: 1.05rem;
  max-width: 36rem;
  line-height: 1.55;
}

.trust-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.trust-chips li {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(215, 226, 219, 0.9);
  backdrop-filter: blur(6px);
  color: var(--accent-hover);
  font-size: 0.8rem;
  font-weight: 600;
  padding: 0.35rem 0.75rem;
  border-radius: var(--radius-pill);
  box-shadow: var(--shadow-sm);
}

.trust-chips li::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent-mid);
  flex-shrink: 0;
}

.trust-chips .chip-beta::before {
  background: var(--sage);
}

/* ——— Search panel ——— */
.search-panel-wrap {
  max-width: var(--max);
  margin: -1.35rem auto 0;
  padding: 0 1.25rem;
  position: relative;
  z-index: 2;
}

.filters {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.15rem 1.25rem;
  box-shadow: var(--shadow-lg);
  display: grid;
  gap: 0.9rem;
}

@media (min-width: 720px) {
  .filters {
    grid-template-columns: 1fr minmax(160px, 220px) auto;
    align-items: end;
    gap: 1rem;
  }
}

.field label {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  margin-bottom: 0.4rem;
  color: var(--text);
  letter-spacing: 0.01em;
}

.field input,
.field select {
  width: 100%;
  padding: 0.75rem 0.95rem;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font: inherit;
  font-size: 1rem;
  background: #fff;
  color: var(--text);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.field input {
  padding: 0.85rem 1rem;
  font-size: 1.05rem;
}

.field input:hover,
.field select:hover {
  border-color: var(--sage);
}

.field input:focus,
.field select:focus {
  border-color: var(--accent-mid);
  box-shadow: 0 0 0 3px rgba(64, 145, 108, 0.2);
  outline: none;
}

.field input::placeholder {
  color: #8a9a92;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  font: inherit;
  font-weight: 600;
  font-size: 0.9rem;
  padding: 0.7rem 1.15rem;
  border-radius: var(--radius-sm);
  border: 1.5px solid transparent;
  cursor: pointer;
  text-decoration: none;
  text-align: center;
  transition: background 0.2s var(--ease), color 0.2s var(--ease),
    border-color 0.2s var(--ease), box-shadow 0.2s var(--ease), transform 0.15s var(--ease);
  white-space: nowrap;
}

.btn-ghost {
  background: transparent;
  border-color: transparent;
  color: var(--muted);
  padding: 0.7rem 1rem;
}

.btn-ghost:hover {
  background: var(--accent-soft);
  color: var(--accent-hover);
}

.btn-secondary {
  background: var(--surface);
  border-color: var(--border);
  color: var(--muted);
}

.btn-secondary:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--sage-soft);
}

.btn-primary {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
  box-shadow: 0 2px 8px rgba(45, 106, 79, 0.25);
}

.btn-primary:hover {
  background: var(--accent-hover);
  border-color: var(--accent-hover);
  color: #fff;
  box-shadow: 0 4px 14px rgba(27, 67, 50, 0.3);
}

.btn-sm {
  padding: 0.5rem 0.9rem;
  font-size: 0.85rem;
}

/* ——— Results ——— */
.results-section {
  max-width: var(--max);
  margin: 0 auto;
  padding: 1.5rem 1.25rem 0;
}

.results-meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.5rem;
  align-items: baseline;
  margin-bottom: 1rem;
  font-size: 0.9rem;
  color: var(--muted);
}

.results-meta strong {
  color: var(--text);
  font-weight: 600;
}

.card-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 1rem;
  grid-template-columns: 1fr;
}

@media (min-width: 720px) {
  .card-list {
    grid-template-columns: 1fr 1fr;
  }
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem 1.3rem;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease),
    border-color 0.2s ease;
}

.card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lift);
  border-color: rgba(123, 168, 148, 0.55);
}

.card-top {
  display: flex;
  gap: 0.9rem;
  align-items: flex-start;
}

.avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: linear-gradient(145deg, var(--accent-soft), #d4e8dc);
  color: var(--accent-hover);
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: -0.02em;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  border: 1.5px solid rgba(45, 106, 79, 0.12);
}

.card-heading {
  min-width: 0;
  flex: 1;
}

.card h2 {
  margin: 0 0 0.4rem;
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--text);
  line-height: 1.25;
}

.region-pill {
  display: inline-flex;
  align-items: center;
  background: var(--sage-soft);
  color: var(--accent);
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.2rem 0.6rem;
  border-radius: var(--radius-pill);
  border: 1px solid rgba(123, 168, 148, 0.35);
}

.card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.tag {
  display: inline-block;
  background: var(--accent-soft);
  color: var(--accent-hover);
  font-size: 0.72rem;
  font-weight: 600;
  padding: 0.2rem 0.55rem;
  border-radius: var(--radius-pill);
}

.tag-more {
  background: transparent;
  border: 1px dashed var(--border);
  color: var(--muted);
}

.card-bio {
  margin: 0;
  font-size: 0.9rem;
  color: var(--muted);
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  flex: 1;
}

.card-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.65rem;
  margin-top: auto;
  padding-top: 0.35rem;
  border-top: 1px solid var(--border-soft);
}

.verified {
  font-size: 0.75rem;
  color: var(--muted);
}

.card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-left: auto;
}

.card-actions .btn {
  text-decoration: none;
}

.no-links {
  font-size: 0.8rem;
  color: var(--muted);
  font-style: italic;
}

/* Empty / loading / error */
.empty,
.error,
.loading {
  grid-column: 1 / -1;
  background: var(--surface);
  border: 1.5px dashed var(--border);
  border-radius: var(--radius);
  padding: 2.5rem 1.5rem;
  text-align: center;
  color: var(--muted);
}

.loading {
  border-style: solid;
  border-color: var(--border-soft);
  background: linear-gradient(180deg, #fff, var(--sage-soft));
}

.loading::before {
  content: "";
  display: block;
  width: 28px;
  height: 28px;
  margin: 0 auto 0.85rem;
  border: 2.5px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.75s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.empty strong,
.error strong {
  display: block;
  font-family: var(--font-display);
  font-size: 1.15rem;
  color: var(--text);
  margin-bottom: 0.35rem;
  font-weight: 600;
}

.error {
  border-color: #e8c4c4;
  background: #fdf6f6;
  color: #6b3a3a;
}

/* ——— Prose pages ——— */
.page-hero {
  padding: 2.25rem 1.25rem 1.5rem;
  background:
    radial-gradient(ellipse 70% 80% at 10% 0%, rgba(64, 145, 108, 0.12), transparent 50%),
    linear-gradient(180deg, #eef5f0, var(--bg));
  border-bottom: 1px solid var(--border-soft);
}

.page-hero-inner {
  max-width: 760px;
  margin: 0 auto;
}

.page-hero h1 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(1.65rem, 3.5vw, 2.1rem);
  letter-spacing: -0.025em;
  color: var(--accent-hover);
  margin: 0 0 0.5rem;
}

.page-hero p {
  margin: 0;
  color: var(--muted);
  font-size: 1.02rem;
  max-width: 38rem;
}

.beta-note {
  display: inline-block;
  background: var(--accent-soft);
  color: var(--accent-hover);
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.25rem 0.65rem;
  border-radius: var(--radius-pill);
  margin-bottom: 0.85rem;
  border: 1px solid rgba(45, 106, 79, 0.12);
}

.prose {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.75rem 1.65rem;
  box-shadow: var(--shadow-sm);
  margin-top: 1.5rem;
}

.prose h2 {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 600;
  margin: 1.75rem 0 0.65rem;
  color: var(--accent-hover);
  letter-spacing: -0.015em;
}

.prose h2:first-child {
  margin-top: 0;
}

.prose p,
.prose li {
  color: var(--text);
  font-size: 0.98rem;
}

.prose p {
  margin: 0 0 1rem;
}

.prose ul,
.prose ol {
  padding-left: 1.3rem;
  margin: 0 0 1rem;
}

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

.prose a {
  font-weight: 500;
}

.callout {
  background: linear-gradient(135deg, var(--accent-soft), var(--sage-soft));
  border: 1px solid rgba(45, 106, 79, 0.18);
  border-radius: var(--radius);
  padding: 1.15rem 1.25rem;
  margin: 1.25rem 0;
}

.callout--warn {
  background: linear-gradient(135deg, #fef9f0, #f5f0e6);
  border-color: rgba(160, 120, 50, 0.25);
}

.callout strong {
  display: block;
  font-family: var(--font-display);
  font-size: 1.05rem;
  color: var(--accent-hover);
  margin-bottom: 0.35rem;
  font-weight: 600;
}

.callout p:last-child {
  margin-bottom: 0;
}

.callout code,
.prose code {
  font-size: 0.88em;
  background: rgba(255, 255, 255, 0.7);
  padding: 0.15em 0.4em;
  border-radius: 6px;
  border: 1px solid var(--border-soft);
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  color: var(--accent-hover);
  word-break: break-all;
}

/* ——— Footer ——— */
.site-footer {
  border-top: 1px solid var(--border);
  background: linear-gradient(180deg, #fafcfb, #eef3f0);
  padding: 2.5rem 1.25rem 1.75rem;
  margin-top: auto;
}

.site-footer-inner {
  max-width: var(--max);
  margin: 0 auto;
}

.footer-grid {
  display: grid;
  gap: 2rem;
  margin-bottom: 2rem;
}

@media (min-width: 720px) {
  .footer-grid {
    grid-template-columns: 1.4fr 1fr 1fr;
    gap: 2.5rem;
  }
}

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

.footer-brand .brand {
  align-self: flex-start;
}

.footer-blurb {
  margin: 0;
  font-size: 0.9rem;
  color: var(--muted);
  max-width: 28rem;
  line-height: 1.55;
}

.footer-col h3 {
  margin: 0 0 0.75rem;
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--accent-hover);
}

.footer-col ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.footer-col a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
}

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

.footer-bottom {
  padding-top: 1.25rem;
  border-top: 1px solid var(--border);
  font-size: 0.8rem;
  color: var(--muted);
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.25rem;
  justify-content: space-between;
}

.footer-disclaimer {
  max-width: 36rem;
  line-height: 1.45;
}

/* ——— Utilities ——— */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@media (max-width: 480px) {
  .brand-sub {
    display: none;
  }

  .nav a {
    padding: 0.35rem 0.65rem;
    font-size: 0.85rem;
  }

  .card-actions {
    width: 100%;
    margin-left: 0;
  }

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