/* ===========================================================
   MYINIA — Break The Scroll
   Shared stylesheet for all pages
   =========================================================== */

:root {
  --bg: #ffffff;
  --bg-soft: #fafafa;
  --ink: #111111;
  --ink-soft: #4a4a4a;
  --line: #e6e6e6;
  --icon-bg: #f2f2f2;
  --accent: #111111;
  --accent-contrast: #ffffff;
  --radius-sm: 10px;
  --radius-md: 16px;
  --max-width: 1100px;
  --font-display: 'Baloo 2', 'Poppins', sans-serif;
  --font-body: 'Inter', system-ui, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
  line-height: 1.55;
}

a {
  color: inherit;
  text-decoration: none;
}

img,
svg {
  display: block;
}

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

/* ---------------- Header ---------------- */

.site-header {
  border-bottom: 1px solid var(--line);
  background: var(--bg);
  position: sticky;
  top: 0;
  z-index: 50;
}

.header-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 22px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.35rem;
  letter-spacing: 0.03em;
}

.desktop-nav {
  display: none;
  align-items: center;
  gap: 40px;
}

.desktop-nav a {
  font-weight: 600;
  font-size: 1rem;
  color: var(--ink);
  padding-bottom: 4px;
  border-bottom: 2px solid transparent;
  transition: border-color 0.2s ease, opacity 0.2s ease;
}

.desktop-nav a:hover {
  opacity: 0.6;
}

.desktop-nav a.active {
  border-bottom-color: var(--ink);
}

.menu-toggle {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}

.menu-toggle span {
  width: 26px;
  height: 2px;
  background: var(--ink);
  border-radius: 2px;
  transition: transform 0.25s ease, opacity 0.25s ease;
}

.menu-toggle.open span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.menu-toggle.open span:nth-child(2) {
  opacity: 0;
}

.menu-toggle.open span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

.mobile-nav {
  display: none;
  flex-direction: column;
  border-bottom: 1px solid var(--line);
  background: var(--bg);
}

.mobile-nav.open {
  display: flex;
}

.mobile-nav a {
  padding: 16px 24px;
  font-weight: 600;
  border-top: 1px solid var(--line);
}

.mobile-nav a.active {
  background: var(--bg-soft);
}

@media (min-width: 860px) {
  .desktop-nav {
    display: flex;
  }
  .menu-toggle {
    display: none;
  }
  .mobile-nav {
    display: none !important;
  }
}

/* ---------------- Page hero / heading ---------------- */

.page-hero {
  text-align: center;
  padding: 72px 24px 40px;
}

.page-hero h1 {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(2.6rem, 6vw, 4.2rem);
  margin: 0 0 22px;
  letter-spacing: -0.01em;
}

.divider {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  max-width: 360px;
  margin: 0 auto 28px;
}

.divider .line {
  flex: 1;
  height: 1px;
  background: var(--line);
}

.divider svg {
  flex-shrink: 0;
}

.page-hero p {
  max-width: 640px;
  margin: 0 auto 6px;
  font-size: 1.05rem;
  color: var(--ink-soft);
}

/* ---------------- Buttons ---------------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: var(--accent);
  color: var(--accent-contrast);
  border: none;
  padding: 18px 36px;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 1.05rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: transform 0.15s ease, opacity 0.2s ease;
}

.btn:hover {
  opacity: 0.85;
}

.btn:active {
  transform: scale(0.98);
}

.btn:focus-visible,
a:focus-visible,
button:focus-visible {
  outline: 3px solid #111;
  outline-offset: 3px;
}

/* ---------------- Home hero ---------------- */

.hero {
  text-align: center;
  padding: 64px 24px 24px;
}

.hero h1 {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(2.4rem, 6.5vw, 4rem);
  line-height: 1.12;
  margin: 0 0 22px;
  letter-spacing: -0.01em;
}

.hero .sub {
  max-width: 620px;
  margin: 0 auto 34px;
  color: var(--ink-soft);
  font-size: 1.05rem;
}

.hero .tagline {
  margin: 22px 0 0;
  font-size: 0.98rem;
  color: var(--ink-soft);
}

/* ---------------- Feature blocks ---------------- */

.features {
  padding: 48px 24px 64px;
  max-width: var(--max-width);
  margin: 0 auto;
}

.features-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
}

.feature {
  display: flex;
  gap: 20px;
  padding: 26px 0;
  border-top: 1px solid var(--line);
}

.feature:first-child {
  border-top: none;
}

.feature-icon {
  flex-shrink: 0;
  width: 64px;
  height: 64px;
  background: var(--icon-bg);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
}

.feature-icon svg {
  width: 28px;
  height: 28px;
}

.feature h3 {
  margin: 4px 0 8px;
  font-size: 1.15rem;
}

.feature p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.98rem;
}

@media (min-width: 860px) {
  .features-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  .feature {
    flex-direction: column;
    align-items: center;
    text-align: center;
    border-top: none;
    border-left: 1px solid var(--line);
    padding: 6px 32px;
  }
  .feature:first-child {
    border-left: none;
  }
}

/* ---------------- Info list (Privacy / Terms) ---------------- */

.info-list {
  max-width: 760px;
  margin: 0 auto;
  padding: 8px 24px 64px;
}

