/*
 * Clay Way homepage redesign.
 * Loaded only on the front page after the shared theme stylesheet.
 */

/* Keep the shared text-only review carousel compact on the homepage. */
.cw-homepage-sections .cw-reviews { padding-block: 52px 0; }
.cw-homepage-sections .cw-reviews__heading { margin-bottom: 28px; }
.cw-homepage-sections .cw-reviews__heading h2 { font-size: clamp(28px, 3vw, 42px); }
.cw-homepage-sections .cw-reviews__track { width: max-content; display: flex; align-items: stretch; gap: var(--cw-review-gap); transition: transform var(--cw-review-duration) cubic-bezier(.22, 1, .36, 1); will-change: transform; }
.cw-homepage-sections .cw-reviews__track.is-instant { transition: none; }
.cw-homepage-sections .cw-reviews__track.is-instant .cw-review-card { transition: none; }
.cw-homepage-sections .cw-review-card { flex: 0 0 var(--cw-review-card-width); }
.cw-homepage-sections .cw-review-card--no-product .cw-review-card__quote { max-width: 34ch; padding-bottom: 0; }

@media (max-width: 720px) {
  .cw-homepage-sections .cw-reviews { padding-block-start: 36px; }
  .cw-homepage-sections .cw-reviews__heading { margin-bottom: 20px; }
  .cw-homepage-sections .cw-reviews__heading h2 {
    font-size: clamp(24px, 6.5vw, 32px);
  }
}
.cw-lessons-cta { width: min(1160px, calc(100% - 64px)); padding-block: 36px 30px; }
.cw-lessons-cta__panel { aspect-ratio: auto; min-height: 370px; }
.cw-lessons-cta__copy { position: relative; min-height: 370px; padding: 28px 32px; }
.cw-lessons-cta__copy h2 { font-size: clamp(28px, 2.65vw, 38px); line-height: 1.12; }
.cw-lessons-cta__copy h2 span { white-space: normal; }
.cw-lessons-cta__copy > p { margin-top: 14px; font-size: 15px; line-height: 1.55; }
.cw-lessons-cta__copy > p + p { margin-top: 12px; }
.cw-lessons-cta__copy .cw-lessons-cta__promise { margin-top: 16px; font-size: 14px; }
.cw-lessons-cta__button { min-height: 48px; margin-top: 18px; padding: 9px 22px; font-size: 15px; }
@media (max-width: 820px) {
  .cw-lessons-cta { width: calc(100% - 32px); padding-block: 32px; }
  .cw-lessons-cta__panel { min-height: 0; }
  .cw-lessons-cta__copy { width: 100%; min-height: 0; padding: 28px; }
  .cw-lessons-cta__copy h2 { font-size: clamp(29px, 5.4vw, 38px); }
  .cw-lessons-cta__visual { aspect-ratio: 2 / 1; max-height: 260px; }
}

@media (max-width: 680px) {
  .cw-lessons-cta__visual { aspect-ratio: 932 / 413; max-height: none; }
  .cw-lessons-cta__visual img { object-position: center; }
}
@media (max-width: 640px) {
  .cw-homepage-sections .cw-reviews__heading h2 { font-size: clamp(24px, 6.5vw, 32px); }
  .cw-homepage-sections .cw-review-card { min-height: 300px; padding: 24px; }
  .cw-homepage-sections .cw-review-card__quote { font-size: 19px; padding-bottom: 0; }
  .cw-homepage-sections .cw-review-card__name { bottom: 20px; left: 24px; }
}

/* Match the existing About heading scale, without changing desktop typography. */
@media (max-width: 680px) {
  .cw-homepage-sections .cw-reviews__heading h2 {
    font-family: var(--wp--preset--font-family--display, "Raleway", sans-serif);
    font-size: 32px;
    font-weight: 400;
    line-height: 1;
    letter-spacing: -.035em;
    margin: 0;
  }
}
@media (max-width: 420px) {
  .cw-homepage-sections .cw-reviews__heading h2 { font-size: 29px; }
}
@media (max-width: 360px) {
  .cw-homepage-sections .cw-reviews__heading { grid-template-columns: 1fr; }
  .cw-homepage-sections .cw-reviews__rule,
  .cw-homepage-sections .cw-reviews__dot { display: none; }
}

.cw-homepage-sections {
  overflow-x: clip;
}

.home-hero {
  width: 100%;
  box-sizing: border-box;
  padding: clamp(18px, 2.2vw, 32px) 24px clamp(58px, 6.5vw, 96px);
}

