/**
 * REI UK - Shared Styles
 * Color palette and common utilities
 */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

:root {
  /* Primary palette */
  --pitch-black: #0f1108;
  --dark-coffee: #241909;
  --neon-ice: #00f6ed;
  --pale-sky: #cad8de;
  --taupe-grey: #8a7d77;

  /* Derived colors */
  --neon-ice-dim: rgba(0, 246, 237, 0.5);
  --neon-ice-glow: rgba(0, 246, 237, 0.15);
  --pale-sky-dim: rgba(202, 216, 222, 0.7);
  --glass-bg: rgba(15, 17, 8, 0.85);
  --glass-border: rgba(0, 246, 237, 0.15);

  /* Typography */
  --font-sans: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'SF Mono', 'Monaco', 'Inconsolata', 'Fira Mono', monospace;

  /* Transitions */
  --ease-out: cubic-bezier(0.4, 0, 0.2, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
}

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

* {
  margin: 0;
  padding: 0;
}

html {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-sans);
  background: var(--pitch-black);
  color: var(--pale-sky);
  overflow-x: hidden;
}

/* Links */
a {
  color: var(--neon-ice);
  text-decoration: none;
  transition: color 0.2s var(--ease-out);
}

a:hover {
  color: var(--pale-sky);
}

/* Buttons */
.rei-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--neon-ice);
  background: transparent;
  border: 1px solid var(--neon-ice);
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.3s var(--ease-out);
}

.rei-btn:hover {
  background: var(--neon-ice);
  color: var(--pitch-black);
  box-shadow: 0 0 30px var(--neon-ice-glow);
}

.rei-btn-primary {
  background: var(--neon-ice);
  color: var(--pitch-black);
}

.rei-btn-primary:hover {
  background: #5ffff8;
  border-color: #5ffff8;
  box-shadow: 0 0 20px rgba(255, 255, 255, 0.4);
}

/* Form inputs */
.rei-input {
  width: 100%;
  padding: 14px 18px;
  font-family: var(--font-sans);
  font-size: 14px;
  color: var(--pale-sky);
  background: rgba(15, 17, 8, 0.6);
  border: 1px solid rgba(100, 88, 83, 0.3);
  border-radius: 6px;
  outline: none;
  transition: all 0.3s var(--ease-out);
}

.rei-input:focus {
  border-color: var(--neon-ice);
  box-shadow: 0 0 0 3px var(--neon-ice-glow);
}

.rei-input::placeholder {
  color: var(--taupe-grey);
}

.rei-textarea {
  min-height: 120px;
  resize: vertical;
}

.rei-label {
  display: block;
  margin-bottom: 8px;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--taupe-grey);
}

/* Glassmorphism card */
.rei-glass {
  background: var(--glass-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--glass-border);
  border-radius: 16px;
}

/* Text styles */
.rei-heading {
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--pale-sky);
}

.rei-heading-lg {
  font-size: clamp(32px, 5vw, 48px);
  line-height: 1.1;
}

.rei-heading-md {
  font-size: clamp(24px, 3vw, 32px);
  line-height: 1.2;
}

.rei-heading-sm {
  font-size: 18px;
  line-height: 1.3;
}

.rei-text {
  font-size: 15px;
  line-height: 1.7;
  color: var(--pale-sky-dim);
}

.rei-text-sm {
  font-size: 13px;
  line-height: 1.6;
}

.rei-caption {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--taupe-grey);
}

/* Accent text */
.rei-accent {
  color: var(--neon-ice);
}

/* Glow effect */
.rei-glow {
  text-shadow: 0 0 20px var(--neon-ice-dim);
}

/* Contextual link */
.rei-contextual-link {
  position: fixed;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--pale-sky);
  background: var(--glass-bg);
  backdrop-filter: blur(12px);
  border: 1px solid var(--glass-border);
  border-radius: 30px;
  cursor: pointer;
  transition: all 0.3s var(--ease-out);
  text-decoration: none;
  z-index: 100;
}

.rei-contextual-link:hover {
  color: var(--neon-ice);
  border-color: rgba(0, 246, 237, 0.3);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.3);
}

.rei-contextual-link svg {
  width: 16px;
  height: 16px;
  stroke: currentColor;
  stroke-width: 2;
}

/* Content overlay */
.rei-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(15, 17, 8, 0.9);
  backdrop-filter: blur(8px);
  opacity: 0;
  visibility: hidden;
  transition: all 0.4s var(--ease-out);
  z-index: 1000;
}

.rei-overlay.active {
  opacity: 1;
  visibility: visible;
}

.rei-overlay-content {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 90%;
  max-width: 600px;
  max-height: 80vh;
  overflow-y: auto;
  padding: 40px;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: 16px;
}

/* Scrollbar */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.2);
}

::-webkit-scrollbar-thumb {
  background: var(--taupe-grey);
  border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--neon-ice-dim);
}

/* Selection */
::selection {
  background: var(--neon-ice);
  color: var(--pitch-black);
}

/* Animations */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes pulse {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.5;
  }
}

.rei-fade-in {
  animation: fadeIn 0.6s var(--ease-out) forwards;
}

/* Focus states for accessibility */
a:focus,
button:focus,
input:focus,
textarea:focus,
select:focus,
[tabindex]:focus {
  outline: 2px solid var(--neon-ice);
  outline-offset: 2px;
}

/* Remove default focus for mouse users, keep for keyboard */
:focus:not(:focus-visible) {
  outline: none;
}

:focus-visible {
  outline: 2px solid var(--neon-ice);
  outline-offset: 2px;
}

/* Skip to content link for screen readers */
.skip-to-content {
  position: absolute;
  top: -40px;
  left: 0;
  background: var(--neon-ice);
  color: var(--pitch-black);
  padding: 8px 16px;
  font-size: 14px;
  font-weight: 500;
  z-index: 10000;
  transition: top 0.3s;
}

.skip-to-content:focus {
  top: 0;
}

/* Utilities */
.rei-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;
}
