/* Neidell.com — static rebuild of the original Wix site */

:root {
  --black: #000;
  --white: #fff;
  --cream: #f0efdc;
  --blue: #1c6bff;
  --font-text: "Wix Madefor Text", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --font-display: "Wix Madefor Display", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --page-max: 1200px;
  --gutter: clamp(16px, 4vw, 40px);
}

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

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

body {
  margin: 0;
  background: var(--white);
  color: var(--black);
  font-family: var(--font-text);
  font-size: 16px;
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

main {
  flex: 1;
}

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

h1,
h2 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.2;
  margin: 0;
}

p {
  margin: 0 0 1.4em;
}

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

.container {
  width: 100%;
  max-width: var(--page-max);
  margin: 0 auto;
  padding-left: var(--gutter);
  padding-right: var(--gutter);
}

.site-footer {
  padding-block: 12px;
  text-align: center;
}

.site-footer hr {
  border: 0;
  border-top: 1px solid #bcbcbc;
  margin: 0 0 12px;
}

.skip-link {
  position: absolute;
  left: -9999px;
}

.skip-link:focus {
  left: 8px;
  top: 8px;
  z-index: 100;
  background: var(--white);
  padding: 8px 12px;
}

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

.site-header {
  background: var(--white);
  position: relative;
  z-index: 10;
}

.site-header .bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 64px;
  padding: 0 clamp(16px, 7vw, 90px) 0 20px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--black);
  text-decoration: none;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 40px;
  line-height: 1;
  letter-spacing: -0.01em;
}

.brand img {
  height: 34px;
  width: auto;
}

.site-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.site-nav > ul {
  display: flex;
  align-items: center;
  gap: 28px;
}

.site-nav a {
  color: var(--black);
  text-decoration: none;
  font-size: 16px;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  white-space: nowrap;
}

.site-nav a:hover,
.site-nav a[aria-current="page"] {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.has-submenu {
  position: relative;
}

.submenu {
  display: none;
  position: absolute;
  right: 0;
  top: 100%;
  min-width: 220px;
  padding: 12px 20px;
  background: var(--white);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.12);
}

.submenu li + li {
  margin-top: 8px;
}

.has-submenu:hover .submenu,
.has-submenu:focus-within .submenu {
  display: block;
}

.nav-toggle {
  display: none;
  background: none;
  border: 0;
  padding: 8px;
  cursor: pointer;
}

.nav-toggle span {
  display: block;
  width: 26px;
  height: 2px;
  background: var(--black);
}

.nav-toggle span + span {
  margin-top: 6px;
}

@media (max-width: 760px) {
  .site-header .bar {
    padding-right: 12px;
    padding-left: 12px;
  }

  .brand {
    font-size: 30px;
  }

  .brand img {
    height: 26px;
  }

  .nav-toggle {
    display: block;
  }

  .site-nav {
    display: none;
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    background: var(--white);
    padding: 8px 20px 24px;
    box-shadow: 0 12px 18px rgba(0, 0, 0, 0.12);
  }

  .site-nav.open {
    display: block;
  }

  .site-nav > ul {
    flex-direction: column;
    align-items: flex-start;
    gap: 14px;
  }

  .site-nav a {
    font-size: 18px;
  }

  .submenu {
    display: block;
    position: static;
    box-shadow: none;
    padding: 10px 0 0 18px;
    min-width: 0;
  }
}

/* ---------- Home ---------- */

.hero {
  background: #b9b7c9 url("../images/hero.jpg") center / cover no-repeat;
  min-height: clamp(280px, 45vw, 580px);
  padding: clamp(24px, 4vw, 50px) clamp(16px, 11.7vw, 150px);
}

.hero .wordmark {
  background: var(--white);
  width: clamp(200px, 30vw, 388px);
}

.dark {
  background: var(--black);
  color: var(--white);
  padding: clamp(48px, 7vw, 92px) 0 clamp(80px, 14vw, 200px);
}

.dark .mark {
  width: clamp(40px, 4.2vw, 52px);
  margin: 0 auto clamp(48px, 8vw, 96px);
}

.dark .lead {
  max-width: 1100px;
  margin: 0 auto;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(18px, 2.1vw, 25px);
  line-height: 1.45;
}

.dark .wordmark {
  width: clamp(180px, 22vw, 260px);
  margin: clamp(60px, 10vw, 150px) clamp(0px, 4vw, 60px) 0 auto;
}

/* ---------- Generic content pages ---------- */

