/* TrackedTasks — trackedtasks.com
   Dark, warm, minimal. Colours and shapes follow the app itself. */

:root {
  --black: #000;
  --surface: #101010;
  --surface-2: #1c1c1e;
  --line: rgba(255, 255, 255, 0.08);
  --line-strong: rgba(255, 255, 255, 0.14);
  --white: #fff;
  --muted: #9a9aa1;
  --muted-dim: #6f6f76;
  --orange: #ff9f0a;
  --orange-light: #ffb400;
  --orange-deep: #ff9230;

  --wrap: 1120px;
  --gutter: 24px;
  --radius: 20px;
  --section-y: clamp(56px, 7.5vw, 96px);

  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, "Helvetica Neue", Arial, sans-serif;
}

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--black);
  color: var(--white);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.55;
  letter-spacing: -0.01em;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img { max-width: 100%; }

a {
  color: var(--white);
  text-decoration: none;
}

h1, h2, h3 {
  margin: 0;
  font-weight: 700;
  letter-spacing: -0.028em;
  line-height: 1.06;
}

h1 { font-size: clamp(2.5rem, 8.5vw, 4rem); }
h2 { font-size: clamp(1.875rem, 5vw, 3rem); line-height: 1.1; }
h3 { font-size: clamp(1.5rem, 3.6vw, 2.125rem); line-height: 1.12; }

p { margin: 0; }

.wrap {
  width: min(100% - (var(--gutter) * 2), var(--wrap));
  margin-inline: auto;
}

.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.skip-link {
  position: absolute;
  left: 16px;
  top: -60px;
  z-index: 20;
  padding: 12px 18px;
  border-radius: 999px;
  background: var(--orange);
  color: #000;
  font-weight: 600;
  transition: top 0.18s ease;
}
.skip-link:focus { top: 16px; }

:focus-visible {
  outline: 2px solid var(--orange);
  outline-offset: 3px;
  border-radius: 6px;
}

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

.site-header {
  position: relative;
  z-index: 3;
  padding: 20px 0;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.brand-mark {
  width: 30px;
  height: 30px;
  border-radius: 8px;
}

.brand-name {
  width: 148px;
  height: auto;
  border-radius: 6px;
}

.header-cta { padding: 9px 18px; font-size: 0.9375rem; }

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: 999px;
  font-weight: 600;
  letter-spacing: -0.01em;
  white-space: nowrap;
  transition: transform 0.18s ease, background-color 0.18s ease, border-color 0.18s ease, opacity 0.18s ease;
}

/* Official App Store badge. Apple's artwork: never recoloured or reshaped. */
.badge {
  display: inline-block;
  border-radius: 10px;
  transition: opacity 0.18s ease, transform 0.18s ease;
}

.badge img {
  display: block;
  width: 168px;
  height: auto;
}

@media (hover: hover) {
  .badge:hover { opacity: 0.85; }
}

.badge:active { transform: scale(0.985); }

.btn-ghost {
  border: 1px solid var(--line-strong);
  color: var(--white);
  background: transparent;
}

@media (hover: hover) {
  .btn-ghost:hover { border-color: var(--orange); color: var(--orange); }
}

.btn:active { transform: translateY(0) scale(0.985); }

/* ---------- Shared bits ---------- */

