/* danna landing page. Plain CSS, no build step. Colours and type come from the app's own tokens. */

@font-face {
  font-family: 'Inter';
  src: url('fonts/inter-latin-wght-normal.woff2') format('woff2');
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Unbounded';
  src: url('fonts/unbounded-latin-wght-normal.woff2') format('woff2');
  font-weight: 200 900;
  font-style: normal;
  font-display: swap;
}

:root {
  --ink: #0f1b33;
  --ink-2: #3a4560;
  --muted: #7a8398;
  --line: #e6eaf2;
  --line-2: #d5dce8;
  --canvas: #ffffff;
  --surface-2: #f6f8fb;
  --primary: #2f6bff;
  --primary-600: #1f56e8;
  --primary-50: #eef4ff;
  --font: 'Inter', 'Segoe UI', system-ui, -apple-system, sans-serif;
  --display: 'Unbounded', 'Inter', system-ui, sans-serif;
  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
  --gutter: 16px;
  --nav-h: 64px;
}

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
}

body {
  margin: 0;
  background: var(--canvas);
  color: var(--ink);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}

h1,
h2,
h3,
p,
ol,
ul,
figure {
  margin: 0;
}

ol,
ul {
  padding: 0;
  list-style: none;
}

a {
  color: inherit;
}

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

:focus-visible {
  outline: 3px solid rgba(47, 107, 255, 0.45);
  outline-offset: 3px;
  border-radius: 6px;
}

.skip {
  position: absolute;
  left: var(--gutter);
  top: -56px;
  z-index: 50;
  padding: 10px 14px;
  border-radius: 8px;
  background: var(--ink);
  color: #ffffff;
  font-weight: 600;
  text-decoration: none;
}

.skip:focus {
  top: 12px;
}

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

/* Reading progress along the top edge */
.progress {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 30;
  height: 2px;
  background: var(--primary);
  transform-origin: 0 50%;
  transform: scaleX(0);
}

/* ---------- Navigation ---------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 20;
  background: var(--canvas);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s var(--ease);
}

.nav.is-scrolled {
  border-bottom-color: var(--line);
}

.nav__inner {
  height: var(--nav-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

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

.brand img {
  width: 28px;
  height: 28px;
}

.wordmark {
  font-family: var(--display);
  font-weight: 700;
  font-size: 19px;
  letter-spacing: -0.035em;
  line-height: 1;
  color: var(--ink);
}

.nav__links {
  display: flex;
  align-items: center;
  gap: 18px;
}

.nav__link {
  font-size: 15px;
  font-weight: 550;
  color: var(--ink-2);
  text-decoration: none;
}

.nav__link:hover {
  color: var(--ink);
}

/* ---------- Language switch (English / PT-BR) ---------- */
.lang {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 999px;
}

.lang__btn {
  height: 28px;
  padding: 0 11px;
  border: 0;
  white-space: nowrap;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 13px;
  font-weight: 650;
  line-height: 1;
  cursor: pointer;
  transition:
    background-color 0.2s var(--ease),
    color 0.2s var(--ease);
}

.lang__btn:hover {
  color: var(--ink);
}

.lang__btn[aria-pressed='true'] {
  background: var(--ink);
  color: var(--canvas);
}

.lang__btn:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

.lang__short {
  display: none;
}

/* ---------- Buttons and text links ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  height: 48px;
  padding: 0 20px;
  border: 1px solid transparent;
  border-radius: 12px;
  font: inherit;
  font-size: 16px;
  font-weight: 650;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition:
    background-color 0.2s var(--ease),
    border-color 0.2s var(--ease),
    color 0.2s var(--ease),
    transform 0.2s var(--ease);
}

.btn:hover {
  transform: translateY(-1px);
}

.btn--primary {
  background: var(--primary);
  color: #ffffff;
}

.btn--primary:hover {
  background: var(--primary-600);
}

.btn--ghost {
  background: var(--canvas);
  color: var(--ink);
  border-color: var(--line-2);
}

.btn--ghost:hover {
  border-color: #b7c6e8;
  background: var(--primary-50);
}

.btn--large {
  height: 56px;
  padding: 0 26px;
  font-size: 17px;
}

.btn--small {
  height: 38px;
  padding: 0 16px;
  border-radius: 10px;
  font-size: 15px;
}

.btn .icon {
  flex: none;
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.text-link {
  font-size: 16px;
  font-weight: 600;
  color: var(--primary);
  text-decoration: none;
}

.text-link:hover {
  text-decoration: underline;
  text-underline-offset: 4px;
}

/* ---------- Type ---------- */
.eyebrow {
  font-size: 13px;
  font-weight: 650;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--primary);
}

