:root {
  color-scheme: light;
  --bg: #f6f3ec;
  --surface: #fffdf8;
  --soft: #edf6f2;
  --soft-blue: #eef4f7;
  --soft-warm: #fff3da;
  --ink: #162222;
  --muted: #5f6c67;
  --line: #ded5c5;
  --primary: #0c625c;
  --primary-dark: #073f3b;
  --blue: #235a78;
  --amber: #9b5d0b;
  --gold: #c08a2c;
  --maroon: #7a2d2d;
  --focus: #c47a13;
  --shadow: 0 18px 48px rgba(44, 34, 21, 0.1);
  --radius: 8px;
  --max: 1160px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: linear-gradient(180deg, #fbfaf6 0%, var(--bg) 42%, #f2eee4 100%);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 17px;
  line-height: 1.65;
}

body.nav-open {
  overflow: hidden;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
  -webkit-user-drag: none;
  user-select: none;
}

a {
  color: var(--primary-dark);
  text-decoration-thickness: 0.08em;
  text-underline-offset: 0.18em;
}

a:hover {
  color: var(--blue);
}

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

.skip-link {
  position: absolute;
  left: 1rem;
  top: 0.5rem;
  z-index: 1000;
  transform: translateY(-160%);
  background: var(--ink);
  color: #fff;
  padding: 0.55rem 0.8rem;
  border-radius: var(--radius);
}

.skip-link:focus {
  transform: translateY(0);
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 253, 248, 0.96);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(16px);
}

.header-inner,
.wrap {
  width: min(100% - 32px, var(--max));
  margin: 0 auto;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 74px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  color: var(--ink);
  text-decoration: none;
  min-width: 0;
  flex: 1 1 auto;
}

.brand-mark {
  display: grid;
  place-items: center;
  flex: 0 0 44px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary-dark), var(--primary));
  box-shadow: inset 0 0 0 2px rgba(192, 138, 44, 0.36);
  color: #fff;
  font-weight: 800;
  letter-spacing: 0;
}

.brand-text {
  display: grid;
  gap: 0.08rem;
  min-width: 0;
}

.brand-title {
  font-size: 0.95rem;
  font-weight: 800;
  line-height: 1.2;
}

.brand-tagline {
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.25;
}

@media (max-width: 1339px) {
  .header-inner {
    gap: 0.75rem;
  }

  .brand {
    max-width: 17rem;
  }

  .brand-title {
    font-size: 0;
    line-height: 1;
  }

  .brand-title::after {
    content: "Dr H N Roy\A Awareness Initiative";
    display: block;
    font-size: 1rem;
    line-height: 1.16;
    white-space: pre-line;
  }

  .brand-tagline {
    display: none;
  }
}

@media (max-width: 520px) {
  .brand {
    gap: 0.55rem;
    max-width: 15rem;
  }

  .brand-mark {
    flex-basis: 40px;
    width: 40px;
    height: 40px;
  }

  .nav-toggle {
    padding: 0.5rem 0.64rem;
  }
}

.nav-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--ink);
  padding: 0.55rem 0.72rem;
  font: inherit;
  font-weight: 700;
}

.nav-toggle-lines {
  display: grid;
  gap: 4px;
}

.nav-toggle-lines span {
  display: block;
  width: 20px;
  height: 2px;
  background: currentColor;
}

.primary-nav {
  position: fixed;
  inset: 74px 0 auto 0;
  display: none;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  box-shadow: var(--shadow);
}

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

.primary-nav ul {
  width: min(100% - 32px, var(--max));
  max-height: calc(100vh - 90px);
  margin: 0 auto;
  padding: 0.8rem 0 1rem;
  list-style: none;
  overflow: auto;
}

.primary-nav a {
  display: block;
  padding: 0.65rem 0;
  color: var(--ink);
  text-decoration: none;
  font-weight: 700;
}

.primary-nav a[aria-current="page"] {
  color: var(--primary);
}

.clinic-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  border-radius: var(--radius);
  background: var(--primary);
  color: #fff;
  padding: 0.65rem 0.9rem;
  text-decoration: none;
  font-weight: 800;
  white-space: nowrap;
}

.clinic-cta:hover {
  background: var(--primary-dark);
  color: #fff;
}

.header-cta {
  display: none;
}

.hero {
  padding: 2rem 0 1.5rem;
  background:
    linear-gradient(180deg, rgba(255, 253, 248, 0.98) 0%, rgba(237, 246, 242, 0.96) 66%, rgba(246, 243, 236, 0.98) 100%);
  border-bottom: 1px solid rgba(192, 138, 44, 0.22);
}

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