.home-hero__frame {
  position: relative;
  width: min(100%, 1440px);
  aspect-ratio: 1610 / 900;
  margin-inline: auto;
  overflow: hidden;
  border: 1px solid rgba(219, 190, 168, .42);
  border-radius: clamp(28px, 2.6vw, 36px);
  background: #eadbce;
  box-shadow: 0 26px 80px rgba(92, 57, 35, .09);
}

.home-hero__picture,
.home-hero__picture img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.home-hero__picture img {
  max-width: none;
  object-fit: cover;
  object-position: center 48%;
}

.home-hero__copy {
  position: absolute;
  z-index: 2;
  left: clamp(38px, 6.2vw, 96px);
  top: 50%;
  width: min(41%, 590px);
  transform: translateY(-45%);
}

.home-hero__copy h1 {
  max-width: 570px;
  margin: 0;
  color: #4a94bc;
  font-family: var(--wp--preset--font-family--display, Raleway, "Segoe UI", sans-serif);
  font-size: clamp(34px, 3.2vw, 52px);
  font-weight: 500;
  letter-spacing: -.035em;
  line-height: 1.07;
  text-wrap: balance;
}

.home-hero__line {
  display: inline;
}

.home-hero__button {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-top: 20px;
  padding: 10px 21px;
  border: 1px solid rgba(174, 117, 78, .12);
  border-radius: 999px;
  color: #7d3a1d;
  background: rgba(255, 253, 250, .94);
  box-shadow: 0 12px 26px rgba(112, 67, 37, .11);
  font-size: 14px;
  font-weight: 650;
  text-decoration: none;
  transition: transform .16s ease, box-shadow .16s ease, background-color .16s ease;
}

.home-hero__button:hover {
  transform: translateY(-2px);
  background: #fff;
  box-shadow: 0 16px 32px rgba(112, 67, 37, .16);
}

.home-hero__button:focus-visible,
.category-showcase a:focus-visible {
  outline: 3px solid #176182;
  outline-offset: 4px;
}

.category-showcase {
  width: min(calc(100% - 64px), 1360px);
  box-sizing: border-box;
  margin-inline: auto;
  padding-bottom: clamp(24px, 3vw, 44px);
}

.category-showcase__heading {
  display: grid;
  grid-template-columns: minmax(70px, 1fr) auto minmax(70px, 1fr);
  align-items: center;
  gap: clamp(20px, 3vw, 46px);
  margin-bottom: clamp(38px, 4vw, 58px);
}

