/**
 * HomeWiP Home Page styles
 * Loaded by the child theme's front-page.php template.
 *
 * All rules are namespaced under `.hwip-home` so they never leak into
 * admin UI, other pages, or the Goodlayers page builder.
 *
 * Performance notes:
 *   - No external images; the hero "lot" graphic is inline SVG in PHP.
 *   - Only one webfont file is needed for LCP (Poppins 600). It is
 *     preloaded in front-page.php and referenced by local() first so
 *     installed copies are used with zero network cost.
 *   - `contain: layout paint` on the H1 lets the browser paint the LCP
 *     element without waiting on off-screen work.
 *   - `size-adjust` on the fallback face prevents layout shift on swap.
 *   - The whole stylesheet is intended to be inlined into <style> by
 *     front-page.php via file_get_contents() for single-request LCP.
 *     If enqueued as a normal asset instead, it still works fine.
 */

/* ---------- Webfonts (loaded globally so parent theme UI can use them too) ---------- */
@font-face {
  font-family: "Poppins";
  src: local("Poppins SemiBold"), local("Poppins-SemiBold"),
       url("https://fonts.gstatic.com/s/poppins/v20/pxiByp8kv8JHgFVrLGT9Z1xlFQ.woff2") format("woff2");
  font-weight: 600; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Poppins";
  src: local("Poppins Regular"),
       url("https://fonts.gstatic.com/s/poppins/v20/pxiEyp8kv8JHgFVrJJfecnFHGPc.woff2") format("woff2");
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Roboto";
  src: local("Roboto"),
       url("https://fonts.gstatic.com/s/roboto/v30/KFOmCnqEu92Fr1Mu4mxK.woff2") format("woff2");
  font-weight: 400 700; font-style: normal; font-display: swap;
}
/* Metric-compatible fallback so the system font matches Poppins
   dimensions until the webfont swaps in — eliminates CLS on the hero. */
@font-face {
  font-family: "Poppins-fallback";
  src: local("Arial");
  size-adjust: 112%;
  ascent-override: 95%;
  descent-override: 25%;
  line-gap-override: 0%;
}

/* ---------- Design tokens (scoped to the home page wrapper) ---------- */
.hwip-home {
  --teal:        #009DA6;
  --teal-dark:   #007078;
  --yellow:      #F9CB21;
  --orange:      #F96F3E;
  --turquoise:   #7EC8BA;
  --red:         #FB4556;
  --violet:      #5E57C0;
  --ink:         #0E2A2C;
  --muted:       #4C6264;
  --bg:          #FFFFFF;
  --bg-soft:     #F4FAFA;
  --line:        #E3EDED;
  --radius:      14px;
  --shadow:      0 8px 24px rgba(0,62,66,.08);
  --maxw:        1180px;
  --step:        clamp(1rem, .85rem + .7vw, 1.125rem);

  font-family: "Roboto", system-ui, -apple-system, "Segoe UI", Arial, sans-serif;
  font-size: var(--step);
  line-height: 1.55;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

/* ---------- Reset inside the wrapper ---------- */
.hwip-home,
.hwip-home *,
.hwip-home *::before,
.hwip-home *::after { box-sizing: border-box; }

.hwip-home h1,
.hwip-home h2,
.hwip-home h3 {
  font-family: "Poppins", "Poppins-fallback", system-ui, Arial, sans-serif;
  font-weight: 600;
  line-height: 1.1;
  margin: 0 0 .5em;
  letter-spacing: -.01em;
  color: var(--ink);
}
.hwip-home p { margin: 0 0 1em; color: inherit; }
.hwip-home a { color: var(--teal); text-decoration: none; }
.hwip-home a:hover { text-decoration: underline; }
.hwip-home img,
.hwip-home svg { max-width: 100%; height: auto; display: block; }

.hwip-home .wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 20px; }