.eyebrow {
  margin-bottom: 14px;
  color: var(--orange);
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.lead {
  color: var(--muted);
  font-size: clamp(1.0625rem, 1.6vw, 1.1875rem);
  line-height: 1.6;
}

.section { padding-block: var(--section-y); }

.section-head { margin-bottom: clamp(32px, 5vw, 56px); }
.section-head h2 { max-width: 15em; }
.section-head .lead { margin-top: 18px; max-width: 46ch; }

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

.hero {
  position: relative;
  padding-top: clamp(32px, 6vw, 64px);
  padding-bottom: clamp(40px, 5vw, 64px);
}

.glow {
  position: absolute;
  inset: -220px 0 auto 0;
  height: 720px;
  background:
    radial-gradient(46% 42% at 62% 38%, rgba(255, 164, 42, 0.20) 0%, rgba(255, 164, 42, 0) 70%),
    radial-gradient(40% 36% at 18% 22%, rgba(255, 216, 74, 0.09) 0%, rgba(255, 216, 74, 0) 72%);
  pointer-events: none;
}

.hero-inner {
  position: relative;
  display: grid;
  gap: clamp(48px, 7vw, 72px);
}

.hero-copy h1 { margin-bottom: 22px; }
.hero-copy .lead { max-width: 44ch; }

.hero-actions { margin-top: 32px; }

.fineprint {
  margin-top: 18px;
  color: var(--muted-dim);
  font-size: 0.9375rem;
}

.hero-shot { display: flex; justify-content: center; }

/* ---------- Device frame ---------- */

.device {
  position: relative;
  width: min(280px, 62vw);
  padding: 7px;
  border-radius: 46px;
  background: linear-gradient(150deg, #2e2e30 0%, #131314 42%, #0a0a0b 100%);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.10),
    0 48px 90px -40px rgba(0, 0, 0, 1),
    0 0 60px -30px rgba(255, 149, 0, 0.35);
}

.device img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 662 / 1440;
  border-radius: 39px;
  background: var(--black);
}

/* ---------- Use cases ---------- */

.case-list {
  display: grid;
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.case {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 18px 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.case-text {
  font-size: clamp(1rem, 2.2vw, 1.125rem);
  letter-spacing: -0.015em;
}

.ring {
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border: 2px solid var(--orange);
  border-radius: 50%;
  color: var(--orange);
  font-size: 0.9375rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

/* ---------- Features ---------- */

.feature-stack {
  display: grid;
  gap: clamp(56px, 7vw, 88px);
}

.feature {
  display: grid;
  gap: clamp(36px, 5vw, 48px);
  align-items: center;
}

.feature-copy h3 { margin-bottom: 18px; }

.feature-copy p:not(.eyebrow) {
  max-width: 46ch;
  color: var(--muted);
  line-height: 1.6;
}

.feature-shot { display: flex; justify-content: center; }
.feature-shot .device { width: min(260px, 58vw); }

/* ---------- Closing CTA ---------- */

.cta { padding-block: clamp(56px, 7vw, 88px); }

.cta-inner {
  padding: clamp(40px, 6vw, 72px) clamp(24px, 5vw, 64px);
  border: 1px solid var(--line);
  border-radius: 28px;
  background:
    radial-gradient(120% 140% at 50% 0%, rgba(255, 164, 42, 0.14) 0%, rgba(255, 164, 42, 0) 62%),
    var(--surface);
  text-align: center;
}

.cta-inner .lead { margin-top: 20px; }

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

.site-footer {
  padding: 40px 0 56px;
  border-top: 1px solid var(--line);
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 20px 32px;
}

.footer-brand {
  font-weight: 600;
  letter-spacing: -0.02em;
}

.footer-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 28px;
}

.footer-nav a,
.footer-copy {
  color: var(--muted);
  font-size: 0.9375rem;
}

@media (hover: hover) {
  .footer-nav a:hover { color: var(--orange); }
}

/* ---------- Legal pages ---------- */

.page-head {
  padding-block: clamp(48px, 8vw, 88px) clamp(24px, 4vw, 40px);
}

.page-head .updated {
  margin-top: 16px;
  color: var(--muted-dim);
  font-size: 0.9375rem;
}

.prose {
  max-width: 68ch;
  /* .wrap centres its box; keep the text column flush with the page heading. */
  margin-inline: max(var(--gutter), calc((100% - var(--wrap)) / 2)) auto;
  padding-bottom: clamp(72px, 10vw, 120px);
  color: var(--muted);
  font-size: 1.0625rem;
  line-height: 1.7;
}

.prose h2 {
  margin-top: 48px;
  margin-bottom: 14px;
  color: var(--white);
  font-size: clamp(1.25rem, 2.6vw, 1.5rem);
  letter-spacing: -0.02em;
}

.prose h2:first-child { margin-top: 0; }

.prose p + p { margin-top: 16px; }

.prose ul {
  margin: 16px 0 0;
  padding-left: 22px;
}

.prose li { margin-bottom: 10px; }

.prose li::marker { color: var(--orange); }

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

.prose strong { color: var(--white); font-weight: 600; }

/* ---------- Reveal on scroll ---------- */

.js .reveal {
  opacity: 0;
  transform: translateY(20px);
}

.js .reveal.is-visible {
  opacity: 1;
  transform: none;
  transition: opacity 0.6s ease, transform 0.6s cubic-bezier(0.22, 0.68, 0.32, 1);
}

/* ---------- Breakpoints ---------- */

@media (min-width: 768px) {
  :root { --gutter: 40px; }

  body { font-size: 18px; }

  .case { padding: 22px 26px; }

  .case-list { gap: 14px; }
}

@media (min-width: 900px) {
  .hero-inner {
    grid-template-columns: 1.05fr 0.95fr;
    align-items: center;
  }

  .hero-copy h1 { font-size: clamp(3rem, 5.4vw, 4.25rem); }

  .hero-shot { justify-content: flex-end; }
  .device { width: 320px; }
  .feature-shot .device { width: 300px; }

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

  .feature:nth-child(even) .feature-copy { order: 2; }
  .feature:nth-child(even) .feature-shot { justify-content: flex-start; }
  .feature:nth-child(odd) .feature-shot { justify-content: flex-end; }

  .case-list {
    grid-template-columns: 1fr 1fr;
    gap: 16px;
  }
}

@media (min-width: 1200px) {
  .hero { padding-bottom: 128px; }
  .device { width: 340px; }
}

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

  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    transition-duration: 0.001ms !important;
  }

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