/* Timme site design system — dark, timer-driven, matches the app's color language */

:root {
  /* Brand */
  --primary: #FF6B6B;
  --primary-dark: #E85555;
  --primary-light: #FF8A8A;
  --secondary: #4ECDC4;
  --secondary-dark: #3DBDB5;
  --secondary-light: #6FE0D8;

  /* Workout type colors (match in-app accents) */
  --amrap: #FF6B6B;
  --emom: #4ECDC4;
  --tabata: #F59E0B;
  --pyramid: #EC4899;
  --pomodoro: #3498DB;
  --stopwatch: #10B981;

  /* Surfaces */
  --bg: #0A0A0A;
  --surface: #141414;
  --surface-elevated: #1E1E1E;
  --surface-highlight: #282828;

  /* Text */
  --text: #FAFAFA;
  --text-secondary: #A1A1AA;
  --text-muted: #71717A;

  /* Borders */
  --border: #27272A;
  --border-light: #3F3F46;

  /* Type — Timme's default app font (SF Pro on Apple platforms) */
  --font-display: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --font-body: -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;

  --container: 1120px;
}

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

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
}

body {
  font-family: var(--font-body);
  font-weight: 400;
  line-height: 1.65;
  color: var(--text-secondary);
  background: var(--bg);
  min-height: 100vh;
  overflow-x: hidden;
}

a {
  color: inherit;
}

img {
  max-width: 100%;
  display: block;
}

/* ------------------------------------------------------------------ */
/* Grain overlay                                                       */
/* ------------------------------------------------------------------ */

.grain {
  position: fixed;
  inset: 0;
  z-index: 999;
  pointer-events: none;
  opacity: 0.05;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ------------------------------------------------------------------ */
/* Layout helpers                                                      */
/* ------------------------------------------------------------------ */

.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 28px;
}

section {
  position: relative;
  padding: 88px 0;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-size: 0.72em;
  font-weight: 700;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.eyebrow::before {
  content: '';
  display: block;
  width: 28px;
  height: 2px;
  background: var(--primary);
}

.section-head {
  max-width: 640px;
  margin: 0 auto 56px;
  text-align: center;
}

.section-head h2 {
  font-family: var(--font-display);
  font-size: clamp(1.9em, 4vw, 2.6em);
  font-weight: 800;
  letter-spacing: 0.02em;
  color: var(--text);
  text-transform: uppercase;
  margin: 14px 0 12px;
}

.section-head p {
  font-size: 1.05em;
  color: var(--text-secondary);
}

.section-head .eyebrow {
  justify-content: center;
}

.section-head .eyebrow::before {
  display: none;
}

/* ------------------------------------------------------------------ */
/* Nav                                                                  */
/* ------------------------------------------------------------------ */

.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(10, 10, 10, 0.72);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}

.nav-inner {
  max-width: var(--container);
  margin: 0 auto;
  padding: 16px 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}

.logo-mark circle {
  fill: none;
  stroke: var(--primary);
  stroke-width: 3;
}

.logo-mark text {
  font-family: var(--font-display);
  font-weight: 900;
  fill: var(--text);
}

.logo-text {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.15em;
  letter-spacing: 0.18em;
  color: var(--text);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 32px;
  font-size: 0.92em;
  font-weight: 600;
}

.nav-links a {
  text-decoration: none;
  color: var(--text-secondary);
  transition: color 0.2s ease;
}

.nav-links a:hover {
  color: var(--text);
}

.nav-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--primary);
  color: #1A0A0A;
  font-weight: 800;
  font-size: 0.88em;
  letter-spacing: 0.02em;
  text-decoration: none;
  padding: 11px 22px;
  border-radius: 999px;
  transition: transform 0.2s ease, background 0.2s ease;
  white-space: nowrap;
}

.nav-cta:hover {
  background: var(--primary-light);
  transform: translateY(-1px);
}

.nav-toggle {
  display: none;
}

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

.trial-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--surface);
  border: 1px solid var(--border-light);
  color: var(--text);
  padding: 9px 18px;
  border-radius: 999px;
  font-size: 0.9em;
  font-weight: 600;
}

.trial-pill::before {
  content: '';
  display: block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--secondary);
  box-shadow: 0 0 0 4px rgba(78, 205, 196, 0.18);
}

.app-store-badge {
  display: inline-block;
  transition: transform 0.25s ease, filter 0.25s ease;
  filter: drop-shadow(0 8px 24px rgba(0, 0, 0, 0.45));
}

.app-store-badge:hover {
  transform: translateY(-3px) scale(1.02);
}

.app-store-badge img {
  height: 54px;
}

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

.hero {
  padding: 72px 0 100px;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: -240px;
  right: -200px;
  width: 640px;
  height: 640px;
  background: radial-gradient(circle, rgba(255, 107, 107, 0.16), transparent 70%);
  pointer-events: none;
}

.hero::after {
  content: '';
  position: absolute;
  bottom: -260px;
  left: -220px;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(78, 205, 196, 0.12), transparent 70%);
  pointer-events: none;
}

