/* Prostate Cancer Made Simple - static rebuild */
*, *::before, *::after { box-sizing: border-box; }

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

body {
  margin: 0;
  background: #fff;
  color: #8b8b8b;
  font-family: "Nunito", Arial, sans-serif;
  font-size: 18px;
  font-weight: 300;
  line-height: 1.3;
  -webkit-font-smoothing: antialiased;
}

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

.container {
  width: 100%;
  max-width: 1170px;
  margin: 0 auto;
  padding: 0 20px;
}

h1, h2 {
  margin: 0;
  font-family: "Montserrat", Arial, sans-serif;
}

h2 {
  margin: 20px 0 22px;
  font-size: clamp(28px, 4.5vw, 36px);
  font-weight: 500;
  line-height: 1.1;
  text-align: center;
}

p { margin: 0 0 18px; }

/* ---------- Hero ---------- */
.hero {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: clamp(380px, 74vw, 860px);
  padding: 40px 20px;
  background: #4f80a0 url("../images/hero.webp") 50% 50% / cover no-repeat;
  color: #fff;
  text-align: center;
}

.hero-inner { max-width: 860px; }

.hero h1 {
  font-size: clamp(34px, 7vw, 72px);
  font-weight: 700;
  line-height: 1.07;
}

.credentials {
  margin: 0.8em 0 0;
  font-size: clamp(15px, 2.5vw, 24px);
  font-style: italic;
  font-weight: 400;
  line-height: 1.35;
}

/* ---------- Introduction ---------- */
.intro {
  padding: 20px 0 70px;
  background: #e98fa2 url("../images/intro-bg.webp") 50% 50% / cover no-repeat;
  color: #fff;
}

.intro h2 { margin-bottom: 30px; }

.diagram {
  width: 100%;
  max-width: 435px;
  margin: 0 auto 24px;
}

/* ---------- Historical Perspective ---------- */
.history {
  position: relative;
  padding: 50px 0 80px;
  background: #fff url("../images/doctor-bg.webp") 50% 0 / cover no-repeat;
}

/* Soft white wash on phones so text stays readable over the photo */
.history::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, 0.75);
}

.history .container { position: relative; }

.history h2 { color: #4f80a0; }

/* ---------- Downloads ---------- */
.downloads {
  padding: 15px 0 60px;
  background: #4f80a0;
  color: #fff;
  text-align: center;
}

.downloads p {
  max-width: 900px;
  margin: 0 auto 36px;
}

.download-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 32px;
}

.download {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  font-size: clamp(20px, 2.6vw, 24px);
  font-weight: 700;
  line-height: 1.3;
  text-decoration: none;
}
.download svg {
  width: 56px;
  height: 56px;
  transition: transform .2s;
}
.download:hover svg, .download:focus svg { transform: translateY(3px); }
.download:hover span, .download:focus span { text-decoration: underline; }

/* ---------- Back to top ---------- */
.back-to-top {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 10;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  background: #436f8a;
  color: #fff;
  opacity: 0.5;
  transition: opacity .2s;
}
.back-to-top:hover, .back-to-top:focus { opacity: 1; }
.back-to-top svg { width: 20px; height: 20px; }

/* ---------- Tablet and up ---------- */
@media (min-width: 768px) {
  body { font-size: 20px; line-height: 1.2; }

  .diagram {
    float: right;
    width: 58%;
    margin: 0 0 20px 20px;
    padding-bottom: 20px;
  }
  .intro .container::after { content: ""; display: table; clear: both; }

  .history { padding: 50px 0 120px; }
  .history::before { display: none; }
  .history-text { width: 50%; padding: 35px 15px 0 0; }

  .download-grid { grid-template-columns: 1fr 1fr; }
}

/* Lighter background files for smaller screens */
@media (max-width: 1024px) {
  .hero { background-image: url("../images/hero-1024.webp"); }
  .intro { background-image: url("../images/intro-bg-1024.webp"); }
  .history { background-image: url("../images/doctor-bg-1024.webp"); }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
