/**
 * Context Clues - Base Styles
 * Shared across every page: tokens, reset, header, buttons, footer.
 */

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* Prevent flash of unstyled content - simplified */
.container {
  opacity: 1;
}

:root {
  --charcoal: #121212;
  --pastel-blue: #cee5fc;
  --white: #ffffff;
  --light-red: #f8d7da;
  --red: #e53e3e;
  --green: #d4edda;
  --yellow: #fff3cd;
  --gray: #6b7280;
  --gold: #d4af37;

  --button-height: 48px;
  --button-width: 100%;
  --button-max-width: 350px;
  --white-size: 1rem;

  --text-primary: var(--charcoal);
  --bg-primary: var(--white);

  --font-family:
    'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-size-xs: 0.75rem;
  --font-size-sm: 0.875rem;
  --font-size-base: 1rem;
  --font-size-lg: 1.125rem;
  --font-size-xl: 1.25rem;
  --font-size-2xl: 1.5rem;
  --font-size-title: 3.35rem;

  --space-xxs: 0.25rem;
  --space-xs: 0.5rem;
  --space-sm: 0.75rem;
  --space-md: 1rem;
  --space-lg: 1.5rem;
  --space-xl: 2rem;

  --radius-sm: 8px;
  --radius-md: 10px;
  --radius-lg: 12px;

  --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 8px 16px rgba(0, 0, 0, 0.15);

  --transition: all 200ms ease;
}

body {
  font-family: var(--font-family);
  background: var(--pastel-blue) !important;
  color: var(--charcoal);
  line-height: 1.6;
  min-height: 100vh;
}

.container {
  max-width: 600px;
  margin: 0 auto;
  padding: var(--space-md);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  /* Opacity animation already defined above */
}

.header {
  position: relative;
  text-align: center;
  padding: var(--space-sm);
  padding-top: 0;
  display: flex;
  justify-content: center;
}

.header-text {
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  width: fit-content;
}

.title {
  font-size: var(--font-size-title);
  font-weight: 700;
  color: var(--charcoal);
  margin-bottom: var(--space-xs);
  white-space: nowrap;
}

.title a {
  color: inherit;
  text-decoration: none;
}

.title a:hover,
.title a:focus-visible {
  text-decoration: underline;
}

.subtitle {
  position: absolute;
  bottom: 0;
  right: 0;
  font-size: var(--font-size-sm);
  color: var(--charcoal);
  font-weight: 400;
  font-style: italic;
}

.button {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-sm);
  border: 3px solid var(--charcoal);
  border-radius: var(--radius-md);
  background: var(--charcoal);
  font-family: inherit;
  font-size: var(--white-size);
  color: var(--white);
  height: var(--button-height);
  width: var(--button-width);
  max-width: var(--button-max-width);
  cursor: pointer;
  transition: var(--transition);
}

.button:disabled {
  background: var(--gray);
  border-color: var(--charcoal);
  color: var(--charcoal);
  opacity: 0.8;
  cursor: not-allowed;
  transform: none;
  pointer-events: none;
}

.hidden {
  display: none !important;
}

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

@media (max-width: 319px) {
  .title {
    font-size: 1.5rem;
  }
}

@media (max-width: 400px) {
  .title {
    font-size: 2.8rem;
  }
}

@media (min-width: 1024px) {
  .container {
    max-width: 700px;
  }
}

/* Footer */
.footer {
  padding: 1rem 0;
  text-align: center;
}

.footer-text {
  font-size: 0.875rem;
  margin: 0;
  opacity: 0.8;
}

@media (max-width: 480px) {
  .footer {
    margin-top: 1.5rem;
    padding: 0.75rem 0;
  }

  .footer-text {
    font-size: 0.8rem;
  }
}
