/* DoctorTim.net -------------------------------------------------------
   Tim Sharpe, DACM, LAc
   Palette sampled directly from the DoctorTim mark.
   -------------------------------------------------------------------- */

:root {
  --navy:    #041e46;
  --navy-2:  #0a2c60;
  --azure:   #00a6fd;
  --blue:    #005cbc;
  --ice:     #eaf4fe;
  --fog:     #f5f8fb;
  --paper:   #ffffff;
  --slate:   #57677e;
  --line:    #dce5ef;

  --display: "Outfit", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --body:    "Source Serif 4", Georgia, "Times New Roman", serif;

  --measure: 68ch;
  --gutter: clamp(1.25rem, 5vw, 3rem);
  --shadow: 0 1px 2px rgba(4,30,70,.05), 0 12px 34px -12px rgba(4,30,70,.18);
  --shadow-lift: 0 2px 4px rgba(4,30,70,.06), 0 20px 44px -14px rgba(4,30,70,.26);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--paper);
  color: #16233a;
  font-family: var(--body);
  font-size: 1.0625rem;
  line-height: 1.7;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

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

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

a { color: var(--blue); text-underline-offset: .18em; text-decoration-thickness: 1px; }
a:hover { color: var(--azure); }
a:focus-visible { outline: 3px solid var(--azure); outline-offset: 3px; border-radius: 3px; }

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  background: rgba(255,255,255,.94);
  backdrop-filter: saturate(1.6) blur(10px);
  border-bottom: 1px solid var(--line);
}

.site-header__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: .5rem 2rem;
  padding-block: .25rem;
}

.brand { display: inline-flex; line-height: 0; }
.brand img { height: 3.3rem; width: auto; }

.site-nav {
  display: flex;
  flex-wrap: wrap;
  gap: .25rem 1.85rem;
  font-family: var(--display);
  font-size: .875rem;
  font-weight: 500;
  letter-spacing: .005em;
}

.site-nav a {
  color: var(--slate);
  text-decoration: none;
  padding-block: .3rem;
  border-bottom: 2px solid transparent;
}

.site-nav a:hover { color: var(--navy); }
.site-nav a[aria-current="page"] { color: var(--navy); border-bottom-color: var(--azure); }

/* --- Shared type ----------------------------------------------------- */

.eyebrow {
  display: flex;
  align-items: center;
  gap: .65rem;
  margin: 0 0 1.1rem;
  font-family: var(--display);
  font-size: .74rem;
  font-weight: 600;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--azure);
}

.eyebrow::before {
  content: "";
  width: 1.6rem;
  height: 2px;
  flex: none;
  background: var(--azure);
}

.eyebrow--dark { color: var(--blue); }
.eyebrow--dark::before { background: var(--blue); }

h1, h2, h3 { font-family: var(--display); letter-spacing: -.025em; line-height: 1.12; }

.section-title { margin: 0 0 1.5rem; font-size: clamp(1.6rem, 3.4vw, 2.2rem); font-weight: 600; }

.prose { max-width: var(--measure); }
.prose p { margin: 0 0 1.2rem; }
.prose p:last-child { margin-bottom: 0; }
.prose h3 {
  margin: 2.8rem 0 .75rem;
  font-size: 1.22rem;
  font-weight: 600;
  color: var(--navy);
  line-height: 1.3;
}
.prose h3:first-child { margin-top: 0; }
.prose ul { margin: 0 0 1.2rem; padding-left: 0; list-style: none; }
.prose ul li { position: relative; padding-left: 1.5rem; margin-bottom: .5rem; }
.prose ul li::before {
  content: "";
  position: absolute;
  left: 0; top: .72em;
  width: .48rem; height: .48rem;
  background: var(--azure);
  transform: rotate(45deg);
}

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

