/* @domain: core
 * @type: style
 * @status: ui-draft
 * @description: Design tokens and atomic styles for the Educational Soft UI aesthetic.
 */

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

:root {
  /* Colors */
  --bg-canvas: #f8f9fc;
  --bg-card: #ffffff;
  --text-main: #1e293b;
  --text-muted: #64748b;
  
  --accent-primary: #6366f1; /* Soft Indigo */
  --accent-primary-hover: #4f46e5;
  --accent-secondary: #14b8a6; /* Soft Teal/Mint */
  
  --pastel-blue: #e0e7ff;
  --pastel-green: #ccfbf1;
  --pastel-orange: #ffedd5;
  
  /* Border & Shadows */
  --border-light: rgba(99, 102, 241, 0.1);
  --shadow-diffuse: 0 10px 40px -10px rgba(99, 102, 241, 0.08);
  --shadow-hover: 0 20px 40px -10px rgba(99, 102, 241, 0.15);
  
  /* Radii */
  --radius-sm: 0.5rem;
  --radius-md: 1rem;
  --radius-lg: 1.5rem;
  --radius-xl: 2rem;
  
  /* Transitions */
  --spring: cubic-bezier(0.175, 0.885, 0.32, 1.275);
  --transition-smooth: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

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

body {
  font-family: 'Outfit', sans-serif;
  background-color: var(--bg-canvas);
  color: var(--text-main);
  line-height: 1.6;
  min-height: 100dvh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* Typography */
h1, h2, h3, h4 {
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.1;
  color: var(--text-main);
}

.text-display { font-size: clamp(2.5rem, 5vw, 4rem); tracking: -0.04em; }
.text-h1 { font-size: clamp(2rem, 4vw, 3rem); }
.text-h2 { font-size: 2rem; }
.text-h3 { font-size: 1.5rem; }
.text-body { font-size: 1.125rem; color: var(--text-muted); max-width: 65ch; }

/* Atoms: Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.875rem 1.5rem;
  font-family: inherit;
  font-size: 1rem;
  font-weight: 500;
  border-radius: 9999px; /* Pill shape */
  border: none;
  cursor: pointer;
  transition: transform 0.3s var(--spring), box-shadow 0.3s var(--spring), background-color 0.2s;
  will-change: transform;
}

.btn:active {
  transform: scale(0.96);
}

.btn-primary {
  background: var(--accent-primary);
  color: #fff;
  box-shadow: 0 4px 15px rgba(99, 102, 241, 0.25);
}

.btn-primary:hover {
  background: var(--accent-primary-hover);
  box-shadow: 0 8px 20px rgba(99, 102, 241, 0.35);
  transform: translateY(-2px);
}

.btn-secondary {
  background: var(--bg-card);
  color: var(--text-main);
  border: 1px solid var(--border-light);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.02);
}

.btn-secondary:hover {
  border-color: rgba(99, 102, 241, 0.3);
  transform: translateY(-2px);
}

.btn-disabled {
  opacity: 0.5;
  cursor: not-allowed;
  pointer-events: none;
}

/* Atoms: Inputs */
.input-group {
  display: flex;
  position: relative;
  width: 100%;
}

.input-field {
  width: 100%;
  padding: 1rem 1.5rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-light);
  background: var(--bg-card);
  font-family: inherit;
  font-size: 1rem;
  color: var(--text-main);
  transition: var(--transition-smooth);
}

.input-field:focus {
  outline: none;
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 4px var(--pastel-blue);
}

/* Atoms: Tags & Badges */
.tag {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.tag-blue { background: var(--pastel-blue); color: var(--accent-primary); }
.tag-green { background: var(--pastel-green); color: var(--accent-secondary); }

/* Molecules: Cards (Double-Bezel Soft UI) */
.card-shell {
  background: rgba(255, 255, 255, 0.5);
  padding: 0.75rem;
  border-radius: var(--radius-xl);
  border: 1px solid rgba(255, 255, 255, 0.8);
  box-shadow: var(--shadow-diffuse);
  backdrop-filter: blur(10px);
}

.card-core {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  padding: 2rem;
  border: 1px solid rgba(0, 0, 0, 0.02);
  transition: var(--transition-smooth);
}

.card-core:hover {
  box-shadow: var(--shadow-hover);
  transform: translateY(-4px);
}

/* Utilities */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.flex-center { display: flex; align-items: center; justify-content: center; }
.flex-between { display: flex; align-items: center; justify-content: space-between; }
.gap-2 { gap: 0.5rem; }
.gap-4 { gap: 1rem; }
.gap-6 { gap: 1.5rem; }

.text-center { text-align: center; }
.mt-4 { margin-top: 1rem; }
.mt-8 { margin-top: 2rem; }
.mb-4 { margin-bottom: 1rem; }
.mb-8 { margin-bottom: 2rem; }
