/* Session 44 — shared styling for the public Nombara site (landing page +
   doctor directory + practitioner detail).

   Tokens are the Nombara design tokens: pine, green, amber, paper. Display
   type and every number is Sora; body copy is Manrope. Both are loaded from
   Google Fonts with a full system fallback stack, so a blocked/slow font
   host degrades to a readable page rather than an invisible one. */

:root {
  --pine:        #0F3A2E;
  --green:       #1F8F5F;
  --green-soft:  #E6F3EC;
  --amber:       #E8A13A;
  --amber-soft:  #FCF2E0;
  --paper:       #FBFCFB;
  --card:        #FFFFFF;
  --ink:         #12241E;
  --mute:        #69796F;
  --line:        #E3E9E4;
  --line-strong: #CDD8D1;
  --red:         #B3261E;
  --radius:      14px;
  --radius-sm:   10px;
  --max:         68rem;
  --shadow:      0 1px 2px rgba(15, 58, 46, .05), 0 8px 24px rgba(15, 58, 46, .05);

  --display: "Sora", ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --body: "Manrope", ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  font-family: var(--body);
  font-size: 16px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, .num { font-family: var(--display); letter-spacing: -0.015em; }
h1 { font-size: 1.9rem; line-height: 1.2; margin: 0 0 .4rem; }
h2 { font-size: 1.25rem; margin: 2rem 0 .6rem; }
h3 { font-size: 1rem; margin: 0 0 .2rem; }

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

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 1.15rem; }
.wrap--narrow { max-width: 46rem; }

/* ---------------------------------------------------------------- header */

header.site {
  background: var(--card);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 20;
}

header.site .wrap {
  display: flex;
  align-items: center;
  gap: 1rem;
  min-height: 60px;
  flex-wrap: wrap;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  font-family: var(--display);
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--ink);
  text-decoration: none;
}

.brand .mark {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: var(--green);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  font-weight: 700;
  line-height: 1;
}

header.site nav {
  margin-left: auto;
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  font-size: .92rem;
}

header.site nav a { color: var(--mute); text-decoration: none; }
header.site nav a:hover,
header.site nav a[aria-current="page"] { color: var(--green); }

/* ------------------------------------------------------------------ hero */

.hero {
  background: var(--pine);
  color: #fff;
  padding: 2.6rem 0 2.2rem;
}

.hero h1 { color: #fff; font-size: 2.1rem; }
.hero p { color: #C8DCD3; margin: .3rem 0 0; max-width: 34rem; }
.hero .count { color: var(--amber); font-weight: 700; }

/* --------------------------------------------------------------- toolbar */

.toolbar {
  background: var(--card);
  border-bottom: 1px solid var(--line);
  padding: .9rem 0;
  position: sticky;
  top: 60px;
  z-index: 15;
}

.toolbar .row { display: flex; gap: .6rem; flex-wrap: wrap; align-items: center; }
.toolbar .row + .row { margin-top: .6rem; }

.field {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  background: var(--paper);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  padding: .4rem .6rem;
  font-size: .92rem;
  min-height: 40px;
}

.field input,
.field select {
  border: 0;
  background: transparent;
  font: inherit;
  color: inherit;
  outline: none;
  min-width: 0;
}

.field--search { flex: 1 1 16rem; }
.field--search input { flex: 1; }

.chip {
  border: 1px solid var(--line-strong);
  background: var(--card);
  color: var(--ink);
  border-radius: 999px;
  padding: .38rem .85rem;
  font: inherit;
  font-size: .88rem;
  cursor: pointer;
  white-space: nowrap;
}

.chip[aria-pressed="true"] {
  background: var(--green-soft);
  border-color: var(--green);
  color: var(--pine);
  font-weight: 700;
}

.chip .n { color: var(--mute); font-family: var(--display); font-size: .8rem; }
.chip[aria-pressed="true"] .n { color: var(--green); }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .4rem;
  background: var(--pine);
  color: #fff;
  border: 1px solid var(--pine);
  text-decoration: none;
  padding: .6rem 1rem;
  border-radius: var(--radius-sm);
  font: inherit;
  font-weight: 700;
  font-size: .92rem;
  cursor: pointer;
  min-height: 40px;
}

.btn--green { background: var(--green); border-color: var(--green); }
.btn--ghost { background: transparent; color: var(--ink); border-color: var(--line-strong); }
.btn--ghost:hover { border-color: var(--green); color: var(--green); }
.btn--block { width: 100%; }

.status-line {
  color: var(--mute);
  font-size: .88rem;
  margin: .9rem 0 .2rem;
  display: flex;
  gap: .5rem;
  align-items: baseline;
  flex-wrap: wrap;
}

.status-line strong { color: var(--ink); font-family: var(--display); }

/* ----------------------------------------------------------------- cards */

.grid {
  list-style: none;
  margin: 1rem 0 0;
  padding: 0;
  display: grid;
  gap: .9rem;
  grid-template-columns: repeat(auto-fill, minmax(19rem, 1fr));
}

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1rem;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  gap: .75rem;
}