.eyebrow {
  margin: 0 0 0.65rem;
  color: var(--maroon);
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

h1,
h2,
h3 {
  color: var(--ink);
  line-height: 1.16;
  letter-spacing: 0;
}

h1 {
  margin: 0;
  font-size: clamp(2.15rem, 1.75rem + 1.6vw, 3.7rem);
}

h2 {
  margin: 0 0 0.9rem;
  font-size: clamp(1.55rem, 1.35rem + 0.8vw, 2.3rem);
}

h3 {
  margin: 0 0 0.45rem;
  font-size: 1.16rem;
}

p {
  margin: 0 0 1rem;
}

.lead {
  color: #344653;
  font-size: 1.12rem;
  line-height: 1.72;
}

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

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  padding: 0.7rem 1rem;
  text-decoration: none;
  font-weight: 800;
}

.button.primary {
  background: var(--primary);
  color: #fff;
}

.button.primary:hover {
  background: var(--primary-dark);
  color: #fff;
}

.button.secondary {
  background: var(--surface);
  border-color: var(--line);
  color: var(--ink);
}

.button.secondary:hover {
  border-color: var(--primary);
  color: var(--primary-dark);
}

.button.phone {
  background: var(--blue);
  color: #fff;
}

.notice,
.emergency-note,
.disclaimer-note {
  border-left: 4px solid var(--primary);
  border-radius: var(--radius);
  background: var(--soft);
  padding: 0.95rem 1rem;
  color: #28423f;
}

.emergency-note {
  border-left-color: #b42318;
  background: #fff1f0;
  color: #6d1f18;
}

.disclaimer-note {
  border-left-color: var(--amber);
  background: var(--soft-warm);
  color: #55320a;
}

.hero .notice {
  margin-top: 1.1rem;
}

.hero-media {
  display: grid;
  gap: 0.75rem;
  justify-items: center;
}

.hero-media .photo-frame {
  width: min(100%, 360px);
  aspect-ratio: 1 / 1;
  display: grid;
  place-items: center;
  background: #f8f5ed;
}

.hero-media .photo-frame img {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.photo-frame {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(192, 138, 44, 0.34);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.photo-frame::after {
  content: "© Dr H N Roy Legacy Archive · Reuse not permitted";
  position: absolute;
  right: 0.65rem;
  bottom: 0.65rem;
  max-width: calc(100% - 1.3rem);
  border-radius: 4px;
  background: rgba(17, 42, 43, 0.78);
  color: #fff;
  padding: 0.28rem 0.45rem;
  font-size: 0.76rem;
  font-weight: 800;
  line-height: 1.25;
  pointer-events: none;
}

.photo-frame img {
  width: 100%;
  object-fit: cover;
}

.caption {
  color: var(--muted);
  font-size: 0.92rem;
}

.section {
  padding: 2.7rem 0;
}

.section.alt {
  background: var(--surface);
  border-block: 1px solid rgba(222, 213, 197, 0.8);
}

.section.soft {
  background: var(--soft-blue);
}

.section-header {
  max-width: 780px;
  margin-bottom: 1.35rem;
}

.grid {
  display: grid;
  gap: 1rem;
}

.grid.two,
.grid.three {
  grid-template-columns: 1fr;
}

.card,
.myth-card,
.check-card,
.resource-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  padding: 1.1rem;
  box-shadow: 0 10px 28px rgba(44, 34, 21, 0.04);
}

.card,
.myth-card,
.check-card,
.resource-card {
  border-top-color: rgba(192, 138, 44, 0.45);
}

.card.accent {
  background: var(--soft);
}

.card.blue {
  background: var(--soft-blue);
}

.card.warm {
  background: var(--soft-warm);
}

.card p:last-child,
.myth-card p:last-child,
.check-card p:last-child,
.resource-card p:last-child {
  margin-bottom: 0;
}

.card-link {
  display: inline-flex;
  margin-top: 0.35rem;
  font-weight: 800;
}

.list,
.tick-list,
.warning-list {
  margin: 0;
  padding-left: 1.2rem;
}

.list li,
.tick-list li,
.warning-list li {
  margin: 0.35rem 0;
}

.topic-list {
  display: grid;
  gap: 1rem;
}

.myth-label {
  margin: 0 0 0.3rem;
  color: var(--amber);
  font-weight: 800;
}

.fact-label {
  margin: 0 0 0.3rem;
  color: var(--primary-dark);
  font-weight: 800;
}

.timeline {
  display: grid;
  gap: 1rem;
  margin: 1.2rem 0;
}

.timeline-item {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.85rem;
  align-items: start;
}

.timeline-year {
  min-width: 74px;
  border-radius: var(--radius);
  background: var(--primary);
  color: #fff;
  padding: 0.35rem 0.55rem;
  text-align: center;
  font-weight: 800;
}

.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  align-items: center;
  color: var(--muted);
  font-size: 0.9rem;
  margin-bottom: 1.15rem;
}

.breadcrumbs a {
  color: var(--muted);
}

