/* Focus — meaningful-things.com/focus (fresh blue theme) */

*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --color-light: #F7FBFE;
  --color-medium: #9FCDFA;
  --color-dark: #3D7DC5;
  --color-dark-top: #4F9EF8;
  --color-dark-bottom: #193254;
  --gradient-dark: linear-gradient(180deg, var(--color-dark-top), var(--color-dark-bottom));
  --text-on-light: #16202c;
  --text-on-light-secondary: rgba(22, 32, 44, 0.66);
  --text-on-dark: #F7FBFE;
  --text-on-dark-secondary: rgba(247, 251, 254, 0.8);
  --glass-bg: rgba(255, 255, 255, 0.66);
  --corner-radius: 30px;
  --font-primary: -apple-system, BlinkMacSystemFont, 'SF Pro Display', system-ui, sans-serif;
  --font-serif: 'New York', 'Iowan Old Style', Georgia, serif;
  --surface-elevated: rgba(255, 255, 255, 0.85);
  --border-subtle: rgba(22, 32, 44, 0.12);
  --focus-ring: 0 0 0 3px rgba(85, 165, 255, 0.6);
  --max-width-wide: 1200px;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-primary);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  background: var(--color-light);
  color: var(--text-on-light);
  overflow-x: hidden;
}

/* ---- Skip link (a11y) ---- */
.skip-link {
  position: absolute;
  top: -100px;
  left: 1rem;
  background: var(--color-light);
  color: var(--text-on-light);
  padding: 0.75rem 1.25rem;
  border-radius: 999px;
  font-weight: 600;
  text-decoration: none;
  z-index: 100;
  transition: top 0.2s ease-out;
}

.skip-link:focus {
  top: 1rem;
  box-shadow: var(--focus-ring);
  outline: none;
}

/* ---- Floating nav pill ---- */
.nav-pill {
  position: fixed;
  top: 1rem;
  right: 1rem;
  z-index: 50;
  background: var(--glass-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-radius: 999px;
  padding: 0.5rem 0.5rem;
  display: flex;
  gap: 0.25rem;
  opacity: 0;
  transform: translateY(-1rem);
  pointer-events: none;
  transition: opacity 0.3s ease-out, transform 0.3s ease-out;
}

.nav-pill.is-visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.nav-pill__link {
  padding: 0.4rem 0.85rem;
  border-radius: 999px;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-on-light);
  text-decoration: none;
  transition: background 0.2s;
  white-space: nowrap;
}

.nav-pill__link:hover {
  background: rgba(255, 255, 255, 0.5);
}

.nav-pill__link[aria-current="true"] {
  background: rgba(61, 125, 197, 0.25);
  background: color-mix(in srgb, var(--color-dark) 25%, transparent);
}

.nav-pill__link:focus-visible {
  outline: none;
  box-shadow: var(--focus-ring);
}

/* ---- Studio link (top-left of the hero) ---- */
.studio-link {
  position: absolute;
  top: 1.25rem;
  left: 1.5rem;
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  color: var(--text-on-light-secondary);
  text-decoration: none;
}

.studio-link:hover {
  color: var(--text-on-light);
}

.studio-link:focus-visible {
  outline: none;
  box-shadow: var(--focus-ring);
  border-radius: 4px;
}

/* ---- Curve Separators ---- */
.curve-separator {
  line-height: 0;
  overflow: hidden;
  margin-bottom: -1px;
}

.curve-separator svg {
  display: block;
  width: 100%;
  height: 30px;
}

/* ---- Hero ---- */
.hero {
  background: var(--color-dark);
  position: relative;
  overflow: hidden;
}

.hero-cool {
  position: relative;
  background: var(--color-light);
  text-align: center;
  padding: 6rem 2rem 3rem;
}

.hero-curve {
  line-height: 0;
  background: var(--color-light);
}

.hero-curve svg {
  display: block;
  width: 100%;
  height: 30px;
}

.hero-blue {
  position: relative;
  background: var(--gradient-dark);
  text-align: center;
  padding: 4rem 2rem 5rem;
}

.app-icon {
  width: 160px;
  height: 160px;
  border-radius: 36px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.12);
  opacity: 0;
  transform: scale(0.9);
  animation: hero-fade-in 1s ease-out forwards;
}

