/* Dr. K N Thakur — static site styles
   Fonts: Newsreader (headings) and Source Sans 3 (body), both SIL Open Font License, self-hosted. */

@font-face {
  font-family: "Newsreader";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../fonts/newsreader-latin-400-normal.woff2") format("woff2");
}
@font-face {
  font-family: "Newsreader";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("../fonts/newsreader-latin-500-normal.woff2") format("woff2");
}
@font-face {
  font-family: "Source Sans 3";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../fonts/source-sans-3-latin-400-normal.woff2") format("woff2");
}
@font-face {
  font-family: "Source Sans 3";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("../fonts/source-sans-3-latin-600-normal.woff2") format("woff2");
}

:root {
  --ivory: #fbf8f2;
  --ivory-deep: #eef2ea;
  --sand: #e8dfcc;
  --sand-line: #dcd3bf;
  --sand-text: #76613f;
  --ink: #2b4537;
  --ink-soft: #4d6457;
  --forest: #3e6a52;
  --forest-dark: #305841;
  --footer: #2f4b3d;
  --footer-soft: #e2e8de;
  --sage-wash: #dfe8dc;

  --serif: "Newsreader", "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  --sans: "Source Sans 3", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;

  --max: 70rem;
  --gutter: clamp(1.25rem, 4vw, 2.5rem);
  --measure: 38rem;
}

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

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

@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}

body {
  margin: 0;
  background: var(--ivory);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.7;
}

@media (min-width: 900px) {
  body {
    font-size: 1.125rem;
  }
}

h1,
h2,
h3,
h4 {
  margin: 0;
  color: var(--forest-dark);
  font-family: var(--serif);
  font-weight: 400;
  line-height: 1.15;
  letter-spacing: -0.005em;
  text-wrap: balance;
}

p {
  margin: 0 0 1em;
  text-wrap: pretty;
}

a {
  color: inherit;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
}

a:hover {
  text-decoration-thickness: 2px;
}

:focus-visible {
  outline: 3px solid var(--forest-dark);
  outline-offset: 3px;
}

.wrap {
  width: 100%;
  max-width: var(--max);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

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

.skip-link {
  position: absolute;
  left: var(--gutter);
  top: -5rem;
  z-index: 100;
  padding: 0.75rem 1rem;
  background: var(--ink);
  color: var(--ivory);
  font-weight: 600;
}

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

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 3.25rem;
  padding: 0.75rem 1.5rem;
  border: 2px solid var(--forest);
  border-radius: 6px;
  font: 600 1.0625rem/1.2 var(--sans);
  text-align: center;
  text-decoration: none;
  transition: background-color 0.15s ease, color 0.15s ease;
}

.btn-primary {
  background: var(--forest);
  color: var(--ivory);
}

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

.btn-secondary {
  background: transparent;
  color: var(--forest);
}

.btn-secondary:hover {
  background: var(--ivory-deep);
}

@media (prefers-reduced-motion: reduce) {
  .btn {
    transition: none;
  }
}

/* ---------- Header ---------- */

.site-header {
  background: var(--ivory);
  border-bottom: 1px solid var(--sand-line);
}

.header-inner {
  display: grid;
  gap: 0.125rem 1.5rem;
  align-items: center;
  padding-block: 0.75rem 0.25rem;
}

.identity {
  justify-self: start;
  display: inline-flex;
  flex-direction: column;
  justify-content: center;
  min-height: 44px;
  text-decoration: none;
}

.identity-name {
  font-family: var(--serif);
  font-size: 1.625rem;
  font-weight: 500;
  line-height: 1.1;
}

.identity-quals {
  color: var(--ink-soft);
  font-size: 0.9375rem;
  letter-spacing: 0.02em;
}

.main-nav ul {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin: 0;
  padding: 0;
  list-style: none;
}

.main-nav a {
  display: flex;
  align-items: center;
  min-height: 44px;
  font-weight: 600;
  text-decoration: none;
}

.main-nav a:hover {
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 0.35em;
}

.header-call {
  display: none;
}

@media (min-width: 560px) {
  .main-nav ul {
    display: flex;
    flex-wrap: wrap;
    gap: 0 1.75rem;
  }
}

/* Tablet: identity and call button share the first row, navigation sits below */
@media (min-width: 720px) and (max-width: 899px) {
  .header-inner {
    grid-template-columns: 1fr auto;
    grid-template-areas:
      "identity call"
      "nav nav";
  }

  .identity {
    grid-area: identity;
  }

  .main-nav {
    grid-area: nav;
  }

  .header-call {
    grid-area: call;
    display: inline-flex;
    min-height: 3rem;
    padding-inline: 1.25rem;
  }
}

@media (min-width: 900px) {
  .site-header {
    position: sticky;
    top: 0;
    z-index: 20;
  }

  .header-inner {
    grid-template-columns: auto 1fr auto;
    padding-block: 0.875rem;
  }

  .main-nav {
    justify-self: end;
  }

  .main-nav ul {
    flex-wrap: nowrap;
    gap: 0 2rem;
  }

  .header-call {
    display: inline-flex;
    min-height: 3rem;
    padding-inline: 1.25rem;
  }
}

