/* RepLytics - training log / gym board */

:root {
  --accent-color: #2e7df5;
  --accent-soft: rgba(46, 125, 245, 0.14);
  --accent-bright: #28e0a9;
  --accent-text: #3ce8b4;
  --blue-text: #6aa6ff;
  --board-bg: #0d131b;
  --tile-bg: rgba(255, 255, 255, 0.035);
  --panel-bg: rgba(14, 21, 31, 0.86);
  --panel-border: rgba(150, 180, 220, 0.16);
  --chalk-line: rgba(220, 232, 248, 0.22);
  --grid-line: rgba(140, 170, 210, 0.055);
  --tint-color: #07090d;
  --bg-gradient:
    radial-gradient(ellipse 70% 45% at 85% 0%, rgba(46, 125, 245, 0.20), transparent 70%),
    radial-gradient(ellipse 55% 40% at 0% 35%, rgba(40, 224, 169, 0.10), transparent 70%),
    repeating-linear-gradient(0deg, var(--grid-line) 0 1px, transparent 1px 32px),
    repeating-linear-gradient(90deg, var(--grid-line) 0 1px, transparent 1px 32px),
    #07090d;
  --text-color: #f1f5fc;
  --muted-text: #a9b5c6;
  --selection-bg: rgba(40, 224, 169, 0.32);
  --selection-text: #f5fffb;
  --shadow: 0 28px 70px rgba(0, 0, 0, 0.5);
  --font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text",
                 "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-condensed: "Avenir Next Condensed", "SF Pro Display Condensed",
                    "SF Pro Display", "Arial Narrow", "Roboto Condensed",
                    sans-serif-condensed, "Helvetica Neue", Impact, sans-serif;
  --font-mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
}

@media (prefers-color-scheme: light) {
  :root {
    --accent-color: #1f6fe5;
    --accent-soft: rgba(31, 111, 229, 0.10);
    --accent-bright: #17b888;
    --accent-text: #087a5a;
    --blue-text: #1758c2;
    --board-bg: #ffffff;
    --tile-bg: rgba(16, 40, 80, 0.035);
    --panel-bg: rgba(255, 255, 255, 0.9);
    --panel-border: rgba(28, 69, 124, 0.16);
    --chalk-line: rgba(20, 50, 95, 0.22);
    --grid-line: rgba(31, 111, 229, 0.07);
    --tint-color: #f5f8fc;
    --bg-gradient:
      radial-gradient(ellipse 70% 45% at 85% 0%, rgba(31, 111, 229, 0.12), transparent 70%),
      radial-gradient(ellipse 55% 40% at 0% 35%, rgba(23, 184, 136, 0.10), transparent 70%),
      repeating-linear-gradient(0deg, var(--grid-line) 0 1px, transparent 1px 32px),
      repeating-linear-gradient(90deg, var(--grid-line) 0 1px, transparent 1px 32px),
      #f5f8fc;
    --text-color: #0e1622;
    --muted-text: #4b596b;
    --selection-bg: rgba(31, 111, 229, 0.22);
    --selection-text: #0e1622;
    --shadow: 0 20px 50px rgba(24, 67, 130, 0.16);
  }
}

html,
body {
  margin: 0;
  padding: 0;
  min-height: 100%;
  font-family: var(--font-family);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  background: var(--bg-gradient);
  background-color: var(--tint-color);
  color: var(--text-color);
}

body {
  padding: 0;
  overflow-x: hidden;
}

::selection {
  background: var(--selection-bg);
  color: var(--selection-text);
}

.container {
  max-width: 1120px;
  width: 100%;
  margin: 0 auto;
  padding: 1.25rem 1.5rem 2rem;
  box-sizing: border-box;
  animation: fadeInUp 0.55s ease-out;
}

@media (max-width: 600px) {
  .container {
    padding: 0.9rem 1rem 1.6rem;
  }
}

/* ---------- Type ---------- */

h1,
h2,
h3,
.hero-title,
.board-title,
.metric-tile strong {
  font-family: var(--font-condensed);
  font-stretch: condensed;
  text-transform: uppercase;
  letter-spacing: 0.01em;
}

h1 {
  font-size: 1.5rem;
  font-weight: 800;
  line-height: 1;
  margin: 0;
  color: var(--text-color);
}

