/* =========================================================================
   EDB Pools - blog list, single post, regular pages, ACF sections (prose)
   ========================================================================= */

/* shared (also defined in shop.css, which isn't loaded here) */
.edb-site .edb-pill {
  display: inline-flex; align-items: center; gap: 6px; height: 44px; padding: 0 18px;
  border-radius: 999px; border: 1px solid var(--line-strong);
  font-size: 15px; font-weight: 500; color: var(--text); white-space: nowrap;
  transition: background 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}
.edb-pill sup { font-size: 11px; color: var(--text-3); top: -0.5em; }
.edb-site .edb-pill:hover { border-color: var(--text); }
.edb-site .edb-pill.is-active { background: var(--aqua); border-color: var(--aqua); color: #fff; }
.edb-pill.is-active sup { color: var(--ink-2); }
.edb-pager { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-top: clamp(56px, 6vw, 88px); }
.edb-pager .page-numbers {
  min-width: 48px; height: 48px; padding: 0 14px; border-radius: 999px; display: grid; place-items: center;
  border: 1px solid var(--line-strong); font-weight: 500; font-variant-numeric: tabular-nums;
}
.edb-pager a.page-numbers:hover { border-color: var(--text); }
.edb-pager .page-numbers.current { background: var(--aqua); color: #fff; border-color: var(--aqua); }
.edb-pager .dots { border-color: transparent; }
.edb-related { background: var(--bg); }
.edb-related__head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: clamp(40px, 5vw, 72px); }
.edb-related__head .edb-h { font-size: clamp(40px, 5vw, 84px); }

.edb-crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: clamp(24px, 3vw, 40px); font-size: 14px; color: var(--text-3); }
.edb-crumbs > span { display: contents; }
.edb-crumbs a { color: var(--text-2); transition: color 0.3s ease; }
.edb-crumbs a:hover { color: var(--aqua); }
.edb-crumbs .breadcrumb_last, .edb-crumbs [aria-current] { color: var(--text); }
.edb-crumbs .edb-crumbs__sep { color: var(--text-3); }

.edb-js .edb-shop .edb-w, .edb-blog .edb-w, .edb-page .edb-w { padding: 0.08em 0.08em 0.24em 0; margin: -0.08em -0.08em -0.24em 0; }

/* ---------- blog list ---------- */
.edb-blog { background: var(--bg); padding: calc(var(--header) + 88px) 0 clamp(88px, 10vw, 150px); }
.edb-blog__head { display: grid; grid-template-columns: 1.5fr 0.7fr; gap: 32px 72px; align-items: end; margin-bottom: clamp(36px, 4vw, 56px); }
.edb-blog__head .edb-display { font-size: clamp(56px, 7.2vw, 124px); }
.edb-blog__intro { padding-bottom: 12px; }
.edb-blog__cats {
  display: flex; flex-wrap: wrap; gap: 8px; padding: 24px 0; margin-bottom: clamp(36px, 4vw, 64px);
  border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
}
.edb-blog__grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(40px, 4vw, 64px) clamp(16px, 2vw, 28px); }
.edb-blog__empty { padding: 40px 0; }