/* ---------- Hero ---------- */

.hero {
  padding-block: clamp(2rem, 6vw, 4.5rem) clamp(3.5rem, 8vw, 6rem);
}

.hero-inner {
  display: grid;
  gap: 3rem;
  align-items: center;
}

.hero h1 {
  font-size: clamp(2.125rem, 1.45rem + 3vw, 3.5rem);
  line-height: 1.08;
}

.lead {
  max-width: 34rem;
  margin: 1.5rem 0 0;
  font-size: clamp(1.125rem, 1.05rem + 0.4vw, 1.3rem);
  line-height: 1.55;
}

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

.hero-actions .btn {
  flex: 1 1 13rem;
}

@media (min-width: 560px) {
  .hero-actions .btn {
    flex: 0 0 auto;
  }
}

.text-link {
  display: inline-flex;
  align-items: center;
  min-height: 3.25rem;
  padding-inline: 0.25rem;
  color: var(--forest);
  font-weight: 600;
}

.hero-actions .text-link {
  flex: 0 0 auto;
}

.hero-phone {
  margin: 1.5rem 0 0;
  color: var(--ink-soft);
}

.hero-phone a {
  display: inline-block;
  margin-right: 1rem;
  padding-block: 0.4rem;
  color: var(--ink);
  font-size: 1.25rem;
  font-weight: 600;
}

.portrait {
  position: relative;
  isolation: isolate;
  margin: 0 1rem 1rem 0;
  max-width: 27rem;
}

.portrait::before {
  content: "";
  position: absolute;
  inset: 1rem -1rem -1rem 1rem;
  z-index: -1;
  background: var(--sage-wash);
  border-radius: 6px;
}

.portrait img {
  border-radius: 6px;
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 5 / 6;
  object-fit: cover;
  object-position: 50% 0;
}

@media (min-width: 900px) {
  .hero-inner {
    grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
    gap: clamp(3rem, 6vw, 5.5rem);
  }

  .portrait {
    justify-self: end;
    width: 100%;
    margin-right: 1.25rem;
  }
}

/* ---------- Sections ---------- */

.section {
  padding-block: clamp(3rem, 7vw, 5.5rem);
}

.section-ruled {
  border-top: 1px solid var(--sand-line);
}

.section-tint {
  background: var(--ivory-deep);
  border-block: 1px solid #dfe6da;
}

.section-title {
  font-size: clamp(1.75rem, 1.3rem + 1.6vw, 2.5rem);
}

.split {
  display: grid;
  gap: 1.25rem 3rem;
}

@media (min-width: 900px) {
  .split {
    grid-template-columns: minmax(0, 1fr) minmax(0, 2fr);
  }
}

.prose p {
  max-width: var(--measure);
}

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

/* Anchor targets sit clear of the sticky header on large screens */
section[id] {
  scroll-margin-top: 1rem;
}

@media (min-width: 900px) {
  section[id] {
    scroll-margin-top: 4.5rem;
  }
}

/* ---------- Areas of care ---------- */

.care-list {
  display: grid;
  gap: 0 3rem;
  margin: 3rem 0 0;
  padding: 0;
  list-style: none;
  border-bottom: 1px solid var(--sand-line);
}

@media (min-width: 760px) {
  .care-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.care-list li {
  padding: 1.5rem 0 1.75rem;
  border-top: 1px solid var(--sand-line);
}

.care-list h3 {
  margin-bottom: 0.5rem;
  font-size: 1.4rem;
  font-weight: 500;
}

.care-list p {
  margin: 0;
  max-width: 34rem;
}

.care-note {
  margin-top: 2rem;
}

.care-note p {
  max-width: var(--measure);
  margin: 0;
  color: var(--ink-soft);
}

@media (max-width: 899px) {
  .care-note span {
    display: none;
  }
}

/* ---------- Experience and training ---------- */

.exp-grid {
  display: grid;
  gap: 3rem;
  margin-top: 2.5rem;
}

@media (min-width: 900px) {
  .exp-grid {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.55fr);
    gap: 4rem;
    align-items: start;
  }
}

.block-title {
  margin: 0 0 0.5rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--forest);
  font-family: var(--sans);
  font-size: 0.9375rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  line-height: 1.3;
  text-transform: uppercase;
  color: var(--sand-text);
}

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

.entry {
  padding: 1.25rem 0;
  border-top: 1px solid var(--sand-line);
}

.entry:first-child {
  border-top: 0;
}

