:root {
  --ink: #0f2a33;
  --teal: #0e7c72;
  --teal-hover: #0b6a61;
  --teal-light: #4fd1c1;
  --bg: #f6faf9;
  --text-muted: #3d5560;
  --border: #c9d8dc;
}

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

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

body {
  margin: 0;
  font-family: 'Sora', system-ui, sans-serif;
  background: var(--bg);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

::selection {
  background: rgb(14 124 114 / 0.18);
}

h1,
h2 {
  text-wrap: balance;
}

p,
li {
  text-wrap: pretty;
}

a {
  color: var(--teal);
}

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

.skip {
  position: absolute;
  left: -999px;
  top: 0;
  padding: 12px 20px;
  background: var(--teal);
  color: #fff;
  z-index: 10;
}

.skip:focus {
  left: 0;
}

.page {
  min-height: 100svh;
  display: grid;
  grid-template-rows: auto 1fr auto;
}

.container {
  width: 100%;
  max-width: 1080px;
  margin-inline: auto;
  padding-inline: 24px;
}

@media (min-width: 640px) {
  .container {
    padding-inline: 48px;
  }
}

/* ------------------------------- header ---------------------------------- */

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-block: 28px;
}

.site-header .logo {
  height: 28px;
  width: auto;
  display: block;
}

@media (min-width: 640px) {
  .site-header .logo {
    height: 32px;
  }
}

.lang-switch {
  font-size: 15px;
  font-weight: 500;
  color: var(--text-muted);
  text-decoration: none;
  padding: 12px 4px;
}

@media (hover: hover) and (pointer: fine) {
  .lang-switch:hover {
    color: var(--teal);
  }
}

/* -------------------------------- hero ----------------------------------- */

.hero {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding-block: 48px;
}

.hero h1 {
  margin: 0 0 24px;
  font-size: clamp(3rem, 9vw, 6rem);
  font-weight: 500;
  letter-spacing: -0.03em;
  line-height: 1.05;
}

.hero .lede {
  margin: 0 0 40px;
  font-size: 18px;
  line-height: 1.6;
  color: var(--text-muted);
  max-width: 40ch;
}

.cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: fit-content;
  height: 48px;
  padding: 0 28px;
  border-radius: 999px;
  background: var(--teal);
  color: #fff;
  font-size: 16px;
  font-weight: 500;
  text-decoration: none;
  transition:
    transform 120ms cubic-bezier(0.23, 1, 0.32, 1),
    background-color 120ms cubic-bezier(0.23, 1, 0.32, 1);
}

@media (hover: hover) and (pointer: fine) {
  .cta:hover {
    background: var(--teal-hover);
  }
}

.cta:active {
  transform: scale(0.97);
}

.hero .note {
  margin: 20px 0 0;
  font-size: 14px;
  color: var(--text-muted);
  max-width: 44ch;
}

/* ------------------------------ pulse line -------------------------------- */

.pulse {
  position: relative;
  height: 96px;
  width: 100%;
  overflow: hidden;
  align-self: end;
  --beat-x: 24px;
}

@media (min-width: 640px) {
  .pulse {
    --beat-x: calc(max(0px, (100% - 1080px) / 2) + 48px);
  }
}

.pulse .seg {
  position: absolute;
  top: 0;
  height: 96px;
  display: block;
}

.pulse .seg-left {
  left: 0;
  width: var(--beat-x);
}

.pulse .seg-beat {
  left: var(--beat-x);
  width: 200px;
}

.pulse .seg-right {
  left: calc(var(--beat-x) + 200px);
  width: calc(100% - var(--beat-x) - 200px);
}

.pulse line,
.pulse path {
  stroke: var(--teal);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  fill: none;
}

/* One continuous left→right sweep: left flat (clip reveal), the beat
   (dash draw, never stretched so pathLength is exact), then the right
   flat (clip reveal). fill-mode: both keeps each piece hidden until its
   turn and drawn afterwards. */
@keyframes pulse-reveal {
  to {
    clip-path: inset(0 0 0 0);
  }
}

@keyframes pulse-draw {
  to {
    stroke-dashoffset: 0;
  }
}

.pulse .seg-left {
  clip-path: inset(0 100% 0 0);
  animation: pulse-reveal 0.45s linear 0.15s both;
}

.pulse .seg-beat path {
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
  animation: pulse-draw 0.35s linear 0.6s both;
}

.pulse .seg-right {
  clip-path: inset(0 100% 0 0);
  animation: pulse-reveal 0.7s cubic-bezier(0.23, 1, 0.32, 1) 0.95s both;
}

@media (prefers-reduced-motion: reduce) {
  .pulse .seg-left,
  .pulse .seg-right {
    animation: none;
    clip-path: inset(0 0 0 0);
  }

  .pulse .seg-beat path {
    animation: none;
    stroke-dashoffset: 0;
  }
}

/* ------------------------------- footer ----------------------------------- */

.site-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 24px;
  padding-block: 28px;
  font-size: 14px;
  color: var(--text-muted);
}

.site-footer a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--text-muted);
  text-decoration: none;
}

@media (hover: hover) and (pointer: fine) {
  .site-footer a:hover {
    color: var(--teal);
  }
}

/* ------------------------------ privacy page ------------------------------ */

.doc {
  max-width: 68ch;
  padding-block: 24px 64px;
}

.doc h1 {
  margin: 0 0 8px;
  font-size: clamp(2.25rem, 5vw, 3rem);
  font-weight: 500;
  letter-spacing: -0.02em;
  line-height: 1.1;
}

.doc .updated {
  margin: 0 0 32px;
  font-size: 14px;
  color: var(--text-muted);
}

.doc h2 {
  margin: 40px 0 12px;
  font-size: 20px;
  font-weight: 600;
}

.doc p,
.doc li {
  font-size: 17px;
  line-height: 1.65;
}

.doc p {
  margin: 0 0 16px;
}

.doc ul {
  margin: 0 0 16px;
  padding-left: 24px;
}

.doc li {
  margin-bottom: 8px;
}

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