/* Reset, typography, page shell and layout. Uses tokens.css only. */

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

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

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: var(--text-md);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  display: flex;
  flex-direction: column;
}

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

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

[hidden] {
  display: none !important;
}

/* Typography */
h1,
h2,
h3,
h4 {
  font-family: var(--font-heading);
  font-weight: 500;
  line-height: 1.2;
  margin: 0 0 calc(var(--space) * 1.5);
  letter-spacing: -0.01em;
}

h1 { font-size: var(--text-2xl); }
h2 { font-size: var(--text-xl); }
h3 { font-size: var(--text-lg); }

p {
  margin: 0 0 calc(var(--space) * 2);
}

a {
  color: var(--accent);
  text-decoration: underline;
  text-decoration-color: color-mix(in srgb, var(--accent) 40%, transparent);
  text-underline-offset: 3px;
  transition: text-decoration-color var(--transition);
}

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

:focus-visible {
  outline: none;
  box-shadow: var(--focus-ring);
  border-radius: var(--radius-sm);
}

.muted {
  color: var(--text-muted);
}

.small {
  font-size: var(--text-sm);
}

/* Order #s, client IDs, tracking numbers and money */
.mono {
  font-family: var(--font-mono);
  font-feature-settings: "tnum";
  letter-spacing: 0;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* Page shell */
.container {
  width: 100%;
  max-width: var(--content-width);
  margin: 0 auto;
  padding: 0 calc(var(--space) * 2);
}

.page {
  flex: 1;
  padding-block: calc(var(--space) * 4) calc(var(--space) * 8);
}

.page-header {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: calc(var(--space) * 2);
  margin-bottom: calc(var(--space) * 3);
}

.page-header h1 {
  margin: 0;
}

.stack > * + * {
  margin-top: calc(var(--space) * 2);
}

.grid {
  display: grid;
  gap: calc(var(--space) * 2);
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.site-footer {
  padding: calc(var(--space) * 3) 0;
  color: var(--text-muted);
  font-size: var(--text-sm);
  border-top: 1px solid var(--border);
}

/* Wordmark */
.wordmark {
  font-family: var(--font-heading);
  font-size: var(--text-lg);
  font-weight: 500;
  color: var(--text);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: var(--space);
}

.wordmark::before {
  content: "";
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 12px color-mix(in srgb, var(--accent) 60%, transparent);
}

/* Auth pages: one centered card */
.auth {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: calc(var(--space) * 3);
  padding: calc(var(--space) * 4) calc(var(--space) * 2);
}

.auth-card {
  width: 100%;
  max-width: var(--auth-width);
}

.auth-card h1 {
  margin-bottom: var(--space);
}

.auth-alt {
  margin: calc(var(--space) * 3) 0 0;
  text-align: center;
  color: var(--text-muted);
  font-size: var(--text-sm);
}

/* Holding page */
.hero {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: calc(var(--space) * 3);
  padding-block: calc(var(--space) * 8);
}

.hero h1 {
  font-size: var(--text-3xl);
  max-width: 14ch;
  margin: 0;
}

.hero p {
  font-size: var(--text-lg);
  color: var(--text-muted);
  max-width: 44ch;
  margin: 0;
}

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