/* CoreBone – clinical study landing page. Mobile-first, RTL. */

/* Heebo (variable, self-hosted, OFL) */
@font-face {
  font-family: "Heebo";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("assets/fonts/heebo-hebrew-wght.woff2") format("woff2");
  unicode-range: U+0307-0308, U+0590-05FF, U+200C-2010, U+20AA, U+25CC, U+FB1D-FB4F;
}
@font-face {
  font-family: "Heebo";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("assets/fonts/heebo-latin-wght.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --navy: #0E2841;
  --green: #4EA72E;
  --green-hover: #43932A;
  --cream: #FFFFCF;
  --white: #FFFFFF;
  --gray: #4B5563;      /* secondary text */
  --line: #DCE3EA;
  --soft: #F2F5F8;      /* footer background */
  --gutter: 20px;
  --content: 780px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: "Heebo", "Segoe UI", Arial, sans-serif;
  color: var(--navy);
  background: var(--white);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img, video, svg { display: block; max-width: 100%; }
h1, h2, p { margin: 0; }
.nowrap { white-space: nowrap; }

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

.container {
  width: 100%;
  max-width: calc(var(--content) + 2 * var(--gutter));
  margin-inline: auto;
  padding-inline: var(--gutter);
}

/* ── 1. Hero ─────────────────────────────────────────────── */
.hero {
  position: relative;
  background: var(--navy);
  color: var(--white);
  overflow: hidden;
}
/* Mobile / tablet: photo band on top (cropped for portrait), text below on the dark navy */
.hero__media {
  position: relative;
  aspect-ratio: 3 / 2;
}
.hero__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 0 30%;
}
.hero__media::after { /* soft fade of the photo into the navy text area */
  content: "";
  position: absolute;
  inset: auto 0 0 0;
  height: 30%;
  background: linear-gradient(to bottom, rgba(14, 40, 65, 0), var(--navy));
}
.hero__inner { padding: 0 var(--gutter) 34px; }
.hero__logo { /* sits over the dark top-right corner of the photo */
  position: absolute;
  z-index: 1;
  top: 16px;
  right: var(--gutter);
  width: clamp(124px, 36vw, 190px);
  height: auto;
}
.hero h1 {
  font-size: clamp(2rem, 1.05rem + 4.3vw, 2.75rem);
  font-weight: 800;
  line-height: 1.12;
  letter-spacing: -0.01em;
  color: var(--cream);
  text-wrap: balance;
}
.hero__subtitle {
  margin-top: 0.5em;
  font-size: clamp(1.1875rem, 0.95rem + 1.1vw, 1.625rem);
  font-weight: 700;
  line-height: 1.3;
  color: var(--cream);
  text-wrap: balance;
}
.hero__lead {
  margin-top: 0.9em;
  max-width: 36em;
  font-size: clamp(1.0625rem, 1rem + 0.3vw, 1.25rem);
  line-height: 1.65;
  color: var(--white);
}

@media (min-width: 600px) {
  .hero__media { aspect-ratio: 16 / 9; max-height: 620px; }
  .hero__media img { object-position: 0 35%; }
  .hero__media::after { height: 22%; }
  .hero__inner { padding-bottom: 48px; }
  .hero__content { max-width: 720px; }
}

/* Desktop: the photo is the background of the whole hero; text on its dark side */
@media (min-width: 1200px) {
  .hero {
    --hero-h: clamp(560px, 42vw, 700px);
    min-height: var(--hero-h);
    display: flex;
    align-items: center;
  }
  .hero__media {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    aspect-ratio: auto;
    max-height: none;
  }
  .hero__media img {
    width: auto;
    height: 100%;
    max-width: none;
  }
  .hero__media::after { /* blends the photo's dark side into the navy, behind the text */
    inset: 0 0 0 auto;
    width: 46%;
    height: auto;
    background: linear-gradient(to right, rgba(14, 40, 65, 0) 0%, rgba(14, 40, 65, 0.55) 55%, var(--navy) 100%);
  }
  .hero__inner {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 1440px;
    margin-inline: auto;
    padding: 64px 72px;
    /* keeps the text clear of the figure (the photo is anchored to the viewport's left edge, the container is centred) */
    padding-left: calc(var(--hero-h) * 0.84 + 32px - max(0px, (100vw - 1440px) / 2));
  }
  .hero__content { max-width: 800px; }
  .hero__logo {
    position: static;
    width: clamp(260px, 21vw, 330px);
    margin-bottom: 30px;
  }
  .hero h1 { font-size: clamp(3.25rem, 4.55vw, 4.25rem); }
  .hero__subtitle { font-size: clamp(1.875rem, 2.45vw, 2.25rem); }
  .hero__lead { font-size: clamp(1.25rem, 1.55vw, 1.4375rem); max-width: 28em; }
}

/* ── 1b. Approval badge on the hero / white seam ─────────────
   Lives in .intro (the hero clips with overflow:hidden). A zero-height row sits exactly on the
   seam and centres the badge on it: half on the navy hero, half on the white section.
   Not a link or button: no shadow, hover, icon or arrow. */
.intro {
  --intro-top: 64px;   /* space above the first paragraph (clears the badge's lower half) */
  position: relative;
  padding-top: var(--intro-top);
}
.approval {
  position: absolute;
  z-index: 2;
  top: 0;
  left: 0;
  right: 0;
  height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}
.approval .approval__badge {
  flex: none;
  max-width: min(430px, 90%);
  padding: 12px 22px;
  border: 1px solid var(--navy);
  border-radius: 12px;
  background: var(--cream);
  color: var(--navy);
  font-size: 0.875rem;   /* 14px */
  font-weight: 600;
  line-height: 1.45;
  text-align: center;
  text-wrap: balance;
}
@media (max-width: 599.98px) {
  .hero__inner { padding-bottom: 56px; } /* room for the badge's upper half below the hero text */
}
@media (max-width: 379.98px) {
  /* too narrow for one line: two balanced lines, broken at the comma, and the frame hugs the text */
  .approval__badge span { display: block; }
}
@media (min-width: 768px) {
  .intro { --intro-top: 72px; }
  .approval .approval__badge { font-size: 0.9375rem; } /* 15px */
}
@media (forced-colors: active) {
  .approval .approval__badge { border-color: CanvasText; }
}

/* ── 2. Eligibility & participation ──────────────────────── */
.intro > .container { position: relative; z-index: 1; }

/* Decorative knee line art: desktop only, in the empty white area left of the text column */
.intro__art { display: none; }
@media (min-width: 1200px) {
  .intro__art {
    display: block;
    position: absolute;
    inset: 0;
    z-index: 0;
    overflow: hidden;      /* fallback */
    overflow: clip visible; /* crops the art at the page edge (no horizontal scrollbar), not vertically */
    pointer-events: none;
  }
  .knee-art {
    position: absolute;
    top: calc(50% + var(--intro-top) / 2); /* centred on the paragraphs + CTA */
    left: -4px; /* only a sliver of the fibula touches the page edge */
    width: auto;
    height: clamp(300px, 25vw, 380px);
    max-width: none;
    transform: translateY(-50%);
    fill: none;
    stroke: #C9D8E1;
    stroke-width: 1.5;
    stroke-linecap: round;
    stroke-linejoin: round;
    opacity: 0.4;
  }
  .knee-art path { vector-effect: non-scaling-stroke; }
}
.intro p {
  font-size: clamp(1.0625rem, 1rem + 0.3vw, 1.25rem);
  line-height: 1.75;
}
.intro p + p { margin-top: 1em; }

/* ── 3. Primary CTA ─────────────────────────────────────── */
.cta-wrap { margin-top: 32px; display: flex; justify-content: center; }
.cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45em;
  width: 100%;
  min-height: 60px;
  padding: 14px 12px;
  border-radius: 10px;
  background: var(--green);
  color: var(--white);
  font-size: clamp(1.125rem, 0.6rem + 2.6vw, 1.75rem);
  font-weight: 700;
  line-height: 1.25;
  text-align: center;
  text-decoration: none;
  box-shadow: 0 2px 8px rgba(14, 40, 65, 0.14);
  transition: background-color 0.15s ease;
}
.cta svg { width: 0.75em; height: 0.75em; flex: none; }
.cta:hover { background: var(--green-hover); }
.cta[aria-disabled="true"] { cursor: not-allowed; }

