/* SwimDash product page — Pace & Performance board
   Sibling world to Meet Control: analytical pace/split materials, season notebook.
   Scoped to .swimdash-product. Requires product-shared.css first. */

.swimdash-product {
  --ps-deep: #122333;
  --ps-deep-2: #1a3044;
  --ps-ground: #eef3f7;
  --ps-line: #c3d0da;
  --ps-ink: #122333;
  --ps-muted: #4a6274;
  --ps-on-deep: #f2f7fa;
  --ps-on-deep-muted: rgba(242, 247, 250, 0.72);

  --pace-blue: #40b4e0;
  --pace-green: #1a9b6c;
  --pace-amber: #ffb700;
  --pace-red: #fd192a;
  --pace-soft: rgba(64, 180, 224, 0.16);
  --pace-grid: rgba(18, 35, 51, 0.08);

  color: var(--ps-ink);
}

/* ── Hero ── */

.sd-hero {
  position: relative;
  padding: 1.25rem 0 4.5rem;
  overflow: hidden;
}

.sd-hero__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2.5rem;
  align-items: end;
}

@media (min-width: 900px) {
  .sd-hero__grid {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
    gap: 3rem;
    align-items: center;
  }
}

.sd-hero__copy {
  position: relative;
  z-index: 2;
  padding-bottom: 0.5rem;
}

.sd-hero__tag {
  margin: 1.25rem 0 0;
  font-size: clamp(1.05rem, 2vw, 1.3rem);
  line-height: 1.55;
  max-width: 34rem;
  color: var(--ps-on-deep-muted);
}

/* Pace-chart field: horizontal split rules only.
   Rules live on an oversized ::before that drifts one rule period. */
.sd-pace-field {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  mask-image: linear-gradient(90deg, transparent 0%, #000 30%, #000 100%);
  -webkit-mask-image: linear-gradient(90deg, transparent 0%, #000 30%, #000 100%);
  opacity: 0.9;
}

.sd-pace-field::before {
  content: '';
  position: absolute;
  inset: -12% 0;
  background:
    repeating-linear-gradient(
      to bottom,
      transparent 0,
      transparent 3.25rem,
      rgba(64, 180, 224, 0.14) 3.25rem,
      rgba(64, 180, 224, 0.14) calc(3.25rem + 1px)
    );
  animation: ps-drift-y 10s linear infinite;
}

/* Hero entrance — one authored moment */
.sd-hero .sd-hero__copy,
.sd-hero .ps-board {
  animation: ps-enter 320ms var(--ease-out) both;
}

.sd-hero .ps-board {
  animation-delay: 60ms;
}

/* ── Sections shared ── */

.sd-section {
  padding: 4rem 0 4.25rem;
}

.sd-section__head {
  margin-bottom: 2.25rem;
  max-width: 40rem;
}

.sd-section--tight {
  padding: 3.25rem 0 3.5rem;
}

/* ── Dense feature rows (pace ticks) ── */

.sd-rows {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
  margin: 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--ps-line);
}

@media (min-width: 720px) {
  .sd-rows--2 {
    grid-template-columns: 1fr 1fr;
  }

  .sd-rows--2 .sd-row:nth-child(odd) {
    padding-right: 1.5rem;
    border-right: 1px solid var(--ps-line);
  }

  .sd-rows--2 .sd-row:nth-child(even) {
    padding-left: 1.5rem;
  }
}

.sd-row {
  padding: 1.2rem 0;
  border-bottom: 1px solid var(--ps-line);
}

.sd-row__title {
  display: flex;
  align-items: baseline;
  gap: 0.55rem;
  font-family: var(--font-body);
  font-size: 1.02rem;
  font-weight: 600;
  color: var(--ps-ink);
  margin: 0 0 0.35rem;
  line-height: 1.3;
}

/* Pace tick — short split mark, not a lane rope */
.sd-row__title::before {
  content: '';
  flex: 0 0 0.75rem;
  width: 0.75rem;
  height: 3px;
  border-radius: 1px;
  background: var(--pace-blue);
  transform: translateY(-0.28em);
}

.sd-row--award .sd-row__title::before {
  background: var(--pace-amber);
}

.sd-row--pb .sd-row__title::before {
  background: var(--pace-green);
}

.sd-row--alert .sd-row__title::before {
  background: var(--pace-red);
}

.sd-row__desc {
  margin: 0;
  padding-left: calc(0.75rem + 0.55rem);
  font-size: 0.925rem;
  line-height: 1.55;
  color: var(--ps-muted);
  max-width: 38rem;
}

/* ── Audience strip ── */

.sd-audience {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
  margin: 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--ps-line);
}