.card__head { display: flex; gap: .8rem; align-items: flex-start; }

.avatar {
  width: 56px;
  height: 56px;
  flex: 0 0 56px;
  border-radius: 14px;
  object-fit: cover;
  background: var(--green-soft);
  color: var(--pine);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--display);
  font-weight: 700;
  font-size: 1.1rem;
  letter-spacing: .02em;
  overflow: hidden;
}

.card__name { font-size: 1.02rem; margin: 0; }
.card__name a { color: var(--ink); text-decoration: none; }
.card__name a:hover { color: var(--green); text-decoration: underline; }

.card__sub { color: var(--mute); font-size: .88rem; margin: .1rem 0 0; }

.tag {
  display: inline-block;
  background: var(--green-soft);
  color: var(--pine);
  border-radius: 999px;
  padding: .1rem .55rem;
  font-size: .74rem;
  font-weight: 700;
  letter-spacing: .02em;
  text-transform: uppercase;
  vertical-align: 1px;
}

.card__meta {
  display: flex;
  flex-direction: column;
  gap: .3rem;
  font-size: .9rem;
  color: var(--mute);
}

.card__meta .where { color: var(--ink); }
.card__meta .dist,
.card__meta .when { font-family: var(--display); }
.card__meta .when { color: var(--pine); font-weight: 600; }
.card__meta .when--none { color: var(--mute); font-weight: 400; font-family: var(--body); }

.rating { color: var(--amber); font-weight: 700; font-family: var(--display); }
.rating .of { color: var(--mute); font-weight: 400; font-family: var(--body); font-size: .84rem; }

.card__actions { display: flex; gap: .5rem; margin-top: auto; }
.card__actions .btn { flex: 1; }

.more-link { font-size: .84rem; }

/* ---------------------------------------------------------------- states */

.skeleton {
  background: linear-gradient(90deg, #EFF3F0 25%, #F7FAF8 50%, #EFF3F0 75%);
  background-size: 400% 100%;
  animation: shimmer 1.4s ease infinite;
  border-radius: 6px;
  color: transparent;
}

@keyframes shimmer {
  0% { background-position: 100% 0; }
  100% { background-position: 0 0; }
}

@media (prefers-reduced-motion: reduce) {
  .skeleton { animation: none; }
  html { scroll-behavior: auto; }
}

.notice {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.6rem 1.3rem;
  text-align: center;
  margin: 1.2rem 0;
}

.notice h2 { margin: 0 0 .3rem; font-size: 1.1rem; }
.notice p { color: var(--mute); margin: 0 0 1rem; }
.notice--error { border-color: #E9C9C6; background: #FDF6F5; }
.notice--error h2 { color: var(--red); }
.notice .actions { display: flex; gap: .5rem; justify-content: center; flex-wrap: wrap; }

.callout {
  background: var(--amber-soft);
  border: 1px solid #F0DCB8;
  border-radius: var(--radius);
  padding: .85rem 1rem;
  font-size: .9rem;
  margin: 1rem 0;
}

.callout p { margin: 0; }

/* --------------------------------------------------------------- profile */

.profile__head { display: flex; gap: 1.1rem; align-items: flex-start; flex-wrap: wrap; }
.profile .avatar { width: 88px; height: 88px; flex-basis: 88px; font-size: 1.7rem; border-radius: 18px; }
.profile__bio { margin: 1rem 0 0; max-width: 40rem; }

.loc {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1rem;
  margin: .8rem 0;
}

.loc h3 { margin: 0; }
.loc .town { color: var(--mute); font-size: .9rem; }
.loc .weekly { color: var(--mute); font-size: .88rem; margin: .5rem 0 .8rem; }
.loc .weekly span { white-space: nowrap; }
.loc .weekly span + span::before { content: " · "; }

/* ---------------------------------------------------------------- footer */

footer.site {
  border-top: 1px solid var(--line);
  margin-top: 3rem;
  color: var(--mute);
  font-size: .88rem;
  background: var(--card);
}

footer.site .wrap { padding-top: 1.4rem; padding-bottom: 2.4rem; }
footer.site nav { display: flex; gap: 1rem; flex-wrap: wrap; margin-bottom: .6rem; }
footer.site a { color: var(--mute); }

.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;
}

:focus-visible { outline: 3px solid var(--amber); outline-offset: 2px; }

@media (max-width: 560px) {
  .hero { padding: 1.8rem 0 1.5rem; }
  .hero h1 { font-size: 1.6rem; }
  .toolbar { position: static; }
  header.site { position: static; }
}

.more-slot { text-align: center; margin: 1.4rem 0 0; }
.btn--spaced { margin-top: .8rem; }