.h2 {
  margin-top: 16px;
  max-width: 20em;
  text-wrap: balance;
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(1.8rem, 3.6vw, 2.8rem);
  line-height: 1.12;
  letter-spacing: -0.03em;
}

.body {
  margin-top: 20px;
  max-width: 36em;
  font-size: 17px;
  line-height: 1.65;
  color: var(--ink-2);
}

/* ---------- Hero ---------- */
.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(0, 0.92fr);
  gap: clamp(40px, 6vw, 80px);
  align-items: center;
  padding-block: clamp(56px, 9vw, 120px) clamp(72px, 9vw, 112px);
}

.hero__title {
  margin-top: 20px;
  text-wrap: balance;
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(2.4rem, 5.4vw, 4.4rem);
  line-height: 1.04;
  letter-spacing: -0.04em;
}

.lead {
  margin-top: 24px;
  max-width: 34em;
  font-size: clamp(1.05rem, 1.5vw, 1.2rem);
  line-height: 1.6;
  color: var(--ink-2);
}

.actions {
  margin-top: 36px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

/* The hero's roadmap: a path from A1 to C1 that draws itself in, with the current node pulsing */
.roadmap {
  width: 100%;
  max-width: 520px;
}

.roadmap svg {
  display: block;
  width: 100%;
  height: auto;
  overflow: visible;
}

.roadmap__track {
  fill: none;
  stroke: var(--line-2);
  stroke-width: 2.5;
  stroke-linecap: round;
}

.roadmap__progress {
  fill: none;
  stroke: var(--primary);
  stroke-width: 3;
  stroke-linecap: round;
  stroke-dasharray: 1 1;
  stroke-dashoffset: 0;
}

.roadmap__node {
  fill: var(--canvas);
  stroke: var(--line-2);
  stroke-width: 2.5;
}

.roadmap__node--done,
.roadmap__node--current {
  fill: var(--primary);
  stroke: var(--canvas);
  stroke-width: 3;
}

.roadmap__pulse {
  fill: none;
  stroke: var(--primary);
  stroke-width: 2;
  opacity: 0;
}

.roadmap__label {
  fill: var(--ink);
  font-family: var(--font);
  font-size: 13px;
  font-weight: 650;
  letter-spacing: 0.04em;
  text-anchor: middle;
}

/* ---------- Sections ---------- */
.section {
  padding-block: clamp(72px, 10vw, 128px);
  border-top: 1px solid var(--line);
}

.skills {
  margin-top: clamp(40px, 6vw, 64px);
  border-top: 1px solid var(--line);
}

.skill {
  display: grid;
  grid-template-columns: minmax(160px, 0.8fr) minmax(0, 1.4fr);
  gap: 24px;
  align-items: baseline;
  padding-block: 26px;
  border-bottom: 1px solid var(--line);
}

.skill__name {
  font-family: var(--display);
  font-size: 20px;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.skill p {
  font-size: 17px;
  line-height: 1.6;
  color: var(--ink-2);
}

/* How it works: the intro stays put while the steps pass, and the rail fills as you scroll */
.steps-layout {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: clamp(40px, 7vw, 96px);
  align-items: start;
}

.steps__intro {
  position: sticky;
  top: 112px;
}

.steps {
  position: relative;
}

.steps__list {
  display: grid;
  gap: 64px;
}

.steps__rail {
  position: absolute;
  left: 17px;
  top: 18px;
  bottom: 18px;
  width: 2px;
  overflow: hidden;
  background: var(--line);
}

.steps__fill {
  position: absolute;
  inset: 0;
  background: var(--primary);
  transform-origin: 50% 0;
  transform: scaleY(0);
}

.step {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr);
  gap: 24px;
  transition: opacity 0.5s var(--ease);
}

.js .step:not(.is-active) {
  opacity: 0.45;
}

.step__num {
  position: relative;
  z-index: 1;
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border: 2px solid var(--line-2);
  border-radius: 50%;
  background: var(--canvas);
  color: var(--muted);
  font-size: 15px;
  font-weight: 650;
  transition:
    background-color 0.4s var(--ease),
    border-color 0.4s var(--ease),
    color 0.4s var(--ease);
}

.step.is-active .step__num {
  border-color: var(--primary);
  background: var(--primary);
  color: #ffffff;
}

.step h3 {
  padding-top: 2px;
  font-size: 21px;
  font-weight: 650;
  line-height: 1.3;
  letter-spacing: -0.015em;
}

.step p {
  margin-top: 10px;
  font-size: 17px;
  line-height: 1.6;
  color: var(--ink-2);
}

/* Privacy */
.split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(40px, 7vw, 96px);
  align-items: start;
}

.facts {
  border-top: 1px solid var(--line);
}

.facts li {
  padding-block: 26px;
  border-bottom: 1px solid var(--line);
}