.hero-title {
  font-size: clamp(3rem, 8vw, 5rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text-on-dark);
  opacity: 0;
  animation: hero-fade-in 1s ease-out 0.2s forwards;
}

.hero-tagline {
  font-family: var(--font-serif);
  font-size: clamp(1.2rem, 2.8vw, 1.6rem);
  font-weight: 500;
  color: var(--text-on-dark);
  max-width: 560px;
  margin: 1rem auto 0;
  line-height: 1.45;
  opacity: 0;
  animation: hero-fade-in 1s ease-out 0.4s forwards;
}

.hero-sub {
  font-size: clamp(1rem, 2vw, 1.15rem);
  font-weight: 500;
  color: var(--text-on-dark-secondary);
  max-width: 520px;
  margin: 1rem auto 0;
  line-height: 1.6;
  opacity: 0;
  animation: hero-fade-in 1s ease-out 0.5s forwards;
}

.hero-cta {
  margin-top: 2.5rem;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  opacity: 0;
  animation: hero-fade-in 1s ease-out 0.6s forwards;
}

.hero-cta__note {
  width: 100%;
  margin-top: 0.25rem;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-on-dark-secondary);
}

/* The signature motif: a slow, decorative timer ring in the blue band.
   Conic sweep masked down to a thin 3px circle; purely ornamental. */
.timer-ring {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 340px;
  height: 340px;
  margin: -170px 0 0 -170px;
  border-radius: 50%;
  background: conic-gradient(from 0deg, rgba(247, 251, 254, 0.35), rgba(247, 251, 254, 0) 75%);
  -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 4px), #000 calc(100% - 3px));
  mask: radial-gradient(farthest-side, transparent calc(100% - 4px), #000 calc(100% - 3px));
  opacity: 0.5;
  pointer-events: none;
  animation: timer-ring-spin 60s linear infinite;
}

@keyframes timer-ring-spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

@keyframes hero-fade-in {
  to {
    opacity: 1;
    transform: scale(1);
  }
}

/* ---- App Store badge ---- */
.app-store-badge {
  display: inline-block;
  line-height: 0;
  border-radius: 10px;
  transition: transform 0.2s;
}

.app-store-badge:hover {
  transform: translateY(-2px);
}

.app-store-badge:focus-visible {
  outline: none;
  box-shadow: var(--focus-ring);
}

.app-store-badge img {
  width: 220px;
  height: auto;
  display: block;
}

/* ---- Sections ---- */
.section {
  padding: 6rem 2rem;
  scroll-margin-top: 5rem;
}

.section__inner {
  max-width: var(--max-width-wide);
  margin: 0 auto;
}

.section--paper {
  background: var(--color-light);
  color: var(--text-on-light);
}

.section--blue {
  background: var(--gradient-dark);
  color: var(--text-on-dark);
}

.section-heading {
  text-align: center;
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 1rem;
  line-height: 1.15;
}

.section-lede {
  text-align: center;
  font-size: clamp(1.05rem, 2vw, 1.25rem);
  font-weight: 500;
  max-width: 640px;
  margin: 0 auto 3rem;
  line-height: 1.5;
}

.section--paper .section-heading { color: var(--text-on-light); }
.section--paper .section-lede { color: var(--text-on-light-secondary); }
.section--blue .section-heading { color: var(--text-on-dark); }
.section--blue .section-lede { color: var(--text-on-dark-secondary); }

/* ---- Reveal animation (no-JS safe: visible by default; JS adds .js to <html>) ---- */
.reveal {
  opacity: 1;
  transform: none;
}

.js .reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 1s ease-out, transform 1s ease-out;
}

.js .reveal.revealed {
  opacity: 1;
  transform: translateY(0);
}

.reveal-delay-1 { transition-delay: 0.4s; }
.reveal-delay-2 { transition-delay: 0.8s; }

/* ---- Rhythm strip (Plan → Work → Break → Review) ---- */
.rhythm-strip {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
}

.rhythm-step {
  background: var(--surface-elevated);
  border: 1px solid var(--border-subtle);
  border-top: 3px solid var(--color-medium);
  border-radius: var(--corner-radius);
  padding: 1.75rem 1.5rem;
}