h2 {
  margin: 2.2rem 0 0.9rem;
  font-size: clamp(1.6rem, 4vw, 2.2rem);
  font-weight: 800;
  line-height: 1;
  color: var(--text-color);
}

h3 {
  font-size: 1.3rem;
  font-weight: 700;
  line-height: 1.05;
  margin: 1.2rem 0 0.35rem;
  color: var(--text-color);
}

p {
  line-height: 1.6;
  margin: 0.45rem 0;
  font-size: 1rem;
  color: var(--muted-text);
}

ul,
ol {
  padding-left: 1.3rem;
  margin: 0.45rem 0 0.3rem;
}

li {
  line-height: 1.6;
  margin-bottom: 0.2rem;
  color: var(--muted-text);
}

li strong,
p strong {
  color: var(--text-color);
}

a {
  color: var(--accent-text);
  text-decoration: none;
  word-break: break-word;
  transition: color 0.2s ease;
}

a:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* ---------- Header ---------- */

.header {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 0.85rem;
  min-height: 64px;
  padding: 0.75rem 0 0.9rem;
  border-bottom: 3px solid var(--text-color);
  position: relative;
}

.header::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -3px;
  width: 96px;
  height: 3px;
  background: linear-gradient(90deg, var(--accent-color), var(--accent-bright));
}

.header > div {
  display: flex;
  flex-direction: column;
}

.app-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  box-shadow:
    0 0 0 1px var(--panel-border),
    0 10px 24px rgba(0, 0, 0, 0.35);
  -webkit-user-drag: none;
}

.tagline {
  margin: 0.25rem 0 0;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted-text);
}

.header-tag {
  margin-left: auto;
  padding: 0.3rem 0.6rem;
  border: 1.5px solid var(--chalk-line);
  border-radius: 4px;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted-text);
}

@media (max-width: 480px) {
  .header-tag {
    display: none;
  }
}

.underline-accent {
  display: none;
}

/* ---------- Hero ---------- */

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(300px, 0.85fr);
  align-items: center;
  gap: 3rem;
  padding: 3.2rem 0 2rem;
}

.kicker {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0 0 1rem;
  font-family: var(--font-mono);
  font-size: 0.74rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent-text);
}

.kicker-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent-bright);
  box-shadow: 0 0 0 4px rgba(40, 224, 169, 0.18);
  animation: pulse 2.4s ease-in-out infinite;
}

.hero-title {
  margin: 0;
  font-size: clamp(4rem, 13vw, 8.6rem);
  font-weight: 900;
  line-height: 0.82;
  letter-spacing: -0.01em;
  color: var(--text-color);
}

.hero-rail {
  display: flex;
  align-items: center;
  gap: 4px;
  max-width: 520px;
  margin: 1.2rem 0 1.5rem;
}

.rail-plate {
  flex: none;
  width: 12px;
  height: 40px;
  border-radius: 3px;
  background: var(--accent-color);
}

.rail-plate.small {
  width: 8px;
  height: 26px;
  background: var(--accent-bright);
}

.rail-bar {
  flex: 1;
  height: 6px;
  border-radius: 3px;
  background:
    repeating-linear-gradient(90deg, transparent 0 10px, rgba(0, 0, 0, 0.18) 10px 12px),
    linear-gradient(90deg, var(--muted-text), var(--text-color), var(--muted-text));
  opacity: 0.75;
}

.hero-lead {
  font-size: 1.15rem;
  color: var(--text-color);
}

.badge-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.7rem;
  margin: 1.4rem 0 0.5rem;
}

.app-store-link img {
  width: 190px;
  height: auto;
  display: block;
  -webkit-user-drag: none;
}

/* ---------- "Today" board ---------- */

.hero-metrics {
  position: relative;
  display: grid;
  gap: 0.75rem;
  padding: 1rem;
  border: 1px solid var(--panel-border);
  border-top: 4px solid var(--accent-color);
  border-radius: 10px;
  background:
    repeating-linear-gradient(0deg, transparent 0 27px, var(--grid-line) 27px 28px),
    var(--board-bg);
  box-shadow: var(--shadow);
  transform: rotate(0.6deg);
}

.board-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 0.6rem;
  border-bottom: 2px dashed var(--chalk-line);
}