.facts h3 {
  font-size: 19px;
  font-weight: 650;
  letter-spacing: -0.015em;
}

.facts p {
  margin-top: 8px;
  font-size: 16px;
  line-height: 1.6;
  color: var(--ink-2);
}

/* Open source band */
.band {
  padding-block: clamp(72px, 10vw, 120px);
  border-top: 1px solid var(--line);
  background: var(--surface-2);
}

.band__inner {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr);
  gap: clamp(40px, 6vw, 80px);
  align-items: end;
}

.band__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 20px;
}

/* Final call to action */
.cta {
  padding-block: clamp(80px, 12vw, 140px);
  border-top: 1px solid var(--line);
}

.cta .actions {
  margin-top: 36px;
}

/* ---------- Footer: the wordmark fills the width, letter by letter ---------- */
.foot {
  padding: clamp(56px, 8vw, 96px) var(--gutter) 32px;
  border-top: 1px solid var(--line);
}

.foot__mark {
  display: flex;
  width: 100%;
  font-family: var(--display);
  font-size: 24vw; /* the script sets the exact size once the font has loaded */
  font-weight: 700;
  line-height: 0.8;
  letter-spacing: -0.045em;
  color: var(--primary);
  white-space: nowrap;
  user-select: none;
}

.foot__letters {
  display: flex;
  width: max-content;
}

.foot__row {
  margin-top: 40px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 18px 32px;
  font-size: 15px;
  color: var(--ink-2);
}

.foot__row a {
  color: var(--ink);
  font-weight: 550;
  text-underline-offset: 4px;
}

.foot__row a:hover {
  text-decoration: underline;
}

.foot__links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
}

.foot__small {
  margin-top: 32px;
  max-width: 70ch;
  font-size: 13px;
  color: var(--muted);
}

/* ---------- Motion (skipped for people who ask for less) ---------- */
@media (prefers-reduced-motion: no-preference) {
  .js .reveal {
    opacity: 0;
    transform: translateY(24px);
    transition:
      opacity 0.9s var(--ease),
      transform 0.9s var(--ease);
    transition-delay: calc(var(--d, 0) * 120ms);
  }

  .js .reveal.is-in {
    opacity: 1;
    transform: none;
  }

  .roadmap__track {
    animation: fade-in 0.9s var(--ease) both;
  }

  .roadmap__progress {
    animation: draw 2.2s var(--ease) 0.3s both;
  }

  .roadmap__node,
  .roadmap__label {
    animation-duration: 0.6s;
    animation-timing-function: var(--ease);
    animation-fill-mode: both;
    animation-delay: var(--d, 0s);
  }

  .roadmap__node {
    animation-name: pop;
    transform-box: fill-box;
    transform-origin: center;
  }

  .roadmap__label {
    animation-name: fade-in;
  }

  .roadmap__pulse {
    transform-box: fill-box;
    transform-origin: center;
    animation: ring 2.8s var(--ease) 2.4s infinite;
  }

  .js .foot__letters span {
    opacity: 0;
    transform: translateY(0.45em);
    transition:
      opacity 1.1s var(--ease),
      transform 1.1s var(--ease);
    transition-delay: calc(var(--i, 0) * 110ms);
  }

  .js .foot__mark.is-in .foot__letters span {
    opacity: 1;
    transform: none;
  }
}

@keyframes draw {
  from {
    stroke-dashoffset: 1;
  }

  to {
    stroke-dashoffset: 0;
  }
}

@keyframes pop {
  from {
    transform: scale(0);
  }

  to {
    transform: scale(1);
  }
}

@keyframes fade-in {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

@keyframes ring {
  0% {
    opacity: 0.6;
    transform: scale(1);
  }

  100% {
    opacity: 0;
    transform: scale(2.6);
  }
}

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

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

/* ---------- Layout for narrower screens ---------- */
@media (max-width: 920px) {
  .hero,
  .steps-layout,
  .split,
  .band__inner {
    grid-template-columns: minmax(0, 1fr);
  }

  .steps__intro {
    position: static;
  }

  .roadmap {
    max-width: 480px;
  }
}

@media (max-width: 600px) {
  .nav__links {
    gap: 12px;
  }

  /* The GitHub link is still in the footer and the open source band; the switch needs the room. */
  .nav__link {
    display: none;
  }

  .lang__long {
    display: none;
  }

  .lang__short {
    display: inline;
  }

  .lang__btn {
    padding: 0 9px;
  }

  .btn--small {
    padding: 0 14px;
  }

  .actions {
    flex-direction: column;
  }

  .actions .btn,
  .band__actions .btn {
    width: 100%;
  }

  .skill {
    grid-template-columns: minmax(0, 1fr);
    gap: 6px;
  }
}
