/* Main Styles - Direct Marketing Mastery School */

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

/* Reset & Base */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: 1.6;
  color: var(--text-primary);
  background: var(--bg-primary);
  min-height: 100vh;
}

/* Skip Link */
.skip-link {
  position: absolute;
  top: -40px;
  left: 0;
  background: var(--accent-primary);
  color: white;
  padding: 8px;
  text-decoration: none;
  z-index: 1000;
  border-radius: var(--radius-sm);
}

.skip-link:focus {
  top: 8px;
  left: 8px;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.2;
  margin-bottom: var(--space-4);
}

h1 { font-size: var(--text-3xl); }
h2 { font-size: var(--text-2xl); }
h3 { font-size: var(--text-xl); }
h4 { font-size: var(--text-lg); }

p {
  margin-bottom: var(--space-4);
}

a {
  color: var(--accent-primary);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

/* Layout */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--space-4);
}

.page-wrapper {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

main {
  flex: 1;
}

/* Neumorphic Cards */
.card {
  background: var(--bg-primary);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-light);
  padding: var(--space-6);
  transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}

.card:hover {
  transform: translateY(-2px);
}

.card--pressed {
  box-shadow: var(--shadow-inset);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-6);
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-weight: 600;
  text-decoration: none;
  border: none;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all var(--transition-fast);
  box-shadow: var(--shadow-light);
  min-height: 44px;
  min-width: 44px;
}

.btn:active {
  box-shadow: var(--shadow-pressed);
  transform: scale(0.98);
}

.btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.btn--primary {
  background: var(--accent-primary);
  color: white;
}

.btn--primary:hover {
  background: color-mix(in srgb, var(--accent-primary) 90%, black);
  text-decoration: none;
}

.btn--secondary {
  background: var(--accent-secondary);
  color: #1a202c;
}

.btn--secondary:hover {
  background: color-mix(in srgb, var(--accent-secondary) 90%, black);
  text-decoration: none;
}

.btn--outline {
  background: transparent;
  color: var(--text-primary);
  box-shadow: var(--shadow-light), inset 0 0 0 2px var(--accent-primary);
}

.btn--outline:hover {
  background: var(--accent-primary);
  color: white;
  text-decoration: none;
}

.btn--ghost {
  background: transparent;
  color: var(--text-secondary);
  box-shadow: none;
}

.btn--ghost:hover {
  color: var(--text-primary);
  text-decoration: none;
}

/* Forms */
.form-group {
  margin-bottom: var(--space-4);
}

label {
  display: block;
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: var(--space-2);
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
textarea,
select {
  width: 100%;
  padding: var(--space-3) var(--space-4);
  font-family: var(--font-body);
  font-size: var(--text-base);
  color: var(--text-primary);
  background: var(--bg-primary);
  border: none;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-inset);
  transition: box-shadow var(--transition-fast);
}

input:focus,
textarea:focus,
select:focus {
  outline: none;
  box-shadow: var(--shadow-inset), 0 0 0 2px var(--accent-primary);
}

input::placeholder,
textarea::placeholder {
  color: var(--text-muted);
}

/* Header */
.header {
  height: var(--header-height);
  background: var(--bg-primary);
  box-shadow: var(--shadow-light);
  position: sticky;
  top: 0;
  z-index: var(--z-sticky);
}

.header__inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--space-4);
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.header__logo {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: 700;
  color: var(--text-primary);
  text-decoration: none;
}

.header__logo:hover {
  text-decoration: none;
}

.header__nav {
  display: flex;
  align-items: center;
  gap: var(--space-6);
}

.header__nav a {
  color: var(--text-secondary);
  font-weight: 500;
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius-md);
  transition: all var(--transition-fast);
}

.header__nav a:hover,
.header__nav a.active {
  color: var(--text-primary);
  text-decoration: none;
  box-shadow: var(--shadow-pressed);
}

/* Utility Classes */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.mt-4 { margin-top: var(--space-4); }
.mt-6 { margin-top: var(--space-6); }
.mt-8 { margin-top: var(--space-8); }
.mb-4 { margin-bottom: var(--space-4); }
.mb-6 { margin-bottom: var(--space-6); }
.mb-8 { margin-bottom: var(--space-8); }

/* Grid */
.grid {
  display: grid;
  gap: var(--space-6);
}

.grid--2 { grid-template-columns: repeat(2, 1fr); }
.grid--3 { grid-template-columns: repeat(3, 1fr); }
.grid--4 { grid-template-columns: repeat(4, 1fr); }

@media (max-width: 768px) {
  .grid--2,
  .grid--3,
  .grid--4 {
    grid-template-columns: 1fr;
  }
}

/* Page Sections */
.section {
  padding: var(--space-16) 0;
}

.section__title {
  text-align: center;
  margin-bottom: var(--space-12);
}

/* Loading States */
.skeleton {
  background: linear-gradient(
    90deg,
    var(--bg-secondary) 25%,
    var(--bg-primary) 50%,
    var(--bg-secondary) 75%
  );
  background-size: 200% 100%;
  animation: skeleton-loading 1.5s ease-in-out infinite;
  border-radius: var(--radius-md);
}

@keyframes skeleton-loading {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* Error States */
.error-message {
  color: var(--accent-error);
  font-size: var(--text-sm);
  margin-top: var(--space-2);
}

/* Toast Notifications */
.toast {
  position: fixed;
  bottom: var(--space-6);
  right: var(--space-6);
  padding: var(--space-4) var(--space-6);
  background: var(--bg-primary);
  box-shadow: var(--shadow-light);
  border-radius: var(--radius-md);
  z-index: var(--z-toast);
  animation: toast-slide-in 0.3s ease;
}

@keyframes toast-slide-in {
  from {
    transform: translateY(100%);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.toast--success { border-left: 4px solid var(--accent-success); }
.toast--error { border-left: 4px solid var(--accent-error); }
.toast--warning { border-left: 4px solid var(--accent-warning); }

/* Theme Toggle */
.theme-toggle {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  background: var(--bg-primary);
  box-shadow: var(--shadow-light);
  border: none;
  transition: all var(--transition-fast);
}

.theme-toggle:hover {
  box-shadow: var(--shadow-pressed);
}

.theme-toggle svg {
  width: 20px;
  height: 20px;
  color: var(--text-secondary);
}

/* Footer */
.footer {
  background: var(--bg-secondary);
  padding: var(--space-12) 0;
  margin-top: auto;
}

.footer__inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--space-4);
  text-align: center;
  color: var(--text-muted);
}

/* Responsive */
@media (max-width: 768px) {
  :root {
    --header-height: 64px;
  }
  
  .header__nav {
    display: none; /* Mobile menu would be implemented separately */
  }
}
