/* CASTDICE Ver.3.16.3 — homepage first-view ONLY.
   This stylesheet is deliberately scoped to .cd-site .cd-hero.
   It does not modify any WordPress post, pattern, teacher, or form content. */

/* The supplied finished photo is already in the blue background. The old
   independent rectangular portrait and ornamental CSS should not appear. */
.cd-site .cd-hero {
  background-color: #063169;
  background-image: url('cd3163-hero-pc.jpg');
  background-repeat: no-repeat;
  background-position: center top;
  background-size: cover;
}
.cd-site .cd-hero::before,
.cd-site .cd-hero::after { content: none !important; }

/* Use the single real HTML text column; the photo is supplied by the image. */
.cd-site .cd-hero .cd-hero-grid {
  display: block !important;
  grid-template-columns: none !important;
  grid-template-areas: none !important;
  gap: 0 !important;
}
.cd-site .cd-hero .cd-hero-copy-column {
  display: block !important;
  position: relative !important;
  width: 100% !important;
  max-width: 100% !important;
}
.cd-site .cd-hero .cd-hero-copy {
  display: block !important;
  width: 100%;
  max-width: min(55%, 620px) !important;
  padding: 0 !important;
}
.cd-site .cd-hero .cd-hero-photo-column { display: none !important; }

/* Two English decorative captions were agreed to be omitted from the FV.
   They are hidden here without mutating the saved Gutenberg blocks. */
.cd-site .cd-hero .cd-hero-copy > .cd-kicker,
.cd-site .cd-hero .cd-hero-footnote { display: none !important; }

.cd-site .cd-hero .cd-hero-inner { padding-block: 54px 56px; }
.cd-site .cd-hero .cd-hero-title {
  margin-top: 0 !important;
  max-width: 100%;
  line-height: 1.5;
  overflow-wrap: anywhere;
  word-break: normal;
  text-wrap: pretty;
}
.cd-site .cd-hero .cd-hero-title br { display: inline !important; }
.cd-site .cd-hero .cd-hero-sub { margin-top: 23px; }
.cd-site .cd-hero .cd-hero-lead { max-width: 39em; }
.cd-site .cd-hero .cd-hero-points { margin-top: 18px; }
.cd-site .cd-hero .cd-hero-buttons { margin-top: 23px; }

/* Narrow desktop/tablet: reserve more room for the subject on the right. */
@media (min-width: 601px) and (max-width: 1100px) {
  .cd-site .cd-hero { background-position: 75% top; }
  .cd-site .cd-hero .cd-hero-copy { max-width: 53% !important; }
  .cd-site .cd-hero .cd-hero-buttons { gap: 9px; }
  .cd-site .cd-hero .cd-hero-buttons .wp-block-button__link { font-size: 11.5px; padding: 12px 12px; }
  .cd-site .cd-hero .cd-hero-inner { padding-block: 46px 49px; }
  .cd-site .cd-hero .cd-hero-sub { font-size: clamp(15px, 1.7vw, 19px); }
  .cd-site .cd-hero .cd-hero-lead { font-size: 12.5px; }
}

/* The supplied mobile asset has text space at left and the subject at right.
   Keep HTML title/subtitle to the left of the face, with tags/CTAs below. */
@media (max-width: 600px) {
  .cd-site .cd-hero {
    background-image: url('cd3163-hero-mobile.jpg');
    background-position: center top;
    background-size: cover;
  }
  .cd-site .cd-hero .cd-hero-inner {
    min-height: 0;
    padding-block: 35px 31px;
  }
  .cd-site .cd-hero .cd-hero-copy { max-width: none !important; }
  .cd-site .cd-hero .cd-hero-title {
    width: 56%;
    max-width: 56%;
    margin-top: 0 !important;
    font-size: clamp(21px, 6.5vw, 27px);
    letter-spacing: -.055em;
    line-height: 1.48;
    text-wrap: balance;
  }
  .cd-site .cd-hero .cd-hero-title .cd3163-hero-line { display: block; white-space: nowrap; }
  .cd-site .cd-hero .cd-hero-title br { display: none !important; }
  .cd-site .cd-hero .cd-hero-sub {
    width: 55%;
    max-width: 55%;
    margin-top: 17px;
    text-wrap: balance;
    font-size: 12px;
    line-height: 1.7;
  }
  .cd-site .cd-hero .cd-hero-lead {
    width: 55%;
    max-width: 55%;
    margin-top: 9px;
    text-wrap: balance;
    font-size: 10.5px;
    line-height: 1.8;
  }
  .cd-site .cd-hero .cd-hero-points {
    margin-top: 30px;
    gap: 6px;
    width: 100%;
  }
  .cd-site .cd-hero .cd-hero-buttons {
    width: 100% !important;
    margin-top: 19px;
    display: flex !important;
    flex-wrap: nowrap !important;
    gap: 8px;
  }
  .cd-site .cd-hero .cd-hero-buttons .wp-block-button { flex: 1 1 0; min-width: 0; }
  .cd-site .cd-hero .cd-hero-buttons .wp-block-button__link {
    display: flex;
    width: 100%;
    min-height: 48px;
    align-items: center;
    justify-content: center;
    padding: 10px 7px;
    font-size: clamp(10px, 2.6vw, 12px);
    line-height: 1.5;
  }
}

