@font-face {
  font-family: "Manrope";
  src: url("manrope-latin-wght.woff2") format("woff2");
  font-weight: 200 800;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg: #111416;
  --bg-2: #1c2225;
  --text: #f2f3f2;
  --text-2: #a0a8aa;
  --accent: #35d96b;

  --gutter: clamp(1.25rem, 4vw, 3rem);
  --sweep-period: 32s;

  /* Diameter of the graduated ring. The scope itself is twice this. */
  --bezel: 88vmin;
}

@media (max-aspect-ratio: 1/1) {
  :root { --bezel: min(150vmin, 84vh); }
}

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

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

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100svh;
  display: grid;
  grid-template-rows: auto 1fr auto;
  color: var(--text);
  font-family: "Manrope", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 1rem;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

p, h1 { margin: 0; }

::selection { background: var(--accent); color: var(--bg); }

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

/* Radar ------------------------------------------------------------------ */

.radar {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
  animation: fade 1.8s ease-out both;
}

.radar__stage {
  position: absolute;
  top: 50%;
  left: 50%;
  width: calc(var(--bezel) * 2);
  height: calc(var(--bezel) * 2);
  transform: translate(-50%, -50%);
}

.radar__stage > * {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

/* Clockwise from north. The leading edge sits at 360deg, the phosphor tail trails behind it. */
.radar__sweep {
  border-radius: 50%;
  background: conic-gradient(
    from 0deg,
    rgba(53, 217, 107, 0) 0deg 278deg,
    rgba(53, 217, 107, 0.012) 300deg,
    rgba(53, 217, 107, 0.045) 330deg,
    rgba(53, 217, 107, 0.11) 356deg,
    rgba(53, 217, 107, 0.16) 360deg
  );
  will-change: transform;
  animation: sweep var(--sweep-period) linear infinite;
}

.radar__sweep::after {
  content: "";
  position: absolute;
  left: calc(50% - 0.5px);
  top: 0;
  width: 1px;
  height: 50%;
  background: linear-gradient(to top, rgba(53, 217, 107, 0) 12%, rgba(53, 217, 107, 0.6) 52%, rgba(53, 217, 107, 0.08) 96%);
}

/* Keeps the centre quiet for the type and dissolves the far rings into the page. */
.radar__vignette {
  background: radial-gradient(
    circle closest-side,
    rgba(17, 20, 22, 0.86) 0%,
    rgba(17, 20, 22, 0.74) 24%,
    rgba(17, 20, 22, 0.28) 42%,
    rgba(17, 20, 22, 0) 52%,
    rgba(17, 20, 22, 0) 62%,
    var(--bg) 100%
  );
}

.radar__scope { overflow: visible; }

.radar__scope circle,
.radar__scope path { fill: none; }

.radar__scope .rings circle,
.radar__scope .bezel,
.radar__scope .axes,
.radar__scope .ticks,
.radar__scope .ticks-major,
.radar__scope .marks {
  vector-effect: non-scaling-stroke;
  stroke-width: 1px;
}

.radar__scope .disc { fill: var(--bg-2); fill-opacity: 0.32; }
.radar__scope .rings circle { stroke: rgba(242, 243, 242, 0.085); }
.radar__scope .rings .dashed { stroke: rgba(242, 243, 242, 0.14); stroke-dasharray: 1 7; }
.radar__scope .bezel { stroke: rgba(242, 243, 242, 0.26); }
.radar__scope .axes { stroke: rgba(242, 243, 242, 0.07); }
.radar__scope .ticks { stroke: rgba(242, 243, 242, 0.3); }
.radar__scope .ticks-major { stroke: rgba(242, 243, 242, 0.62); }
.radar__scope .marks { stroke: rgba(242, 243, 242, 0.34); }
.radar__scope .index { fill: var(--accent); }

.radar__scope text {
  font-family: inherit;
  font-size: 12.5px;
  font-weight: 500;
  letter-spacing: 0.08em;
  font-variant-numeric: tabular-nums;
  text-anchor: middle;
  dominant-baseline: central;
  fill: rgba(160, 168, 170, 0.8);
}

/* Each blip flares as the beam crosses its bearing, then decays until the next pass. */
.blip {
  --phase: calc(var(--bearing) / 360 * var(--sweep-period) - var(--sweep-period));
}

.blip__dot,
.blip__halo,
.radar__scope .blip__label {
  animation-duration: var(--sweep-period);
  animation-timing-function: linear;
  animation-iteration-count: infinite;
  animation-delay: var(--phase);
}

.radar__scope .blip__dot {
  fill: var(--accent);
  animation-name: blip-dot;
}

.radar__scope .blip__halo {
  stroke: var(--accent);
  stroke-width: 1px;
  vector-effect: non-scaling-stroke;
  transform-box: fill-box;
  transform-origin: center;
  animation-name: blip-halo;
}

.radar__scope .blip__label {
  font-size: 11.5px;
  text-anchor: start;
  fill: var(--accent);
  animation-name: blip-label;
}

@keyframes sweep { to { transform: rotate(360deg); } }
@keyframes fade { from { opacity: 0; } }

@keyframes blip-dot {
  0% { opacity: 1; }
  3% { opacity: 1; }
  48% { opacity: 0.14; }
  100% { opacity: 0.14; }
}

@keyframes blip-halo {
  0% { opacity: 0.8; transform: scale(1); }
  12% { opacity: 0; transform: scale(5); }
  100% { opacity: 0; transform: scale(5); }
}

@keyframes blip-label {
  0% { opacity: 0.9; }
  6% { opacity: 0.9; }
  30% { opacity: 0; }
  100% { opacity: 0; }
}

/* Header ------------------------------------------------------------------ */

.site-header {
  padding: clamp(1.25rem, 3.4vh, 2.25rem) var(--gutter) 0;
  padding-top: max(clamp(1.25rem, 3.4vh, 2.25rem), env(safe-area-inset-top));
}

.logo {
  display: inline-block;
  vertical-align: top;
}

.logo img {
  display: block;
  width: clamp(7.5rem, 11vw, 9.5rem);
  height: auto;
}

/* Hero -------------------------------------------------------------------- */

.hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: clamp(2rem, 5vh, 3rem) var(--gutter);
  text-align: center;
}