.edb-bfeat {
  display: grid; grid-template-columns: 1.25fr 0.75fr; gap: clamp(28px, 4vw, 64px); align-items: center;
  margin-bottom: clamp(56px, 7vw, 104px);
}
.edb-bfeat__media { display: block; aspect-ratio: 16 / 10; border-radius: var(--radius); overflow: hidden; background: var(--surface); -webkit-mask-image: -webkit-radial-gradient(white, black); }
.edb-bfeat__media img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.4s var(--ease); }
.edb-bfeat:hover .edb-bfeat__media img { transform: scale(1.04); }
.edb-bfeat__tag { color: #fff !important; background: var(--aqua); padding: 4px 10px; border-radius: 999px; }
.edb-site .edb-bfeat__title { font-size: clamp(34px, 3.6vw, 60px); line-height: 1.02; letter-spacing: -0.045em; margin-top: 18px; }
.edb-bfeat__title a { transition: color 0.4s var(--ease); }
.edb-bfeat__title a:hover { color: var(--aqua-2); }
.edb-bfeat__lead { margin: 18px 0 26px; color: var(--text-2); font-size: clamp(17px, 1.3vw, 20px); max-width: 44ch; }

.edb-bcard { display: flex; flex-direction: column; gap: 20px; }
.edb-bcard__media { display: block; aspect-ratio: 4 / 3; border-radius: var(--radius); overflow: hidden; background: var(--surface); -webkit-mask-image: -webkit-radial-gradient(white, black); }
.edb-bcard__media img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.2s var(--ease); }
.edb-bcard:hover .edb-bcard__media img { transform: scale(1.05); }
.edb-bcard__body { display: grid; gap: 10px; }
.edb-bcard__meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; font-size: 12px; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; color: var(--text-3); }
.edb-bcard__meta a { color: var(--aqua-2); }
.edb-site .edb-bcard__title { font-size: clamp(22px, 1.9vw, 30px); line-height: 1.15; letter-spacing: -0.035em; padding-bottom: 0.05em; }
.edb-bcard__title a { transition: color 0.4s var(--ease); }
.edb-bcard:hover .edb-bcard__title a { color: var(--aqua-2); }
.edb-bcard__lead { color: var(--text-2); font-size: 16px; line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.edb-bcard__date { font-size: 13px; color: var(--text-3); padding-top: 12px; border-top: 1px solid var(--line); }

/* ---------- single post ---------- */
.edb-post { display: block; }
.edb-post__hero { background: var(--bg); padding: calc(var(--header) + 48px) 0 0; }
.edb-post__intro { max-width: 980px; }
.edb-site .edb-post__intro .edb-kicker { margin-bottom: 20px; }
.edb-site .edb-post__title { font-size: clamp(42px, 5.6vw, 96px); line-height: 1; letter-spacing: -0.05em; padding-bottom: 0.06em; }
.edb-post__lead { margin-top: 26px; font-size: clamp(19px, 1.6vw, 24px); line-height: 1.5; color: var(--text-2); max-width: 52ch; }
.edb-post__meta { display: flex; flex-wrap: wrap; gap: 12px 36px; margin-top: 34px; padding-top: 22px; border-top: 1px solid var(--line); font-size: 15px; color: var(--text); }
.edb-post__meta li { display: grid; gap: 2px; }
.edb-post__meta span { font-size: 11px; font-weight: 600; letter-spacing: 0.16em; text-transform: uppercase; color: var(--text-3); }
.edb-post__cover { margin: clamp(40px, 5vw, 72px) 0 0; height: clamp(320px, 52vw, 760px); border-radius: var(--radius) var(--radius) 0 0; overflow: hidden; background: var(--surface); }
.edb-js .edb-post__cover[data-clip] { clip-path: inset(100% 0 0 0 round var(--radius) var(--radius) 0 0); }
.edb-js .edb-post__cover[data-clip].is-in { clip-path: inset(0 0 0 0 round var(--radius) var(--radius) 0 0); }
.edb-post__cover [data-parallax] { height: 120%; margin-top: -10%; }
.edb-post__cover img { width: 100%; height: 100%; object-fit: cover; }

.edb-post__main { padding: clamp(56px, 7vw, 110px) 0 clamp(72px, 9vw, 140px); }
.edb-post__grid { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: clamp(32px, 6vw, 110px); align-items: start; }
.edb-post__grid.no-toc { grid-template-columns: minmax(0, 1fr); }
.edb-post__grid.no-toc .edb-post__body { margin: 0 auto; }
.edb-post__body { max-width: 760px; width: 100%; }

.edb-toc { position: sticky; top: calc(var(--header) + 32px); }
.edb-toc p { font-size: 12px; font-weight: 600; letter-spacing: 0.16em; text-transform: uppercase; color: var(--ink-2); margin-bottom: 16px; }
.edb-toc ol { counter-reset: toc; border-left: 1px solid rgba(6, 20, 29, 0.14); }
.edb-toc li { counter-increment: toc; }
.edb-toc a {
  position: relative; display: block; padding: 9px 0 9px 20px; font-size: 15px; line-height: 1.35; color: var(--ink-2);
  transition: color 0.3s ease;
}
.edb-toc a::before { content: counter(toc, decimal-leading-zero); display: block; font-size: 11px; letter-spacing: 0.1em; color: var(--aqua-deep); margin-bottom: 2px; }
.edb-toc a::after { content: ""; position: absolute; left: -1px; top: 8px; bottom: 8px; width: 2px; background: var(--aqua-deep); transform: scaleY(0); transition: transform 0.4s var(--ease); }
.edb-toc a:hover, .edb-toc a.is-active { color: var(--ink); }
.edb-toc a.is-active::after { transform: none; }

.edb-post__foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 20px; margin-top: 56px; padding-top: 28px; border-top: 1px solid rgba(6, 20, 29, 0.14); }
.edb-post__tags { display: flex; flex-wrap: wrap; gap: 8px; }
.edb-post__tags a { display: inline-flex; height: 36px; align-items: center; padding: 0 14px; border-radius: 999px; background: rgba(6, 20, 29, 0.06); color: var(--ink-2); font-size: 14px; font-weight: 500; transition: background 0.3s ease, color 0.3s ease; }
.edb-post__tags a:hover { background: var(--ink); color: var(--sand); }
.edb-share { display: flex; align-items: center; gap: 8px; }
.edb-share > span { font-size: 12px; font-weight: 600; letter-spacing: 0.16em; text-transform: uppercase; color: var(--ink-2); margin-right: 6px; }
.edb-share a, .edb-share button {
  width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; border: 1px solid rgba(6, 20, 29, 0.2);
  background: transparent; color: var(--ink); cursor: pointer; transition: background 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}
