/* ==========================================================================
   Dr. Michael Hoffmann, MD PhD — drmichaelhoffmann.com
   Theme: "The Descent" — sunlit water to open ocean
   ========================================================================== */

:root {
  /* Color — ocean depth scale */
  --foam:     #F3FAF8;
  --seaglass: #DDF1EC;
  --shallows: #C4E6E0;
  --aqua:     #2EC4B6;
  --kelp:     #0FA36B;
  --kelp-dk:  #0B7E52;
  --ocean:    #0E7FA0;
  --deep:     #07425E;
  --abyss:    #032536;
  --ink:      #0B2B3A;
  --ink-soft: #3D5A68;
  --line:     #B8DAD3;

  /* Type */
  --display: "Bricolage Grotesque", "Segoe UI", sans-serif;
  --body:    "Source Serif 4", Georgia, serif;
  --mono:    "IBM Plex Mono", Consolas, monospace;

  --wrap: 1140px;
  --radius: 14px;
  --shadow: 0 10px 30px rgba(3, 37, 54, .12);
}

/* ---------- Base ---------- */

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

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--body);
  font-size: 1.06rem;
  line-height: 1.65;
  color: var(--ink);
  background: var(--foam);
}

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

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

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

h1 { font-size: clamp(2.4rem, 5.5vw, 4.1rem); font-weight: 700; }
h2 { font-size: clamp(1.7rem, 3.2vw, 2.5rem); font-weight: 650; }
h3 { font-size: 1.22rem; font-weight: 600; }

p { margin: 0 0 1em; }

:focus-visible {
  outline: 3px solid var(--aqua);
  outline-offset: 3px;
  border-radius: 4px;
}

.wrap {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 24px;
}

.skip-link {
  position: absolute;
  left: -999px;
  top: 8px;
  z-index: 99;
  background: var(--abyss);
  color: #fff;
  padding: .6em 1em;
  border-radius: 8px;
}
.skip-link:focus { left: 8px; }

/* Mono eyebrow — credential/label voice */
.eyebrow {
  font-family: var(--mono);
  font-size: .78rem;
  font-weight: 500;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--kelp);
  margin: 0 0 1em;
}
.on-dark .eyebrow, .eyebrow.on-dark { color: var(--aqua); }

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

.btn {
  display: inline-block;
  font-family: var(--display);
  font-weight: 600;
  font-size: 1rem;
  text-decoration: none;
  padding: .85em 1.7em;
  border-radius: 999px;
  border: 2px solid transparent;
  transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
}
.btn:hover { transform: translateY(-2px); }

.btn-solid {
  background: var(--kelp);
  color: #fff;
  box-shadow: 0 6px 18px rgba(15, 163, 107, .35);
}
.btn-solid:hover { background: var(--kelp-dk); }

.btn-ghost {
  border-color: rgba(255, 255, 255, .65);
  color: #fff;
}
.btn-ghost:hover { background: rgba(255, 255, 255, .12); }

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

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(3, 37, 54, .88);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(46, 196, 182, .25);
}

.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 64px;
}

.brand {
  font-family: var(--display);
  font-weight: 700;
  font-size: 1.1rem;
  letter-spacing: -.01em;
  color: #fff;
  text-decoration: none;
  white-space: nowrap;
}
.brand span {
  font-family: var(--mono);
  font-weight: 400;
  font-size: .8rem;
  color: var(--aqua);
  margin-left: .45em;
  letter-spacing: .04em;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 14px;
}

.header-actions .btn {
  padding: .55em 1.3em;
  font-size: .92rem;
}

.icon-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  color: #fff;
  background: rgba(255, 255, 255, .1);
  transition: background .15s ease;
}
.icon-link:hover { background: rgba(46, 196, 182, .35); }
.icon-link svg { width: 18px; height: 18px; fill: currentColor; }

/* ---------- Hero (home) ---------- */

.hero {
  position: relative;
  background:
    linear-gradient(175deg, rgba(3, 37, 54, .82) 0%, rgba(7, 66, 94, .72) 55%, rgba(14, 127, 160, .55) 100%),
    url("../images/hero-waves.png") center 30% / cover no-repeat;
  color: #fff;
  overflow: hidden;
}

.hero-inner {
  padding: clamp(90px, 14vh, 160px) 0 clamp(140px, 18vh, 200px);
  max-width: 780px;
}

