@font-face {
  font-family: "Martian Mono";
  src: url("fonts/martian-mono.woff2") format("woff2-variations");
  font-weight: 100 800;
  font-stretch: 75% 112.5%;
  font-display: swap;
}

@font-face {
  font-family: "Schibsted Grotesk";
  src: url("fonts/schibsted-grotesk.woff2") format("woff2-variations");
  font-weight: 400 900;
  font-display: swap;
}

:root {
  --bg: #e9ecef;
  --ink: #19212c;
  --soft: #4f5a69;
  --accent: #3446a6;
  --tint: rgba(25, 33, 44, 0.055);
  --tint-strong: rgba(25, 33, 44, 0.1);
  --sans: "Schibsted Grotesk", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "Martian Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #111620;
    --ink: #e4e8ee;
    --soft: #9aa4b2;
    --accent: #9eabff;
    --tint: rgba(228, 232, 238, 0.06);
    --tint-strong: rgba(228, 232, 238, 0.11);
  }
}

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

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

body {
  min-height: 100vh;
  min-height: 100svh;
  display: grid;
  grid-template-columns: minmax(0, 44rem);
  place-content: center;
  padding: clamp(2.5rem, 8vh, 6rem) 1.25rem;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

main {
  min-width: 0;
}

a {
  color: inherit;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.22em;
  text-decoration-color: color-mix(in srgb, currentColor 35%, transparent);
  transition: color 0.15s, text-decoration-color 0.15s;
}

@media (hover: hover) {
  a:hover {
    color: var(--accent);
    text-decoration-color: currentColor;
  }

  .btn:hover {
    background: var(--tint);
    color: var(--ink);
  }

  .btn-primary:hover {
    background: var(--accent);
    color: #fff;
  }

  .btn-small:hover {
    background: var(--tint-strong);
  }
}

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

/* Intro */

.intro {
  display: grid;
  grid-template-columns: auto 1fr;
  column-gap: 1.1rem;
  align-items: center;
  margin-bottom: clamp(2.75rem, 7vh, 4.5rem);
}

.seal {
  width: 3.5rem;
  height: auto;
  fill: var(--ink);
  overflow: visible;
}

.seal circle {
  transform-box: fill-box;
  transform-origin: center;
  animation: dot-in 0.5s cubic-bezier(0.3, 1.4, 0.5, 1) var(--d, 0s) both;
}

.seal circle.on {
  fill: var(--accent);
  transform: scale(1.35);
}

@keyframes dot-in {
  from { transform: scale(0); }
}

h1 {
  font-size: 1.375rem;
  font-weight: 650;
  letter-spacing: -0.01em;
  line-height: 1.1;
}

.lede {
  grid-column: 1 / -1;
  max-width: 34rem;
  margin-top: 1.25rem;
  color: var(--soft);
}

/* Fingerprint */

.fp {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.1em;
  font-family: var(--mono);
  font-size: clamp(1.15rem, 5.2vw, 2.65rem);
  font-weight: 300;
  font-stretch: 100%;
  line-height: 1.25;
  letter-spacing: -0.01em;
  font-variant-numeric: slashed-zero;
  color: var(--soft);
  white-space: nowrap;
}

.g {
  border-radius: 0.15em;
}

.tail {
  display: inline-block;
  transform-origin: 0 0;
  transition: transform 1.4s cubic-bezier(0.65, 0, 0.25, 1);
}

.tail .g {
  color: var(--ink);
  font-weight: 450;
}

/* Vanity focus: the rest of the fingerprint dissolves, the last 16 digits grow to fill it */

.fp > .fp-line > .g,
.seal circle {
  transition: opacity 0.6s ease var(--fade, 0s), color 0.15s, background-color 0.15s, fill 0.15s, transform 0.2s;
}

.fp.solo > .fp-line > .g {
  opacity: 0;
}

.fp.solo .tail {
  transform: translate(var(--tx, 0), var(--ty, 0)) scale(var(--ts, 1));
}

.seal.solo circle:not([data-g="6"], [data-g="7"], [data-g="8"], [data-g="9"]) {
  opacity: 0.18;
}

.g.on {
  color: var(--accent);
  background: var(--tint);
}

/* Actions */

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 0.25rem;
  margin: 2.25rem 0 0 -0.85rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  min-height: 2.75rem;
  padding: 0 0.85rem;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--ink);
  font: 500 0.9375rem/1 var(--sans);
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.15s, color 0.15s;
  -webkit-tap-highlight-color: transparent;
}

.btn:active {
  background: var(--tint-strong);
}

.btn-primary {
  margin-left: 0.85rem;
  padding: 0 1.15rem;
  background: var(--ink);
  color: var(--bg);
}

@media (prefers-color-scheme: dark) and (hover: hover) {
  .btn-primary:hover {
    color: var(--bg);
  }
}

.btn svg {
  width: 1.15rem;
  height: 1.15rem;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* Command */

.cmd {
  margin-top: 1.25rem;
}

.cmd-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 0.35rem 0.35rem 1rem;
  border-radius: 14px;
  background: var(--tint);
}

.cmd code {
  flex: 1;
  min-width: 0;
  padding: 0.45rem 0;
  font-family: var(--mono);
  font-size: 0.8125rem;
  font-stretch: 87.5%;
  line-height: 1.6;
}

.btn-small {
  flex: none;
  min-height: 2.5rem;
  padding: 0 0.9rem;
  font-size: 0.875rem;
}

/* Contact and footer */

.contact {
  margin-top: clamp(3rem, 8vh, 4.5rem);
  font-size: 1.1875rem;
  line-height: 1.5;
}

footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.5rem 1.5rem;
  margin-top: clamp(3rem, 8vh, 4.5rem);
  font-size: 0.875rem;
  color: var(--soft);
}

footer a {
  padding: 0.6rem 0;
  margin: -0.6rem 0;
}

/* Toast */

.toast {
  position: fixed;
  left: 50%;
  bottom: max(1.5rem, env(safe-area-inset-bottom));
  padding: 0.7rem 1.1rem;
  border-radius: 999px;
  background: var(--ink);
  color: var(--bg);
  font-size: 0.9375rem;
  font-weight: 500;
  pointer-events: none;
  opacity: 0;
  transform: translate(-50%, 0.5rem);
  transition: opacity 0.2s, transform 0.2s;
}

.toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}

/* Small screens: narrow the mono so a full fingerprint line still fits */

@media (max-width: 30rem) {
  body {
    align-content: start;
    font-size: 1rem;
  }

  .fp {
    font-size: calc((100vw - 2.5rem) / 15.2);
    font-stretch: 80%;
  }

  .contact {
    font-size: 1.0625rem;
  }
}

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