.hero {
  position: relative;
  overflow: hidden;
  background: linear-gradient(140deg, var(--navy) 0%, var(--navy) 42%, var(--navy-2) 100%);
  color: #eaf1fb;
  padding-block: clamp(3.75rem, 9vw, 6.5rem) clamp(6rem, 11vw, 9rem);
}

.hero__art {
  position: absolute;
  top: 50%;
  right: -6%;
  width: min(46rem, 78%);
  transform: translateY(-50%);
  opacity: .5;
  pointer-events: none;
}

.hero__inner { position: relative; z-index: 1; }
.hero__text { max-width: 48rem; }

.hero__title {
  margin: 0;
  font-size: clamp(2.05rem, 5.1vw, 3.35rem);
  font-weight: 600;
  color: #fff;
  text-wrap: balance;
}

.hero__title span { color: var(--azure); white-space: nowrap; }

.hero__lede {
  max-width: 36rem;
  margin: 1.5rem 0 0;
  font-size: clamp(1.08rem, 2.1vw, 1.28rem);
  line-height: 1.6;
  color: #c3d5ee;
}

/* --- Credential card (overlaps the hero) ----------------------------- */

.credentials { position: relative; z-index: 5; margin-top: clamp(-5rem, -7vw, -3.5rem); }

.credentials__card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 4px;
  box-shadow: var(--shadow);
  padding: clamp(1.5rem, 3vw, 2.25rem);
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr));
  gap: clamp(1.25rem, 2.5vw, 2rem);
}

.cred dt {
  font-family: var(--display);
  font-size: .7rem;
  font-weight: 600;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--azure);
  margin-bottom: .45rem;
}

.cred dd {
  margin: 0;
  font-family: var(--display);
  font-size: .96rem;
  font-weight: 400;
  line-height: 1.45;
  color: var(--navy);
}

.cred dd small { display: block; font-size: .85em; color: var(--slate); margin-top: .15rem; }

/* --- Bands ----------------------------------------------------------- */

.band { padding-block: clamp(3.25rem, 7vw, 5.5rem); }
.band--fog { background: var(--fog); border-block: 1px solid var(--line); }
.band--ice { background: var(--ice); }
.band--top { padding-top: clamp(2.5rem, 5vw, 4rem); }

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

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(19rem, 1fr));
  gap: clamp(1.25rem, 2.5vw, 1.75rem);
}

.card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-top: 3px solid var(--azure);
  border-radius: 4px;
  padding: clamp(1.6rem, 3vw, 2.25rem);
  box-shadow: var(--shadow);
  transition: transform .25s ease, box-shadow .25s ease;
}

.card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lift); }
.card__title { margin: 0 0 .85rem; font-size: 1.32rem; font-weight: 600; color: var(--navy); }
.card p { margin: 0 0 1.35rem; font-size: 1.02rem; }

.card__link {
  font-family: var(--display);
  font-size: .875rem;
  font-weight: 500;
  text-decoration: none;
  color: var(--blue);
}

.card__link::after { content: " \2192"; }
.card:hover .card__link { color: var(--azure); }

/* --- Quote ----------------------------------------------------------- */

.quote { max-width: 48rem; margin: 0; }

.quote p {
  margin: 0;
  font-size: clamp(1.28rem, 3vw, 1.72rem);
  line-height: 1.42;
  font-weight: 400;
  color: var(--navy);
}

.quote footer {
  margin-top: 1.35rem;
  font-family: var(--display);
  font-size: .84rem;
  font-weight: 500;
  color: var(--slate);
}

/* --- Interior page header -------------------------------------------- */

.page-hero {
  position: relative;
  overflow: hidden;
  background: linear-gradient(140deg, var(--navy) 0%, var(--navy) 48%, var(--navy-2) 100%);
  color: #eaf1fb;
  padding-block: clamp(2.75rem, 6vw, 4.5rem);
}

.page-hero__art {
  position: absolute;
  top: 50%; right: -8%;
  width: min(34rem, 62%);
  transform: translateY(-50%);
  opacity: .38;
  pointer-events: none;
}

