:root,
[data-theme="light"] {
  --bg: #e3e5e8;
  --ink: #141414;
  --muted: #4a4a4a;
  --bar: #1f4b7a;
  --surface: #f2f3f5;
  --border: rgba(20, 20, 20, 0.15);
  --btn-bg: #141414;
  --btn-ink: #f2f3f5;
  --btn-on: #1f4b7a;
  --spin-veil: rgba(227, 229, 232, 0.72);
  --cursor: #00e676;
  --font-display: "Barlow Condensed", sans-serif;
  --font-body: "Karla", sans-serif;
}

[data-theme="dark"] {
  --bg: #16181c;
  --ink: #ececec;
  --muted: #a0a4ab;
  --bar: #6fa0d4;
  --surface: #22262c;
  --border: rgba(236, 236, 236, 0.15);
  --btn-bg: #ececec;
  --btn-ink: #16181c;
  --btn-on: #6fa0d4;
  --spin-veil: rgba(22, 24, 28, 0.72);
  --cursor: #39ff14;
}

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  height: 100%;
}

body {
  min-height: 100%;
  min-height: 100dvh;
  display: grid;
  grid-template-rows: auto auto 1fr auto auto;
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--bg);
  border-left: 10px solid var(--bar);
  position: relative;
  transition: background-color 0.2s ease, color 0.2s ease;
}

body.spinning {
  user-select: none;
}

.spin-layer {
  position: fixed;
  inset: -60%;
  z-index: 0;
  pointer-events: none;
  opacity: 0;
  background: conic-gradient(
    from var(--spin-angle, 0deg),
    #c45c26,
    #d4a017,
    #2f6b4f,
    #1f4b7a,
    #7a3e6d,
    #c45c26
  );
  transition: opacity 0.35s ease;
}

body.spinning .spin-layer {
  opacity: 1;
  animation: spin-bg var(--spin-duration, 18s) linear infinite;
  animation-direction: var(--spin-direction, normal);
}

body.spinning.dragging .spin-layer {
  animation: none;
}

@keyframes spin-bg {
  to {
    transform: rotate(360deg);
  }
}

body.spinning::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  background: var(--spin-veil);
  pointer-events: none;
}

.top,
.spin-panel,
.hero,
.hosting,
.footer {
  position: relative;
  z-index: 1;
}

.top {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 1.5rem clamp(1.25rem, 5vw, 3.5rem) 0;
}

.brand {
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 1.125rem;
  color: var(--ink);
}

.controls {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.btn {
  appearance: none;
  border: 1px solid var(--ink);
  background: transparent;
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 500;
  padding: 0.45rem 0.85rem;
  cursor: pointer;
  line-height: 1.2;
}

.btn:hover,
.btn:focus-visible {
  background: var(--btn-bg);
  color: var(--btn-ink);
  outline: none;
}

.btn[aria-pressed="true"] {
  background: var(--btn-on);
  border-color: var(--btn-on);
  color: #fff;
}

.spin-panel {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem 1.5rem;
  margin: 1rem clamp(1.25rem, 5vw, 3.5rem) 0;
  padding: 0.9rem 1rem;
  background: var(--surface);
  border: 1px solid var(--border);
}

.spin-panel[hidden] {
  display: none;
}

.spin-control {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.85rem;
  color: var(--muted);
}

.spin-control input[type="range"] {
  width: min(10rem, 40vw);
  accent-color: var(--bar);
}

.spin-control select {
  font-family: var(--font-body);
  font-size: 0.85rem;
  color: var(--ink);
  background: var(--bg);
  border: 1px solid var(--border);
  padding: 0.3rem 0.45rem;
}

.spin-hint {
  font-size: 0.8rem;
  color: var(--muted);
}

.hero {
  display: flex;
  align-items: center;
  padding: 2rem clamp(1.25rem, 5vw, 3.5rem);
}

.headline {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(3.25rem, 14vw, 8rem);
  line-height: 0.92;
  letter-spacing: -0.01em;
  text-transform: uppercase;
  max-width: 10ch;
}

.hosting {
  padding: 0  clamp(1.25rem, 5vw, 3.5rem) 2.5rem;
  max-width: 36rem;
}

.hosting h2 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.5rem;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  margin-bottom: 0.6rem;
}

.hosting p {
  font-size: 1rem;
  line-height: 1.5;
  color: var(--muted);
  margin-bottom: 0.75rem;
}

.hosting a {
  color: var(--ink);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.hosting a:hover,
.hosting a:focus-visible {
  color: var(--bar);
  outline: none;
}

.hosting-note {
  font-size: 0.85rem !important;
}

.hosting-note code {
  font-family: ui-monospace, Consolas, monospace;
  font-size: 0.9em;
  padding: 0.1em 0.35em;
  background: var(--surface);
  border: 1px solid var(--border);
}

.hosting-cta {
  display: inline-block;
  margin-top: 0.35rem;
  padding: 0.55rem 1rem;
  background: var(--btn-bg);
  color: var(--btn-ink) !important;
  text-decoration: none !important;
  font-weight: 500;
  font-size: 0.9rem;
}

.hosting-cta:hover,
.hosting-cta:focus-visible {
  background: var(--btn-on);
  color: #fff !important;
}

.footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem 1.5rem;
  padding: 1.25rem clamp(1.25rem, 5vw, 3.5rem);
  border-top: 1px solid var(--border);
  font-size: 0.9rem;
  color: var(--muted);
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

.footer a {
  color: var(--ink);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.footer a:hover,
.footer a:focus-visible {
  color: var(--bar);
  outline: none;
}

.cursor,
.cursor-trail {
  display: none;
}

@media (hover: hover) and (pointer: fine) {
  body.has-cursor {
    cursor: none;
  }

  body.has-cursor a,
  body.has-cursor button,
  body.has-cursor input,
  body.has-cursor select,
  body.has-cursor label {
    cursor: none;
  }

  .cursor-trail {
    display: block;
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 9998;
    pointer-events: none;
  }

  .cursor {
    display: block;
    position: fixed;
    top: 0;
    left: 0;
    width: 12px;
    height: 12px;
    z-index: 9999;
    pointer-events: none;
    opacity: 0;
    transform: translate(-50%, -50%);
    will-change: transform;
  }

  .cursor.is-on {
    opacity: 1;
  }

  .cursor-dot {
    position: absolute;
    inset: 0;
    background: var(--cursor);
    border-radius: 50%;
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--cursor) 25%, transparent);
  }

  .cursor-ring {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 32px;
    height: 32px;
    border: 2px solid var(--cursor);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.15s ease, height 0.15s ease, background-color 0.15s ease;
  }

  .cursor.is-hover .cursor-ring {
    width: 52px;
    height: 52px;
    background: color-mix(in srgb, var(--cursor) 14%, transparent);
  }

  .cursor.is-down .cursor-ring {
    width: 24px;
    height: 24px;
  }
}

@media (max-width: 480px) {
  body {
    border-left-width: 6px;
  }

  .footer {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (prefers-reduced-motion: reduce) {
  body.spinning .spin-layer {
    animation: none;
  }

  body.has-cursor,
  body.has-cursor a,
  body.has-cursor button,
  body.has-cursor input,
  body.has-cursor select,
  body.has-cursor label {
    cursor: auto;
  }

  .cursor,
  .cursor-trail {
    display: none !important;
  }
}