.info-item {
  display: flex;
  gap: 20px;
  padding: 26px 0;
  border-top: 1px solid var(--line);
}

.info-item:first-child {
  border-top: none;
}

.info-icon {
  flex-shrink: 0;
  width: 56px;
  height: 56px;
  background: var(--icon-bg);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
}

.info-icon svg {
  width: 24px;
  height: 24px;
}

.info-item h2 {
  margin: 2px 0 8px;
  font-size: 1.15rem;
}

.info-item p {
  margin: 0;
  color: var(--ink-soft);
}

/* ---------------- Contact ---------------- */

.contact-block {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 40px 24px 96px;
  text-align: center;
}

.contact-icon {
  width: 80px;
  height: 80px;
  background: var(--icon-bg);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 22px;
}

.contact-icon svg {
  width: 34px;
  height: 34px;
}

.contact-block h2 {
  margin: 0 0 6px;
  font-size: 1.1rem;
}

.contact-block a.email {
  color: var(--ink-soft);
  font-size: 1.02rem;
}

.contact-block a.email:hover {
  color: var(--ink);
}

/* ---------------- Footer ---------------- */

.site-footer {
  border-top: 1px solid var(--line);
  padding: 28px 24px 40px;
  text-align: center;
  color: var(--ink-soft);
  font-size: 0.92rem;
}

.footer-links {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  margin-bottom: 10px;
}

.footer-links a {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.footer-links a:hover {
  opacity: 0.7;
}

.footer-links span {
  color: var(--line);
}

/* ---------------- Challenge modal ---------------- */

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(17, 17, 17, 0.55);
  display: none;
  align-items: flex-start;
  justify-content: center;
  padding: 40px 16px;
  overflow-y: auto;
  z-index: 200;
}

.modal-overlay.open {
  display: flex;
}

.modal {
  background: var(--bg);
  border-radius: var(--radius-md);
  max-width: 560px;
  width: 100%;
  padding: 36px 28px 30px;
  position: relative;
  animation: pop-in 0.22s ease;
}

@keyframes pop-in {
  from {
    opacity: 0;
    transform: translateY(12px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.modal-close {
  position: absolute;
  top: 18px;
  right: 18px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: var(--bg);
  cursor: pointer;
  font-size: 1.1rem;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-close:hover {
  background: var(--bg-soft);
}

.modal-eyebrow {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink-soft);
  margin-bottom: 8px;
}

.modal h2 {
  font-family: var(--font-display);
  font-size: 1.7rem;
  margin: 0 0 18px;
}

.quote-box {
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 18px 20px;
  font-style: italic;
  margin-bottom: 26px;
  font-size: 1rem;
}

.quote-box span {
  display: block;
  margin-top: 8px;
  font-style: normal;
  font-weight: 600;
  font-size: 0.85rem;
  color: var(--ink-soft);
}

.workout-list {
  list-style: none;
  margin: 0 0 26px;
  padding: 0;
}

.workout-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 0;
  border-top: 1px solid var(--line);
}

.workout-item:first-child {
  border-top: none;
}

.workout-item input[type='checkbox'] {
  width: 22px;
  height: 22px;
  flex-shrink: 0;
  accent-color: #111;
  cursor: pointer;
}

.workout-item .w-num {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--icon-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  font-weight: 700;
  flex-shrink: 0;
}

.workout-item .w-text {
  flex: 1;
}

.workout-item .w-name {
  font-weight: 700;
  font-size: 1rem;
}

.workout-item .w-desc {
  color: var(--ink-soft);
  font-size: 0.88rem;
}

.workout-item.done .w-name,
.workout-item.done .w-desc {
  text-decoration: line-through;
  opacity: 0.5;
}

.modal-progress {
  height: 6px;
  border-radius: 4px;
  background: var(--bg-soft);
  overflow: hidden;
  margin-bottom: 20px;
}

.modal-progress-fill {
  height: 100%;
  width: 0%;
  background: #111;
  transition: width 0.25s ease;
}

.modal-actions {
  display: flex;
  gap: 12px;
}

.btn-secondary {
  background: var(--bg);
  color: var(--ink);
  border: 1.5px solid var(--ink);
}

.btn-secondary:hover {
  background: var(--bg-soft);
}

.btn[disabled] {
  opacity: 0.4;
  cursor: not-allowed;
}

.done-screen {
  text-align: center;
}

.done-screen .check-circle {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: #111;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
}

.done-screen h2 {
  margin-bottom: 10px;
}

.done-screen p {
  color: var(--ink-soft);
  margin-bottom: 26px;
}

.streak-stat {
  display: flex;
  justify-content: center;
  gap: 40px;
  margin-bottom: 26px;
}

.streak-stat div {
  text-align: center;
}

.streak-stat .num {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 800;
  display: block;
}

.streak-stat .label {
  font-size: 0.82rem;
  color: var(--ink-soft);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

/* Utility */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@media (prefers-reduced-motion: reduce) {
  * {
    animation: none !important;
    transition: none !important;
  }
}
/* Calisthenics Plan Link */
.tagline a {
    color: #007bff;
    font-weight: 700;
    text-decoration: none;
}

.tagline a:hover {
    text-decoration: underline;
}