@media (min-width: 768px) {
  .intro p + p { margin-top: 1.1em; }
  .cta-wrap { margin-top: 40px; }
  .cta { width: auto; min-width: min(100%, 600px); min-height: 76px; padding: 16px 40px; }
}

/* ── 4. Video ───────────────────────────────────────────── */
.video-section { padding: 36px var(--gutter) 0; }
.video {
  position: relative;
  max-width: 900px;
  margin-inline: auto;
  aspect-ratio: 16 / 9;
  border-radius: 12px;
  overflow: hidden;
  background: #DDE5EA;
}
.video video { width: 100%; height: 100%; object-fit: contain; }
/* Before the first play: the whole poster is one play button with a centred icon (native controls appear once playing) */
.video__play {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
}
.video__play[hidden] { display: none; }
.video__play-icon {
  display: grid;
  place-items: center;
  width: 76px;
  height: 76px;
  padding-left: 4px; /* optical centring of the triangle */
  border-radius: 50%;
  background: rgba(14, 40, 65, 0.8);
  color: var(--white);
}
.video__play:hover .video__play-icon { background: var(--navy); }
.video__play:focus-visible { outline: 3px solid var(--navy); outline-offset: -3px; }
.video__play:focus-visible .video__play-icon { box-shadow: 0 0 0 3px var(--white), 0 0 0 6px var(--navy); }

@media (min-width: 768px) {
  .video-section { padding-top: 48px; }
  .video__play-icon { width: 88px; height: 88px; }
}

/* ── 5. Formal notes ────────────────────────────────────── */
.notes { margin-top: 36px; }
.notes__box {
  padding-top: 20px;
  border-top: 1px solid var(--line);
  text-align: center;
  color: var(--gray);
  font-size: 0.875rem;
  line-height: 1.65;
  text-wrap: balance;
}
.notes__box p + p { margin-top: 2px; }

@media (min-width: 768px) {
  .notes { margin-top: 44px; }
  .notes__box { font-size: 0.9375rem; }
}

/* ── 6. More information & footer ───────────────────────── */
.site-footer {
  margin-top: 44px;
  padding: 30px 0 34px;
  background: var(--soft);
  text-align: center;
  font-size: 1rem;
  line-height: 1.65;
}
.site-footer__contact a {
  color: var(--navy);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
  overflow-wrap: anywhere;
}
.site-footer__contact a:hover { text-decoration-thickness: 2px; }
.site-footer__ages { margin-top: 10px; font-weight: 600; }
.site-footer__legal { margin-top: 14px; font-size: 0.875rem; color: var(--gray); }

@media (min-width: 768px) {
  .site-footer { margin-top: 56px; padding: 36px 0 40px; font-size: 1.0625rem; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}
@media (forced-colors: active) {
  .cta, .video__play { border: 2px solid ButtonText; }
}