@media (min-width: 720px) {
  .sd-audience {
    grid-template-columns: repeat(4, 1fr);
  }
}

.sd-audience__item {
  padding: 1.35rem 1.25rem 1.35rem 0;
  border-bottom: 1px solid var(--ps-line);
}

@media (min-width: 720px) {
  .sd-audience__item {
    padding: 1.5rem 1.35rem 1.5rem 0;
    border-bottom: none;
    border-right: 1px solid var(--ps-line);
  }

  .sd-audience__item:last-child {
    border-right: none;
    padding-right: 0;
  }

  .sd-audience__item:not(:first-child) {
    padding-left: 1.35rem;
  }
}

.sd-audience__title {
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 600;
  margin: 0 0 0.35rem;
  color: var(--ps-ink);
}

.sd-audience__desc {
  margin: 0;
  font-size: 0.875rem;
  line-height: 1.5;
  color: var(--ps-muted);
}

/* ── Modules station layout ── */

.sd-modules {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2.5rem;
  align-items: start;
}

@media (min-width: 900px) {
  .sd-modules {
    grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
    gap: 3.25rem;
    align-items: start;
  }

  .sd-modules--flip {
    grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
  }

  .sd-modules--flip .sd-modules__copy {
    order: 2;
  }

  .sd-modules--flip .sd-modules__visual {
    order: 1;
  }
}

.sd-also {
  margin-top: 1.75rem;
  padding: 1.5rem 0 0;
  border-top: 1px solid var(--ps-line);
}

.sd-also__title {
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 600;
  margin: 0 0 0.85rem;
  color: var(--ps-ink);
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.sd-check-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 0.85rem;
}

.sd-check-list li {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  font-size: 0.925rem;
  line-height: 1.55;
  color: var(--ps-muted);
}

.sd-check-list li strong {
  color: var(--ps-ink);
  font-weight: 600;
}

.sd-check-mark {
  flex: 0 0 auto;
  margin-top: 0.2rem;
  width: 0.9rem;
  height: 0.9rem;
  border-radius: 999px;
  background: var(--pace-green);
  position: relative;
}