.hero-inner {
  position: relative;
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  align-items: center;
  gap: 64px;
}

.hero-text h1 {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(2.6em, 6.4vw, 4.3em);
  line-height: 1.06;
  letter-spacing: 0.01em;
  text-transform: uppercase;
  color: var(--text);
  margin: 22px 0 20px;
}

.hero-text h1 .accent {
  color: var(--primary);
}

.hero-sub {
  font-size: 1.15em;
  color: var(--text-secondary);
  max-width: 460px;
  margin-bottom: 28px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 18px;
  margin-top: 28px;
}

/* Hero ring */
.hero-visual {
  display: flex;
  justify-content: center;
  position: relative;
}

.ring-wrap {
  position: relative;
  width: min(380px, 90vw);
  aspect-ratio: 1;
}

.ring-wrap svg {
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}

.ring-track {
  fill: none;
  stroke: var(--surface-elevated);
  stroke-width: 14;
}

.ring-progress {
  fill: none;
  stroke: var(--primary);
  stroke-width: 14;
  stroke-linecap: round;
  stroke-dasharray: 729;
  stroke-dashoffset: 180;
  animation: ring-sweep 9s ease-in-out infinite alternate,
             ring-color 9s ease-in-out infinite alternate;
}

@keyframes ring-sweep {
  from { stroke-dashoffset: 729; }
  to   { stroke-dashoffset: 90; }
}

@keyframes ring-color {
  0%   { stroke: var(--primary); }
  50%  { stroke: var(--secondary); }
  100% { stroke: var(--primary); }
}

.ring-readout {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.ring-readout .phase {
  font-family: var(--font-display);
  font-size: 0.85em;
  font-weight: 800;
  letter-spacing: 0.3em;
  color: var(--primary);
  margin-bottom: 6px;
}

.ring-readout .time {
  font-family: var(--font-display);
  font-size: clamp(2.6em, 8vw, 3.6em);
  font-weight: 900;
  color: var(--text);
  letter-spacing: 0.02em;
}

.ring-readout .round {
  margin-top: 10px;
  font-size: 0.85em;
  font-weight: 700;
  letter-spacing: 0.18em;
  color: var(--text-muted);
  text-transform: uppercase;
}

.ring-tag {
  position: absolute;
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--surface);
  border: 1px solid var(--border-light);
  border-radius: 999px;
  padding: 8px 16px;
  font-size: 0.8em;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--text);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.4);
}

.ring-tag .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.ring-tag.tag-watch {
  top: 6%;
  right: -4%;
}

.ring-tag.tag-watch .dot { background: var(--secondary); }

.ring-tag.tag-island {
  bottom: 10%;
  left: -8%;
}

.ring-tag.tag-island .dot { background: var(--pyramid); }

/* ------------------------------------------------------------------ */
/* Marquee — workout type tape                                         */
/* ------------------------------------------------------------------ */

.marquee {
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 22px 0;
  overflow: hidden;
}

.marquee-track {
  display: flex;
  gap: 18px;
  width: max-content;
  animation: marquee 32s linear infinite;
}

.marquee:hover .marquee-track {
  animation-play-state: paused;
}

@keyframes marquee {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

.type-chip {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 22px;
  border-radius: 999px;
  border: 1px solid var(--border-light);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.82em;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text);
  white-space: nowrap;
}

.type-chip .dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
}

.type-chip.amrap .dot { background: var(--amrap); }
.type-chip.emom .dot { background: var(--emom); }
.type-chip.tabata .dot { background: var(--tabata); }
.type-chip.pyramid .dot { background: var(--pyramid); }
.type-chip.pomodoro .dot { background: var(--pomodoro); }
.type-chip.stopwatch .dot { background: var(--stopwatch); }

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

.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: 20px;
  overflow: hidden;
}

.feature-card {
  background: var(--surface);
  padding: 38px 32px;
  transition: background 0.25s ease;
}

.feature-card:hover {
  background: var(--surface-elevated);
}

.feature-icon {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  margin-bottom: 22px;
  background: var(--surface-elevated);
  border: 1px solid var(--border-light);
}

.feature-card h3 {
  font-family: var(--font-display);
  font-size: 1.05em;
  font-weight: 800;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--text);
  margin-bottom: 10px;
}

.feature-card p {
  font-size: 0.96em;
  color: var(--text-secondary);
}

/* ------------------------------------------------------------------ */
/* Workout types — interval bars                                       */
/* ------------------------------------------------------------------ */

.types-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

.type-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 26px;
  transition: transform 0.25s ease, border-color 0.25s ease;
}

.type-card:hover {
  transform: translateY(-4px);
  border-color: var(--border-light);
}

.type-card h4 {
  font-family: var(--font-display);
  font-size: 1.02em;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text);
  margin-bottom: 8px;
}

.type-card p {
  font-size: 0.9em;
  color: var(--text-secondary);
  margin-bottom: 18px;
  min-height: 4.4em;
}