.page-hero__inner { position: relative; z-index: 1; }

.page-hero__title {
  margin: 0;
  font-size: clamp(1.95rem, 5vw, 3rem);
  font-weight: 600;
  color: #fff;
  max-width: 22ch;
}

.page-hero__standfirst {
  max-width: 44rem;
  margin: 1.1rem 0 0;
  font-size: clamp(1.02rem, 2vw, 1.16rem);
  color: #c3d5ee;
}

/* --- Article layout with sticky contents ----------------------------- */

.layout { display: grid; gap: clamp(2rem, 4vw, 3.5rem); }

@media (min-width: 62rem) {
  .layout { grid-template-columns: 15rem minmax(0, 1fr); }
  .toc { position: sticky; top: 5.5rem; align-self: start; }
}

.toc {
  border-left: 2px solid var(--line);
  padding-left: 1.15rem;
}

.toc__label {
  margin: 0 0 .8rem;
  font-family: var(--display);
  font-size: .7rem;
  font-weight: 600;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--slate);
}

.toc ol {
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: toc;
  font-family: var(--display);
  font-size: .875rem;
  line-height: 1.4;
}

.toc li { counter-increment: toc; margin-bottom: .6rem; }
.toc a { color: var(--slate); text-decoration: none; }
.toc a:hover { color: var(--blue); }
.toc a::before { content: counter(toc, decimal-leading-zero) "  "; color: var(--azure); font-weight: 600; }

/* --- Callouts and notes ---------------------------------------------- */

.note {
  max-width: var(--measure);
  margin-top: 3rem;
  padding: 1.15rem 1.35rem;
  background: var(--fog);
  border-left: 3px solid var(--azure);
  border-radius: 0 4px 4px 0;
  font-size: .95rem;
  color: var(--slate);
}

.note p { margin: 0; }

/* --- Contact --------------------------------------------------------- */

.mail-link {
  display: inline-block;
  margin-top: .35rem;
  font-family: var(--display);
  font-size: clamp(1.2rem, 3.2vw, 1.7rem);
  font-weight: 500;
  color: #fff;
  text-decoration: none;
  border-bottom: 2px solid rgba(0,166,253,.65);
  padding-bottom: .2rem;
}

.mail-link:hover { color: var(--azure); border-bottom-color: var(--azure); }

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

.site-footer {
  background: var(--navy);
  color: #b9cbe4;
  padding-block: 3rem 2.25rem;
  font-size: .95rem;
}

.site-footer__top {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1.75rem 3rem;
}

.site-footer img { height: 3rem; width: auto; }
.site-footer__col { max-width: 28rem; }
.site-footer p { margin: 0 0 .35rem; }
.site-footer a { color: #eaf1fb; }
.site-footer a:hover { color: var(--azure); }

.site-footer__name {
  font-family: var(--display);
  font-size: 1.02rem;
  font-weight: 600;
  color: #fff;
}

.site-footer__legal {
  margin-top: 2.25rem;
  padding-top: 1.35rem;
  border-top: 1px solid rgba(255,255,255,.13);
  font-family: var(--display);
  font-size: .78rem;
  color: #7d94b4;
}

/* --- Motion ---------------------------------------------------------- */

.rise { animation: rise .75s cubic-bezier(.22,.61,.36,1) both; }
.rise-2 { animation-delay: .1s; }
.rise-3 { animation-delay: .2s; }
.rise-4 { animation-delay: .32s; }

@keyframes rise {
  from { opacity: 0; transform: translateY(.85rem); }
  to   { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .rise { animation: none; }
  .card { transition: none; }
  .card:hover { transform: none; }
}

@media (max-width: 40rem) {
  .hero__art { opacity: .28; right: -22%; width: 120%; }
  .page-hero__art { opacity: .22; right: -20%; width: 90%; }
}
