/* global.css — CopoSys — Light + Dark Theme */

/* ── Light Mode (default) ─────────────────────────────────────────────────── */
:root {
  --color-primary:       #ea580c;  /* orange-600 */
  --color-primary-hover: #f97316;  /* orange-500 */
  --color-primary-dark:  #c2410c;  /* orange-700 */

  --color-bg:            #fafafa;  /* neutral-50  */
  --color-bg-secondary:  #f5f5f5;  /* neutral-100 */
  --color-bg-white:      #ffffff;
  --color-surface:       #ffffff;

  --color-text:          #0a0a0a;  /* neutral-900 */
  --color-text-light:    #525252;  /* neutral-600 */
  --color-text-muted:    #a3a3a3;  /* neutral-400 */

  --color-border:        #d4d4d4;  /* neutral-300 */

  --color-header-bg:     rgba(255, 255, 255, 0.92);

  --color-footer-bg:      #171717;
  --color-footer-heading: #ffffff;
  --color-footer-muted:   #a3a3a3;
  --color-footer-border:  #262626;

  --color-success: #22c55e;
  --color-danger:  #ef4444;
  --color-warning: #f97316;

  --shadow-sm: 0 1px 2px 0 rgba(0,0,0,0.05);
  --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.10);
  --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.10);
  --shadow-xl: 0 20px 25px -5px rgba(0,0,0,0.10);

  --radius-sm:   0.25rem;
  --radius-md:   0.5rem;
  --radius-lg:   1rem;
  --radius-full: 9999px;

  --transition: all 0.2s ease-in-out;
}

/* ── Dark Mode ────────────────────────────────────────────────────────────── */
[data-theme="dark"] {
  --color-primary:       #f97316;  /* orange-500 */
  --color-primary-hover: #fb923c;  /* orange-400 */
  --color-primary-dark:  #c2410c;  /* orange-700 */

  --color-bg:            #0a0a0a;  /* neutral-950 */
  --color-bg-secondary:  #171717;  /* neutral-900 */
  --color-bg-white:      #171717;
  --color-surface:       #171717;

  --color-text:          #ffffff;
  --color-text-light:    #a3a3a3;  /* neutral-400 */
  --color-text-muted:    #737373;  /* neutral-500 */

  --color-border:        #262626;  /* neutral-800 */

  --color-header-bg:     rgba(10, 10, 10, 0.92);

  --color-footer-bg:      #0a0a0a;
  --color-footer-heading: #ffffff;
  --color-footer-muted:   #737373;
  --color-footer-border:  #262626;

  --color-success: #4ade80;
  --color-danger:  #f87171;
  --color-warning: #fb923c;

  --shadow-sm: 0 1px 2px 0 rgba(0,0,0,0.40);
  --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.50);
  --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.50);
  --shadow-xl: 0 20px 25px -5px rgba(0,0,0,0.50);
}

/* ── Smooth theme transition ──────────────────────────────────────────────── */
.theme-transitioning *,
.theme-transitioning *::before,
.theme-transitioning *::after {
  transition:
    background-color 0.25s ease,
    color 0.25s ease,
    border-color 0.25s ease,
    box-shadow 0.25s ease !important;
}

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

html {
  font-family: 'Segoe UI', system-ui, -apple-system, BlinkMacSystemFont, Roboto, sans-serif;
  font-size: 16px;
  line-height: 1.5;
  color: var(--color-text);
  background-color: var(--color-bg);
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ── Typography ───────────────────────────────────────────────────────────── */
h1, h2, h3, h4, h5, h6 {
  font-weight: 600;
  line-height: 1.2;
  margin-bottom: 1rem;
  color: var(--color-text);
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.25rem; }

p { margin-bottom: 1rem; }

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

a:hover { color: var(--color-primary-hover); }

img { max-width: 100%; height: auto; }

button {
  cursor: pointer;
  font-family: inherit;
  font-size: inherit;
  border: none;
  outline: none;
  transition: var(--transition);
}

input, textarea, select {
  font-family: inherit;
  font-size: inherit;
  outline: none;
}

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

/* ── Buttons ──────────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.5rem;
  font-weight: 500;
  border-radius: var(--radius-md);
  transition: var(--transition);
}

.btn-primary {
  background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-dark) 100%);
  color: white;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
  color: white;
}

.btn-secondary {
  background-color: var(--color-surface);
  color: var(--color-text);
  border: 1px solid var(--color-border);
}

.btn-secondary:hover {
  background-color: var(--color-bg-secondary);
  color: var(--color-text);
}

.btn-xl {
  padding: 1rem 2.5rem;
  font-size: 1.125rem;
  font-weight: 600;
}

.btn-ghost {
  background: transparent;
  color: var(--color-text);
  border: 1.5px solid var(--color-border);
}

.btn-ghost:hover {
  background: var(--color-bg-secondary);
  border-color: var(--color-primary);
  color: var(--color-primary);
}

/* ── Animations ───────────────────────────────────────────────────────────── */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(28px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

.animate-fadeup {
  animation: fadeInUp 0.65s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.animate-fadein {
  animation: fadeIn 0.8s ease both;
  animation-delay: 0.2s;
}

.animate-on-scroll {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.55s ease, transform 0.55s ease;
}

.animate-on-scroll.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ── Utilities ────────────────────────────────────────────────────────────── */
.text-center { text-align: center; }
.text-left   { text-align: left; }
.text-right  { text-align: right; }

.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }

.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }

.hidden { display: none; }
.block  { display: block; }
.flex   { display: flex; }
.grid   { display: grid; }