.page-hero {
  padding: 2rem 0;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}

.page-hero .lead {
  max-width: 820px;
  margin-top: 0.9rem;
}

.content-narrow {
  max-width: 860px;
}

.split {
  display: grid;
  gap: 1.3rem;
  align-items: start;
}

.quote-box {
  border-radius: var(--radius);
  background: var(--primary-dark);
  color: #fff;
  padding: 1.25rem;
  border-top: 4px solid var(--gold);
}

.quote-box p {
  margin: 0;
  font-size: 1.08rem;
}

.check-card label {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  padding: 0.45rem 0;
}

.check-card input {
  width: 1.15rem;
  height: 1.15rem;
  margin-top: 0.23rem;
  accent-color: var(--primary);
}

.check-result {
  margin-top: 0.75rem;
  border-radius: var(--radius);
  background: var(--soft);
  padding: 0.75rem;
  color: var(--primary-dark);
  font-weight: 700;
}

.contact-lines {
  display: grid;
  gap: 0.4rem;
  margin: 1rem 0;
}

.contact-lines p {
  margin: 0;
}

.site-footer {
  background: #102725;
  color: #e8f3f1;
  padding: 2.2rem 0;
  border-top: 4px solid var(--gold);
}

.site-footer a {
  color: #ffffff;
}

.footer-grid {
  display: grid;
  gap: 1.2rem;
}

.footer-title {
  margin: 0 0 0.4rem;
  font-weight: 800;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1rem;
}

.small {
  font-size: 0.92rem;
}

@media (min-width: 760px) {
  .header-inner {
    min-height: 82px;
  }

  .header-cta {
    display: inline-flex;
  }

  .hero {
    padding: 3.3rem 0 2.5rem;
  }

  .hero-grid,
  .split {
    grid-template-columns: minmax(0, 1.05fr) minmax(320px, 0.95fr);
  }

  .grid.two {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .grid.three {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .topic-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .footer-grid {
    grid-template-columns: 1.3fr 0.7fr;
  }
}

@media (min-width: 1340px) {
  .nav-toggle {
    display: none;
  }

  .primary-nav {
    position: static;
    display: block;
    border: 0;
    box-shadow: none;
    background: transparent;
  }

  .primary-nav ul {
    display: flex;
    align-items: center;
    gap: 0.15rem;
    width: auto;
    max-height: none;
    padding: 0;
    overflow: visible;
  }

  .primary-nav a {
    border-radius: var(--radius);
    padding: 0.42rem 0.42rem;
    font-size: 0.84rem;
  }

  .primary-nav a:hover,
  .primary-nav a[aria-current="page"] {
    background: var(--soft);
    color: var(--primary-dark);
  }

  .topic-list {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 1rem;
}

.gallery-card {
  display: grid;
  gap: 0.65rem;
  width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--ink);
  padding: 0.65rem;
  text-align: left;
  font: inherit;
  cursor: pointer;
  box-shadow: 0 12px 30px rgba(44, 34, 21, 0.06);
}

.gallery-card:hover {
  border-color: rgba(192, 138, 44, 0.75);
  transform: translateY(-1px);
}

.gallery-thumb-frame {
  aspect-ratio: 4 / 3;
  display: grid;
  place-items: center;
  background: #f8f5ed;
}

.gallery-thumb-frame::after {
  content: "Reuse not permitted";
  font-size: 0.68rem;
}

.gallery-thumb-frame img {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.gallery-caption {
  margin: 0;
  color: var(--ink);
  font-size: 0.92rem;
  font-weight: 800;
  line-height: 1.35;
}

.gallery-dialog {
  width: min(100% - 24px, 1120px);
  max-height: min(92vh, 920px);
  border: 1px solid rgba(192, 138, 44, 0.38);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--ink);
  padding: 0;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.36);
}

.gallery-dialog::backdrop {
  background: rgba(7, 31, 29, 0.78);
}

.gallery-dialog-inner {
  display: grid;
  gap: 0.8rem;
  padding: 0.8rem;
}

.gallery-dialog-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.gallery-dialog-title {
  margin: 0;
  font-weight: 800;
  line-height: 1.35;
}

.gallery-close {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--ink);
  padding: 0.45rem 0.7rem;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}

.gallery-view-frame {
  max-height: calc(92vh - 150px);
  display: grid;
  place-items: center;
  background: #171f1e;
}

.gallery-view-frame img {
  width: auto;
  max-height: calc(92vh - 150px);
  object-fit: contain;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
  }
}

@media print {
  .photo-frame img {
    display: none;
  }

  .photo-frame::before {
    content: "Archive photo hidden in print copy. Download and reuse are not permitted.";
    display: block;
    padding: 2rem;
    color: var(--ink);
    font-weight: 800;
  }

  .photo-frame::after {
    display: none;
  }
}