/* ---------- Hero (LCP zone) ---------- */
.hwip-home .hero {
  position: relative;
  padding: 72px 0 64px;
  background:
    radial-gradient(1200px 500px at 85% 0%, #E6F6F5 0%, transparent 60%),
    linear-gradient(180deg, #F7FCFB 0%, #FFFFFF 100%);
  overflow: hidden;
}
.hwip-home .hero-grid {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: 56px;
  align-items: center;
}
.hwip-home .eyebrow {
  display: inline-block;
  font-family: "Roboto", sans-serif;
  font-size: .8rem; font-weight: 600; letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--teal-dark);
  background: #DFF3F2; border: 1px solid #C4E8E6;
  padding: 6px 12px; border-radius: 999px;
  margin-bottom: 18px;
}
.hwip-home .h1 {
  font-size: clamp(2.1rem, 1.2rem + 3.2vw, 3.75rem);
  max-width: 16ch;
  margin-bottom: 20px;
  contain: layout paint; /* isolate the LCP element */
}
.hwip-home .h1 em {
  font-style: normal;
  color: var(--teal);
  background: linear-gradient(180deg, transparent 62%, #FFF1B8 62%);
  padding: 0 .05em;
}
.hwip-home .sub {
  font-size: 1.125rem; color: var(--muted);
  max-width: 56ch; margin-bottom: 28px;
}
.hwip-home .ctas {
  display: flex; flex-wrap: wrap; gap: 14px; align-items: center;
}
.hwip-home .btn,
.hwip-home a.btn,
.hwip-home a.btn:hover,
.hwip-home a.btn:focus {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: "Roboto", sans-serif; font-weight: 600; font-size: 1rem;
  padding: 14px 22px; border-radius: 12px;
  transition: transform .1s ease, box-shadow .2s ease, background .2s ease;
  border: 2px solid transparent; cursor: pointer;
  text-decoration: none !important;
}
.hwip-home .btn-primary {
  background: var(--orange); color: #fff;
  box-shadow: 0 6px 16px rgba(249,111,62,.32);
}
.hwip-home .btn-primary:hover {
  background: #E35B2A; text-decoration: none; transform: translateY(-1px);
}
.hwip-home .btn-ghost {
  background: #fff; color: var(--teal-dark); border-color: var(--teal);
}
.hwip-home .btn-ghost:hover { background: #EAF7F6; text-decoration: none; }
.hwip-home .supporting {
  margin-top: 14px; font-size: .92rem; color: var(--muted);
  display: flex; align-items: center; gap: 8px;
}
.hwip-home .supporting svg { width: 16px; height: 16px; fill: var(--teal); }

.hwip-home .hero-art {
  position: relative;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  background: #fff;
  padding: 14px;
  border: 1px solid var(--line);
}
.hwip-home .hero-art svg {
  width: 100%; height: auto; display: block; border-radius: 8px;
}
.hwip-home .hero-art .tag {
  position: absolute; bottom: 22px; left: 22px;
  background: #fff; border-radius: 10px;
  padding: 10px 14px;
  font-family: "Roboto", sans-serif; font-size: .85rem; font-weight: 600;
  box-shadow: 0 4px 12px rgba(0,62,66,.12);
  display: flex; align-items: center; gap: 10px;
}
.hwip-home .hero-art .tag .dot {
  width: 10px; height: 10px; border-radius: 50%;
  background: var(--orange);
  box-shadow: 0 0 0 4px rgba(249,111,62,.22);
}

/* ---------- Section base ---------- */
.hwip-home .section { padding: 72px 0; }
.hwip-home .section-soft { background: var(--bg-soft); }
.hwip-home .section-head { text-align: center; max-width: 720px; margin: 0 auto 48px; }
.hwip-home .section-head h2 {
  font-size: clamp(1.7rem, 1.2rem + 1.6vw, 2.4rem);
  margin-bottom: 12px;
}
.hwip-home .section-head p { color: var(--muted); font-size: 1.05rem; }
.hwip-home .kicker {
  display: inline-block; color: var(--teal-dark);
  font-family: "Roboto", sans-serif;
  font-size: .8rem; font-weight: 700;
  letter-spacing: .14em; text-transform: uppercase;
  margin-bottom: 10px;
}

/* ---------- 3 core messages ---------- */
.hwip-home .cards { display: grid; gap: 22px; grid-template-columns: repeat(3, 1fr); }
.hwip-home .card {
  background: #fff; border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px 26px;
  transition: transform .15s, box-shadow .2s;
}
.hwip-home .card:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.hwip-home .card .icon {
  width: 52px; height: 52px; border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 18px;
}
.hwip-home .card .icon svg { width: 26px; height: 26px; fill: #fff; }
.hwip-home .card-1 .icon { background: var(--teal); }
.hwip-home .card-2 .icon { background: var(--violet); }
.hwip-home .card-3 .icon { background: var(--orange); }
.hwip-home .card h3 { font-size: 1.25rem; margin-bottom: 8px; }
.hwip-home .card p { color: var(--muted); margin: 0; }

/* ---------- How it works ---------- */
.hwip-home .steps {
  display: grid; gap: 18px;
  grid-template-columns: repeat(4, 1fr);
  counter-reset: step;
}
.hwip-home .step {
  background: #fff; border: 1px solid var(--line);
  border-radius: var(--radius); padding: 24px 22px; position: relative;
}
.hwip-home .step::before {
  counter-increment: step;
  content: counter(step, decimal-leading-zero);
  font-family: "Poppins", "Poppins-fallback", sans-serif;
  font-weight: 600; font-size: 1.3rem; color: var(--teal);
  display: block; margin-bottom: 10px;
}
.hwip-home .step h3 { font-size: 1.08rem; margin-bottom: 6px; }
.hwip-home .step p { color: var(--muted); font-size: .95rem; margin: 0; }

/* ---------- Differentiator strip ---------- */
.hwip-home .diff {
  background: linear-gradient(135deg, var(--teal) 0%, #00828A 100%);
  color: #fff; border-radius: 20px; padding: 56px 48px;
  display: grid; grid-template-columns: 1.1fr 1fr; gap: 48px;
  align-items: center;
}
.hwip-home .diff h2 {
  color: #fff;
  font-size: clamp(1.6rem, 1.1rem + 1.4vw, 2.15rem);
}
.hwip-home .diff p { color: rgba(255,255,255,.88); }
.hwip-home .diff .compare {
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.18);
  border-radius: 14px; padding: 22px 24px;
}
.hwip-home .compare ul { list-style: none; margin: 0; padding: 0; }
.hwip-home .compare li {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid rgba(255,255,255,.14);
  font-size: .98rem;
}
.hwip-home .compare li:last-child { border-bottom: 0; }
.hwip-home .compare .check {
  width: 22px; height: 22px; border-radius: 50%;
  background: var(--yellow); color: var(--ink);
  display: inline-flex; align-items: center; justify-content: center;
  font-weight: 700; flex-shrink: 0;
}
.hwip-home .compare .x {
  background: rgba(255,255,255,.15);
  color: rgba(255,255,255,.6);
}

/* ---------- Plan library teaser ---------- */
.hwip-home .teaser {
  display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: center;
}
.hwip-home .teaser h2 { font-size: clamp(1.7rem, 1.2rem + 1.5vw, 2.3rem); }
.hwip-home .teaser .points { list-style: none; margin: 24px 0 0; padding: 0; }
.hwip-home .teaser .points li {
  display: flex; gap: 12px; padding: 10px 0; font-size: 1rem;
}
.hwip-home .teaser .points svg {
  width: 22px; height: 22px; fill: var(--teal);
  flex-shrink: 0; margin-top: 2px;
}
.hwip-home .mini-map {
  position: relative; background: #F0F7F6;
  border-radius: var(--radius); border: 1px solid var(--line);
  padding: 14px; box-shadow: var(--shadow);
}
.hwip-home .mini-map svg { width: 100%; height: auto; border-radius: 8px; }

/* ---------- Builder strip ---------- */
.hwip-home .builder {
  background: #0E2A2C; color: #fff; border-radius: 20px;
  padding: 48px 44px;
  display: grid; grid-template-columns: 1.1fr .9fr; gap: 40px;
  align-items: center;
}
.hwip-home .builder h2 {
  color: #fff;
  font-size: clamp(1.55rem, 1.1rem + 1.2vw, 2rem);
}
.hwip-home .builder p { color: rgba(255,255,255,.8); margin-bottom: 20px; }
.hwip-home .builder .btn-yellow {
  background: var(--yellow); color: var(--ink);
  box-shadow: 0 6px 16px rgba(249,203,33,.3);
}
.hwip-home .builder .btn-yellow:hover { background: #F5C211; }
.hwip-home .builder-tags { display: flex; flex-wrap: wrap; gap: 10px; }
.hwip-home .builder-tags span {
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.18);
  border-radius: 999px;
  padding: 8px 14px; font-size: .88rem; font-weight: 500;
}

/* ---------- Final CTA ---------- */
.hwip-home .final {
  text-align: center; padding: 80px 20px;
  background:
    radial-gradient(800px 300px at 50% 100%, #FFF6D9 0%, transparent 60%),
    #FFFBEE;
}
.hwip-home .final h2 {
  font-size: clamp(1.9rem, 1.3rem + 1.8vw, 2.6rem);
  max-width: 20ch; margin: 0 auto 14px;
}
.hwip-home .final p {
  color: var(--muted); max-width: 56ch; margin: 0 auto 28px;
}

/* ---------- Responsive: 860 / 520 / 380 ---------- */
@media (max-width: 860px) {
  .hwip-home .wrap { padding: 0 18px; }
  .hwip-home .section { padding: 56px 0; }
  .hwip-home .section-head { margin-bottom: 36px; }
  .hwip-home .hero { padding: 36px 0 40px; }
  .hwip-home .hero-grid { grid-template-columns: 1fr; gap: 28px; }
  .hwip-home .hero-art { order: 2; padding: 10px; }
  .hwip-home .hero-art .tag {
    position: static; margin-top: 10px; width: 100%;
    border-radius: 8px; box-shadow: none; background: #F4FAFA;
  }
  .hwip-home .h1 { margin-bottom: 16px; }
  .hwip-home .sub { font-size: 1.05rem; margin-bottom: 22px; }
  .hwip-home .ctas { gap: 12px; }
  .hwip-home .hero .ctas,
  .hwip-home .final .ctas { flex-direction: column; align-items: stretch; }
  .hwip-home .btn { padding: 14px 20px; font-size: .98rem; }
  .hwip-home .btn-primary,
  .hwip-home .btn-ghost,
  .hwip-home .btn-yellow { width: 100%; justify-content: center; }
  .hwip-home .section-head h2 {
    font-size: clamp(1.55rem, 1.1rem + 2.4vw, 2rem);
  }
  .hwip-home .cards { grid-template-columns: 1fr; }
  .hwip-home .card { padding: 24px 22px; }
  .hwip-home .steps { grid-template-columns: 1fr 1fr; }
  .hwip-home .step { padding: 22px 20px; }
  .hwip-home .diff {
    grid-template-columns: 1fr; padding: 36px 26px;
    border-radius: 16px; gap: 28px;
  }
  .hwip-home .diff .compare { padding: 18px 20px; }
  .hwip-home .compare li { font-size: .95rem; padding: 11px 0; }
  .hwip-home .teaser { grid-template-columns: 1fr; gap: 32px; }
  .hwip-home .builder {
    grid-template-columns: 1fr; padding: 36px 26px;
    gap: 28px; border-radius: 16px;
  }
  .hwip-home .builder-tags { gap: 8px; }
  .hwip-home .builder-tags span { font-size: .82rem; padding: 7px 12px; }
  .hwip-home .final { padding: 64px 20px; }
}
@media (max-width: 520px) {
  .hwip-home .wrap { padding: 0 16px; }
  .hwip-home .section { padding: 48px 0; }
  .hwip-home .hero { padding: 28px 0 32px; }
  .hwip-home .eyebrow {
    font-size: .72rem; padding: 5px 11px; margin-bottom: 14px;
  }
  .hwip-home .h1 {
    font-size: clamp(1.85rem, 1rem + 5vw, 2.4rem);
    max-width: none;
  }
  .hwip-home .sub { font-size: 1rem; }
  .hwip-home .supporting { font-size: .88rem; align-items: flex-start; }
  .hwip-home .cards,
  .hwip-home .steps { gap: 16px; }
  .hwip-home .steps { grid-template-columns: 1fr; }
  .hwip-home .card h3 { font-size: 1.15rem; }
  .hwip-home .card p,
  .hwip-home .step p { font-size: .94rem; }
  .hwip-home .diff { padding: 32px 22px; }
  .hwip-home .diff h2,
  .hwip-home .builder h2 { font-size: 1.45rem; }
  .hwip-home .final h2 { font-size: clamp(1.6rem, 1rem + 3vw, 2rem); }
  .hwip-home .final p { font-size: .98rem; }
}
@media (max-width: 380px) {
  .hwip-home .wrap { padding: 0 14px; }
  .hwip-home .h1 { font-size: 1.75rem; line-height: 1.15; }
  .hwip-home .btn { padding: 13px 18px; font-size: .95rem; }
}

/* Prevent horizontal overflow from the hero SVG on narrow screens */
.hwip-home { overflow-x: hidden; }

/* ---------- Reduce motion ---------- */
@media (prefers-reduced-motion: reduce) {
  .hwip-home * { transition: none !important; animation: none !important; }
}

/* ---------- Fix the Goodlayers sidebar-wrap max-width on front page ---------- */
.home .inteco-sidebar-style-none.inteco-sidebar-wrap,
.inteco-sidebar-style-none.inteco-sidebar-wrap {
  max-width: 100% !important;
  width: 100% !important;
}
.home .inteco-single-article-content,
.home .inteco-content-item,
.home .inteco-content-item-wrap {
  padding: 0 !important;
  max-width: 100% !important;
}