/*
Theme Name: PolylAI Studio
Description: A responsive block theme for the PolylAI Translator website.
Version: 1.0.4
Requires at least: 6.6
Requires PHP: 7.4
Text Domain: polylai-studio
License: GNU General Public License v2 or later
*/
:where(body) { overflow-wrap: break-word; }
:where(a, button, input, select, textarea):focus-visible { outline: 3px solid #8258e5; outline-offset: 4px; }
.poly-header { border-bottom: 1px solid #e8e4ef; }
.poly-header-inner { min-height: 72px; }
.poly-header .wp-block-site-title { white-space: nowrap; font-weight: 800; letter-spacing: -.04em; }
.poly-header a, .poly-footer a { text-decoration: none; }
.poly-header a:hover, .poly-footer a:hover { text-decoration: underline; }
.poly-footer { border-top: 1px solid #e8e4ef; }
.poly-footer .wp-block-navigation { font-size: .9rem; }
.poly-document { padding-block: clamp(2rem, 6vw, 5rem); min-height: 45vh; }
.poly-document img { max-width: 100%; height: auto; }
.poly-post-grid .wp-block-post { border: 1px solid #e8e4ef; border-radius: 18px; padding: 1.4rem; }
.poly-post-grid .wp-block-post-featured-image img { border-radius: 10px; }
.poly-home-content > .wp-block-group > .wp-block-columns.alignwide {
  width: 100%;
  max-width: var(--wp--style--global--wide-size, 1280px);
  margin-inline: auto;
}
.poly-home-content > .wp-block-group:first-child:has(h1) {
  background: radial-gradient(ellipse at 95% 4%, #e5d9ff 0%, #f6f1ff 45%, #fff 83%) !important;
  color: #21163b !important;
  border-bottom: 1px solid #e8e4ef;
  padding-block: clamp(3.75rem, 9vw, 8rem) !important;
}
.poly-home-content > .wp-block-group:first-child:has(h1) h1 {
  color: #21163b; font-size: clamp(2.7rem, 6.4vw, 5.4rem) !important;
  max-width: 12ch; letter-spacing: -.075em; line-height: 1.02;
}
.poly-home-content > .wp-block-group:first-child:has(h1) .wp-block-column > p { max-width: 44ch; color: #493d60; }
.poly-home-content > .wp-block-group:first-child:has(h1) .wp-block-column:nth-child(2) > .wp-block-group {
  background: #fff !important; color: #21163b !important; border: 1px solid #e8e0f6;
  border-radius: 24px !important; box-shadow: 0 24px 65px #46247f1b; counter-reset: polylai-step;
}
.poly-home-content > .wp-block-group:first-child:has(h1) .wp-block-column:nth-child(2) p {
  position: relative; padding: .85rem 0 .85rem 2.85rem; border-top: 1px solid #eee8f7; color: #493d60;
}
.poly-home-content > .wp-block-group:first-child:has(h1) .wp-block-column:nth-child(2) p::before {
  counter-increment: polylai-step; content: counter(polylai-step); position: absolute; left: 0; top: .85rem;
  display: grid; place-items: center; width: 1.9rem; height: 1.9rem; border-radius: 50%;
  background: #eee5ff; color: #5023a0; font-size: .85rem; font-weight: 750;
}
.poly-home-content a.wp-block-button__link[href*="wordpress.org/plugins/ai-translator-for-polylang"] {
  background: #6335bb !important; color: #fff !important; border: 1px solid #6335bb; border-radius: 9px;
}
.poly-home-content a.wp-block-button__link[href="#action"] {
  background: #fff !important; color: #38215e !important; border: 1px solid #d8cbe9;
}
.poly-home-content #action, .poly-home-content #pricing { scroll-margin-top: 2rem; }
.poly-home-content .wp-block-embed.is-provider-youtube {
  max-width: 860px; overflow: hidden; border-radius: 20px; box-shadow: 0 15px 45px #24143e22;
}
.poly-home-content .wp-block-group:has(> .wp-block-group #action) > .wp-block-columns > .wp-block-column {
  background: #f8f5fc; border: 1px solid #eee8f5; padding: clamp(1rem, 2.5vw, 1.7rem); border-radius: 16px;
}
.poly-home-content .wp-block-group:has(#pricing):not(.poly-home-content) .wp-block-column:has(.wp-block-buttons) {
  border: 1px solid #e5deef; border-radius: 18px; background: #fff; padding: 1.5rem !important;
}
.poly-home-content .wp-block-column:has(.purchase-pro) { box-shadow: 0 0 0 2px #6335bb, 0 12px 25px #6335bb17; }
@media (max-width: 781px) {
  .poly-header-inner { min-height: 64px; }
  .poly-post-grid .is-layout-grid { grid-template-columns: minmax(0, 1fr); }
  .poly-home-content > .wp-block-group:first-child:has(h1) h1 { max-width: 100%; }
}

.poly-footer {
  padding-block: 1.75rem 1.25rem;
  background: #f8f5fc;
}
.poly-footer .poly-footer-row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: .85rem 2rem;
}
.poly-footer .poly-footer-row > * { margin-block: 0; }
.poly-footer .wp-block-site-title { font-weight: 750; }
.poly-footer .poly-footer-row p { margin-block-start: .2rem; }
.poly-footer .wp-block-navigation__container { gap: .5rem 1.25rem; }
.poly-footer .poly-footer-credit {
  margin-block-start: 1rem;
  padding-block-start: .9rem;
  border-top: 1px solid #e8e4ef;
  font-size: .86rem;
  color: #665b77;
}
.poly-footer .poly-footer-credit > p {
  max-width: none;
  margin: 0;
}

.poly-contact {
  padding-block: clamp(2.5rem, 7vw, 6rem);
  background: linear-gradient(150deg, #f4edff, #fff 72%);
}
.poly-contact > .wp-block-post-title {
  font-size: clamp(2.6rem, 7vw, 4.8rem);
  margin-block: 0 1.25rem;
}
.poly-contact .poly-contact-content {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: start;
  gap: .85rem 2.75rem;
}
.poly-contact-content > :where(p, ul, ol, .wpforms-container) { margin: 0; }
.poly-contact-content > :where(ul, ol) { padding-inline-start: 1.25rem; }
.poly-contact-content > :where(ul, ol) li + li { margin-block-start: .65rem; }
.poly-contact-content > .wpforms-container {
  width: 100%;
  padding: clamp(1.1rem, 3vw, 2rem);
  box-sizing: border-box;
  border: 1px solid #e8e0f6;
  border-radius: 20px;
  background: #fff;
  box-shadow: 0 18px 55px #46247f15;
}
.poly-contact-content .wpforms-container :is(input, select, textarea) {
  --wpforms-field-border-radius: 8px;
  --wpforms-field-border-color: #cec3de;
}
.poly-contact-content .wpforms-container .wpforms-submit {
  background: #6335bb;
  border-radius: 9px;
  color: #fff;
}
.poly-contact-content .wpforms-container .wpforms-submit:hover { background: #50269e; }

@media (min-width: 900px) {
  .poly-contact .poly-contact-content { grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); }
  .poly-contact-content > :where(p, ul, ol) { grid-column: 1; }
  .poly-contact-content > .wpforms-container {
    grid-column: 2;
    grid-row: 1 / span 5;
  }
}

/* Bring back the original PolylAI illustration above the workflow steps. */
.poly-home-content > .wp-block-group:first-child:has(h1) .wp-block-column:nth-child(2) > .wp-block-group::before {
  content: "";
  display: block;
  width: min(100%, 10rem);
  aspect-ratio: 1;
  margin: 0 auto .85rem;
  background: url("https://www.wp-polylai.com/wp-content/uploads/2024/06/robot-removebg-preview.png") center / contain no-repeat;
}

.poly-header-brand { gap: .65rem; }
.poly-header-brand > * { margin: 0; }
.poly-header-brand .wp-block-site-logo img { display: block; height: auto; }
