/* base.css — tokens, reset and shared primitives for every page in Sina-land.
   Palette is a cozy dusk: warm lamp-light against a cooling sky. */

:root {
  /* Sky / background */
  --sky-deep:   #241b3d;
  --sky-mid:    #3d2c5a;
  --sky-warm:   #8a4f6d;
  --ink:        #17122a;

  /* Surfaces */
  --panel:      #2a2145;
  --panel-edge: #4a3a70;
  --panel-soft: #332752;

  /* Text */
  --text:       #f4efe6;
  --text-dim:   #bbb0cc;
  --text-quiet: #8d83a3;

  /* Accents — lamp-light warm, grass green */
  --lamp:       #f2b544;
  --lamp-deep:  #d98f2b;
  --grass:      #6bbf59;
  --grass-deep: #3f8f46;
  --brick:      #c96f6a;

  /* Type */
  --font-pixel: "Press Start 2P", "Courier New", ui-monospace, monospace;
  --font-body:  ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto,
                "Helvetica Neue", Arial, sans-serif;

  /* Rhythm */
  --gutter: 16px;
  --radius: 6px;
  --measure: 68ch;
}

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

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

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.6;
  color: var(--text);
  background: var(--ink);
  -webkit-font-smoothing: antialiased;
}

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

a { color: var(--lamp); }
a:hover { color: #ffd071; }

/* One visible, high-contrast focus ring everywhere. Never removed. */
:focus-visible {
  outline: 3px solid var(--lamp);
  outline-offset: 3px;
  border-radius: 2px;
}

/* Skip link — first thing a keyboard or screen-reader user meets. */
.skip-link {
  position: absolute;
  left: 50%;
  top: 0;
  transform: translate(-50%, -120%);
  z-index: 100;
  padding: 10px 18px;
  background: var(--lamp);
  color: var(--ink);
  font-weight: 700;
  text-decoration: none;
  border-radius: 0 0 var(--radius) var(--radius);
}
.skip-link:focus { transform: translate(-50%, 0); color: var(--ink); }

/* Visually hidden but read aloud. */
.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

/* --- Buttons ------------------------------------------------------ */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 52px;              /* comfortable touch target */
  padding: 14px 22px;
  font-family: var(--font-pixel);
  font-size: 13px;
  line-height: 1.5;
  text-align: center;
  text-decoration: none;
  color: var(--text);
  background: var(--panel-soft);
  border: 3px solid var(--panel-edge);
  border-radius: var(--radius);
  cursor: pointer;
  transition: transform 120ms ease, background-color 120ms ease,
              border-color 120ms ease;
}
.btn:hover {
  color: var(--text);
  background: #3d2f63;
  border-color: var(--lamp);
  transform: translateY(-2px);
}
.btn:active { transform: translateY(1px); }

.btn--primary {
  color: var(--ink);
  background: var(--lamp);
  border-color: var(--lamp-deep);
}
.btn--primary:hover { color: var(--ink); background: #ffc95c; border-color: #ffd071; }

/* --- Under construction ------------------------------------------- */
/* A wink at the 90s animated-GIF roadworks sign. The hazard stripes
   creep; prefers-reduced-motion freezes them via the block below. */

.construction {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 9px 15px;
  font-family: var(--font-pixel);
  font-size: 9px;
  line-height: 1.7;
  color: var(--lamp);
  text-decoration: none;
  background-color: var(--panel-soft);
  background-image: repeating-linear-gradient(
    45deg,
    rgba(242, 181, 68, 0.13) 0 6px,
    transparent 6px 12px
  );
  background-size: 17px 17px;
  border: 2px dashed var(--lamp-deep);
  border-radius: var(--radius);
  animation: crawl 3s linear infinite;
}

.construction__sign { font-size: 13px; line-height: 1; }

@keyframes crawl {
  from { background-position: 0 0; }
  to   { background-position: 17px 0; }
}

/* --- Motion ------------------------------------------------------- */

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