.board-title {
  font-size: 1.6rem;
  font-weight: 800;
  line-height: 1;
  color: var(--text-color);
}

.board-chip {
  padding: 0.2rem 0.5rem;
  border-radius: 999px;
  background: var(--accent-soft);
  border: 1px solid var(--panel-border);
  font-family: var(--font-mono);
  font-size: 0.66rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--blue-text);
}

.metric-row {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.75rem;
}

.metric-tile {
  display: grid;
  align-content: start;
  gap: 0.3rem;
  padding: 0.9rem 1rem;
  border: 1px solid var(--panel-border);
  border-radius: 8px;
  background: var(--tile-bg);
}

.metric-label,
.metric-note {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted-text);
}

.metric-tile strong {
  font-size: 3.4rem;
  font-weight: 900;
  line-height: 0.9;
  color: var(--accent-text);
}

.metric-tile.small strong {
  font-size: 2.8rem;
  color: var(--text-color);
}

.metric-meter,
.card-meter {
  display: block;
  height: 8px;
  border-radius: 999px;
  background: var(--tile-bg);
  box-shadow: inset 0 0 0 1px var(--panel-border);
  overflow: hidden;
}

.metric-meter {
  margin-top: 0.4rem;
}

.metric-meter > span,
.card-meter > span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--accent-color), var(--accent-bright));
  transform-origin: left;
  animation: fillBar 1.1s 0.25s cubic-bezier(.2, .8, .2, 1) both;
}

.tally {
  position: relative;
  display: inline-flex;
  gap: 5px;
  height: 20px;
  margin-top: 0.3rem;
  width: max-content;
}

.tally i {
  width: 3px;
  height: 100%;
  border-radius: 2px;
  background: var(--accent-bright);
}

.tally i.slash {
  position: absolute;
  left: -4px;
  top: 8px;
  width: 38px;
  height: 3px;
  transform: rotate(-24deg);
  background: var(--accent-color);
}

.streak-dots {
  display: flex;
  gap: 4px;
  margin-top: 0.45rem;
}

.streak-dots i {
  width: 10px;
  height: 10px;
  border-radius: 3px;
  border: 1.5px solid var(--chalk-line);
  box-sizing: border-box;
}

.streak-dots i.on {
  border-color: transparent;
  background: var(--accent-color);
}

.metric-chart {
  display: flex;
  align-items: end;
  gap: 0.55rem;
  height: 118px;
  padding: 0.85rem;
  border: 1px solid var(--panel-border);
  border-radius: 8px;
  background:
    repeating-linear-gradient(0deg, var(--chalk-line) 0 1px, transparent 1px 25%),
    var(--tile-bg);
  background-size: 100% calc(100% - 0.85rem);
  background-position: 0 0.85rem;
  background-repeat: no-repeat;
}

.metric-chart span {
  flex: 1;
  min-width: 14px;
  border-radius: 4px 4px 2px 2px;
  background: linear-gradient(180deg, var(--accent-bright), var(--accent-color));
  transform-origin: bottom;
  animation: growBar 0.9s cubic-bezier(.2, .8, .2, 1) both;
}

.metric-chart span:nth-child(2) { animation-delay: 0.06s; }
.metric-chart span:nth-child(3) { animation-delay: 0.12s; }
.metric-chart span:nth-child(4) { animation-delay: 0.18s; }
.metric-chart span:nth-child(5) { animation-delay: 0.24s; }
.metric-chart span:nth-child(6) { animation-delay: 0.30s; }

@media (max-width: 820px) {
  .hero {
    grid-template-columns: 1fr;
    gap: 2.2rem;
    padding-top: 2.2rem;
  }

  .hero-metrics {
    transform: none;
  }
}

/* ---------- Sections ---------- */

.block h2 {
  display: flex;
  align-items: baseline;
  gap: 0.7rem;
  padding-top: 1.6rem;
  border-top: 1px solid var(--panel-border);
}

.h-index {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: var(--blue-text);
  transform: translateY(-0.35em);
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.85rem;
  margin: 1rem 0 0.5rem;
}

@media (max-width: 900px) {
  .feature-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 560px) {
  .feature-grid {
    grid-template-columns: 1fr;
  }
}

