/* Colours are Palette in Routd/Core/Design/Theme.swift. */
:root {
  color-scheme: dark;
  --background: hsl(240 20% 4%);
  --surface: hsl(240 15% 7%);
  --foreground: hsl(210 20% 95%);
  --text: hsl(220 12% 74%);
  --muted: hsl(220 10% 60%);
  --border: hsl(240 12% 16%);
  --cyan: hsl(195 100% 50%);
  --orange: hsl(25 100% 55%);
  --green: hsl(150 100% 45%);
  --yellow: hsl(45 100% 55%);
  --body: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --heading: "Avenir Next Condensed", "Roboto Condensed", "Arial Narrow", sans-serif-condensed, var(--body);
}

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

html { background: var(--background); -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  background: var(--background);
  color: var(--text);
  font: 17px/1.6 var(--body);
  -webkit-font-smoothing: antialiased;
}

/* The same two lights as the sign-in screen: cyan above, orange low on the right. */
.glow {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(90vmax 55vmax at 50% -12%, hsl(195 100% 50% / .2), transparent 70%),
    radial-gradient(60vmax 40vmax at 100% 105%, hsl(25 100% 55% / .1), transparent 70%);
}

a { color: var(--cyan); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
a:focus-visible { outline: 2px solid var(--cyan); outline-offset: 3px; border-radius: 4px; }

.wordmark { display: block; color: var(--foreground); height: auto; }
.wordmark.large {
  width: min(460px, 74vw);
  filter: drop-shadow(0 0 14px hsl(195 100% 50% / .75)) drop-shadow(0 0 46px hsl(195 100% 50% / .4));
}
.wordmark.small {
  width: 104px;
  filter: drop-shadow(0 0 8px hsl(195 100% 50% / .7));
}

/* Home */
.home {
  flex: 1;
  width: 100%;
  max-width: 1040px;
  margin: 0 auto;
  padding: clamp(64px, 13vh, 132px) 24px 48px;
  display: flex;
  flex-direction: column;
}

.hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.tagline {
  margin: 26px 0 0;
  color: var(--foreground);
  font-size: clamp(20px, 3vw, 25px);
  line-height: 1.3;
}

.lede {
  max-width: 33em;
  margin: 12px 0 0;
  color: var(--muted);
}

.cta {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  margin: 36px 0 0;
  padding: 14px 26px;
  border: 1px solid hsl(195 100% 50% / .55);
  border-radius: 12px;
  background: hsl(195 100% 50% / .08);
  color: var(--foreground);
  font-family: var(--heading);
  font-size: 19px;
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: .09em;
  text-transform: uppercase;
}

.cta-live {
  background: var(--cyan);
  border-color: var(--cyan);
  color: var(--background);
  box-shadow: 0 0 28px hsl(195 100% 50% / .45);
}
.cta-live:hover { text-decoration: none; filter: brightness(1.08); }

.dot {
  flex: none;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--cyan);
  box-shadow: 0 0 10px var(--cyan);
  animation: pulse 2.2s ease-in-out infinite;
}

@keyframes pulse { 50% { opacity: .35; } }

.note {
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 15px;
}

.route {
  display: block;
  width: 100%;
  height: 80px;
  margin: clamp(44px, 8vh, 76px) 0 clamp(28px, 5vh, 48px);
  overflow: visible;
  /* Revealed with a clip, not a stroke dash: dashes misbehave together with
     non-scaling-stroke, and the line vanished at phone width. */
  clip-path: inset(-20px 100% -20px 0);
  animation: draw 2.4s .2s ease-out forwards;
}
.route path {
  fill: none;
  stroke: var(--cyan);
  stroke-width: 2;
  stroke-linecap: round;
  filter: drop-shadow(0 0 6px hsl(195 100% 50% / .8));
}

@keyframes draw { to { clip-path: inset(-20px 0 -20px 0); } }

.features {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 32px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.feature { --tint: var(--cyan); border-top: 2px solid var(--tint); padding-top: 14px; }
.feature.orange { --tint: var(--orange); }
.feature.green { --tint: var(--green); }
.feature.yellow { --tint: var(--yellow); }

.feature h2 {
  margin: 0 0 6px;
  color: var(--tint);
  font-family: var(--heading);
  font-size: 20px;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: .09em;
  text-transform: uppercase;
}

.feature p { margin: 0; color: var(--text); font-size: 15.5px; line-height: 1.5; }

.contact { margin: 56px 0 0; text-align: center; color: var(--muted); font-size: 15px; }

.missing { justify-content: center; padding-top: 48px; }

/* Legal */
.legal-header {
  width: 100%;
  max-width: 720px;
  margin: 0 auto;
  padding: 32px 24px 0;
}
.legal-header a { display: inline-block; }

.legal {
  flex: 1;
  width: 100%;
  max-width: 720px;
  margin: 0 auto;
  padding: 44px 24px 64px;
  overflow-wrap: break-word;
}

.legal h1 {
  margin: 0;
  color: var(--foreground);
  font-family: var(--heading);
  font-size: clamp(34px, 6vw, 44px);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: .05em;
  text-transform: uppercase;
}

.updated { margin: 8px 0 12px; color: var(--muted); font-size: 15px; }

.legal h2, .legal h3 {
  font-family: var(--heading);
  font-weight: 700;
  line-height: 1.25;
  text-transform: uppercase;
}

.legal h2 {
  margin: 44px 0 12px;
  padding-top: 22px;
  border-top: 1px solid var(--border);
  color: var(--cyan);
  font-size: 21px;
  letter-spacing: .08em;
}

.legal h3 {
  margin: 28px 0 8px;
  color: var(--foreground);
  font-size: 18px;
  letter-spacing: .07em;
}

.legal p { margin: 0 0 12px; }

.legal ul { margin: 0 0 16px; padding: 0; list-style: none; }

.legal li { position: relative; margin: 0 0 5px; padding-left: 20px; }
.legal li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: .68em;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--cyan);
}

/* Footer */
.footer {
  width: 100%;
  border-top: 1px solid var(--border);
  padding: 24px;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 8px 32px;
  color: var(--muted);
  font-size: 15px;
}
.footer nav { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 28px; }
.footer a { color: var(--text); display: inline-block; padding: 6px 0; }
.footer a:hover { color: var(--foreground); }
.footer p { margin: 0; }

@media (max-width: 860px) {
  .features { grid-template-columns: repeat(2, 1fr); gap: 28px 24px; }
}

@media (max-width: 480px) {
  body { font-size: 16px; }
  .home { padding-left: 20px; padding-right: 20px; }
  .features { grid-template-columns: 1fr; gap: 22px; }
  .route { height: 56px; }
  .cta { font-size: 17px; padding: 13px 20px; }
  .legal-header, .legal { padding-left: 20px; padding-right: 20px; }
}

@media (prefers-reduced-motion: reduce) {
  .dot { animation: none; }
  .route { animation: none; clip-path: none; }
}