.interval-bar {
  display: flex;
  gap: 3px;
  height: 14px;
  border-radius: 6px;
  overflow: hidden;
}

.interval-bar span {
  display: block;
  height: 100%;
  border-radius: 3px;
}

.bar-amrap span { background: var(--amrap); flex: 1; }

.bar-emom span { background: var(--emom); flex: 1; }

.bar-tabata span.work { background: var(--tabata); flex: 2; }
.bar-tabata span.rest { background: var(--surface-highlight); flex: 1; }

.interval-bar.bar-pyramid {
  height: 28px;
  align-items: flex-end;
}

.bar-pyramid span { background: var(--pyramid); border-radius: 3px 3px 0 0; flex: 1; }

.bar-pomodoro span.work { background: var(--pomodoro); flex: 3; }
.bar-pomodoro span.break { background: var(--surface-highlight); flex: 2; }

.bar-stopwatch {
  position: relative;
  background: var(--surface-highlight);
  border-radius: 6px;
}

.bar-stopwatch span {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, var(--stopwatch), transparent);
  border-radius: 6px;
}

/* ------------------------------------------------------------------ */
/* Highlights                                                          */
/* ------------------------------------------------------------------ */

.highlights-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}

.highlight-item {
  display: flex;
  gap: 20px;
  align-items: flex-start;
  padding: 28px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: linear-gradient(160deg, var(--surface), rgba(20, 20, 20, 0.4));
}

.highlight-icon {
  flex-shrink: 0;
  width: 46px;
  height: 46px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  background: var(--surface-elevated);
  border: 1px solid var(--border-light);
}

.highlight-item h4 {
  font-family: var(--font-display);
  font-size: 1em;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text);
  margin-bottom: 6px;
}

.highlight-item p {
  font-size: 0.93em;
  color: var(--text-secondary);
}

/* ------------------------------------------------------------------ */
/* Pro section                                                         */
/* ------------------------------------------------------------------ */

.pro {
  background: linear-gradient(180deg, var(--surface) 0%, var(--bg) 100%);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.pro-badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 0.78em;
  letter-spacing: 0.3em;
  color: var(--bg);
  background: linear-gradient(120deg, var(--primary), var(--secondary));
  padding: 8px 18px;
  border-radius: 999px;
}

.pro-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

.pro-feature {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 22px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.015);
}

.pro-check {
  flex-shrink: 0;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8em;
  font-weight: 900;
  color: var(--bg);
  background: var(--secondary);
}

.pro-feature h5 {
  font-family: var(--font-display);
  font-size: 0.92em;
  font-weight: 800;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--text);
  margin-bottom: 4px;
}

.pro-feature p {
  font-size: 0.88em;
  color: var(--text-secondary);
}

.pro-note {
  text-align: center;
  color: var(--text-muted);
  font-size: 0.92em;
  margin-top: 36px;
}

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

.cta {
  text-align: center;
  padding: 100px 0;
}

.cta h2 {
  font-family: var(--font-display);
  font-size: clamp(2.2em, 6vw, 3.4em);
  font-weight: 900;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--text);
  margin: 18px 0 16px;
}

.cta p {
  font-size: 1.1em;
  color: var(--text-secondary);
  margin-bottom: 32px;
}

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

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

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

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  font-size: 0.92em;
  font-weight: 600;
}

.footer-links a {
  text-decoration: none;
  color: var(--text-secondary);
  transition: color 0.2s ease;
}

.footer-links a:hover {
  color: var(--text);
}

.footer-copy {
  font-size: 0.88em;
  color: var(--text-muted);
}

.lang-switch {
  display: flex;
  gap: 10px;
  font-size: 0.82em;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.lang-switch a {
  text-decoration: none;
  color: var(--text-muted);
  padding: 4px 9px;
  border-radius: 6px;
  border: 1px solid var(--border);
  transition: color 0.2s ease, border-color 0.2s ease;
}

.lang-switch a.active,
.lang-switch a:hover {
  color: var(--text);
  border-color: var(--border-light);
}

/* ------------------------------------------------------------------ */
/* Responsive                                                           */
/* ------------------------------------------------------------------ */

@media (max-width: 980px) {
  .hero-inner {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 56px;
  }

  .hero-text {
    order: 2;
  }

  .hero-sub {
    margin-left: auto;
    margin-right: auto;
  }

  .hero-actions {
    justify-content: center;
  }

  .eyebrow {
    justify-content: center;
  }

  .eyebrow::before {
    display: none;
  }

  .features-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .types-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .pro-grid {
    grid-template-columns: repeat(2, 1fr);
  }

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

@media (max-width: 720px) {
  .nav-links {
    display: none;
  }

  section {
    padding: 64px 0;
  }

  .features-grid {
    grid-template-columns: 1fr;
    border-radius: 16px;
  }

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

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

  .ring-tag {
    display: none;
  }

  .footer-inner {
    flex-direction: column;
    align-items: flex-start;
  }
}
