/* =========================================
   TOBY'S TALES — STYLESHEET
   File: css-files/tobys-tales.css

   Works alongside the main styles.css file.
   ========================================= */


/* =========================================
   1. TOBY'S TALES COLOURS
   ========================================= */

.theme-tobys-tales {
  --toby-blue: #6f8b70;
  --toby-dark-blue: #405f46;
  --toby-light-blue: #e8f0e6;
  --toby-pale-blue: #f3f7f1;
  --toby-cream: #faf7f2;
  --toby-warm-white: #fffdf9;
  --toby-border: #d9e5d6;
  --toby-brown: #756354;

  --accent: #6f8b70;
  --accent-light: #e8f0e6;
}


/* =========================================
   2. TOBY'S TALES HERO
   ========================================= */

.toby-hero {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  align-items: center;
  gap: 70px;

  padding-top: 110px;
  padding-bottom: 75px;
}

.toby-hero-copy {
  max-width: 670px;
}

.toby-hero h1 {
  font-family: var(--heading-font);
  font-size: clamp(3.3rem, 6vw, 5.6rem);
  font-weight: 700;
  line-height: 1.12;
  letter-spacing: -0.055em;

  margin: 0 0 24px;
}

.toby-hero h1 em {
  color: var(--toby-blue);
  font-style: normal;
}

.toby-lead {
  font-size: clamp(1.2rem, 2vw, 1.55rem);
  font-weight: 600;
  line-height: 1.65;

  max-width: 580px;
  margin-bottom: 20px;
}

.toby-hero-copy > p:not(.toby-lead) {
  max-width: 590px;
  color: var(--muted);
  line-height: 1.9;
  margin-bottom: 16px;
}

.toby-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px;

  margin-top: 34px;
}


/* =========================================
   3. HERO VIDEO CONTAINER
   ========================================= */

.toby-hero-art {
  display: flex;
  align-items: center;
  justify-content: center;

  width: 100%;
  aspect-ratio: 1 / 1;

  background: transparent;
  border: 4px solid var(--toby-blue);
  padding: 0;

  border-radius: 38px;

  position: relative;
  overflow: hidden;

  cursor: default;
}


.toby-hero-video {
  display: block;

  width: 100%;
  height: 100%;

  object-fit: cover;
  border-radius: 0;

  position: absolute;
  inset: 0;

  z-index: 1;
}


/* =========================================
   4. SECTION HEADINGS
   ========================================= */

.theme-tobys-tales .toby-section-heading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;

  width: 100%;
  max-width: 100%;

  text-align: center;

  margin: 0 auto 55px;
}


.theme-tobys-tales .toby-section-heading h2 {
  font-family: var(--heading-font);
  font-size: clamp(2.2rem, 4vw, 3.4rem);
  font-weight: 700;
  line-height: 1.25;

  width: 100%;
  text-align: center;

  margin: 10px auto 0;
}


.theme-tobys-tales .toby-section-heading h2 em {
  color: var(--toby-blue);
  font-style: normal;
}


.theme-tobys-tales .toby-section-heading .eyebrow {
  text-align: center;
  align-self: center;
}


/* =========================================
   5. BOOK SECTIONS
   ========================================= */

.toby-book-section {
  background: var(--white);

  padding-top: 65px;
  padding-bottom: 65px;
}


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


.toby-book-grid {
  display: grid;
  grid-template-columns:
    minmax(0, 0.9fr)
    minmax(0, 1.1fr);

  align-items: center;

  gap: clamp(30px, 4vw, 65px);
}


.toby-book-grid--reverse {
  grid-template-columns:
    minmax(0, 1.1fr)
    minmax(0, 0.9fr);
}


.toby-book-copy {
  min-width: 0;
}


.toby-book-copy .eyebrow {
  color: var(--toby-blue);
}


.toby-book-copy h3 {
  font-family: var(--heading-font);
  font-size: clamp(1.9rem, 3.5vw, 3rem);
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -0.035em;

  margin: 10px 0 24px;
}


