/* Editorial pages: implementation of the user-supplied August 2026 reference designs. */
.iw-editorial-page {
  --iw-bg: #080f15;
  --iw-black: #000000;
  --iw-surface: #151c23;
  --iw-surface-2: #192027;
  --iw-surface-3: #2f363c;
  --iw-slate: #34495e;
  --iw-orange: #ff4500;
  --iw-red: #ff6347;
  --iw-text: #ffffff;
  --iw-muted: #dce3ec;
  --iw-warm-muted: #e7bdb2;
  background: var(--iw-bg);
  color: var(--iw-text);
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
  overflow: hidden;
  width: 100vw;
}

/* Narrowly reset Extendable's constrained block and flow spacing on these templates. */
body .wp-site-blocks > .iw-editorial-page,
body .wp-site-blocks .iw-editorial-page > section,
body .wp-site-blocks .iw-editorial-page > section + section {
  margin-block: 0;
  max-width: none;
}

.iw-editorial-page :where(a, button, iframe):focus-visible {
  outline: 3px solid var(--iw-orange);
  outline-offset: 4px;
}

.iw-editorial-page,
.iw-editorial-page * {
  box-sizing: border-box;
}

.iw-editorial-page h1,
.iw-editorial-page h2,
.iw-editorial-page h3,
.iw-editorial-page h4,
.iw-editorial-page p,
.iw-editorial-page ul,
.iw-editorial-page blockquote,
.iw-editorial-page figure {
  margin-top: 0;
}

.iw-editorial-page h1,
.iw-editorial-page h2,
.iw-editorial-page h3,
.iw-editorial-page h4 {
  color: var(--iw-text);
  font-family: Montserrat, "Arial Black", Arial, sans-serif;
  font-weight: 800;
}

.iw-editorial-page h1 {
  font-size: clamp(3rem, 6vw, 4rem);
  letter-spacing: -0.035em;
  line-height: 1.08;
}

.iw-editorial-page h2 {
  font-size: clamp(2rem, 4.3vw, 2.75rem);
  letter-spacing: -0.025em;
  line-height: 1.12;
}

.iw-editorial-page h3 {
  font-size: clamp(1.15rem, 2.3vw, 1.5rem);
  line-height: 1.2;
}

.iw-editorial-page p,
.iw-editorial-page li {
  color: var(--iw-muted);
  font-size: 1rem;
  line-height: 1.6;
}

.iw-editorial-page a {
  color: inherit;
}

.iw-ref-container {
  margin-inline: auto;
  max-width: 1280px;
  width: min(1280px, calc(100% - 48px));
}

.iw-ref-section {
  padding: 80px 0;
}

.iw-ref-surface {
  background: var(--iw-surface);
  border-block: 1px solid rgba(255, 255, 255, 0.06);
}

.iw-ref-accent {
  color: var(--iw-orange) !important;
}

/* Shared centered hero used by Methods and Metabolic. */
.iw-ref-hero-center {
  background: radial-gradient(circle at 50% 0, rgba(255, 69, 0, 0.08), transparent 46%), var(--iw-black);
  padding: 78px 24px 70px;
  text-align: center;
}

.iw-ref-hero-center p {
  color: var(--iw-orange);
  font-family: Montserrat, "Arial Black", Arial, sans-serif;
  font-size: clamp(1rem, 2vw, 1.4rem);
  font-weight: 800;
  margin: 28px auto 0;
}

.iw-ref-hero-center--methods h1 {
  text-transform: uppercase;
  text-shadow: 0 0 30px rgba(255, 69, 0, 0.16);
}

.iw-ref-hero-center--metabolic {
  background: var(--iw-bg);
  padding-top: 88px;
}

.iw-ref-hero-center--metabolic p {
  color: var(--iw-warm-muted);
  font-family: Inter, ui-sans-serif, sans-serif;
  font-size: 1rem;
  font-weight: 500;
  max-width: 760px;
  text-transform: uppercase;
}

.iw-ref-rule-title {
  display: inline-block;
  position: relative;
  text-transform: uppercase;
}

.iw-ref-rule-title::after {
  background: var(--iw-orange);
  bottom: -18px;
  content: "";
  height: 4px;
  left: 50%;
  position: absolute;
  transform: translateX(-50%);
  width: 96px;
}

/* Video treatment mirrors the large framed player in both references. */
.iw-ref-video-wrap {
  background: var(--iw-black);
  padding: 0 24px 80px;
}

.iw-metabolic-page .iw-ref-video-wrap {
  background: var(--iw-bg);
}