.rhythm-step__number {
  font-family: var(--font-serif);
  font-size: 2.5rem;
  font-weight: 600;
  line-height: 1;
  color: var(--color-dark);
  margin-bottom: 0.75rem;
}

.rhythm-step__title {
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--text-on-light);
  margin-bottom: 0.5rem;
}

.rhythm-step__text {
  font-size: 0.95rem;
  line-height: 1.6;
  color: var(--text-on-light-secondary);
  font-weight: 500;
}

/* ---- Glass cards & grids ---- */
.glass-card {
  background: var(--glass-bg);
  border: 1px solid var(--border-subtle);
  border-radius: var(--corner-radius);
  padding: 2rem 2.5rem;
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

/* ---- Feature split (media + text rows) ---- */
.feature-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
}

.feature-split + .feature-split {
  margin-top: 4rem;
}

.feature-split--flip .feature-split__media {
  order: 2;
}

.feature-split__media img {
  max-width: 100%;
  height: auto;
  display: block;
  border-radius: var(--corner-radius);
}

.feature-split h3 {
  font-size: clamp(1.4rem, 3vw, 1.8rem);
  font-weight: 700;
  letter-spacing: -0.01em;
  margin-bottom: 0.75rem;
}

.feature-split p {
  font-size: 1.05rem;
  line-height: 1.7;
}

.section--paper .feature-split h3 { color: var(--text-on-light); }
.section--paper .feature-split p { color: var(--text-on-light-secondary); }
.section--blue .feature-split h3 { color: var(--text-on-dark); }
.section--blue .feature-split p { color: var(--text-on-dark-secondary); }

/* ---- Platform chips ---- */
.platform-chips {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.6rem;
}

.platform-chips li {
  background: var(--surface-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: 999px;
  padding: 0.5rem 1.1rem;
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text-on-light);
}

/* ---- Sub-page chrome (faq, statistics, mac, apple-watch, url-scheme) ---- */
.tip-page-header {
  max-width: var(--max-width-wide);
  margin: 0 auto;
  width: 100%;
  padding: 1.5rem 2rem 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}

.brand-link {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
  color: var(--text-on-light);
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: -0.01em;
}