.category-showcase__heading h2 {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(13px, 1.5vw, 24px);
  margin: 0;
  color: var(--cw-ink, #2d211c);
  font-family: var(--wp--preset--font-family--display, Raleway, "Segoe UI", sans-serif);
  font-size: clamp(34px, 3.15vw, 49px);
  font-weight: 430;
  letter-spacing: -.04em;
  line-height: 1;
  white-space: nowrap;
}

.category-showcase__heading h2 picture {
  width: clamp(152px, 14vw, 206px);
  aspect-ratio: 966 / 567;
  display: block;
  flex: 0 0 auto;
}

.category-showcase__heading h2 picture img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.category-showcase__rule {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 15px;
}

.category-showcase__rule::before {
  content: "";
  height: 1px;
  flex: 1;
  background: var(--cw-sky, #4799c6);
}

.category-showcase__rule i {
  width: 15px;
  height: 15px;
  flex: 0 0 15px;
  border-radius: 50%;
  background: var(--cw-sky, #4799c6);
  box-shadow: 0 4px 12px rgba(71, 153, 198, .2);
}

.category-showcase__rule--reverse {
  flex-direction: row-reverse;
}

.category-showcase__nav {
  display: none;
}

.category-showcase__grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(12px, 1.35vw, 20px);
}

.category-showcase__card--wide {
  grid-column: span 2;
}

.category-showcase__card--lessons {
  align-self: start;
}

.category-showcase__image--wide {
  aspect-ratio: 12 / 7;
}

.category-showcase__card {
  min-width: 0;
  overflow: hidden;
  border: 1px solid rgba(222, 210, 198, .72);
  border-radius: clamp(20px, 1.8vw, 28px);
  color: var(--cw-ink, #29211d);
  background: #f5eee7;
  box-shadow: 0 14px 38px rgba(72, 47, 31, .045);
  text-decoration: none;
  transition: transform .16s ease, box-shadow .16s ease;
}

.category-showcase__image {
  position: relative;
  display: block;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  background: #f3f1ed;
}

.category-showcase__image img {
  width: 100%;
  height: 100%;
  max-width: none;
  object-fit: cover;
  transition: transform .16s ease;
}

.category-showcase__card--lessons .category-showcase__image img {
  display: block;
  object-fit: cover;
  object-position: center;
}

@media (min-width: 761px) {
  .category-showcase__card--lessons .category-showcase__image {
    aspect-ratio: 932 / 413;
  }
}

@media (min-width: 1200px) {
  .category-showcase__card--lessons {
    min-height: 0;
    display: grid;
    grid-template-rows: minmax(0, 1fr) auto;
    align-self: stretch;
  }

  .category-showcase__card--lessons .category-showcase__image {
    height: 100%;
    aspect-ratio: auto;
  }

  .category-showcase__card--lessons .category-showcase__image img {
    object-position: left top;
  }
}

.category-showcase__meta {
  min-width: 0;
  min-height: 94px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  box-sizing: border-box;
  padding: 17px clamp(13px, 1.25vw, 20px);
  background: linear-gradient(135deg, #f7f0e9, #f2e9e0);
}

.category-showcase__meta strong {
  min-width: 0;
  min-height: 2.36em;
  display: grid;
  align-content: center;
  color: #29211d;
  font-size: clamp(14px, 1.18vw, 18px);
  font-weight: 550;
  letter-spacing: .005em;
  line-height: 1.18;
}

.category-showcase__meta strong span {
  display: block;
  white-space: nowrap;
}

.category-showcase__meta i {
  width: clamp(38px, 3vw, 44px);
  height: clamp(38px, 3vw, 44px);
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  border: 1px solid currentColor;
  border-radius: 50%;
  font-family: var(--wp--preset--font-family--body, Raleway, "Segoe UI", sans-serif);
  font-size: 20px;
  font-style: normal;
  transition: transform .16s ease, background-color .16s ease;
}

.category-showcase__card:hover {
  transform: translateY(-2px);
  box-shadow: 0 20px 48px rgba(72, 47, 31, .09);
}

.category-showcase__card:hover .category-showcase__image img {
  transform: scale(1.012);
}

.category-showcase__card--lessons:hover .category-showcase__image img {
  transform: none;
}

.category-showcase__card:hover .category-showcase__meta i {
  transform: translateX(3px);
  background: rgba(255, 255, 255, .48);
}

.cw-about-page--home {
  padding-top: 0;
}

@media (min-width: 1200px) {
  .home-hero {
    padding-block: clamp(16px, 1.4vw, 22px) clamp(34px, 3.5vw, 50px);
  }

  .home-hero__frame {
    width: min(100%, 1160px);
    aspect-ratio: 16 / 8.6;
    border-radius: 30px;
  }

  .home-hero__copy {
    left: clamp(44px, 4.6vw, 66px);
    width: min(40%, 470px);
  }

  .home-hero__copy h1 {
    max-width: 470px;
    font-size: clamp(34px, 2.75vw, 44px);
  }

  .home-hero__button {
    min-height: 42px;
    margin-top: 16px;
    padding: 9px 18px;
    font-size: 13px;
  }

  .category-showcase {
    width: min(calc(100% - 64px), 1040px);
    padding-bottom: 28px;
  }

  .category-showcase__heading {
    grid-template-columns: minmax(52px, 1fr) auto minmax(52px, 1fr);
    gap: 24px;
    margin-bottom: 28px;
  }

  .category-showcase__heading h2 {
    gap: 14px;
    font-size: clamp(30px, 2.4vw, 38px);
  }

  .category-showcase__heading h2 picture {
    width: clamp(132px, 10.6vw, 158px);
  }

  .category-showcase__grid {
    gap: 16px;
  }

  .category-showcase__meta {
    min-height: 72px;
    padding: 12px 14px;
  }

  .category-showcase__meta strong {
    font-size: clamp(14px, 1.05vw, 16px);
  }

  .category-showcase__meta i {
    width: 36px;
    height: 36px;
    font-size: 18px;
  }
}

@media (max-width: 1199px) {
  .home-hero__frame {
    aspect-ratio: 16 / 10;
  }

  .home-hero__copy {
    width: 44%;
  }

  .home-hero__copy h1 {
    font-size: clamp(31px, 4vw, 43px);
  }

  .category-showcase {
    width: min(calc(100% - 48px), 1100px);
  }

  .category-showcase__heading {
    margin-bottom: 30px;
  }

  .category-showcase__heading h2 {
    font-size: clamp(30px, 4vw, 42px);
  }

  .category-showcase__grid {
    width: min(100%, 980px);
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: clamp(16px, 2.4vw, 26px);
    margin-inline: auto;
  }

  .category-showcase__card--wide {
    grid-column: 1 / -1;
    width: calc((200% - clamp(16px, 2.4vw, 26px)) / 3);
    justify-self: center;
  }

  .category-showcase__image {
    aspect-ratio: 12 / 7;
  }

  .category-showcase__meta {
    min-height: 94px;
    padding: 16px clamp(16px, 2.5vw, 28px);
  }

  .category-showcase__meta strong {
    font-size: clamp(18px, 2.8vw, 28px);
  }

  .category-showcase__meta i {
    width: clamp(44px, 5vw, 56px);
    height: clamp(44px, 5vw, 56px);
    font-size: 24px;
  }
}

@media (max-width: 760px) {
  .home-hero {
    padding-inline: 12px;
  }

  .home-hero__frame {
    min-height: 448px;
    aspect-ratio: 4 / 5;
    border-radius: 28px;
  }

  .home-hero__picture img {
    object-position: center bottom;
  }

  .home-hero__copy {
    left: clamp(24px, 7vw, 46px);
    top: 10%;
    width: calc(100% - clamp(48px, 14vw, 92px));
    transform: none;
  }

  .home-hero__copy h1 {
    max-width: 620px;
    font-size: clamp(28px, 7vw, 38px);
    line-height: 1.04;
  }

  .home-hero__line {
    display: block;
    white-space: nowrap;
  }

  .home-hero__button {
    min-height: 44px;
    margin-top: 20px;
    font-size: 14px;
  }

  .category-showcase__heading {
    grid-template-columns: minmax(22px, 1fr) auto minmax(22px, 1fr);
    gap: 12px;
  }

  .category-showcase__heading h2 {
    gap: 10px;
    font-size: clamp(20px, 4.9vw, 31px);
  }

  .category-showcase__heading h2 picture {
    width: clamp(96px, 24vw, 138px);
  }

  .category-showcase__rule {
    gap: 7px;
  }

  .category-showcase__rule i {
    width: 11px;
    height: 11px;
    flex-basis: 11px;
  }

  .category-showcase__nav--quick-links {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
    margin-bottom: 24px;
  }

  .category-showcase__nav-link {
    min-width: 0;
    min-height: 42px;
    display: grid;
    place-items: center;
    box-sizing: border-box;
    padding: 8px 6px;
    border: 1px solid rgba(190, 137, 96, .48);
    border-radius: 8px;
    color: var(--cw-ink, #2d211c);
    background: rgba(255, 253, 249, .72);
    font-size: clamp(12px, 3.4vw, 15px);
    font-weight: 500;
    line-height: 1.1;
    text-align: center;
    white-space: nowrap;
    transition: transform .16s ease, border-color .16s ease, background-color .16s ease;
  }

  .category-showcase__nav-link:hover {
    border-color: rgba(190, 137, 96, .72);
    background: #fffaf5;
  }

  .category-showcase__nav-link:active {
    transform: translateY(1px);
    background: #f4e9de;
  }

  .category-showcase__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .category-showcase__card--wide {
    grid-column: span 2;
    width: auto;
    justify-self: stretch;
  }

  .category-showcase__card--wide .category-showcase__image {
    height: auto;
    aspect-ratio: 932 / 413;
  }

  .category-showcase__card--wide .category-showcase__image img {
    object-position: center 50%;
  }
}

/* Keep homepage section titles on the same scale as “Kūrybinis kelias”. */
.cw-homepage-sections .category-showcase__heading h2,
.cw-homepage-sections .cw-reviews__heading h2,
.cw-homepage-sections .cw-about-heading,
.cw-homepage-sections .cw-lessons-cta__copy h2 {
  font-family: var(--wp--preset--font-family--display, Raleway, "Segoe UI", sans-serif);
  font-size: clamp(35px, 3.25vw, 38px);
  font-weight: 400;
  letter-spacing: -.035em;
}

@media (min-width: 1121px) {
  .cw-homepage-sections .category-showcase__heading h2,
  .cw-homepage-sections .cw-reviews__heading h2,
  .cw-homepage-sections .cw-about-heading,
  .cw-homepage-sections .cw-lessons-cta__copy h2 {
    font-size: 38px;
  }
}

@media (max-width: 680px) {
  .cw-homepage-sections .category-showcase__heading h2,
  .cw-homepage-sections .cw-reviews__heading h2,
  .cw-homepage-sections .cw-about-heading,
  .cw-homepage-sections .cw-lessons-cta__copy h2 {
    font-size: 32px;
  }
}

@media (max-width: 420px) {
  .cw-homepage-sections .category-showcase__heading h2,
  .cw-homepage-sections .cw-reviews__heading h2,
  .cw-homepage-sections .cw-about-heading,
  .cw-homepage-sections .cw-lessons-cta__copy h2 {
    font-size: 29px;
  }
}

@media (max-width: 520px) {
  .category-showcase {
    width: calc(100% - 24px);
  }

  .category-showcase__heading {
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
    gap: 8px;
    margin-bottom: 24px;
  }

  .category-showcase__heading h2 {
    min-width: 0;
    gap: 8px;
  }

  .category-showcase__heading h2 picture {
    width: clamp(80px, 20vw, 96px);
  }

  .category-showcase__grid {
    gap: 10px;
  }

  .category-showcase__card {
    border-radius: 18px;
  }

  .category-showcase__meta {
    min-height: 78px;
    gap: 6px;
    padding: 11px 10px 11px 12px;
  }

  .category-showcase__meta strong {
    font-size: clamp(11px, 3.5vw, 15px);
    line-height: 1.12;
  }

  .category-showcase__meta i {
    width: 38px;
    height: 38px;
    font-size: 19px;
  }

  .category-showcase__card--wide .category-showcase__meta {
    min-height: 46px;
    padding-block: 5px;
  }

  .category-showcase__card--wide .category-showcase__meta strong {
    min-height: 0;
  }

  .category-showcase__card--wide .category-showcase__meta i {
    width: 34px;
    height: 34px;
    font-size: 17px;
  }
}

@media (max-width: 380px) {
  .home-hero__frame {
    min-height: 448px;
  }

  .home-hero__copy h1 { font-size: clamp(28px, 8.1vw, 34px); }

  .category-showcase__heading {
    gap: 7px;
  }

  .category-showcase__heading h2 {
    gap: 7px;
    font-size: 18px;
  }

  .category-showcase__heading h2 picture {
    width: 84px;
  }

  .category-showcase__nav--quick-links { gap: 6px; }
  .category-showcase__nav-link { min-height: 40px; padding-inline: 3px; font-size: 11.5px; }

  .category-showcase__meta strong {
    font-size: 11px;
  }

  .category-showcase__meta {
    gap: 4px;
    padding-inline: 8px;
  }

  .category-showcase__meta i {
    width: 34px;
    height: 34px;
    font-size: 17px;
  }
}

/* Homepage desktop density target: 90%, using component dimensions rather than zoom. */
@media (min-width: 1200px) {
  .cw-homepage-sections { --cw-home-desktop-scale: 0.9; }
  .home-hero__frame { max-width: 1044px; width: min(100%, 1044px); }
  .home-hero__copy { left: clamp(40px, 4.15vw, 59px); max-width: 423px; }
  .home-hero__copy h1 { font-size: clamp(31px, 2.48vw, 40px); max-width: 423px; }
  .home-hero__button { margin-top: 14px; }
  .category-showcase { max-width: 936px; width: min(calc(100% - 64px), 936px); }
  .category-showcase__heading { margin-bottom: 25px; }
  .category-showcase__heading h2,
  .cw-homepage-sections .cw-reviews__heading h2,
  .cw-homepage-sections .cw-about-heading,
  .cw-homepage-sections .cw-lessons-cta__copy h2 { font-size: 34px; }
  .cw-about-page--home .cw-about-origin {
    gap: clamp(2.35rem, 4.5vw, 4.6rem);
    padding-bottom: clamp(5.2rem, 7.2vw, 7.1rem);
    width: min(calc(100% - 64px), 1224px);
  }
  .cw-homepage-sections .cw-reviews { --cw-review-card-width: min(55.8vw, 738px); padding-block-start: 47px; }
  .cw-homepage-sections .cw-reviews__heading { width: min(calc(100% - 64px), 1224px); }
  .cw-lessons-cta { width: min(1044px, calc(100% - 64px)); }
}

@media (prefers-reduced-motion: reduce) {
  .home-hero__button,
  .category-showcase__card,
  .category-showcase__image img,
  .category-showcase__meta i,
  .category-showcase__nav-link {
    transition: none;
  }

  .category-showcase__card:hover,
  .category-showcase__card:hover .category-showcase__image img,
  .category-showcase__card:hover .category-showcase__meta i {
    transform: none;
  }
}