.iw-ref-video {
  aspect-ratio: 16 / 9;
  background: #30272c;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 8px;
  box-shadow: 0 24px 70px rgba(255, 69, 0, 0.08);
  margin: auto;
  max-width: 1024px;
  overflow: hidden;
  position: relative;
  width: 100%;
}

.iw-ref-video iframe,
.iw-ref-video img {
  border: 0;
  display: block;
  height: 100%;
  inset: 0;
  object-fit: cover;
  position: absolute;
  width: 100%;
}

.iw-ref-video-fallback {
  font-size: 0.75rem !important;
  margin: 10px auto 0;
  max-width: 1024px;
  text-align: right;
}

.iw-ref-video-fallback a {
  color: var(--iw-warm-muted);
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* 12-column content grid. */
.iw-ref-grid-12 {
  display: grid;
  gap: 24px;
  grid-template-columns: repeat(12, minmax(0, 1fr));
}

.iw-ref-card {
  background: rgba(25, 32, 39, 0.94);
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 8px;
  padding: 32px;
}

.iw-ref-card--deep {
  background: #1f242a;
}

.iw-ref-card--accent-left {
  border-left: 4px solid var(--iw-orange);
}

/* Methods page. */
.iw-methods-page,
.iw-methods-page .iw-ref-section--methods-main,
.iw-methods-page .iw-ref-ecosystem {
  background: var(--iw-black);
}

.iw-ref-section--methods-main {
  padding-top: 0;
}

.iw-ref-method-main {
  grid-column: span 8;
}

.iw-ref-method-side {
  align-content: start;
  display: grid;
  gap: 24px;
  grid-column: span 4;
}

.iw-ref-method-main h2 {
  border-left: 4px solid var(--iw-orange);
  margin-bottom: 26px;
  padding-left: 14px;
}

.iw-ref-method-main p {
  color: #eaded9;
  margin-bottom: 20px;
}

.iw-ref-method-main p strong {
  color: #ffffff;
}

.iw-ref-emphasis {
  color: var(--iw-orange);
  font-weight: 800;
}

.iw-ref-quote {
  background: #34393e;
  border: 0;
  border-left: 3px solid var(--iw-orange);
  border-radius: 4px;
  color: #ffffff;
  font-style: italic;
  line-height: 1.65;
  margin: 26px 0 0;
  padding: 20px 22px;
}

.iw-ref-icon-title {
  align-items: center;
  display: flex;
  gap: 10px;
  margin-bottom: 14px;
}

.iw-ref-icon-title h3 {
  margin-bottom: 0;
}

.iw-ref-icon {
  color: var(--iw-orange);
  font-size: 1.2rem;
  font-weight: 900;
}

.iw-ref-list {
  display: grid;
  gap: 10px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.iw-ref-list li {
  color: #e7d8d3;
  display: grid;
  gap: 8px;
  grid-template-columns: 14px 1fr;
}

.iw-ref-list li::before {
  color: var(--iw-orange);
  content: "⊙";
  font-size: 0.8rem;
  margin-top: 0.2rem;
}

.iw-ref-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.iw-ref-chip {
  background: var(--iw-slate);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 999px;
  color: #ffffff;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 5px 10px;
}

/* Ecosystem cards shared by all three designs. */
.iw-ref-ecosystem {
  background: var(--iw-black);
  padding: 20px 24px 82px;
}

.iw-metabolic-page .iw-ref-ecosystem,
.iw-physio-page .iw-ref-ecosystem {
  background: var(--iw-bg);
}

.iw-ref-ecosystem h2 {
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  margin-bottom: 34px;
  text-align: center;
  text-transform: uppercase;
}

.iw-ref-ecosystem-grid {
  display: grid;
  gap: 24px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.iw-ref-image-card {
  background: var(--iw-surface);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 8px;
  color: #ffffff;
  min-height: 360px;
  overflow: hidden;
  position: relative;
  text-decoration: none !important;
}

.iw-ref-image-card img {
  filter: brightness(0.55);
  height: 100%;
  inset: 0;
  object-fit: cover;
  position: absolute;
  transition: transform 0.35s ease, filter 0.35s ease;
  width: 100%;
}

.iw-ref-image-card:hover img {
  filter: brightness(0.66);
  transform: scale(1.025);
}

.iw-ref-image-card::after {
  background: linear-gradient(180deg, transparent 26%, rgba(0, 0, 0, 0.94) 100%);
  content: "";
  inset: 0;
  position: absolute;
}

.iw-ref-image-card__copy {
  bottom: 0;
  left: 0;
  padding: 28px;
  position: absolute;
  right: 0;
  z-index: 2;
}

.iw-ref-image-card__copy strong {
  color: #ffffff;
  display: block;
  font-family: Montserrat, "Arial Black", Arial, sans-serif;
  font-size: 1.4rem;
}

.iw-ref-image-card__copy > span:not(.iw-ref-tag) {
  color: #dddddd;
  display: block;
  font-size: 0.9rem;
  margin-top: 6px;
}

.iw-ref-tag {
  background: #ffffff;
  border-radius: 3px;
  color: #111111 !important;
  display: inline-block !important;
  font-size: 0.68rem !important;
  font-weight: 800;
  margin: 0 0 8px !important;
  padding: 3px 8px;
  text-transform: uppercase;
  width: auto;
}

.iw-ref-image-card--science {
  background: var(--iw-surface-3);
}

.iw-ref-image-card--science::after {
  background: linear-gradient(180deg, rgba(8, 15, 21, 0.04), rgba(0, 0, 0, 0.82));
}

.iw-ref-science-icon {
  color: rgba(255, 69, 0, 0.18);
  font-size: 7rem;
  font-weight: 800;
  left: 50%;
  position: absolute;
  top: 42%;
  transform: translate(-50%, -50%);
}

.iw-ref-shop-cta {
  align-items: center;
  background: linear-gradient(105deg, #1f242a, #101419);
  border: 1px solid rgba(255, 69, 0, 0.45);
  border-radius: 8px;
  display: flex;
  gap: 24px;
  justify-content: space-between;
  margin-top: 24px;
  padding: 28px 32px;
}

.iw-ref-shop-cta strong,
.iw-ref-shop-cta .iw-ref-kicker { display: block; }
.iw-ref-shop-cta strong { color: #fff; font: 800 clamp(1.25rem, 3vw, 1.75rem)/1.2 Montserrat, "Arial Black", Arial, sans-serif; }
.iw-ref-kicker { color: var(--iw-orange); font-size: .72rem; font-weight: 800; letter-spacing: .12em; margin-bottom: 6px; text-transform: uppercase; }
.iw-ref-shop-cta > a { background: var(--iw-orange); border-radius: 4px; color: #fff; flex: 0 0 auto; font-weight: 800; padding: 13px 19px; text-decoration: none; }

/* Metabolic test page. */
.iw-ref-context-left,
.iw-ref-context-right {
  grid-column: span 6;
}

.iw-ref-context-right {
  align-self: center;
}

.iw-ref-context-left > p {
  color: var(--iw-warm-muted);
  margin: 0.55rem 0 1.8rem;
}

.iw-ref-source {
  font-size: 0.82rem;
}

.iw-ref-source strong,
.iw-ref-source span {
  display: block;
}

.iw-ref-source strong {
  color: #ffffff;
  margin-bottom: 8px;
}

.iw-ref-card--metabolic-intro h3 {
  margin-bottom: 18px;
}

.iw-ref-section-title {
  margin-bottom: 34px;
  text-align: center;
}

.iw-ref-metric-card {
  background: linear-gradient(145deg, #22303d, #151c23);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 7px;
  display: flex;
  flex-direction: column;
  min-height: 280px;
  padding: 30px;
}

.iw-ref-metric-card--8 {
  grid-column: span 8;
}

.iw-ref-metric-card--4 {
  grid-column: span 4;
}

.iw-ref-metric-card h3 {
  text-transform: uppercase;
}

.iw-ref-metric-head {
  align-items: center;
  color: var(--iw-orange);
  display: flex;
  gap: 10px;
  margin-bottom: 14px;
}

.iw-ref-metric-big {
  color: #ffffff;
  font-family: Montserrat, "Arial Black", Arial, sans-serif;
  font-size: clamp(3rem, 7vw, 5rem);
  font-weight: 800;
  line-height: 0.92;
  margin-top: auto;
}

.iw-ref-metric-big span {
  color: var(--iw-orange);
  font-size: 0.28em;
}

.iw-ref-progress {
  background: #333a41;
  border-radius: 999px;
  height: 7px;
  margin-top: 14px;
  overflow: hidden;
}

.iw-ref-progress span {
  background: linear-gradient(90deg, var(--iw-orange), var(--iw-red));
  display: block;
  height: 100%;
  width: 83%;
}

.iw-ref-metric-note {
  font-size: 0.72rem !important;
  margin-top: 10px;
}

.iw-ref-heart {
  align-items: center;
  text-align: center;
}

.iw-ref-heart-symbol {
  color: var(--iw-red);
  font-size: 3.6rem;
  line-height: 1;
  margin-bottom: 8px;
}

.iw-ref-ring {
  border: 6px solid #34404a;
  border-radius: 50%;
  box-shadow: inset 0 0 0 4px var(--iw-red);
  display: grid;
  height: 126px;
  margin: 14px auto;
  place-content: center;
  width: 126px;
}

.iw-ref-ring strong {
  color: #ffffff;
  font: 800 2rem/1 Montserrat, "Arial Black", Arial, sans-serif;
}

.iw-ref-ring small {
  color: #ffffff;
  font-size: 0.65rem;
}

.iw-ref-kcal .iw-ref-metric-big {
  color: var(--iw-red);
}

.iw-ref-badge {
  align-self: flex-start;
  background: rgba(255, 69, 0, 0.16);
  border: 1px solid rgba(255, 69, 0, 0.28);
  border-radius: 4px;
  color: var(--iw-orange);
  font-size: 0.78rem;
  font-weight: 800;
  margin-top: 10px;
  padding: 6px 10px;
}

.iw-ref-epoc-section {
  background: var(--iw-bg);
}

.iw-ref-epoc {
  align-items: center;
  display: grid;
  gap: 60px;
  grid-template-columns: 1fr 1fr;
}

.iw-ref-epoc p {
  max-width: 680px;
}

.iw-ref-source-note {
  font-size: 0.72rem !important;
  letter-spacing: 0.08em;
  margin-top: 22px !important;
  text-transform: uppercase;
}

.iw-ref-epoc-card {
  aspect-ratio: 1;
  background: linear-gradient(145deg, #20303f, #192027);
  border: 1px solid rgba(255, 69, 0, 0.7);
  border-radius: 10px;
  box-shadow: 0 18px 60px rgba(0, 0, 0, 0.25);
  display: grid;
  margin: auto;
  max-width: 420px;
  place-content: center;
  text-align: center;
  width: 100%;
}

.iw-ref-epoc-card strong {
  color: var(--iw-orange);
  font: 800 clamp(3.5rem, 8vw, 5.5rem)/1 Montserrat, "Arial Black", Arial, sans-serif;
}

.iw-ref-epoc-card strong em { font-size: .22em; font-style: normal; letter-spacing: .04em; }
.iw-ref-epoc-label { color: #fff !important; font: 800 .78rem/1 Montserrat, "Arial Black", Arial, sans-serif !important; letter-spacing: .18em; margin: 0 0 16px !important; }
.iw-ref-epoc-bars { align-items: end; display: flex; gap: 5px; height: 46px; justify-content: center; margin: 18px auto 12px; }
.iw-ref-epoc-bars i { background: var(--iw-orange); border-radius: 2px 2px 0 0; height: 100%; opacity: .95; width: 12px; }
.iw-ref-epoc-bars i:nth-child(2) { height: 84%; }
.iw-ref-epoc-bars i:nth-child(3) { height: 69%; }
.iw-ref-epoc-bars i:nth-child(4) { height: 56%; }
.iw-ref-epoc-bars i:nth-child(5) { height: 45%; }
.iw-ref-epoc-bars i:nth-child(6) { height: 36%; }
.iw-ref-epoc-bars i:nth-child(7) { height: 30%; }

.iw-ref-epoc-card span {
  color: #ffffff;
  font: 800 1.2rem/1.3 Montserrat, "Arial Black", Arial, sans-serif;
  margin-top: 12px;
}

.iw-ref-epoc-card small {
  color: #dddddd;
  margin-top: 4px;
}

/* Physiotherapy page. */
.iw-ref-physio-hero {
  align-items: center;
  background: url('/wp-content/themes/inertiawave/assets/images/editorial/iw-hero-training.png') center center / cover no-repeat;
  display: flex;
  justify-content: center;
  min-height: clamp(500px, 68vh, 760px);
  position: relative;
}

.iw-ref-physio-hero::before {
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.24), rgba(8, 15, 21, 0.08) 48%, #080f15 100%);
  content: "";
  inset: 0;
  position: absolute;
}

.iw-ref-physio-hero h1 {
  font-size: clamp(3.6rem, 8vw, 6.8rem);
  position: relative;
  text-align: center;
  text-shadow: 0 7px 24px rgba(0, 0, 0, 0.55);
  text-transform: uppercase;
  z-index: 1;
}

.iw-ref-physio-hero h1::after {
  background: var(--iw-orange);
  content: "";
  display: block;
  height: 5px;
  margin: 20px auto 0;
  width: 78px;
}

.iw-ref-physio-intro {
  align-items: center;
  display: grid;
  gap: 62px;
  grid-template-columns: 1fr 0.92fr;
}

.iw-ref-physio-intro h2 {
  margin-bottom: 22px;
  text-transform: uppercase;
}

.iw-ref-physio-intro p {
  margin-bottom: 16px;
}

.iw-ref-photo {
  background: var(--iw-surface);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  overflow: hidden;
}

.iw-ref-photo img {
  display: block;
  height: 100%;
  object-fit: cover;
  width: 100%;
}

.iw-ref-photo--portrait img {
  aspect-ratio: 4 / 5;
}

.iw-ref-medical-title {
  margin-bottom: 50px;
  text-align: center;
  text-transform: uppercase;
}

.iw-ref-medical-card {
  background: rgba(47, 54, 60, 0.58);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  padding: 44px 48px;
}

.iw-ref-medical-card h3 {
  border-left: 4px solid var(--iw-orange);
  margin-bottom: 22px;
  padding-left: 14px;
  text-transform: uppercase;
}

.iw-ref-medical-card p {
  color: #dddddd;
  margin-bottom: 16px;
}

.iw-ref-medical-card .iw-ref-medical-note { border-top: 1px solid rgba(255, 255, 255, .13); color: #c8cdd2; font-size: .78rem; margin: 26px 0 0; padding-top: 18px; }

.iw-ref-benefits-title {
  margin-bottom: 32px;
  text-transform: uppercase;
}

.iw-ref-benefit-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.iw-ref-benefit {
  background: #34393e;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 6px;
  min-height: 140px;
  padding: 18px;
}

.iw-ref-benefit-icon {
  background: var(--iw-surface);
  border-radius: 7px;
  color: var(--iw-orange);
  display: grid;
  font-weight: 900;
  height: 34px;
  margin-bottom: 12px;
  place-items: center;
  width: 34px;
}

.iw-ref-benefit h3 {
  font-size: 0.9rem;
  margin-bottom: 7px;
  text-transform: uppercase;
}

.iw-ref-benefit p {
  font-size: 0.82rem;
  line-height: 1.45;
  margin-bottom: 0;
}

.iw-ref-physio-ecosystem {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 58px;
}

@media (max-width: 900px) {
  .iw-ref-container {
    width: min(1280px, calc(100% - 32px));
  }

  .iw-ref-section {
    padding: 60px 0;
  }

  .iw-ref-method-main,
  .iw-ref-method-side,
  .iw-ref-context-left,
  .iw-ref-context-right,
  .iw-ref-metric-card--8,
  .iw-ref-metric-card--4 {
    grid-column: span 12;
  }

  .iw-ref-method-side {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .iw-ref-epoc,
  .iw-ref-physio-intro {
    grid-template-columns: 1fr;
  }

  .iw-ref-benefit-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .iw-ref-physio-intro .iw-ref-photo {
    max-width: 620px;
  }

  .iw-ref-image-card {
    min-height: 320px;
  }
}

@media (max-width: 640px) {
  .iw-editorial-page h1 {
    font-size: clamp(2.5rem, 12vw, 3.4rem);
  }

  .iw-ref-section {
    padding: 48px 0;
  }

  .iw-ref-hero-center {
    padding: 54px 16px 46px;
  }

  .iw-ref-video-wrap {
    padding: 0 16px 48px;
  }

  .iw-ref-card,
  .iw-ref-metric-card,
  .iw-ref-medical-card {
    padding: 22px;
  }

  .iw-ref-method-side {
    grid-template-columns: 1fr;
  }

  .iw-ref-ecosystem {
    padding-inline: 16px;
  }

  .iw-ref-ecosystem-grid {
    grid-template-columns: 1fr;
  }

  .iw-ref-image-card {
    min-height: 280px;
  }

  .iw-ref-epoc {
    gap: 30px;
  }

  .iw-ref-benefit-grid {
    grid-template-columns: 1fr;
  }

  .iw-ref-physio-hero {
    background-position: center;
    min-height: 520px;
  }

  .iw-ref-physio-intro {
    gap: 34px;
  }

  .iw-ref-medical-title {
    margin-bottom: 30px;
  }

  .iw-ref-medical-card {
    padding: 24px 20px;
  }

  .iw-ref-shop-cta { align-items: stretch; flex-direction: column; padding: 24px; }
  .iw-ref-shop-cta > a { text-align: center; }
}

@media (prefers-reduced-motion: reduce) {
  .iw-editorial-page *,
  .iw-editorial-page *::before,
  .iw-editorial-page *::after {
    scroll-behavior: auto !important;
    transition-duration: .01ms !important;
  }
}