.entry-date {
  margin: 0 0 0.25rem;
  color: var(--sand-text);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.entry h4 {
  font-size: 1.3rem;
  font-weight: 500;
}

.entry p {
  margin: 0;
}

.entry .where {
  margin-top: 0.15rem;
}

.entry .detail {
  margin-top: 0.4rem;
  color: var(--ink-soft);
}

/* Education: set in a framed panel, dates above the entry */
.education {
  padding: 1.5rem 1.5rem 0.75rem;
  background: var(--ivory);
  border: 1px solid var(--sand-line);
  border-radius: 6px;
}

/* Experience: open timeline, dates in their own column */
@media (min-width: 600px) {
  .timeline .entry {
    display: grid;
    grid-template-columns: 8.5rem minmax(0, 1fr);
    gap: 0 1.5rem;
  }

  .timeline .entry-date {
    margin: 0.2rem 0 0;
  }
}

/* ---------- Preparing for a consultation ---------- */

.intro {
  max-width: var(--measure);
}

.checklist {
  max-width: 40rem;
  margin: 1.5rem 0 0;
  padding: 0;
  list-style: none;
  border-bottom: 1px solid var(--sand-line);
}

.checklist li {
  position: relative;
  padding: 1rem 0 1rem 2rem;
  border-top: 1px solid var(--sand-line);
}

.checklist li::before {
  content: "";
  position: absolute;
  left: 0.25rem;
  top: 1.6rem;
  width: 0.6rem;
  height: 0.6rem;
  border-radius: 50%;
  background: var(--forest);
}

/* ---------- Appointments ---------- */

.statement {
  max-width: 34rem;
  margin-bottom: 2rem;
  font-family: var(--serif);
  font-size: clamp(1.375rem, 1.1rem + 1vw, 1.75rem);
  line-height: 1.35;
}

.contact {
  display: grid;
  gap: 1.25rem;
  margin: 0 0 2rem;
}

.contact dt {
  color: var(--sand-text);
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.contact dd {
  margin: 0;
  font-size: 1.25rem;
  overflow-wrap: anywhere;
}

.contact div > dd + dd {
  margin-top: 0.25rem;
}

.contact-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1rem;
}

.contact-actions .btn {
  flex: 1 1 13rem;
}

@media (min-width: 560px) {
  .contact-actions .btn {
    flex: 0 0 auto;
  }
}

.contact dd a {
  display: inline-block;
  padding-block: 0.4rem;
  font-weight: 600;
}

.book-note {
  max-width: 30rem;
  margin: 0.75rem 0 0;
  color: var(--ink-soft);
  font-size: 1rem;
}

.contact dd.book-note {
  margin-top: 0.25rem;
  font-size: 1rem;
}

/* ---------- Footer ---------- */

.site-footer {
  padding-block: 3rem 3.5rem;
  background: var(--footer);
  color: var(--ivory);
  font-size: 1.0625rem;
}

.footer-inner {
  display: grid;
  gap: 2rem 3rem;
}

@media (min-width: 760px) {
  .footer-inner {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .footer-note {
  color: var(--footer-soft);
  font-size: 1rem;
}

.notice {
    grid-column: 1 / -1;
  }
}

.site-footer p {
  margin: 0 0 0.4rem;
}

.footer-name {
  margin-bottom: 0.25rem;
  font-family: var(--serif);
  font-size: 1.625rem;
  line-height: 1.2;
}

.site-footer a {
  display: inline-block;
  padding-block: 0.5rem;
  color: var(--ivory);
}

.site-footer :focus-visible {
  outline-color: var(--ivory);
}

.footer-note {
  color: var(--footer-soft);
  font-size: 1rem;
}

.notice {
  max-width: 46rem;
  margin: 0;
  padding-top: 1.5rem;
  border-top: 1px solid #4a6656;
  color: var(--footer-soft);
}

/* ---------- Small mobile call button ---------- */

.call-fab {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 30;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
  padding: 0.5rem max(0.75rem, env(safe-area-inset-right)) max(0.5rem, env(safe-area-inset-bottom)) max(0.75rem, env(safe-area-inset-left));
  background: var(--ivory);
  border-top: 1px solid var(--sand-line);
}

.call-fab a {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  min-height: 3rem;
  padding: 0.5rem 1.125rem;
  border: 2px solid var(--forest);
  border-radius: 6px;
  background: var(--forest);
  color: var(--ivory);
  font-weight: 600;
  text-decoration: none;
  justify-content: center;
}

.call-fab a:hover {
  background: var(--forest-dark);
}

.call-fab .fab-book {
  background: var(--ivory);
  color: var(--forest);
}

.call-fab .fab-book:hover {
  background: var(--ivory-deep);
}

.call-fab.is-hidden {
  display: none;
}

@media (max-width: 719px) {
  body {
    padding-bottom: calc(4.25rem + env(safe-area-inset-bottom));
  }
}

@media (min-width: 720px) {
  .call-fab {
    display: none;
  }
}

/* ---------- Print ---------- */

@media print {
  .call-fab,
  .skip-link,
  .header-call,
  .main-nav {
    display: none;
  }

  .site-header {
    position: static;
  }

  body {
    background: #fff;
  }
}
