/* heartdok.io, the public front page, in Vivid Arch (design/): round 3's Editorial type, the arch mark and its motion.
   Dark follows the system. No script runs on these pages, so every animation is CSS. */
@font-face {
  font-family: Newsreader;
  src: url("/fonts/newsreader-latin.woff2") format("woff2");
  font-weight: 200 800;
  font-display: swap;
}
@font-face {
  font-family: "Schibsted Grotesk";
  src: url("/fonts/schibsted-latin.woff2") format("woff2");
  font-weight: 400 800;
  font-display: swap;
}
:root {
  --sky: #1f8fff;
  --sun: #ffc800;
  --coral: #ff4a36;
  --mint: #00bf8a;
  --bg: #fff;
  --bg2: #f5f5f8;
  --fg: #0b0b14;
  --fg2: #3c3c4a;
  --fg3: #5b5b6a;
  --line: #d5d5df;
  --line2: #e6e6ed;
  --card: #fff;
  --sheetsh: 0 1px 2px rgba(11, 11, 20, 0.05), 0 10px 30px -14px rgba(11, 11, 20, 0.22);
  --sky-t: #0a5fcc;
  --sun-t: #7a5900;
  --coral-t: #c8270f;
  --btn: #0b0b14;
  --on-btn: #fff;
  --glide: cubic-bezier(0.2, 0.8, 0.2, 1);
  --spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --display: Newsreader, Georgia, serif;
  --ui: "Schibsted Grotesk", system-ui, -apple-system, "Segoe UI", sans-serif;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f0f15;
    --bg2: #17171f;
    --fg: #f4f4f8;
    --fg2: #bdbdca;
    --fg3: #9595a5;
    --line: #2d2d39;
    --line2: #22222c;
    --card: #17171f;
    --sheetsh: 0 0 0 1px rgba(255, 255, 255, 0.03), 0 14px 34px -14px rgba(0, 0, 0, 0.7);
    --sky-t: #86c0ff;
    --sun-t: #ffd951;
    --coral-t: #ff8a7c;
    --btn: #f4f4f8;
    --on-btn: #0b0b14;
  }
}

* {
  box-sizing: border-box;
}
html {
  -webkit-text-size-adjust: 100%;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font: 16px/1.55 var(--ui);
  -webkit-font-smoothing: antialiased;
}
a {
  color: inherit;
}
:focus-visible {
  outline: 2px solid var(--sky);
  outline-offset: 3px;
  border-radius: 8px;
}
.page {
  max-width: 1180px;
  margin: 0 auto;
  padding: 20px max(16px, env(safe-area-inset-right)) 40px max(16px, env(safe-area-inset-left));
}
h1,
h2,
h3 {
  font-family: var(--display);
  font-weight: 500;
  letter-spacing: -0.022em;
  font-variation-settings: "opsz" 72;
  margin: 0;
  text-wrap: balance;
}

/* top bar */
.top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--display);
  font-size: 23px;
  font-weight: 600;
  letter-spacing: -0.03em;
  text-decoration: none;
}
.brand svg {
  width: 28px;
  height: 28px;
}
.brand:hover .br {
  animation: hop 0.5s var(--spring);
}
.brand:hover .br2 {
  animation-delay: 0.06s;
}
.brand:hover .br3 {
  animation-delay: 0.12s;
}
.signin {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 16px 9px 18px;
  border-radius: 999px;
  background: var(--btn);
  color: var(--on-btn);
  font-weight: 600;
  font-size: 15px;
  text-decoration: none;
  transition: transform 0.35s var(--spring);
}
.signin svg {
  width: 16px;
  height: 16px;
  transition: transform 0.35s var(--spring);
}
.signin:hover {
  transform: scale(1.04);
}
.signin:hover svg {
  transform: translateX(3px);
}
.signin:active {
  transform: scale(0.97);
}

/* hero */
.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  gap: 32px;
  align-items: center;
  padding-top: 56px;
}
.wm {
  font-size: clamp(64px, 12vw, 156px);
  line-height: 0.92;
  letter-spacing: -0.04em;
  font-weight: 500;
  white-space: nowrap;
}
.wm .dot {
  display: inline-block;
  width: 0.17em;
  height: 0.17em;
  margin-left: 0.03em;
  border-radius: 50%;
  background: var(--coral);
  animation: beat 1.4s var(--glide) infinite;
}
.lede {
  font-family: var(--display);
  font-size: clamp(19px, 2vw, 23px);
  line-height: 1.4;
  color: var(--fg2);
  margin: 22px 0 0;
  max-width: 32ch;
  text-wrap: pretty;
}
.art {
  justify-self: end;
  width: 100%;
  max-width: 480px;
  color: var(--fg);
}
.art svg {
  display: block;
  width: 100%;
  height: auto;
  overflow: visible;
}
.art text {
  font-family: var(--ui);
  font-size: 7px;
  font-weight: 600;
}
.art .t-sky {
  fill: var(--sky-t);
}
.art .t-sun {
  fill: var(--sun-t);
}
.art .t-coral {
  fill: var(--coral-t);
}
.art .t-ink {
  fill: var(--fg);
}
.art .lead {
  stroke: var(--fg3);
  stroke-width: 0.45;
  fill: none;
  stroke-dasharray: 1 1;
  animation: draw 0.5s var(--glide) both;
}
.art .lab {
  animation: rise 0.5s var(--glide) both;
}
.art .k1 {
  animation-delay: 0.95s;
}
.art .k2 {
  animation-delay: 1.05s;
}
.art .k3 {
  animation-delay: 1.15s;
}
.art .k4 {
  animation-delay: 1.25s;
}
.art:hover .br1 {
  animation: sway 1.2s ease-in-out infinite;
}
.art:hover .br2 {
  animation: sway 1.2s ease-in-out -0.4s infinite;
}
.art:hover .br3 {
  animation: sway 1.2s ease-in-out -0.8s infinite;
}

