/*
Theme Name: Xpertsly Wellness
Theme URI: https://wellness.xpertsly.com
Author: Xpertsly
Description: One-page wellness landing page with a matching Blogs section.
Version: 1.7
Requires at least: 6.0
Requires PHP: 7.4
Text Domain: xpertsly-wellness
*/

  /* Xpertsly Wellness — xpertsly.com/wellness
     Single light theme, deliberately: this is the client's live brand page and
     must match the parent site in any viewer's OS setting. Every colour painted
     explicitly so the page never borrows the host ground. */
  :root {
    --red:      #D8434B;  /* homepage red — fills, wedges, rules */
    --red-ink:  #B32A33;  /* darker red — text on white, solid buttons (4.5:1) */
    --red-deep: #8E1F27;  /* hover */
    --red-pale: #F2929A;  /* red on navy */
    --navy:     #1B2139;
    --navy-lift:#222942;
    --charcoal: #4A4A4A;
    --stone:    #F2F2F2;
    --stone-2:  #E8E8E8;
    --line:     #C9CCC7;
    --ink:      #1C1C1A;
    --ink-soft: #4A4A4A;
    --ink-mute: #5C5C5C;
    --paper:    #FFFFFF;
    --ember:    #F79A33;  /* logo ribbon, warm end */
    --ember-2:  #EE6330;
    --display: 'Poppins', 'Futura', 'Trebuchet MS', sans-serif;
    --body: 'Source Sans 3', 'Helvetica Neue', Arial, sans-serif;
    --wrap: 1200px;
    --gut: clamp(16px, 4vw, 64px);
  }

  * { box-sizing: border-box; }
  /* the host page normally supplies these two; a standalone file must carry them */
  img, svg { max-width: 100%; }
  [hidden] { display: none !important; }
  body {
    margin: 0;
    background: var(--paper);
    color: var(--ink);
    font-family: var(--body);
    font-size: 17px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
  }
  h1, h2, h3 { font-family: var(--display); font-weight: 800; letter-spacing: -0.02em; margin: 0; text-wrap: balance; }
  p { margin: 0; }
  a { color: var(--red-ink); }
  a:hover { color: var(--red-deep); }
  :focus-visible { outline: 3px solid var(--red-ink); outline-offset: 3px; }
  img { max-width: 100%; }

  .wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: var(--gut); }
  .eyebrow { font-size: 13px; font-weight: 700; letter-spacing: 0.34em; text-transform: uppercase; }

  /* ---------- header ---------- */
  .top {
    position: sticky; top: env(safe-area-inset-top, 0px); z-index: 40;
    background: var(--paper); border-bottom: 1px solid var(--stone-2);
  }
  .top-in { display: flex; align-items: center; padding-block: 14px; }

  .mark { display: block; text-decoration: none; position: relative; flex-shrink: 0; }
  .mark-word { display: block; font-family: var(--display); font-weight: 700; font-size: clamp(24px, 4.4vw, 33px); letter-spacing: -0.035em; color: var(--ink); line-height: 1; white-space: nowrap; }
  /* the ribbon sits IN the word, in place of the e */
  .mark-e { display: inline-block; width: 0.80em; height: 0.72em; vertical-align: -0.085em; margin-inline: -0.035em; }
  .mark-img { display: block; height: clamp(28px, 5vw, 40px); width: auto; }
  .base .mark-img { height: 32px; }
  .mark-sub { display: block; font-size: clamp(9px, 1.6vw, 11px); font-weight: 600; letter-spacing: 0.42em; color: var(--red-ink); line-height: 1; margin-top: 5px; }


  .btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 11px;
    min-height: 54px; padding: 0 28px; border: 0; border-radius: 0; cursor: pointer;
    font-family: var(--body); font-size: 18px; font-weight: 700; text-decoration: none;
    background: var(--red-ink); color: #FFFFFF;
    transition: background .15s ease;
  }
  .btn:hover { background: var(--red-deep); color: #FFFFFF; }
  .btn-ghost { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 2px var(--navy); }
  .btn-ghost:hover { background: var(--navy); color: #FFFFFF; }


  /* ---------- nav ---------- */
  .top-nav { margin-left: auto; display: flex; align-items: center; gap: clamp(16px, 3vw, 32px); }
  .top-nav > a:not(.btn) { font-weight: 700; font-size: 16px; color: var(--ink); text-decoration: none; white-space: nowrap; }
  .top-nav > a:not(.btn):hover { color: var(--red-ink); }
  .top-cta { min-height: 44px; padding: 0 20px; font-size: 16px; }
  @media (max-width: 620px) { .top-cta { display: none; } .top-nav { gap: 14px; } .top-nav > a:not(.btn) { font-size: 15px; } }
  @media (max-width: 380px) { .mark-img { height: 24px; } .top-nav { gap: 11px; } }

  /* ---------- hero ---------- */
  /* hero: illustrated side columns, centre carries the promise */
  .hero { display: grid; grid-template-columns: minmax(190px, 19vw) 1fr minmax(190px, 19vw); background: var(--paper); min-height: clamp(540px, 40vw, 760px); }
  .hero-side { position: relative; overflow: hidden; }
  .hero-side > svg { position: absolute; left: 0; width: 100%; height: 50%; display: block; }
  .hero-side > svg:nth-of-type(1) { top: 0; }
  .hero-side > svg:nth-of-type(2) { top: 50%; }
  .hero-side::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 7px; background: var(--red); z-index: 2; }
  .hero-side--l { border-right: 1px solid var(--stone-2); }
  .hero-side--r { border-left: 1px solid var(--stone-2); }
  .hero-mid { display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: 22px; padding: clamp(52px, 7vw, 96px) var(--gut); }
  .hero h1 { font-size: clamp(34px, 5.2vw, 64px); line-height: 1.08; max-width: 13ch; }
  .hero-sub { font-size: clamp(17px, 1.9vw, 21px); color: var(--ink-soft); max-width: 36ch; text-wrap: balance; }

  /* ---------- audiences ---------- */
  .who { position: relative; padding-block: clamp(40px, 6vw, 60px) clamp(56px, 8vw, 88px); overflow: hidden; }
  .who-panel { position: absolute; left: 0; right: 0; top: clamp(96px, 14vw, 180px); bottom: clamp(30px, 5vw, 62px); background: var(--charcoal); clip-path: polygon(0 4%, 100% 0, 100% 96%, 0 100%); z-index: 0; }
  .who-floor { position: absolute; left: 0; right: 0; bottom: 0; height: clamp(34px, 5vw, 66px); background: var(--stone-2); clip-path: polygon(0 46%, 100% 0, 100% 100%, 0 100%); z-index: 0; }
  .who .wrap { position: relative; z-index: 2; }
  .who .eyebrow { display: block; text-align: center; color: var(--charcoal); margin-bottom: clamp(26px, 4vw, 42px); }
  .cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 28px; }
  .card { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 26px; text-align: center; padding: clamp(28px, 3.4vw, 40px) 26px; min-height: 396px; }
  .card-fill { background: var(--red); color: #FFFFFF; }
  .card-plain { background: var(--stone); color: var(--ink); border: 1px solid var(--red); }
  .card h3 { font-size: clamp(22px, 2.3vw, 27px); line-height: 1.24; }
  .card svg { width: clamp(150px, 15vw, 196px); height: auto; flex-shrink: 0; }

  /* ---------- what we do: illustrated band under a navy scrim ---------- */
  .does { position: relative; overflow: hidden; background: var(--navy); min-height: 340px; }
  .does > svg { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
  .does-scrim { position: relative; z-index: 1; display: flex; flex-direction: column; align-items: center; gap: clamp(40px, 5vw, 64px); padding: clamp(66px, 8vw, 104px) var(--gut) clamp(60px, 7vw, 96px);
    background: linear-gradient(180deg, rgba(27,33,57,.55) 0%, rgba(27,33,57,.86) 26%, rgba(27,33,57,.9) 100%); }
  .does-head { display: flex; flex-direction: column; align-items: center; gap: 16px; text-align: center; }
  .does-rule { position: absolute; top: 0; left: 0; right: 0; height: 10px; background: var(--red); z-index: 3; }
  .does .eyebrow { color: #FFFFFF; }
  .does h2 { font-size: clamp(28px, 4.2vw, 48px); line-height: 1.16; color: #FFFFFF; max-width: 22ch; }

  /* journey: what the client experiences -> what the practice gets */
  .journey { list-style: none; margin: 0; padding: 0; width: 100%; max-width: var(--wrap); display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; position: relative; }
  .journey::before { content: ""; position: absolute; top: 27px; left: 12%; right: 12%; height: 2px; background: linear-gradient(90deg, rgba(242,146,154,.15), rgba(242,146,154,.7) 20%, rgba(242,146,154,.7) 80%, rgba(242,146,154,.15)); }
  .step { position: relative; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 12px; }
  .step-mark { position: relative; z-index: 1; display: flex; align-items: center; justify-content: center; width: 56px; height: 56px; border-radius: 50%; background: var(--red-ink); color: #FFFFFF; box-shadow: 0 0 0 6px rgba(27,33,57,.9), 0 0 0 7px rgba(242,146,154,.45); }
  .step-when { margin-top: 6px; font-size: 13px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: #D8DBE2; }
  .step-n { color: #FFFFFF; margin-right: 4px; }
  .step h3 { font-size: clamp(19px, 1.7vw, 22px); line-height: 1.25; color: #FFFFFF; font-weight: 700; }
  .step-io { margin: 4px 0 0; width: 100%; display: flex; flex-direction: column; background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.14); text-align: left; }
  .step-desc { flex: 1; width: 100%; padding: 16px 18px; background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.14); border-top: 3px solid var(--red); font-size: 16px; line-height: 1.5; color: #EEF0F5; }
  .step-n { margin-right: 0; }
  .does-proof { max-width: 60ch; text-align: center; font-size: clamp(17px, 1.7vw, 20px); line-height: 1.55; color: #FFFFFF; font-style: italic; }
  .does-cta { min-width: 220px; }
  .does-close { max-width: 62ch; text-align: center; font-size: clamp(16px, 1.6vw, 19px); line-height: 1.6; color: #D8DBE2; padding-top: 28px; border-top: 1px solid rgba(255,255,255,.14); }
  .step-io { flex: 1; }
  .step-io > div { padding: 12px 16px; }
  .step-io > div + div { flex: 1; }
  .step-io > div + div { border-top: 1px solid rgba(255,255,255,.12); background: rgba(216,67,75,.14); }
  .step-io dt { font-size: 13px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: #D8DBE2; margin-bottom: 4px; }
  .step-io > div + div dt { color: #FFFFFF; }
  .step-io dd { margin: 0; font-size: 16.5px; line-height: 1.5; color: #FFFFFF; }
  @media (max-width: 1000px) {
    .journey { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 40px; column-gap: 24px; }
    .journey::before { display: none; }
  }
  @media (max-width: 620px) {
    .journey { grid-template-columns: 1fr; row-gap: 0; max-width: 460px; }
    .journey::before { display: block; top: 28px; bottom: 28px; left: 27px; right: auto; width: 2px; height: auto; background: rgba(242,146,154,.5); }
    .step { display: grid; grid-template-columns: 56px 1fr; column-gap: 16px; row-gap: 6px; align-items: start; text-align: left; padding-bottom: 30px; }
    .step-mark { grid-row: 1 / span 3; }
    .step-when { margin-top: 4px; }
    .step > :not(.step-mark) { grid-column: 2; }
  }
  .does-sub { font-size: clamp(17px, 1.9vw, 21px); line-height: 1.55; color: #E4E7EE; max-width: 46ch; text-wrap: balance; }

  /* ---------- sign-up ---------- */
  .signup { padding-block: clamp(56px, 8vw, 88px); background: var(--paper); scroll-margin-top: 90px; }
  .signup-head { display: flex; flex-direction: column; align-items: center; gap: 12px; text-align: center; margin-bottom: clamp(30px, 4vw, 42px); }
  .signup h2 { font-size: clamp(28px, 4vw, 44px); line-height: 1.2; }
  .signup-head p { color: var(--ink-soft); }
  form { max-width: 740px; margin-inline: auto; display: flex; flex-direction: column; gap: 20px; }
  .row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
  .field { display: flex; flex-direction: column; gap: 7px; }
  .field label { font-size: 14px; font-weight: 700; color: var(--ink); }
  .field label .opt { font-weight: 400; color: var(--ink-mute); }
  .field input, .field textarea {
    width: 100%; min-height: 52px; padding: 13px 15px; border: 1px solid var(--line); border-radius: 0;
    background: #fff; color: var(--ink); font-family: var(--body); font-size: 16px; line-height: 1.5;
  }
  .field textarea { min-height: 116px; resize: vertical; }
  .field input:focus, .field textarea:focus { border-color: var(--red-ink); }
  .field[data-bad] input, .field[data-bad] textarea { border-color: var(--red-ink); border-width: 2px; }
  .err { font-size: 13px; font-weight: 600; color: var(--red-ink); }
  .count { font-size: 13px; color: var(--ink-mute); font-variant-numeric: tabular-nums; align-self: flex-end; }
  .foot-row { display: flex; align-items: center; justify-content: flex-end; gap: 22px; flex-wrap: wrap; }
  .foot-row p { font-size: 13px; color: var(--ink-mute); max-width: 44ch; }
  .hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

  .sent { max-width: 740px; margin-inline: auto; display: flex; flex-direction: column; align-items: center; gap: 22px; text-align: center; padding-block: 20px; }
  .sent-tick { display: flex; align-items: center; justify-content: center; width: 76px; height: 76px; background: var(--red); }
  .sent h2 { font-size: clamp(26px, 3.6vw, 42px); line-height: 1.22; max-width: 20ch; }
  .sent p { color: var(--ink-soft); max-width: 48ch; }
  .sent-acts { display: flex; align-items: center; gap: 24px; flex-wrap: wrap; justify-content: center; }

  /* ---------- Calendly booking ---------- */
  .book { padding-block: clamp(56px, 8vw, 88px); background: var(--stone); border-top: 7px solid var(--red); scroll-margin-top: 90px; }
  .book-head { display: flex; flex-direction: column; align-items: center; gap: 12px; text-align: center; margin-bottom: clamp(24px, 3vw, 36px); }
  .book-head h2 { font-size: clamp(28px, 4vw, 44px); line-height: 1.2; }
  .book-head p:last-child { color: var(--ink-soft); max-width: 52ch; }
  .book-frame { min-width: 320px; height: 720px; max-width: 1000px; margin-inline: auto; background: var(--paper); border: 1px solid var(--stone-2); }
  .book-alt { text-align: center; margin-top: 16px; font-size: 15px; color: var(--ink-mute); }
  @media (max-width: 620px) { .book-frame { height: 1000px; min-width: 0; margin-inline: calc(-1 * var(--gut)); border-inline: 0; } }

  /* ---------- contact ---------- */
  .contact { scroll-margin-top: 90px; position: relative; background: var(--stone); overflow: hidden; padding-block: clamp(48px, 7vw, 74px); text-align: center; }
  .contact-cap { position: absolute; left: 0; right: 0; top: 0; height: clamp(26px, 4vw, 50px); background: var(--paper); clip-path: polygon(0 0, 100% 0, 100% 52%, 0 100%); }
  .contact .wrap { position: relative; z-index: 2; display: flex; flex-direction: column; align-items: center; gap: 10px; }
  .contact-lead { font-family: var(--display); font-weight: 700; font-size: clamp(19px, 2.4vw, 24px); color: var(--ink-soft); }
  .contact-tel { font-family: var(--display); font-weight: 800; font-size: clamp(27px, 4.4vw, 40px); letter-spacing: -0.02em; color: var(--ink); text-decoration: none; display: inline-flex; align-items: center; min-height: 48px; }
  .contact-tel:hover { color: var(--red-ink); }

  /* ---------- footer ---------- */
  .base { background: var(--navy); color: #D8DBE2; padding-block: clamp(34px, 5vw, 48px); }
  .base-in { display: flex; align-items: center; justify-content: space-between; gap: 26px; flex-wrap: wrap; }
  .base .mark-sub { color: var(--red-pale); }
  .base-links { display: flex; align-items: center; gap: clamp(18px, 3vw, 36px); flex-wrap: wrap; }
  .base-links a { font-size: 15px; font-weight: 600; color: #D8DBE2; text-decoration: none; }
  .base-links a:hover { color: #FFFFFF; }
  .base-links span { font-size: 15px; color: #9BA2B4; }
  .base-links .base-copy a { font-weight: 400; color: inherit; text-decoration: underline; text-underline-offset: 3px; }
  .base-links .base-copy a:hover { color: #FFFFFF; }

  /* ---------- reveal (starts visible; JS opts in only when motion is allowed) ---------- */
  .js-motion .reveal { opacity: 0; transform: translateY(22px); transition: opacity .6s ease, transform .6s ease; }
  .js-motion .reveal.in { opacity: 1; transform: none; }

  @media (max-width: 900px) {
    .tap { display: inline-flex; }
    .hero { grid-template-columns: 1fr; min-height: 0; }
    .hero-side--r { display: none; }
    .hero-side--l { height: clamp(230px, 40vw, 330px); min-height: 0; border-right: 0; border-bottom: 1px solid var(--stone-2); }
    .hero-side--l > svg:nth-of-type(1) { height: 100%; }
    .hero-side--l > svg:nth-of-type(2) { display: none; }
    .cards { grid-template-columns: 1fr; gap: 18px; }
    .card { min-height: 0; flex-direction: row; text-align: left; gap: 22px; justify-content: flex-start; padding: 24px; }
    .card svg { width: 128px; }
    .who-panel { top: clamp(78px, 16vw, 130px); }
    .does-block { display: none; }
  }
  @media (max-width: 620px) {
    .row { grid-template-columns: 1fr; }
    .foot-row { flex-direction: column; align-items: stretch; }
    .foot-row .btn { width: 100%; }
    .base-in { flex-direction: column; align-items: flex-start; }
  }
  @media (prefers-reduced-motion: reduce) {
    * { animation-duration: .01ms !important; transition-duration: .01ms !important; }
    html { scroll-behavior: auto !important; }
  }
  html { scroll-behavior: smooth; }

  /* ---------- WordPress extras ---------- */
  body.admin-bar .top { top: 32px; }
  @media (max-width: 782px) { body.admin-bar .top { top: 46px; } }
  .top-nav > a[aria-current="page"] { color: var(--red-ink); box-shadow: inset 0 -2px 0 var(--red-ink); }
  .screen-reader-text { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(1px,1px,1px,1px); white-space: nowrap; }

  /* ---------- blogs list ---------- */
  .blog-hero { background: var(--stone); border-bottom: 7px solid var(--red); padding-block: clamp(48px, 7vw, 88px); text-align: center; }
  .blog-hero .wrap { display: flex; flex-direction: column; align-items: center; gap: 16px; }
  .blog-hero h1 { font-size: clamp(34px, 5vw, 58px); line-height: 1.1; }
  .blog-hero p { font-size: clamp(17px, 1.9vw, 20px); color: var(--ink-soft); max-width: 44ch; }
  .blog-list { padding-block: clamp(48px, 7vw, 84px); }
  .posts { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); gap: 28px; }
  .post { display: flex; flex-direction: column; background: var(--paper); border: 1px solid var(--stone-2); border-top: 5px solid var(--red); text-decoration: none; color: var(--ink); transition: border-color .15s ease, transform .15s ease; }
  .post:hover { border-color: var(--red); transform: translateY(-2px); color: var(--ink); }
  .post-img { aspect-ratio: 16 / 9; overflow: hidden; background: var(--stone); }
  .post-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
  .post-body { display: flex; flex-direction: column; gap: 12px; padding: 26px 28px 28px; flex: 1; }
  .post time, .single-meta { font-size: 13px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--red-ink); }
  .post h2 { font-size: clamp(21px, 2.2vw, 25px); line-height: 1.25; }
  .post p { color: var(--ink-soft); }
  .post .more { margin-top: auto; font-weight: 700; color: var(--red-ink); }
  .empty { max-width: 560px; margin-inline: auto; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 16px; padding: 40px 24px; border: 1px dashed var(--line); }
  .empty h2 { font-size: clamp(24px, 3vw, 32px); }
  .empty p { color: var(--ink-soft); }
  .pager { display: flex; justify-content: center; gap: 10px; flex-wrap: wrap; margin-top: 44px; }
  .pager .page-numbers { display: inline-flex; align-items: center; justify-content: center; min-width: 44px; min-height: 44px; padding: 0 14px; border: 1px solid var(--line); color: var(--ink); text-decoration: none; font-weight: 700; }
  .pager .page-numbers.current, .pager a.page-numbers:hover { background: var(--red-ink); border-color: var(--red-ink); color: #fff; }

  /* ---------- single post / plain page ---------- */
  .xw-single { padding-block: clamp(44px, 6vw, 80px); }
  .single-in { max-width: 760px; margin-inline: auto; }
  .single-back { display: inline-block; font-weight: 700; text-decoration: none; margin-bottom: 26px; }
  .xw-single h1 { font-size: clamp(32px, 4.6vw, 52px); line-height: 1.12; margin: 12px 0 28px; }
  .single-img { margin: 0 0 32px; }
  .single-img img { width: 100%; height: auto; display: block; }
  .entry { font-size: 18px; line-height: 1.75; }
  .entry > * + * { margin-top: 1.1em; }
  .entry h2 { font-size: clamp(24px, 3vw, 32px); margin-top: 1.6em; line-height: 1.25; }
  .entry h3 { font-size: clamp(20px, 2.4vw, 24px); margin-top: 1.4em; line-height: 1.3; }
  .entry ul, .entry ol { padding-left: 1.3em; }
  .entry blockquote { margin: 1.4em 0; padding: 4px 0 4px 22px; border-left: 4px solid var(--red); color: var(--ink-soft); font-size: 20px; }
  .entry img { height: auto; }
  .entry .alignwide, .entry .alignfull { max-width: 100%; }
  .single-cta { margin-top: 56px; padding: 32px; background: var(--stone); display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
  .single-cta p { font-family: var(--display); font-weight: 700; font-size: 22px; }