.feature-card {
  display: flex;
  flex-direction: column;
  padding: 1rem 1.1rem 1.2rem;
  border-radius: 10px;
  background: var(--panel-bg);
  border: 1px solid var(--panel-border);
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.16);
}

.card-meter {
  height: 6px;
  margin-bottom: 0.9rem;
}

.card-no {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--blue-text);
}

.feature-card h3 {
  margin: 0.3rem 0 0.4rem;
  font-size: 1.7rem;
  font-weight: 800;
}

.feature-card p {
  margin: 0;
  font-size: 0.92rem;
}

/* Set log list */

.set-log {
  list-style: none;
  padding: 0;
  margin: 1rem 0 0.5rem;
  counter-reset: set;
  border: 1px solid var(--panel-border);
  border-radius: 10px;
  background: var(--panel-bg);
  overflow: hidden;
}

.set-log li {
  counter-increment: set;
  display: grid;
  grid-template-columns: 4.2rem 1fr 22px;
  align-items: center;
  gap: 0.9rem;
  margin: 0;
  padding: 0.85rem 1rem;
  border-top: 1px dashed var(--chalk-line);
  color: var(--text-color);
}

.set-log li:first-child {
  border-top: 0;
}

.set-log li::before {
  content: "Set " counter(set);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--blue-text);
}

.set-log li::after {
  content: "";
  width: 18px;
  height: 18px;
  border-radius: 5px;
  background:
    no-repeat center / 12px 12px
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M2 6.3l2.6 2.5L10 3.3' fill='none' stroke='%2307090d' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"),
    var(--accent-bright);
}

@media (max-width: 480px) {
  .set-log li {
    grid-template-columns: 3.4rem 1fr 18px;
    gap: 0.7rem;
    padding: 0.8rem 0.85rem;
  }

  .set-log li::after {
    width: 16px;
    height: 16px;
  }
}

/* Privacy plate */

.privacy-plate p {
  max-width: 760px;
  padding: 1rem 1.2rem;
  border-left: 4px solid var(--accent-bright);
  border-radius: 0 8px 8px 0;
  background: var(--panel-bg);
}

/* ---------- Footer ---------- */

footer {
  margin-top: 2.8rem;
  padding-top: 1.25rem;
  border-top: 3px solid var(--text-color);
  text-align: center;
  font-size: 0.88rem;
  color: var(--muted-text);
}

footer a {
  font-weight: 600;
}

.no-select {
  user-select: none;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
}

/* ---------- Subpages (privacy / support / terms) ---------- */

.subpage .container {
  max-width: 1120px;
  margin: 0 auto;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.subpage section,
.subpage .header,
.subpage .container > p,
.subpage .container > ul,
.subpage .container > ol,
.subpage .container > h2,
.subpage footer {
  max-width: 760px;
  margin-left: auto;
  margin-right: auto;
}

.subpage .header {
  padding-top: 1rem;
}

.subpage h1 {
  font-size: clamp(2rem, 7vw, 2.8rem);
  font-weight: 900;
  line-height: 0.95;
}

.subpage .container > p:first-of-type {
  margin-top: 2rem;
  font-size: 1.08rem;
  color: var(--text-color);
}

.subpage h2 {
  font-size: clamp(1.4rem, 4.5vw, 1.75rem);
  margin: 2rem auto 0.6rem;
}

.subpage .container > h2 {
  padding-top: 1.35rem;
  border-top: 1px solid var(--panel-border);
}

.subpage section {
  padding: 1.2rem 0;
  border-top: 1px solid var(--panel-border);
}

.subpage section:first-of-type {
  border-top: 0;
  padding-top: 0;
}

.subpage section h2 {
  margin-top: 0.4rem;
}

.subpage h3 {
  font-size: 1.2rem;
  color: var(--blue-text);
}

.subpage li::marker {
  color: var(--accent-text);
}

/* ---------- Motion ---------- */

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes growBar {
  from { transform: scaleY(0); }
  to { transform: scaleY(1); }
}

@keyframes fillBar {
  from { transform: scaleX(0); }
  to { transform: scaleX(1); }
}

@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 3px rgba(40, 224, 169, 0.18); }
  50% { box-shadow: 0 0 0 7px rgba(40, 224, 169, 0.04); }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}