.toby-book-copy p {
  color: var(--muted);
  line-height: 1.9;

  margin-bottom: 16px;
}


.toby-book-copy .toby-byline {
  color: var(--ink);
  font-weight: 600;

  margin-top: 22px;
  margin-bottom: 28px;
}


/* =========================================
   6. BOOK COVER CONTAINERS
   ========================================= */

.toby-cover-frame {
  display: flex;
  align-items: center;
  justify-content: center;

  width: 100%;
  aspect-ratio: 1 / 1;

  /* No coloured background, border or padding */
  padding: 0;
  background: transparent;
  border: none;

  /* Rounded corners */
  border-radius: 30px;

  position: relative;
  overflow: hidden;

  /* No surrounding shadow */
  box-shadow: none;
}


/* Remove alternate background for Book Two */

.toby-book-section:not(.toby-book-section--soft)
.toby-cover-frame {
  background: transparent;
}


/* Full-size book cover images */

.language-book-cover {
  display: block;

  width: 100%;
  max-width: none;
  height: 100%;

  aspect-ratio: 1 / 1;

  /* Fill the entire square */
  object-fit: cover;

  /* Rounded corners handled by container */
  border-radius: 0;

  box-shadow: none;

  transition:
    opacity 0.18s ease,
    transform 0.25s ease;
}


/* Language-switching animation */

.language-book-cover.changing {
  opacity: 0.65;
  transform: scale(0.985);
}


/* =========================================
   7. LANGUAGE SELECTION LABELS
   ========================================= */

.toby-book-copy .language-label {
  color: var(--ink);
  font-family: var(--heading-font);
  font-size: 1rem;
  font-weight: 700;

  margin-top: 30px;
  margin-bottom: 14px;
}


.language-options {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;

  margin-bottom: 12px;
}


/* =========================================
   8. LANGUAGE BUTTONS
   ========================================= */

.language-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;

  padding: 10px 17px;

  border: 1px solid var(--toby-border);
  border-radius: 100px;

  background: var(--white);
  color: var(--ink);

  font-family: var(--body-font, "Open Sans", sans-serif);
  font-size: 0.86rem;
  font-weight: 600;
  line-height: 1.4;

  cursor: pointer;

  transition:
    background 0.2s ease,
    color 0.2s ease,
    border-color 0.2s ease,
    transform 0.2s ease;
}


.language-button:hover {
  background: var(--toby-light-blue);
  border-color: var(--toby-blue);
  color: var(--toby-dark-blue);

  transform: translateY(-2px);
}


.language-button.active,
.language-button[aria-pressed="true"] {
  background: var(--toby-blue);
  border-color: var(--toby-blue);
  color: #ffffff;
}


.language-button.active:hover,
.language-button[aria-pressed="true"]:hover {
  background: var(--toby-dark-blue);
  border-color: var(--toby-dark-blue);
  color: #ffffff;
}


.language-button:focus-visible {
  outline: 3px solid var(--toby-blue);
  outline-offset: 4px;
}


/* =========================================
   9. SELECTED LANGUAGE NOTE
   ========================================= */

.toby-book-copy .selected-language {
  font-size: 0.83rem;
  line-height: 1.6;

  color: var(--muted);

  margin: 15px 0 28px;
}


.selected-language strong {
  color: var(--toby-dark-blue);
  font-weight: 700;
}


.toby-book-copy > .btn {
  margin-top: 4px;
}


/* =========================================
   10. MORE BOOKS COMING SOON
   ========================================= */

.toby-coming-soon {
  background: var(--toby-light-blue);
}


.toby-coming-inner {
  display: grid;
  grid-template-columns:
    minmax(0, 1fr)
    minmax(0, 0.9fr);

  align-items: center;
  gap: clamp(35px, 5vw, 80px);
}


.toby-coming-inner .eyebrow {
  color: var(--toby-dark-blue);
}