.brand-link img {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.brand-link:focus-visible {
  outline: none;
  box-shadow: var(--focus-ring);
  border-radius: 4px;
}

.breadcrumbs {
  list-style: none;
  display: flex;
  gap: 0.5rem;
  font-size: 0.9rem;
  color: var(--text-on-light-secondary);
  flex-wrap: wrap;
}

.breadcrumbs li {
  display: flex;
  align-items: center;
}

.breadcrumbs li:not(:last-child)::after {
  content: "›";
  margin-left: 0.5rem;
  opacity: 0.6;
}

.breadcrumbs a {
  color: var(--text-on-light-secondary);
  text-decoration: none;
  font-weight: 500;
}

.breadcrumbs a:hover {
  color: var(--text-on-light);
  text-decoration: underline;
}

.breadcrumbs a:focus-visible {
  outline: none;
  box-shadow: var(--focus-ring);
  border-radius: 4px;
}

.page-main {
  max-width: 760px;
  width: 100%;
  margin: 0 auto;
  padding: 3rem 2rem 6rem;
}

.last-updated {
  font-size: 0.85rem;
  color: var(--text-on-light-secondary);
  font-weight: 500;
}

/* ---- Prose (long-form sub-page content) ---- */
.prose {
  font-size: 1.05rem;
  line-height: 1.7;
  color: var(--text-on-light);
}

.prose h1 {
  font-size: clamp(1.85rem, 4.5vw, 2.2rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.2;
  color: var(--text-on-light);
  margin-bottom: 1.25rem;
}

.prose h2 {
  font-size: clamp(1.4rem, 3vw, 1.7rem);
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1.3;
  color: var(--text-on-light);
  margin: 2.5rem 0 1rem;
}

.prose h3 {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text-on-light);
  margin: 2rem 0 0.75rem;
}

.prose p {
  margin-bottom: 1.25rem;
}

.prose ul,
.prose ol {
  margin: 0 0 1.25rem;
  padding-left: 1.5rem;
}

.prose li {
  margin-bottom: 0.5rem;
}

.prose li::marker {
  color: var(--text-on-light-secondary);
}

.prose a {
  color: var(--color-dark);
  text-decoration: underline;
  text-decoration-thickness: 1.5px;
  text-underline-offset: 3px;
}

.prose a:hover {
  text-decoration-thickness: 2px;
}

.prose a:focus-visible {
  outline: none;
  box-shadow: var(--focus-ring);
  border-radius: 4px;
}

.prose strong {
  font-weight: 700;
  color: var(--text-on-light);
}

.prose blockquote {
  border-left: 3px solid var(--color-medium);
  padding-left: 1.25rem;
  margin: 1.5rem 0;
  font-family: var(--font-serif);
  font-style: italic;
  color: var(--text-on-light-secondary);
}

.prose code {
  font-family: ui-monospace, 'SF Mono', Menlo, monospace;
  font-size: 0.9em;
  background: var(--surface-elevated);
  border: 1px solid var(--border-subtle);
  padding: 0.15em 0.45em;
  border-radius: 8px;
}

.prose pre {
  background: var(--surface-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  padding: 1.25rem 1.5rem;
  overflow-x: auto;
  margin-bottom: 1.25rem;
}

.prose pre code {
  background: none;
  border: none;
  padding: 0;
  border-radius: 0;
  font-size: 0.9rem;
  line-height: 1.6;
}

/* ---- FAQ ---- */
.faq-list {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  margin-top: 2rem;
}

.faq-item {
  padding: 1.25rem 1.5rem;
  margin: 0 -1.5rem;
  border-radius: 20px;
  scroll-margin-top: 6rem;
  transition: background 0.3s ease-out;
}

.faq-item:target {
  background: rgba(61, 125, 197, 0.1);
  background: color-mix(in srgb, var(--color-dark) 10%, transparent);
}

.faq-item h2,
.faq-item h3 {
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--text-on-light);
  margin-bottom: 0.6rem;
}

.faq-item p {
  font-size: 1.05rem;
  line-height: 1.7;
  color: var(--text-on-light);
  margin-bottom: 1rem;
}

.faq-item p:last-child {
  margin-bottom: 0;
}

/* ---- App Store CTA (aside on sub-pages) ---- */
.tip-cta {
  max-width: 640px;
  margin: 0 auto;
  background: var(--glass-bg);
  border: 1px solid var(--border-subtle);
  border-radius: var(--corner-radius);
  padding: 2.5rem 2rem;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
}

.tip-cta__text {
  font-size: 1.15rem;
  line-height: 1.5;
  color: var(--text-on-light);
  font-weight: 600;
  max-width: 480px;
  margin: 0;
}

.tip-cta .app-store-badge img {
  display: block;
  width: 220px;
  height: auto;
}

.tip-cta__alt {
  font-size: 0.95rem;
  color: var(--text-on-light-secondary);
  margin: 0;
}

.tip-cta__alt a {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.tip-cta__alt a:hover {
  color: var(--text-on-light);
}

/* ---- Footer ---- */
footer {
  background: var(--color-light);
  color: var(--text-on-light);
  text-align: center;
  padding: 4rem 2rem 3rem;
}

.footer-contact {
  margin-bottom: 1.5rem;
}

.footer-contact a {
  color: var(--text-on-light);
  font-weight: 600;
  font-size: 1.05rem;
  text-decoration: none;
}

.footer-contact a:hover {
  text-decoration: underline;
}

.footer-contact a:focus-visible {
  outline: none;
  box-shadow: var(--focus-ring);
  border-radius: 4px;
}

.footer-links {
  display: flex;
  justify-content: center;
  gap: 2rem;
  margin-bottom: 2rem;
  flex-wrap: wrap;
}

.footer-links a {
  color: var(--text-on-light-secondary);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
}

.footer-links a:hover {
  text-decoration: underline;
}

.footer-links a:focus-visible {
  outline: none;
  box-shadow: var(--focus-ring);
  border-radius: 4px;
}

.footer-love {
  font-size: 0.9rem;
  color: var(--text-on-light-secondary);
  margin-bottom: 0.35rem;
}

.footer-crosspromo {
  font-size: 0.9rem;
  color: var(--text-on-light-secondary);
  margin-bottom: 1.5rem;
}

.footer-crosspromo a {
  color: var(--text-on-light);
  font-weight: 500;
  text-decoration: none;
}

.footer-crosspromo a:hover {
  text-decoration: underline;
}

.footer-crosspromo a:focus-visible {
  outline: none;
  box-shadow: var(--focus-ring);
  border-radius: 4px;
}

.footer-social {
  display: flex;
  justify-content: center;
  gap: 1.25rem;
  margin-bottom: 1.5rem;
}

.footer-social a {
  display: inline-flex;
  padding: 0.35rem;
  color: var(--text-on-light-secondary);
  border-radius: 8px;
}

.footer-social a:hover {
  color: var(--text-on-light);
}

.footer-social a:focus-visible {
  outline: none;
  box-shadow: var(--focus-ring);
}

.footer-social svg {
  width: 22px;
  height: 22px;
  display: block;
  fill: currentColor;
}

.footer-copyright {
  font-size: 0.85rem;
  color: var(--text-on-light-secondary);
}

/* ---- Responsive ---- */
@media (max-width: 1023px) {
  .rhythm-strip {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 720px) {
  .nav-pill {
    top: 0.75rem;
    left: 0.75rem;
    right: 0.75rem;
    overflow-x: auto;
    scrollbar-width: none;
    justify-content: flex-start;
    padding: 0.4rem;
  }

  .nav-pill::-webkit-scrollbar {
    display: none;
  }

  .section {
    padding: 4rem 1.25rem;
  }

  .glass-card {
    padding: 1.5rem 1.75rem;
  }

  .app-icon {
    width: 120px;
    height: 120px;
    border-radius: 28px;
  }

  .hero-cool {
    padding: 4rem 1.25rem 2rem;
  }

  .hero-blue {
    padding: 3rem 1.25rem 4rem;
  }

  .app-store-badge img {
    width: 190px;
    height: auto;
  }

  .timer-ring {
    display: none;
  }

  .rhythm-strip {
    grid-template-columns: 1fr;
    max-width: 400px;
    margin: 0 auto;
  }

  .card-grid {
    grid-template-columns: 1fr;
  }

  .feature-split {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .feature-split--flip .feature-split__media {
    order: 0;
  }

  .feature-split + .feature-split {
    margin-top: 3rem;
  }

  .tip-page-header {
    padding: 1rem 1.25rem 0;
  }

  .page-main {
    padding: 2rem 1.25rem 4rem;
  }

  .faq-item {
    padding: 1rem 1.1rem;
    margin: 0;
  }

  .tip-cta {
    padding: 2rem 1.5rem;
  }
}

/* ---- Reduced Motion ---- */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .app-icon,
  .hero-title,
  .hero-tagline,
  .hero-sub,
  .hero-cta {
    animation: none;
    opacity: 1;
    transform: none;
  }

  .timer-ring {
    display: none;
  }

  .js .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .nav-pill {
    transition: none;
  }

  .skip-link,
  .app-store-badge,
  .faq-item {
    transition: none;
  }
}

/* ---- Dark Mode (deep-navy canvas) ---- */
@media (prefers-color-scheme: dark) {
  :root {
    --color-light: #101F36;
    --color-medium: #16294A;
    --color-dark: #6AB0F8;
    --color-dark-top: #12233F;
    --color-dark-bottom: #0A1424;
    --text-on-light: #EAF3FE;
    --text-on-light-secondary: rgba(234, 243, 254, 0.72);
    --text-on-dark: #EAF3FE;
    --text-on-dark-secondary: rgba(234, 243, 254, 0.78);
    --glass-bg: rgba(16, 31, 54, 0.66);
    --surface-elevated: rgba(22, 41, 74, 0.85);
    --border-subtle: rgba(159, 205, 250, 0.18);
    --focus-ring: 0 0 0 3px rgba(106, 176, 248, 0.6);
  }

  .app-icon {
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
  }

  .brand-link img {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
  }

  .nav-pill__link:hover {
    background: rgba(255, 255, 255, 0.08);
  }

  .timer-ring {
    background: conic-gradient(from 0deg, rgba(106, 176, 248, 0.35), rgba(106, 176, 248, 0) 75%);
  }

  .rhythm-step {
    border-top-color: var(--color-dark);
  }

  .prose blockquote {
    border-left-color: var(--color-dark);
  }
}