@media (max-width: 360px) {
  .cd-site .cd-hero .cd-hero-title { font-size: 21px; width: 56%; max-width: 56%; }
  .cd-site .cd-hero .cd-hero-sub,
  .cd-site .cd-hero .cd-hero-lead { width: 55%; max-width: 55%; }
  .cd-site .cd-hero .cd-hero-points { margin-top: 25px; }
}

@media (min-width: 420px) and (max-width: 600px) {
  .cd-site .cd-hero .cd-hero-title { width: 56%; max-width: 56%; }
}

/* Small landscape tablets: use the phone composition (complete face), but
   keep the compact desktop text layout and both CTAs on one line. */
@media (min-width: 601px) and (max-width: 700px) {
  .cd-site .cd-hero {
    background-image: url('cd3163-hero-mobile.jpg');
    background-position: center -25px;
  }
  .cd-site .cd-hero .cd-hero-inner { padding-block: 39px 41px; }
  .cd-site .cd-hero .cd-hero-copy { max-width: 57% !important; }
  .cd-site .cd-hero .cd-hero-title { font-size: 25px; line-height: 1.48; }
  .cd-site .cd-hero .cd-hero-sub { font-size: 14px; margin-top: 17px; }
  .cd-site .cd-hero .cd-hero-lead { font-size: 11.5px; line-height: 1.75; }
  .cd-site .cd-hero .cd-hero-points span { font-size: 9px; padding: 3px 6px; }
  .cd-site .cd-hero .cd-hero-buttons { flex-wrap: nowrap; gap: 6px; }
  .cd-site .cd-hero .cd-hero-buttons .wp-block-button__link { font-size: 11px; padding: 10px 10px; }
}

/* Ver.3.16.4 — first-view copy alignment, no other sections affected.
   WordPress is-layout-constrained sets auto margins, which centers the narrow
   title/subtitle and causes them to crowd the photo. Align them to the same
   content left edge as the badges and CTA buttons. */
.cd-site .cd-hero .cd-hero-title,
.cd-site .cd-hero .cd-hero-sub,
.cd-site .cd-hero .cd-hero-lead {
  margin-left: 0 !important;
  margin-right: auto !important;
  text-align: left !important;
}

/* Render-only label beside the person, not embedded in the photo. */
.cd-site .cd-hero .cd3164-person-label {
  display: block;
  position: absolute;
  right: 70px;
  bottom: 70px;
  z-index: 2;
  pointer-events: none;
  color: rgba(255,255,255,.96);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .04em;
  line-height: 1.5;
  white-space: nowrap;
  text-shadow: 0 1px 4px rgba(0,15,39,.8);
}
@media (min-width: 601px) and (max-width: 1100px) {
  .cd-site .cd-hero .cd3164-person-label { right: 42px; bottom: 56px; font-size: 12px; }
}
@media (min-width: 601px) and (max-width: 700px) {
  .cd-site .cd-hero .cd3164-person-label { right: 20px; bottom: 27px; font-size: 11px; }
}
@media (max-width: 600px) {
  .cd-site .cd-hero .cd3164-person-label { right: 12px; bottom: 132px; font-size: 11px; }
}
@media (max-width: 360px) {
  .cd-site .cd-hero .cd3164-person-label { right: 8px; bottom: 130px; font-size: 10px; }
}