.toby-coming-inner h2 {
  font-family: var(--heading-font);
  font-size: clamp(2.2rem, 4vw, 3.5rem);
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -0.04em;

  margin: 12px 0 24px;
}


.toby-coming-inner h2 em {
  color: var(--toby-blue);
  font-style: normal;
}


.toby-coming-inner p {
  color: var(--muted);
  line-height: 1.9;

  margin-bottom: 18px;
}


.toby-coming-inner img {
  display: block;

  width: 100%;
  max-width: 480px;
  height: auto;

  object-fit: cover;

  border-radius: 28px;

  box-shadow: 0 16px 40px rgba(49, 91, 122, 0.09);
}


/* =========================================
   11. CONTACT SECTION
   ========================================= */

.toby-contact {
  background: var(--toby-pale-blue);
}


.toby-contact-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 40px;

  padding: clamp(30px, 5vw, 65px);

  background: var(--white);

  border: 1px solid var(--toby-border);
  border-radius: 30px;

  box-shadow: 0 12px 35px rgba(49, 91, 122, 0.04);
}


.toby-contact-inner .eyebrow {
  color: var(--toby-blue);
}


.toby-contact-inner h2 {
  font-family: var(--heading-font);
  font-size: clamp(2.2rem, 4vw, 3.4rem);
  font-weight: 700;
  line-height: 1.2;

  margin: 10px 0 18px;
}


.toby-contact-inner h2 em {
  color: var(--toby-blue);
  font-style: normal;
}


.toby-contact-inner p {
  max-width: 650px;

  color: var(--muted);
  line-height: 1.85;

  margin-bottom: 0;
}


.toby-contact-inner > .btn {
  flex-shrink: 0;
}


/* =========================================
   12. SIMPLE CENTRED CONTACT SECTION
   ========================================= */

.theme-tobys-tales .toby-contact--simple {
  background: var(--toby-pale-blue);
}


.theme-tobys-tales .toby-contact--simple .toby-contact-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;

  max-width: 850px;
  margin: 0 auto;
  padding: 0 20px;

  background: transparent;
  border: none;
  border-radius: 0;
  box-shadow: none;

  text-align: center;
}


.theme-tobys-tales .toby-contact--simple .toby-contact-copy {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
}


.theme-tobys-tales .toby-contact--simple h2 {
  margin: 12px 0 20px;
}


.theme-tobys-tales .toby-contact--simple p {
  max-width: 600px;
  margin: 0 auto 30px;
  text-align: center;
}


.theme-tobys-tales .toby-contact--simple .btn {
  width: auto;
  flex-shrink: 0;
}


/* =========================================
   13. BUTTON COLOURS
   ========================================= */

.theme-tobys-tales .btn-primary {
  background: var(--toby-blue);
  border-color: var(--toby-blue);
  color: #ffffff;
}


.theme-tobys-tales .btn-primary:hover {
  background: var(--toby-dark-blue);
  border-color: var(--toby-dark-blue);
  color: #ffffff;
}


.theme-tobys-tales .btn-outline {
  background: transparent;
  border-color: var(--toby-blue);
  color: var(--toby-dark-blue);
}


.theme-tobys-tales .btn-outline:hover {
  background: var(--toby-blue);
  border-color: var(--toby-blue);
  color: #ffffff;
}


.theme-tobys-tales .text-link:hover {
  color: var(--toby-blue);
}


/* =========================================
   14. ACCESSIBILITY
   ========================================= */

.toby-actions a:focus-visible,
.toby-contact a:focus-visible,
.toby-book-copy a:focus-visible {
  outline: 3px solid var(--toby-blue);
  outline-offset: 4px;
}


/* =========================================
   15. TABLET RESPONSIVENESS
   ========================================= */

@media (max-width: 1050px) {

  .toby-hero {
    gap: 40px;
  }

}


/* =========================================
   16. MOBILE RESPONSIVENESS
   ========================================= */