.hero h1 { color: #fff; margin-bottom: .35em; }

.hero .lede {
  font-size: clamp(1.08rem, 1.6vw, 1.28rem);
  color: rgba(243, 250, 248, .92);
  max-width: 620px;
  margin-bottom: 2em;
}

.hero-ctas { display: flex; flex-wrap: wrap; gap: 16px; }

/* Drifting wave layers at hero base */
.hero-waves {
  position: absolute;
  left: 0; right: 0; bottom: -2px;
  height: 110px;
  pointer-events: none;
}
.hero-waves svg {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 200%;
  height: 100%;
}
.hero-waves .w1 { animation: drift 26s linear infinite; opacity: .5; }
.hero-waves .w2 { animation: drift 17s linear infinite reverse; opacity: .7; }
.hero-waves .w3 { animation: drift 11s linear infinite; }

@keyframes drift {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

/* ---------- Section scaffolding: the descent ---------- */

.section { padding: 72px 0; }

.depth-0 { background: var(--foam); }
.depth-1 { background: var(--seaglass); }
.depth-2 { background: linear-gradient(180deg, var(--seaglass), var(--shallows)); }
.depth-3 { background: var(--deep); color: #E8F5F2; }
.depth-4 { background: linear-gradient(180deg, var(--deep), var(--abyss)); color: #E8F5F2; }

.depth-3 h2, .depth-4 h2 { color: #fff; }
.depth-3 a:not(.btn), .depth-4 a:not(.btn) { color: var(--aqua); }

/* Wave divider between depths */
.divider { display: block; width: 100%; height: 60px; margin-bottom: -1px; }

.section-head { max-width: 640px; margin-bottom: 42px; }
.section-head p { color: var(--ink-soft); }
.depth-3 .section-head p, .depth-4 .section-head p { color: rgba(232, 245, 242, .8); }

/* ---------- Announcement ribbon ---------- */

.announce {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 40px;
  align-items: center;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 32px 40px;
  box-shadow: var(--shadow);
}

.announce img {
  border-radius: 10px;
  box-shadow: 0 8px 24px rgba(3, 37, 54, .18);
}

.announce h2 { font-size: 1.6rem; }
.announce .actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 6px; }

/* ---------- Explore grid (homepage buttons) ---------- */

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

.card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px;
  text-decoration: none;
  color: var(--ink);
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
  border-color: var(--aqua);
}

.card .card-icon {
  width: 46px;
  height: 46px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, var(--aqua), var(--ocean));
  color: #fff;
  margin-bottom: 6px;
}
.card .card-icon svg { width: 24px; height: 24px; stroke: currentColor; fill: none; stroke-width: 1.8; }

.card h3 { margin: 0; }
.card p { margin: 0; font-size: .95rem; color: var(--ink-soft); flex-grow: 1; }

.card .go {
  font-family: var(--mono);
  font-size: .8rem;
  letter-spacing: .08em;
  color: var(--kelp);
}

/* ---------- Credentials band ---------- */

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

.cred {
  border-left: 2px solid var(--aqua);
  padding-left: 18px;
}
.cred .big {
  font-family: var(--display);
  font-weight: 700;
  font-size: 1.5rem;
  color: #fff;
  line-height: 1.25;
}
.cred .label {
  font-family: var(--mono);
  font-size: .78rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--aqua);
  margin-top: .5em;
}

/* ---------- Books ---------- */

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

.book-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 26px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  transition: transform .18s ease, box-shadow .18s ease;
}
.book-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }

.book-card .cover {
  align-self: center;
  height: 300px;
}
.book-card .cover img {
  height: 100%;
  width: auto;
  border-radius: 6px;
  box-shadow: 0 10px 26px rgba(3, 37, 54, .25);
}

.book-card h3 { margin: 4px 0 0; }
.book-card .book-sub {
  font-style: italic;
  color: var(--ink-soft);
  font-size: .95rem;
  margin: 0;
}
.book-card p.blurb { font-size: .95rem; color: var(--ink-soft); flex-grow: 1; }
.book-card .btn { align-self: flex-start; }

.pub-note {
  font-family: var(--mono);
  font-size: .74rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--ocean);
  margin: 0;
}

/* ---------- Topic chips (home seminar preview) ---------- */

.chip-row { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 34px; }

.chip {
  font-family: var(--display);
  font-weight: 600;
  font-size: .95rem;
  color: #fff;
  text-decoration: none;
  background: rgba(46, 196, 182, .16);
  border: 1px solid rgba(46, 196, 182, .45);
  border-radius: 999px;
  padding: .55em 1.2em;
  transition: background .15s ease;
}
.chip:hover { background: rgba(46, 196, 182, .35); }