.status {
  display: inline-flex;
  align-items: center;
  gap: 0.75em;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.3em;
  /* Balance the trailing tracking so the label stays optically centred with its dot. */
  margin-right: -0.3em;
  text-transform: uppercase;
  color: var(--text);
}

.status__dot {
  position: relative;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
}

.status__dot::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 1px solid var(--accent);
  animation: ping 4s ease-out infinite;
}

@keyframes ping {
  0% { transform: scale(1); opacity: 0.8; }
  55%, 100% { transform: scale(3.4); opacity: 0; }
}

.headline {
  margin-top: clamp(1.25rem, 3.2vh, 2rem);
  /* Sized so the second line stays inside the graduated ring at common desktop ratios. */
  font-size: clamp(2.5rem, min(5.4vw, 10.5vh), 5.5rem);
  font-weight: 600;
  line-height: 1.07;
  letter-spacing: -0.035em;
}

.headline span {
  display: block;
  text-wrap: balance;
}

.headline em {
  font-style: normal;
  color: var(--accent);
}

.message {
  margin-top: clamp(1.25rem, 3.4vh, 2.25rem);
  color: var(--text-2);
  font-size: clamp(0.9375rem, 0.88rem + 0.25vw, 1.0625rem);
}

.message__lead {
  margin-bottom: 0.3rem;
  color: var(--text);
  font-size: clamp(1.125rem, 1.02rem + 0.45vw, 1.375rem);
  font-weight: 500;
  letter-spacing: -0.012em;
}

.contact {
  position: relative;
  margin-top: clamp(1.75rem, 4.6vh, 3rem);
  padding-top: clamp(1.75rem, 4.6vh, 3rem);
  color: var(--text-2);
  font-size: 0.875rem;
}

/* A short signal trace linking the message to the address. */
.contact::before {
  content: "";
  position: absolute;
  top: 0;
  left: calc(50% - 0.5px);
  width: 1px;
  height: clamp(1rem, 3vh, 1.75rem);
  background: linear-gradient(to bottom, rgba(160, 168, 170, 0), rgba(160, 168, 170, 0.55));
}

.contact__email {
  display: inline-block;
  margin-top: 0.25rem;
  padding: 0.25rem 0;
  color: var(--text);
  font-size: 1.125rem;
  font-weight: 600;
  letter-spacing: -0.005em;
  text-decoration: none;
  background: linear-gradient(var(--accent), var(--accent)) left bottom / 100% 1px no-repeat;
  transition: color 0.2s ease;
}

.contact__email:hover { color: var(--accent); }

/* Footer ------------------------------------------------------------------ */

.site-footer {
  padding: 0 var(--gutter) clamp(1rem, 3vh, 1.75rem);
  padding-bottom: max(clamp(1rem, 3vh, 1.75rem), env(safe-area-inset-bottom));
  color: var(--text-2);
  font-size: 0.75rem;
  letter-spacing: 0.02em;
}

/* Page entrance ------------------------------------------------------------ */

.rise {
  animation: rise 0.9s cubic-bezier(0.2, 0.7, 0.2, 1) both;
  animation-delay: calc(var(--i, 0) * 90ms + 120ms);
}

@keyframes rise {
  from { opacity: 0; transform: translateY(10px); }
}

/* The footer sits on the page edge: moving it would add overflow and flash a scrollbar. */
.site-footer.rise { animation-name: fade; }

/* Small screens ------------------------------------------------------------ */

@media (max-width: 640px) {
  .headline {
    font-size: clamp(2.375rem, 11.6vw, 3.5rem);
    line-height: 1.06;
  }

  .contact__email {
    padding: 0.625rem 0;
    background-position: left calc(100% - 0.375rem);
  }
}

@media (max-height: 620px) {
  .hero { padding-block: 1.25rem; }

  .contact {
    margin-top: 1rem;
    padding-top: 1.25rem;
  }
}

/* Reduced motion ------------------------------------------------------------ */

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

  .radar__sweep { transform: rotate(64deg); }
  .radar__scope .blip__dot { opacity: 0.55; }
  .radar__scope .blip__halo,
  .radar__scope .blip__label { opacity: 0; }
  .status__dot::after { opacity: 0; }
}