@media (max-width: 850px) {

  .toby-hero {
    grid-template-columns: 1fr;
    gap: 35px;

    padding-top: 75px;
    padding-bottom: 55px;
  }

  .toby-hero-copy {
    max-width: 100%;
  }

  .toby-hero-art {
    max-width: 520px;
    margin: 0 auto;
  }

  .toby-book-section {
    padding-top: 45px;
    padding-bottom: 45px;
  }

  .toby-book-grid,
  .toby-book-grid--reverse {
    grid-template-columns: 1fr;
    gap: 35px;
  }

  .toby-book-grid--reverse .toby-cover-frame {
    order: -1;
  }

  .toby-cover-frame {
    max-width: 600px;
    margin: 0 auto;
  }

  .language-book-cover {
    width: 100%;
    max-width: none;
    height: 100%;
  }

  .toby-coming-inner {
    grid-template-columns: 1fr;
    gap: 35px;
  }

  .toby-coming-inner img {
    max-width: 520px;
    margin: 0 auto;
  }

  .toby-contact-inner {
    flex-direction: column;
    align-items: flex-start;
  }

}


/* =========================================
   17. SMALL MOBILE SCREENS
   ========================================= */

@media (max-width: 650px) {

  .toby-hero {
    padding-top: 55px;
    padding-bottom: 40px;
  }

  .toby-hero h1 {
    font-size: clamp(2.8rem, 10vw, 4rem);
  }

  .toby-lead {
    font-size: 1.15rem;
  }

  .toby-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .toby-actions .btn {
    width: 100%;
    justify-content: center;
    text-align: center;
  }

  .toby-hero-art {
    border-radius: 25px;
  }

  .toby-book-section {
    padding-top: 35px;
    padding-bottom: 35px;
  }

  .toby-book-grid,
  .toby-book-grid--reverse {
    gap: 30px;
  }

  .toby-book-copy h3 {
    font-size: clamp(1.75rem, 7vw, 2.4rem);
  }

  .toby-cover-frame {
    padding: 0;
    border-radius: 24px;
  }

  .language-book-cover {
    border-radius: 0;
  }

  .language-options {
    gap: 8px;
  }

  .language-button {
    padding: 9px 13px;
    font-size: 0.8rem;
  }

  .toby-coming-inner h2,
  .toby-contact-inner h2 {
    font-size: clamp(2rem, 8vw, 2.7rem);
  }

  .toby-coming-inner img {
    border-radius: 22px;
  }

  .toby-contact-inner {
    padding: 28px 22px;
    border-radius: 24px;
  }

  .theme-tobys-tales .toby-contact--simple .toby-contact-inner {
    padding: 0 10px;
  }

  .theme-tobys-tales .toby-contact--simple .btn {
    width: 100%;
    max-width: 280px;
    justify-content: center;
  }

}


/* =========================================
   18. EXTRA SMALL SCREENS
   ========================================= */

@media (max-width: 380px) {

  .toby-hero h1 {
    font-size: 2.55rem;
  }

  .toby-cover-frame {
    padding: 0;
  }

  .language-button {
    font-size: 0.76rem;
    padding: 8px 11px;
  }

  .toby-contact-inner {
    padding: 24px 18px;
  }

}


/* =========================================
   19. REDUCED MOTION SUPPORT
   ========================================= */

@media (prefers-reduced-motion: reduce) {

  .language-book-cover,
  .language-button {
    transition: none;
  }

  .language-button:hover {
    transform: none;
  }

}


/* =========================================
   END OF TOBY'S TALES CSS
   ========================================= */

/* =========================================
   TOBY'S TALES SOCIAL BUTTON COLOURS
   ========================================= */

.theme-tobys-tales .social-button {
  background: var(--toby-blue);
  color: #ffffff;
}

.theme-tobys-tales .social-button:hover,
.theme-tobys-tales .social-button:focus-visible {
  background: var(--toby-dark-blue);
  color: #ffffff;
}