/* ---------- Seminar cards (seminars page) ---------- */

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

.seminar-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform .18s ease, box-shadow .18s ease;
}
.seminar-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }

.seminar-card img { height: 190px; width: 100%; object-fit: cover; }

.seminar-card .body {
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex-grow: 1;
}
.seminar-card p { font-size: .95rem; color: var(--ink-soft); margin: 0; flex-grow: 1; }
.seminar-card .btn { align-self: flex-start; margin-top: 4px; }

/* ---------- Page hero (subpages) ---------- */

.page-hero {
  background: linear-gradient(170deg, var(--abyss) 0%, var(--deep) 70%, var(--ocean) 130%);
  color: #fff;
  padding: 70px 0 80px;
  position: relative;
  overflow: hidden;
}
.page-hero h1 { color: #fff; font-size: clamp(2rem, 4.2vw, 3.1rem); }
.page-hero .lede {
  font-size: 1.15rem;
  color: rgba(243, 250, 248, .88);
  max-width: 640px;
}

/* ---------- About layout ---------- */

.about-intro {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 56px;
  align-items: start;
}

.portrait-frame {
  position: relative;
}
.portrait-frame img {
  border-radius: var(--radius);
  box-shadow: 0 16px 40px rgba(3, 37, 54, .35);
}
.portrait-frame::after {
  content: "";
  position: absolute;
  inset: 14px -14px -14px 14px;
  border: 2px solid var(--aqua);
  border-radius: var(--radius);
  z-index: -1;
}

.fact-list { list-style: none; margin: 0; padding: 0; }
.fact-list li {
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}
.fact-list li strong { font-family: var(--display); font-weight: 600; }
.depth-3 .fact-list li, .depth-4 .fact-list li { border-color: rgba(46, 196, 182, .25); }

.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
}

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

.contact-layout {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 56px;
  align-items: start;
}

.contact-form {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 36px;
  box-shadow: var(--shadow);
}

.field { margin-bottom: 20px; }

.field label {
  display: block;
  font-family: var(--display);
  font-weight: 600;
  font-size: .92rem;
  margin-bottom: 6px;
}

.field input,
.field select,
.field textarea {
  width: 100%;
  font-family: var(--body);
  font-size: 1rem;
  color: var(--ink);
  background: var(--foam);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: .7em .9em;
}
.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: 3px solid var(--aqua);
  outline-offset: 1px;
  border-color: var(--aqua);
}

.contact-form button {
  cursor: pointer;
  border: none;
  width: 100%;
}

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

.site-footer {
  background: var(--abyss);
  color: rgba(232, 245, 242, .78);
  padding: 64px 0 40px;
  font-size: .95rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 48px;
  margin-bottom: 44px;
}

.site-footer h3 {
  color: #fff;
  font-size: 1rem;
  letter-spacing: .02em;
  margin-bottom: .9em;
}

.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin-bottom: .55em; }
.site-footer a { color: rgba(232, 245, 242, .78); text-decoration: none; }
.site-footer a:hover { color: var(--aqua); }

.footer-brand {
  font-family: var(--display);
  font-weight: 700;
  font-size: 1.25rem;
  color: #fff;
  margin-bottom: .4em;
}

.footer-bottom {
  border-top: 1px solid rgba(46, 196, 182, .2);
  padding-top: 22px;
  font-family: var(--mono);
  font-size: .75rem;
  letter-spacing: .06em;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
}

/* ---------- Responsive ---------- */

@media (max-width: 960px) {
  .card-grid, .book-row, .seminar-grid { grid-template-columns: repeat(2, 1fr); }
  .cred-grid { grid-template-columns: repeat(2, 1fr); gap: 34px; }
  .about-intro, .contact-layout, .two-col { grid-template-columns: 1fr; }
  .portrait-frame { max-width: 340px; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 640px) {
  .card-grid, .book-row, .seminar-grid { grid-template-columns: 1fr; }
  .announce { grid-template-columns: 1fr; padding: 28px; }
  .announce img { max-width: 200px; }
  .cred-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .brand span { display: none; }
  .section { padding: 56px 0; }
}

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

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .hero-waves .w1, .hero-waves .w2, .hero-waves .w3 { animation: none; }
  .btn, .card, .book-card, .seminar-card { transition: none; }
}
