/**
 * Base Styles - Warm Neon Cantina
 * A sophisticated, warm aesthetic for Chula's
 */

/* ==========================================================================
   GOOGLE FONTS - Distinctive Typography
   ========================================================================== */

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

/* ==========================================================================
   CUSTOM FONT - Atrament Bold (Display)
   ========================================================================== */

@font-face {
  font-family: 'Atrament';
  src: url('/fonts/atrament-bold.otf') format('opentype');
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

/* ==========================================================================
   CSS VARIABLES - Warm Neon Cantina Palette
   ========================================================================== */

:root {
  /* Primary Brand Colors - Enhanced with warmth */
  --color-chulas-red: #F05960;
  --color-chulas-red-glow: rgba(240, 89, 96, 0.4);
  --color-chulas-purple: #7060A9;
  --color-chulas-purple-glow: rgba(112, 96, 169, 0.4);
  --color-chulas-lime: #D6DE23;
  --color-chulas-lime-glow: rgba(214, 222, 35, 0.35);
  --color-chulas-orange: #F8A054;
  --color-chulas-orange-glow: rgba(248, 160, 84, 0.4);
  --color-chulas-tan: #FFDF8A;
  --color-chulas-teal: #00B19A;
  --color-chulas-teal-glow: rgba(0, 177, 154, 0.4);
  --color-chulas-black: #1A1617;
  --color-chulas-white: #FFFFFF;

  /* Warm Background Palette */
  --color-background: #1A1617;
  --color-background-warm: #1E1A1B;
  --color-secondary-background: #252122;
  --color-tertiary-background: #2F2A2B;

  /* Glass-morphism Card Backgrounds */
  --color-card-background: rgba(45, 40, 42, 0.85);
  --color-card-background-solid: #2D282A;
  --color-card-hover: rgba(55, 50, 52, 0.9);
  --color-input-background: rgba(35, 30, 32, 0.9);
  --color-glass: rgba(255, 255, 255, 0.03);
  --color-glass-border: rgba(255, 255, 255, 0.08);

  /* Text Colors - Warmer whites */
  --color-text: #FAF8F5;
  --color-text-secondary: rgba(250, 248, 245, 0.7);
  --color-text-tertiary: rgba(250, 248, 245, 0.45);
  --color-text-muted: rgba(250, 248, 245, 0.3);

  /* Shadows - Warmer, softer */
  --shadow-color: rgba(0, 0, 0, 0.5);
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.25);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.35);
  --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.45);
  --shadow-glow-lime: 0 0 20px rgba(214, 222, 35, 0.25);
  --shadow-glow-red: 0 0 20px rgba(240, 89, 96, 0.25);
  --shadow-glow-purple: 0 0 20px rgba(112, 96, 169, 0.25);
  --shadow-glow-teal: 0 0 20px rgba(0, 177, 154, 0.25);
  --shadow-glow-orange: 0 0 20px rgba(248, 160, 84, 0.25);

  /* Layout Constants */
  --horizontal-margin: 20px;
  --section-spacing: 24px;
  --card-padding: 20px;
  --card-radius: 20px;
  --card-radius-sm: 14px;
  --card-radius-lg: 28px;
  --card-spacing: 16px;
  --banner-height: 132px;
  --logo-height: 120px;
  --tab-bar-height: 70px;

  /* Typography */
  --font-display: 'Atrament', sans-serif;
  --font-body: 'Outfit', -apple-system, BlinkMacSystemFont, sans-serif;

  /* Safe Area */
  --safe-area-top: env(safe-area-inset-top, 0px);
  --safe-area-bottom: env(safe-area-inset-bottom, 0px);

  /* Transitions */
  --transition-fast: 0.15s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-normal: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-bounce: 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* ==========================================================================
   RESET & BASE STYLES
   ========================================================================== */

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

html, body {
  height: 100%;
  width: 100%;
  overflow: hidden;
}

body {
  font-family: var(--font-body);
  background-color: var(--color-background);
  color: var(--color-text);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  -webkit-tap-highlight-color: transparent;
  -webkit-touch-callout: none;
  user-select: none;
  font-weight: 400;
  letter-spacing: 0.01em;
  line-height: 1.5;
}

/* Display font for headings */
h1, h2, h3, .display-font {
  font-family: var(--font-display);
  font-weight: bold;
  letter-spacing: 0.02em;
}

/* Body font for everything else */
p, span, label, input, textarea, button, a, li, td, th {
  font-family: var(--font-body);
}

/* Placeholders */
::placeholder {
  font-family: var(--font-body);
  color: var(--color-text-tertiary);
}

::-webkit-input-placeholder {
  font-family: var(--font-body);
}

::-moz-placeholder {
  font-family: var(--font-body);
}

:-ms-input-placeholder {
  font-family: var(--font-body);
}

#app {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  overflow: hidden;
}

/* ==========================================================================
   NOISE TEXTURE OVERLAY (adds depth)
   ========================================================================== */

body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  pointer-events: none;
  z-index: 10000;
  opacity: 0.025;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
}

/* ==========================================================================
   GLOBAL MOBILE ENHANCEMENTS
   ========================================================================== */

html {
  scroll-behavior: smooth;
}

* {
  -webkit-overflow-scrolling: touch;
}

body {
  -webkit-user-select: none;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

/* Allow text selection in inputs and content areas */
input,
textarea,
.auth-form,
.detail-section p,
.form-control,
[contenteditable="true"] {
  -webkit-user-select: text;
  user-select: text;
}

/* ==========================================================================
   SCROLLBAR STYLING
   ========================================================================== */

::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.15);
  border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.25);
}

/* ==========================================================================
   FOCUS STATES (Accessibility)
   ========================================================================== */

:focus-visible {
  outline: 2px solid var(--color-chulas-lime);
  outline-offset: 2px;
}

button:focus:not(:focus-visible),
a:focus:not(:focus-visible),
input:focus:not(:focus-visible) {
  outline: none;
}

/* ==========================================================================
   SELECTION STYLES
   ========================================================================== */

::selection {
  background: rgba(214, 222, 35, 0.3);
  color: var(--color-text);
}

::-moz-selection {
  background: rgba(214, 222, 35, 0.3);
  color: var(--color-text);
}