.page {
  padding: clamp(24px, 4vw, 48px) 0 clamp(60px, 10vw, 140px);
}

.page-title {
  font-size: clamp(32px, 4.2vw, 44px);
  text-align: center;
  margin-bottom: clamp(28px, 5vw, 60px);
}

.cols {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(28px, 6vw, 90px);
  align-items: start;
}

.cols + .cols {
  margin-top: clamp(40px, 7vw, 90px);
}

.cols.middle {
  align-items: center;
}

figure {
  margin: 0;
}

figure img {
  margin: 0 auto;
}

.cols figure + p,
.cols p + figure {
  margin-top: clamp(24px, 4vw, 60px);
}

.page a {
  color: inherit;
  overflow-wrap: anywhere;
}

@media (max-width: 760px) {
  .cols {
    grid-template-columns: 1fr;
  }

  /* keep text before its figure when the columns stack */
  .cols .figure-first {
    order: 2;
  }
}

/* ---------- Licensing / About ---------- */

.wordmark-right {
  width: min(540px, 60%);
  margin-left: auto;
}

.licensing h1 {
  font-size: clamp(32px, 4.2vw, 44px);
  margin: 16px 0 clamp(24px, 4vw, 44px);
  padding-left: clamp(0px, 5vw, 60px);
}

.licensing .big {
  font-size: clamp(22px, 3.3vw, 40px);
  line-height: 1.55;
  max-width: 900px;
  margin-left: clamp(0px, 14vw, 170px);
}

.about h1 {
  font-size: clamp(24px, 3.4vw, 40px);
  margin-top: clamp(32px, 6vw, 80px);
  text-align: center;
}

/* ---------- Challenges (Medical page) ---------- */

.challenges {
  margin-top: clamp(48px, 9vw, 120px);
}

.challenges h2 {
  font-size: clamp(32px, 4.2vw, 44px);
  padding-left: clamp(0px, 6vw, 70px);
}

.challenges blockquote {
  margin: 0;
  font-style: italic;
  font-size: clamp(17px, 1.8vw, 20px);
}

.challenges .body {
  margin-top: clamp(28px, 5vw, 56px);
  padding: 0 clamp(0px, 5vw, 60px);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(18px, 2.3vw, 28px);
  line-height: 1.3;
}

/* ---------- Bio pages ---------- */

.bio {
  background: var(--blue);
  color: var(--white);
  padding: clamp(32px, 6vw, 80px) 0 clamp(24px, 4vw, 40px);
}

.bio .cols {
  grid-template-columns: auto minmax(0, 420px);
  justify-content: center;
  gap: clamp(24px, 6vw, 90px);
}

.bio .photo {
  width: min(456px, 100%);
}

.bio .photo.wide {
  aspect-ratio: 3 / 2;
  object-fit: cover;
  object-position: center 20%;
}

.bio .photo.small {
  width: min(294px, 100%);
}

.bio h1,
.bio h2 {
  font-size: clamp(28px, 3.6vw, 44px);
}

.bio a {
  color: var(--white);
  text-underline-offset: 4px;
}

.bio .mark {
  width: clamp(64px, 8vw, 104px);
  margin: 40px 0 0 clamp(20px, 7vw, 94px);
}

.bio .contact {
  margin-top: clamp(28px, 4vw, 44px);
  text-align: center;
  overflow-wrap: anywhere;
}

@media (max-width: 760px) {
  .bio .cols {
    grid-template-columns: 1fr;
    justify-items: center;
    text-align: center;
  }

  .bio .mark {
    margin: 24px auto 0;
  }
}

/* ---------- Lightbox (click a diagram to enlarge) ---------- */

.zoomable {
  cursor: zoom-in;
}

.zoomable:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 4px;
}

.lightbox {
  border: 0;
  padding: 0;
  margin: 0;
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  max-width: none;
  max-height: none;
  background: transparent;
}

.lightbox[open] {
  display: flex;
  align-items: center;
  justify-content: center;
}

.lightbox::backdrop {
  background: rgba(0, 0, 0, 0.82);
}

.lightbox img {
  width: min(94vw, 1400px);
  height: auto;
  max-height: 90vh;
  max-height: 90dvh;
  object-fit: contain;
  background: var(--white);
  cursor: default;
}

.lightbox-close {
  position: fixed;
  top: 12px;
  right: 16px;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 50%;
  background: var(--white);
  color: var(--black);
  font-size: 30px;
  line-height: 1;
  cursor: pointer;
}

body:has(.lightbox[open]) {
  overflow: hidden;
}
