/* Sonnet Print - Dental Colouring Book page
   Responsive hero, process section, benefits, form and flipbook toggle. */

.page-dental-book {
  background: #fff;
  overflow-x: clip;
}

.page-dental-book *,
.page-dental-book *::before,
.page-dental-book *::after {
  box-sizing: border-box;
}

.page-dental-book .container {
  width: min(calc(100% - 48px), var(--max));
  margin-inline: auto;
}

/* HERO */
.dental-hero {
  padding: 48px 0 34px;
  background: linear-gradient(110deg, #fff 0%, #f7fbff 48%, #dff1ff 100%);
}

.dental-hero-grid {
  display: grid;
  grid-template-columns: minmax(360px, .9fr) minmax(460px, 1.1fr);
  gap: clamp(28px, 4vw, 56px);
  align-items: center;
}

.dental-hero-copy {
  min-width: 0;
}

.dental-hero-copy h1 {
  margin: 0;
  color: var(--navy-900);
  font-size: clamp(40px, 4.2vw, 60px);
  line-height: 1.08;
  letter-spacing: -.045em;
}

.dental-lead {
  margin: 10px 0 8px;
  color: #3e9bdd;
  font-size: clamp(24px, 2.25vw, 33px);
  line-height: 1.15;
  font-weight: 750;
}

.dental-intro {
  max-width: 540px;
  margin: 0 0 24px;
  font-size: 17px;
  line-height: 1.55;
}

.dental-hero-points {
  display: grid;
  gap: 14px;
  margin: 0 0 26px;
}

.dental-point {
  display: grid;
  grid-template-columns: 50px minmax(0, 1fr);
  gap: 13px;
  align-items: center;
}

.dental-point strong {
  display: block;
  margin-bottom: 2px;
  color: var(--navy-900);
  font-size: 15px;
}

.dental-point span:not(.dental-icon) {
  display: block;
  color: var(--text-body);
  font-size: 13px;
  line-height: 1.45;
}

.dental-icon {
  display: grid;
  width: 46px;
  height: 46px;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  overflow: hidden;
  flex: none;
}

.dental-icon svg {
  display: block;
  width: 26px !important;
  height: 26px !important;
}

.dental-icon-blue { background: #27a7df; }
.dental-icon-green { background: #75bf2b; }
.dental-icon-orange { background: #ff8617; }
.dental-icon-purple { background: #7352bf; }
.dental-icon-teal { background: #1eafa2; }

.dental-primary-button {
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  min-height: 52px;
  margin: 0;
  padding: 0 24px;
  border: 0;
  border-radius: 5px;
  background: var(--navy-900);
  color: #fff;
  box-shadow: 0 8px 20px rgba(8, 40, 84, .14);
  font: inherit;
  font-size: 13px;
  font-weight: 850;
  line-height: 1;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
  transition: background .2s ease, transform .2s ease, box-shadow .2s ease;
}

.dental-primary-button:hover,
.dental-primary-button:focus-visible {
  background: var(--navy-700);
  color: #fff;
  box-shadow: 0 10px 24px rgba(8, 40, 84, .18);
}

.dental-primary-button:focus-visible {
  outline: 3px solid rgba(39, 167, 223, .35);
  outline-offset: 3px;
}

.dental-primary-button:active {
  transform: translateY(1px);
}

.dental-button-arrow {
  display: inline-block;
  font-size: 20px;
  line-height: 1;
  transition: transform .2s ease;
}

.dental-primary-button[aria-expanded="true"] .dental-button-arrow {
  transform: rotate(180deg);
}

.dental-hero-media {
  display: flex;
  min-width: 0;
  align-items: center;
  justify-content: center;
}

.dental-hero-placeholder {
  display: block;
  width: 100%;
  max-width: 760px;
  min-height: 0;
  aspect-ratio: auto;
  border: 0;
  border-radius: 0;
  background: transparent;
  overflow: visible;
}

.dental-hero-media img {
  display: block;
  width: 100%;
  max-width: 760px;
  height: auto;
  margin: 0 auto;
  object-fit: contain;
  filter: drop-shadow(0 20px 22px rgba(8, 40, 84, .14));
}

/* FLIPBOOK + PROCESS */
.dental-inside {
  padding: 30px 0 20px;
  background: #fff;
}

.dental-flipbook-panel[hidden] {
  display: none !important;
}

.dental-flipbook-panel {
  scroll-margin-top: 90px;
  margin-bottom: 28px;
}

.dental-flipbook-panel > h2,
.dental-process-title {
  text-align: center;
  color: var(--navy-900);
  text-transform: uppercase;
  letter-spacing: -.01em;
}

.dental-flipbook-panel > h2 {
  margin: 0 0 12px;
  font-size: 21px;
}

.dental-process-title {
  margin: 18px 0 24px;
  font-size: 21px;
}

.dental-process-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) 34px minmax(0, 1.25fr) 34px minmax(230px, .8fr);
  gap: 14px;
  align-items: center;
  width: 100%;
  padding: 22px;
  border: 1px solid #e7ebf0;
  border-radius: 10px;
  background: #fff;
  box-shadow: var(--shadow-sm);
}

.dental-process-card {
  min-width: 0;
  width: 100%;
  text-align: center;
}

.dental-process-card h3 {
  margin: 0 0 10px;
  color: #66a628;
  font-size: 15px;
  font-weight: 700;
  text-transform: uppercase;
}

.dental-process-image {
  width: 100%;
  overflow: hidden;
  border: 1px solid #b8d98d;
  border-radius: 7px;
  background: #fbfdf8;
}

.dental-process-image img {
  display: block;
  width: 100%;
  height: auto;
}

.dental-equation {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  color: var(--navy-900);
  font-size: 32px;
  line-height: 1;
  font-weight: 800;
}

.dental-process-result {
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  min-width: 0;
}

.dental-process-result h3 {
  margin: 0 0 6px;
  color: var(--navy-900);
  font-size: 16px;
  line-height: 1.25;
  text-transform: uppercase;
}

.dental-process-result p {
  margin: 0;
  color: var(--text-body);
  font-size: 13px;
  line-height: 1.5;
}

.dental-result-icon {
  display: grid;
  width: 54px;
  height: 54px;
  place-items: center;
  color: #fff;
  background: var(--navy-900);
  border-radius: 50%;
}

.dental-result-icon svg {
  width: 30px !important;
  height: 30px !important;
}

/* BENEFITS */
.dental-benefits {
  padding: 18px 0 30px;
}

.dental-benefit-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border: 1px solid #e7ebf0;
  border-radius: 10px;
  background: #fff;
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

.dental-benefit-grid article {
  display: grid;
  grid-template-columns: 50px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  min-width: 0;
  padding: 18px;
  border-right: 1px solid var(--line);
}

.dental-benefit-grid article:last-child {
  border-right: 0;
}

.dental-benefit-grid strong {
  display: block;
  color: var(--navy-900);
  font-size: 13px;
}

.dental-benefit-grid p {
  margin: 3px 0 0;
  font-size: 11px;
  line-height: 1.4;
}

/* SAMPLE FORM */
.dental-sample {
  padding: 10px 0 58px;
  background: #fff;
}

.dental-sample-panel {
  display: grid;
  grid-template-columns: .72fr 1.28fr;
  gap: 34px;
  align-items: center;
  padding: 30px;
  border: 1px solid #e4eaf1;
  border-radius: 10px;
  background: linear-gradient(110deg, #f3f8fd, #fff);
  box-shadow: var(--shadow-sm);
}

.dental-kicker {
  display: block;
  margin-bottom: 8px;
  color: var(--navy-700);
  font-size: 12px;
  font-weight: 850;
  text-transform: uppercase;
}

.dental-sample-copy h2 {
  margin: 0 0 9px;
  font-size: 29px;
}

.dental-sample-copy p {
  margin: 0 0 14px;
}

.dental-pricing-note {
  font-size: 13px;
}

.dental-sample-form-wrap {
  min-width: 0;
}

.dental-sample-form {
  padding: 0;
}

.dental-sample-form .field textarea {
  min-height: 80px;
}

.dental-sample-form .form-actions {
  margin-top: 18px;
  padding-top: 18px;
}

.dental-sample-form .button,
.dental-sample-form .button-primary {
  min-height: 48px;
  border: 0;
  border-radius: 5px;
  background: var(--navy-900);
  color: #fff;
  font-weight: 800;
  text-transform: uppercase;
  cursor: pointer;
}

.dental-sample-form .button:hover,
.dental-sample-form .button:focus-visible {
  background: var(--navy-700);
  color: #fff;
}

.dental-checkbox {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  margin-top: 18px;
  color: var(--text-body);
  font-size: 13px;
  font-weight: 650;
}

.dental-checkbox input {
  margin-top: 3px;
  accent-color: var(--navy-900);
}

/* TABLET */
@media (max-width: 1080px) {
  .dental-hero {
    padding-top: 38px;
  }

  .dental-hero-grid {
    grid-template-columns: minmax(320px, .9fr) minmax(390px, 1.1fr);
    gap: 26px;
  }

  .dental-hero-copy h1 {
    font-size: clamp(38px, 4.6vw, 49px);
  }

  .dental-intro {
    font-size: 15px;
  }

  .dental-process-grid {
    grid-template-columns: minmax(0, 1fr) 30px minmax(0, 1fr);
  }

  .dental-process-grid .dental-equation:nth-of-type(2) {
    display: none;
  }

  .dental-process-result {
    grid-column: 1 / -1;
    width: min(100%, 650px);
    margin: 8px auto 0;
  }

  .dental-benefit-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .dental-benefit-grid article:nth-child(2) {
    border-right: 0;
  }

  .dental-benefit-grid article:nth-child(-n+2) {
    border-bottom: 1px solid var(--line);
  }

  .dental-sample-panel {
    grid-template-columns: 1fr;
  }
}

/* MOBILE */
@media (max-width: 760px) {
  .page-dental-book .container {
    width: min(calc(100% - 28px), var(--max));
  }

  .dental-hero {
    padding: 26px 0 26px;
    background: linear-gradient(180deg, #fff 0%, #f5fbff 58%, #e4f3ff 100%);
  }

  /*
   * On desktop .dental-hero-copy contains the copy and button, while
   * .dental-hero-media is its sibling. On mobile display:contents lets
   * those children participate directly in the hero-grid ordering.
   */
  .dental-hero-grid {
    display: flex;
    flex-direction: column;
    gap: 0;
  }

  .dental-hero-copy {
    display: contents;
  }

  .dental-hero-copy h1 {
    order: 1;
    width: 100%;
    margin: 0;
    font-size: clamp(34px, 10.5vw, 44px);
    line-height: 1.04;
    letter-spacing: -.04em;
  }

  .dental-lead {
    order: 2;
    width: 100%;
    margin: 9px 0 0;
    font-size: clamp(21px, 6.7vw, 27px);
  }

  .dental-intro {
    order: 3;
    width: 100%;
    margin: 8px 0 20px;
    font-size: 15px;
    line-height: 1.5;
  }

  .dental-hero-points {
    order: 4;
    width: 100%;
    display: grid;
    gap: 12px;
    margin: 0 0 22px;
  }

  .dental-point {
    grid-template-columns: 42px minmax(0, 1fr);
    gap: 11px;
  }

  .dental-icon {
    width: 40px;
    height: 40px;
  }

  .dental-icon svg {
    width: 23px !important;
    height: 23px !important;
  }

  .dental-point strong {
    font-size: 14px;
  }

  .dental-point span:not(.dental-icon) {
    font-size: 12px;
    line-height: 1.4;
  }

  /* Product image is deliberately before the flipbook button on mobile. */
  .dental-hero-media {
    order: 5;
    display: flex;
    width: 100%;
    min-width: 0;
    margin: 0 0 20px;
    align-items: center;
    justify-content: center;
  }

  .dental-hero-placeholder {
    display: block;
    width: 100%;
    max-width: 520px;
    min-height: 0;
    margin: 0 auto;
    aspect-ratio: auto;
    border: 0;
    border-radius: 0;
    background: transparent;
    overflow: visible;
  }

  .dental-hero-media img {
    display: block;
    width: 100%;
    max-width: 520px;
    height: auto;
    margin: 0 auto;
    object-fit: contain;
    filter: drop-shadow(0 14px 16px rgba(8, 40, 84, .13));
  }

  .dental-primary-button {
    order: 6;
    width: 100%;
    min-height: 50px;
    margin: 0;
    padding-inline: 16px;
  }

  .dental-inside {
    padding: 24px 0 16px;
  }

  .dental-flipbook-panel {
    margin-bottom: 24px;
    scroll-margin-top: 72px;
  }

  .dental-flipbook-panel > h2,
  .dental-process-title {
    font-size: 18px;
    line-height: 1.2;
  }

  .dental-process-title {
    margin: 6px auto 18px;
    max-width: 340px;
  }

  .dental-process-grid {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 16px;
  }

  .dental-process-card,
  .dental-process-result {
    width: 100%;
  }

  .dental-process-card h3 {
    font-size: 14px;
  }

  .dental-equation {
    width: auto;
    height: 22px;
    font-size: 27px;
  }

  .dental-process-result {
    grid-template-columns: 46px minmax(0, 1fr);
    margin: 2px 0 0;
  }

  .dental-result-icon {
    width: 46px;
    height: 46px;
  }

  .dental-process-result h3 {
    font-size: 15px;
  }

  .dental-process-result p {
    font-size: 12px;
  }

  .dental-benefits {
    padding: 12px 0 24px;
  }

  .dental-benefit-grid {
    grid-template-columns: 1fr;
  }

  .dental-benefit-grid article {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .dental-benefit-grid article:last-child {
    border-bottom: 0;
  }

  .dental-sample {
    padding-bottom: 34px;
  }

  .dental-sample-panel {
    gap: 22px;
    padding: 20px 16px;
  }

  .dental-sample-copy h2 {
    font-size: 25px;
  }

  .dental-sample-form .form-grid.two {
    grid-template-columns: 1fr;
  }

  .dental-sample-form .form-grid + .form-grid {
    margin-top: 16px;
  }

  .dental-sample-form .button,
  .dental-sample-form .button-primary {
    width: 100%;
  }

  .g-recaptcha {
    transform-origin: left top;
  }
}

/* Narrow phones */
@media (max-width: 390px) {
  .page-dental-book .container {
    width: calc(100% - 22px);
  }

  .dental-hero-copy h1 {
    font-size: 32px;
  }

  .dental-lead {
    font-size: 21px;
  }

  .dental-point {
    grid-template-columns: 38px minmax(0, 1fr);
  }

  .dental-icon {
    width: 36px;
    height: 36px;
  }

  .dental-primary-button {
    font-size: 12px;
  }

  .dental-hero-media {
    margin-bottom: 16px;
  }

  .dental-sample-panel {
    padding-inline: 13px;
  }

  .g-recaptcha {
    transform: scale(.88);
  }
}