.edb-share a:hover, .edb-share button:hover, .edb-share button.is-copied { background: var(--ink); color: #fff; border-color: var(--ink); }

.edb-post__cta { margin-top: 56px; padding: clamp(28px, 4vw, 52px); border-radius: 32px; background: var(--bg); color: var(--text); }
.edb-site .edb-post__cta h2 { font-size: clamp(30px, 3.2vw, 48px); line-height: 1.05; letter-spacing: -0.045em; margin-bottom: 14px; }
.edb-post__cta h2 em { color: var(--aqua); }
.edb-post__cta > p:not(.edb-kicker) { color: var(--text-2); margin-bottom: 28px; max-width: 44ch; }
.edb-post__cta .edb-kicker { color: var(--aqua-2) !important; margin-bottom: 18px; }

/* ---------- regular page ---------- */
.edb-page { display: block; }
.edb-page__head { padding-top: calc(var(--header) + 64px); padding-bottom: clamp(48px, 6vw, 88px); background: var(--bg); max-width: none; }
.edb-page__head .edb-display { font-size: clamp(52px, 7vw, 120px); max-width: 14ch; }
.edb-page__lead { margin-top: 26px; max-width: 52ch; }
.edb-page__main { padding: clamp(56px, 7vw, 110px) 0 clamp(72px, 9vw, 140px); }
.edb-page__body .edb-prose { max-width: 820px; }

/* ---------- pool configurator page ---------- */
.edb-config__top { background: var(--bg); padding-top: calc(var(--header) + 88px); }
.edb-site .edb-config__head { margin-bottom: 0; padding-bottom: clamp(36px, 4vw, 56px); position: relative; }
.edb-config__head::after { content: ""; position: absolute; left: var(--gutter); right: var(--gutter); bottom: 0; border-bottom: 1px solid var(--line); }
.edb-site .edb-config__main { padding-top: clamp(36px, 4vw, 64px); }
.edb-config__main {
  position: relative; overflow: hidden; isolation: isolate; color: var(--text);
  padding-top: clamp(8px, 2vw, 24px);
  background: var(--bg);
}
/* faint pool-tile grid fading out from the centre */
.edb-config__main::before {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background-image:
    linear-gradient(rgba(169, 236, 255, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(169, 236, 255, 0.06) 1px, transparent 1px);
  background-size: 56px 56px; background-position: center top;
  -webkit-mask-image: radial-gradient(70% 60% at 50% 40%, #000 0%, transparent 75%);
          mask-image: radial-gradient(70% 60% at 50% 40%, #000 0%, transparent 75%);
}
.edb-config__frame {
  position: relative; padding: 10px; border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(241, 247, 249, 0.10), rgba(241, 247, 249, 0.03));
  border: 1px solid var(--line-strong);
}
.edb-config__screen {
  position: relative; overflow: hidden; border-radius: calc(var(--radius) - 10px);
  background: #3a7cc0; height: clamp(560px, calc(100vh - var(--header) - 64px), 920px);
}
.edb-config__screen iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; display: block; }
.edb-config__content { max-width: 820px; margin-top: clamp(48px, 6vw, 88px); color: var(--text-2); }
@media (max-width: 767px) {
  .edb-config__main .edb-wrap { padding-left: 12px; padding-right: 12px; }
  .edb-config__frame { padding: 6px; border-radius: 20px; }
  .edb-config__screen { border-radius: 14px; height: calc(100svh - var(--header) - 40px); min-height: 520px; }
  .edb-config__content { padding: 0 4px; }
}

/* ---------- prose (ACF sections) ---------- */
.edb-prose { color: var(--ink); font-size: 18px; line-height: 1.7; }
.edb-prose > * + * { margin-top: clamp(32px, 4vw, 48px); }
.edb-prose__text { scroll-margin-top: calc(var(--header) + 40px); }
.edb-site .edb-prose h2 { font-size: clamp(28px, 2.6vw, 40px); line-height: 1.1; letter-spacing: -0.04em; margin-bottom: 18px; }
.edb-site .edb-prose h3 { font-size: clamp(21px, 1.7vw, 26px); line-height: 1.2; letter-spacing: -0.03em; margin-bottom: 14px; }
.edb-prose__body p + p, .edb-prose__body p + ul, .edb-prose__body ul + p, .edb-prose__body p + ol, .edb-prose__body h3 { margin-top: 1em; }
.edb-prose__body h3 { margin-top: 1.6em; }
.edb-prose__body a { color: var(--aqua-deep); text-decoration: underline; text-underline-offset: 3px; }
.edb-prose__body strong { font-weight: 600; color: var(--ink); }
.edb-prose__body em { font-family: var(--serif); font-size: 1.12em; color: var(--ink-2); }
.edb-prose__body ul { list-style: disc; padding-left: 1.3em; }
.edb-prose__body ol { list-style: decimal; padding-left: 1.3em; }
.edb-prose__body li + li { margin-top: 0.4em; }
.edb-prose__body img { border-radius: 18px; height: auto; }

.edb-prose__figure { margin-left: 0; margin-right: 0; }
.edb-prose__figure img { width: 100%; height: auto; border-radius: 24px; }
.edb-prose__figure.is-wide { margin-left: 0; margin-right: 0; }
.edb-prose__figure figcaption { margin-top: 12px; font-size: 14px; color: var(--ink-2); }

.edb-prose__quote { margin-left: 0; margin-right: 0; padding: 8px 0 8px 28px; border-left: 3px solid var(--aqua-deep); }
.edb-prose__quote p { font-size: clamp(24px, 2.3vw, 34px); line-height: 1.25; letter-spacing: -0.03em; font-weight: 450; color: var(--ink); }
.edb-prose__quote cite { display: block; margin-top: 14px; font-style: normal; font-size: 14px; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: var(--aqua-deep); }

.edb-prose__check { padding: clamp(24px, 3vw, 36px); border-radius: 24px; background: #fff; border: 1px solid rgba(6, 20, 29, 0.08); }
.edb-prose__check ul { display: grid; gap: 12px; }
.edb-prose__check li { display: flex; gap: 12px; align-items: flex-start; font-size: 17px; line-height: 1.45; }
.edb-prose__check li > span { flex: 0 0 auto; width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; background: var(--ink); color: #fff; margin-top: 1px; }

.edb-prose__stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 0; border-top: 1px solid rgba(6, 20, 29, 0.16); }
.edb-prose__stats li { display: grid; gap: 6px; padding: 22px 20px 0 0; }
.edb-prose__stats strong { font-size: clamp(30px, 3vw, 46px); font-weight: 500; letter-spacing: -0.05em; line-height: 1; color: var(--ink); }
.edb-prose__stats span { font-size: 14px; line-height: 1.4; color: var(--ink-2); }

.edb-prose__gallery { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.edb-prose__gallery figure { margin: 0; aspect-ratio: 4 / 3; border-radius: 20px; overflow: hidden; }
.edb-prose__gallery img { width: 100%; height: 100%; object-fit: cover; }

.edb-prose__cta {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 20px 32px;
  padding: clamp(24px, 3vw, 36px); border-radius: 24px; background: var(--ink); color: var(--text);
}
.edb-site .edb-prose__cta h3 { color: var(--text); margin-bottom: 6px; }
.edb-prose__cta p { color: var(--text-2); font-size: 16px; line-height: 1.5; max-width: 42ch; }

/* ---------- responsive ---------- */
@media (max-width: 1100px) {
  .edb-post__grid { grid-template-columns: 1fr; }
  .edb-toc { position: static; padding: 22px 24px; border-radius: 20px; background: #fff; }
  .edb-post__body { margin: 0 auto; }
}
@media (max-width: 980px) {
  .edb-blog__head, .edb-bfeat { grid-template-columns: 1fr; }
  .edb-blog__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .edb-blog__cats { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
}
@media (max-width: 640px) {
  .edb-blog__grid { grid-template-columns: 1fr; }
  .edb-prose { font-size: 17px; }
  .edb-prose__gallery { grid-template-columns: 1fr; }
  .edb-post__meta { gap: 12px 24px; }
}

@media (min-width: 2000px) {
  .edb-blog__head .edb-display, .edb-page__head .edb-display { font-size: clamp(124px, 5vw, 168px); }
  .edb-site .edb-bfeat__title { font-size: clamp(60px, 2.4vw, 76px); }
  .edb-site .edb-bcard__title { font-size: clamp(30px, 1.3vw, 38px); }
  .edb-post__intro { max-width: 1180px; }
  .edb-site .edb-post__title { font-size: clamp(96px, 4vw, 124px); }
  .edb-post__cover { height: clamp(760px, 36vw, 920px); }
  .edb-post__body { max-width: 840px; }
  .edb-related__head .edb-h { font-size: clamp(84px, 3.4vw, 112px); }
}
