/* ==========================================================================
   Clone.it — Base
   Reset, web fonts, document shell, focus rings, reduced-motion guard.
   ========================================================================== */

/* ---------- Fonts ---------- */

/* Inter — variable body sans. */
@font-face {
  font-family: "Inter";
  src: url("/fonts/inter-var.woff2") format("woff2-variations"),
       url("/fonts/inter-var.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

/* ---------- Reset (targeted, not * bomb) ---------- */

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

html,
body {
  height: 100%;
}

body,
h1,
h2,
h3,
h4,
p,
figure,
blockquote,
ol,
ul,
dl,
dd {
  margin: 0;
}

ol,
ul {
  padding: 0;
}

button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}

img,
svg,
video,
canvas {
  display: block;
  max-width: 100%;
}

/* ---------- Document ---------- */

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

body {
  background: var(--color-bg);
  color: var(--color-fg);
  font: 400 var(--fs-body) / 1.55 var(--font-sans);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  min-height: 100svh;
  overflow-x: hidden;
  position: relative;
}

/* ---------- Links (global default) ---------- */

a {
  color: inherit;
  text-decoration: none;
  transition: color var(--dur-fast) var(--ease-out);
}

a:hover {
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* ---------- Focus ring ---------- */

:focus {
  outline: none;
}

:focus-visible {
  outline: 2px solid rgba(120, 140, 255, .65);
  outline-offset: 2px;
  border-radius: 4px;
}

/* ---------- Utility ---------- */

.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ---------- Main stack (vertical-centered layout) ---------- */

.stack {
  position: relative;
  z-index: 1;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: clamp(56px, 8vh, 104px) var(--space-6) 15vh;
  gap: 0;
}

.stack > * {
  width: min(640px, 100%);
  text-align: center;
  margin-inline: auto;
}

/* Vertical rhythm between sibling children — but not when the next sibling
   is hidden (collapsed form, etc.) so we don't leave ghost gaps. */
.stack > * + *:not([hidden]) {
  margin-top: 14px;
}

.stack > [hidden] + * {
  margin-top: 14px;
}

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

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}

@media (max-width: 480px) {
  .stack {
    padding: var(--space-7) var(--space-4) 13vh;
  }

  .stack > * {
    width: 100%;
  }
}