/* the arch mark */
.arch .trunk {
  stroke-dasharray: 1 1;
}
.arch .br {
  transform-box: view-box;
}
.arch .br1 {
  transform-origin: 39.73px 30.83px;
}
.arch .br2 {
  transform-origin: 50.2px 26.09px;
}
.arch .br3 {
  transform-origin: 61.41px 28.65px;
}
.sprout .trunk {
  animation: draw 0.55s var(--glide) both;
}
.sprout .br {
  animation: sprout 0.62s var(--spring) both;
}
.sprout .br1 {
  animation-delay: 0.38s;
}
.sprout .br2 {
  animation-delay: 0.5s;
}
.sprout .br3 {
  animation-delay: 0.62s;
}

/* the monitor strip */
.strip {
  margin-top: 56px;
  border-top: 1px solid var(--line2);
  border-bottom: 1px solid var(--line2);
  padding: 14px 0;
}
.strip svg {
  display: block;
  width: 100%;
  height: 56px;
}
.strip .base {
  stroke: var(--line);
  stroke-width: 1.6;
  fill: none;
  stroke-linejoin: round;
}
.strip .sweep {
  stroke: var(--coral);
  stroke-width: 2.4;
  fill: none;
  stroke-linejoin: round;
  stroke-linecap: round;
}
.strip .win {
  animation: sweep 3.6s linear infinite;
}

/* what is here */
.cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-top: 56px;
}
.card {
  background: var(--card);
  border: 1px solid var(--line2);
  border-radius: 20px;
  padding: 22px 22px 24px;
  box-shadow: var(--sheetsh);
  animation: rise 0.5s var(--glide) both;
}
.card:nth-child(1) {
  animation-delay: 0.3s;
}
.card:nth-child(2) {
  animation-delay: 0.4s;
}
.card:nth-child(3) {
  animation-delay: 0.5s;
}
.card h2 {
  font-size: 25px;
  line-height: 1.1;
  margin-top: 18px;
}
.card p {
  margin: 8px 0 0;
  color: var(--fg2);
}
.tile {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 29%;
  background: var(--tc);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.32),
    inset 0 -1px 0 rgba(0, 0, 0, 0.14),
    0 1px 2px rgba(11, 11, 20, 0.22);
  transition: transform 0.35s var(--spring);
}
.tile svg {
  width: 100%;
  height: 100%;
  overflow: visible;
  filter: drop-shadow(0 0.6px 0.6px rgba(0, 0, 0, 0.16));
}
.tile.sun {
  --tc: var(--sun);
}
.tile.sky {
  --tc: var(--sky);
}
.tile.coral {
  --tc: var(--coral);
}
.card:hover .tile {
  transform: rotate(-8deg) scale(1.08);
}
.card:hover .g {
  animation: jump 0.5s var(--spring);
  transform-box: fill-box;
  transform-origin: center;
}

/* about, privacy, footer */
.about {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr);
  gap: 32px;
  margin-top: 72px;
  padding-top: 32px;
  border-top: 1px solid var(--line2);
}
.about h2 {
  font-size: clamp(28px, 3.4vw, 38px);
  line-height: 1.05;
}
.about p {
  margin: 0 0 12px;
  color: var(--fg2);
  max-width: 62ch;
}
.doc {
  max-width: 680px;
  padding-top: 56px;
}
.doc h1 {
  font-size: clamp(40px, 6vw, 64px);
  line-height: 1;
}
.doc h2 {
  font-size: 24px;
  margin-top: 32px;
}
.doc p,
.doc li {
  color: var(--fg2);
}
.doc .stamp {
  color: var(--fg3);
  font-size: 14px;
  margin-top: 12px;
}
.foot {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  justify-content: space-between;
  margin-top: 72px;
  padding-top: 20px;
  border-top: 1px solid var(--line2);
  color: var(--fg3);
  font-size: 14px;
}
.foot nav {
  display: flex;
  gap: 18px;
}
.foot a {
  text-decoration: none;
}
.foot a:hover {
  color: var(--fg);
  text-decoration: underline;
}

@media (max-width: 820px) {
  .hero {
    grid-template-columns: minmax(0, 1fr);
    padding-top: 36px;
    gap: 20px;
  }
  .art {
    justify-self: center;
    max-width: 340px;
  }
  .cards,
  .about {
    grid-template-columns: minmax(0, 1fr);
  }
  .strip,
  .cards {
    margin-top: 36px;
  }
}

@keyframes beat {
  0%,
  100% {
    transform: scale(1);
  }
  10% {
    transform: scale(1.35);
  }
  22% {
    transform: scale(1);
  }
  32% {
    transform: scale(1.18);
  }
  46% {
    transform: scale(1);
  }
}
@keyframes draw {
  0% {
    stroke-dashoffset: 1;
    opacity: 0;
  }
  1% {
    opacity: 1;
  }
  100% {
    stroke-dashoffset: 0;
    opacity: 1;
  }
}
@keyframes sprout {
  0% {
    transform: scale(0);
  }
  100% {
    transform: scale(1);
  }
}
@keyframes sway {
  0%,
  100% {
    transform: rotate(-7deg);
  }
  50% {
    transform: rotate(7deg);
  }
}
@keyframes hop {
  0% {
    transform: scale(1);
  }
  35% {
    transform: scale(1.4) translateY(-2px);
  }
  100% {
    transform: scale(1);
  }
}
@keyframes jump {
  0% {
    transform: translateY(0);
  }
  40% {
    transform: translateY(-3px) scale(1.2);
  }
  100% {
    transform: none;
  }
}
@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
}
@keyframes sweep {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(420px);
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}