.sd-check-mark::after {
  content: '';
  position: absolute;
  left: 0.28rem;
  top: 0.18rem;
  width: 0.22rem;
  height: 0.4rem;
  border: solid #fff;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

/* ── Onboarding timeline ── */

.sd-timeline {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
  margin: 0;
  padding: 0;
  list-style: none;
}

@media (min-width: 800px) {
  .sd-timeline {
    grid-template-columns: repeat(3, 1fr);
  }
}

.sd-timeline__step {
  position: relative;
  padding: 1.75rem 0;
  border-top: 2px solid var(--pace-blue);
}

@media (min-width: 800px) {
  .sd-timeline__step {
    padding: 1.75rem 1.75rem 0 0;
  }

  .sd-timeline__step:not(:last-child) {
    border-right: 1px solid var(--ps-line);
    padding-right: 1.75rem;
    margin-right: 1.75rem;
  }
}

.sd-timeline__mark {
  display: block;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 2.5rem;
  line-height: 1;
  color: var(--pace-blue);
  margin-bottom: 0.65rem;
  letter-spacing: -0.02em;
}

.sd-timeline__title {
  font-family: var(--font-body);
  font-size: 1.15rem;
  font-weight: 600;
  margin: 0 0 0.45rem;
  color: var(--ps-ink);
}

.sd-timeline__desc {
  margin: 0;
  font-size: 0.95rem;
  line-height: 1.55;
  color: var(--ps-muted);
  max-width: 28rem;
}

/* ── Compare table (split grid) ── */

.sd-compare-wrap {
  overflow-x: auto;
  border: 1px solid var(--ps-line);
  border-radius: 0.5rem;
  background: #fff;
  box-shadow:
    0 12px 28px rgba(18, 35, 51, 0.08),
    0 1px 2px rgba(18, 35, 51, 0.04);
}

.sd-compare {
  width: 100%;
  min-width: 36rem;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.925rem;
}

.sd-compare thead th {
  background: var(--ps-ground);
  color: var(--ps-ink);
  font-weight: 600;
  padding: 0.95rem 1.15rem;
  border-bottom: 1px solid var(--ps-line);
  white-space: nowrap;
}

.sd-compare tbody td {
  padding: 0.95rem 1.15rem;
  border-bottom: 1px solid var(--pace-grid);
  color: var(--ps-muted);
  vertical-align: top;
}

.sd-compare tbody tr:last-child td {
  border-bottom: none;
}

.sd-compare tbody td:first-child {
  font-weight: 600;
  color: var(--ps-ink);
  white-space: nowrap;
}

.sd-compare .sd-badge {
  display: inline-flex;
  align-items: center;
  margin-left: 0.55rem;
  padding: 0.15rem 0.55rem;
  border-radius: 999px;
  background: rgba(255, 183, 0, 0.22);
  color: #8a6200;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  vertical-align: middle;
}

/* Feature availability marks */
.sd-features td:not(:first-child),
.sd-features th:not(:first-child) {
  text-align: center;
  width: 7.5rem;
}

.sd-yes,
.sd-no {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.35rem;
  height: 1.35rem;
}

.sd-yes {
  color: var(--pace-green);
}

.sd-no {
  color: #9aabb8;
}

.sd-yes svg,
.sd-no svg {
  width: 1.15rem;
  height: 1.15rem;
  display: block;
}

.sd-notes {
  margin: 1rem auto 0;
  max-width: 48rem;
  padding: 0;
  list-style: none;
  font-size: 0.8125rem;
  line-height: 1.55;
  color: var(--ps-muted);
}

.sd-notes li {
  position: relative;
  padding-left: 0.9rem;
  margin-bottom: 0.35rem;
}

.sd-notes li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 0.35rem;
  height: 0.35rem;
  border-radius: 999px;
  background: var(--pace-blue);
}

.sd-module-note {
  margin: 1.15rem auto 0;
  max-width: 48rem;
  font-size: 0.875rem;
  line-height: 1.55;
  color: var(--ps-muted);
}

.sd-cta-note {
  margin-top: 1.75rem;
  padding: 1.5rem 1.75rem;
  border: 1px solid var(--ps-line);
  border-radius: 0.5rem;
  background: #fff;
  text-align: center;
  font-size: 0.95rem;
  line-height: 1.55;
  color: var(--ps-muted);
}

.sd-cta-note a {
  font-weight: 600;
}

/* ── Close ── */

.sd-close {
  padding: 5rem 0 5.5rem;
  text-align: left;
}

.sd-close .ps-h2 {
  max-width: 16ch;
}

.sd-close .ps-lead {
  margin-top: 1rem;
  max-width: 36rem;
}

/* ── Reduced motion ── */

@media (prefers-reduced-motion: reduce) {
  .sd-hero .sd-hero__copy,
  .sd-hero .ps-board {
    animation: ps-fade-in 200ms ease both;
    animation-delay: 0ms;
  }
}

/* ── Small screens ── */

@media (max-width: 640px) {
  .sd-hero {
    padding: 1rem 0 3.25rem;
  }

  .sd-section {
    padding: 2.75rem 0;
  }

  .sd-close {
    padding: 3.5rem 0 4rem;
  }
}
