/* ============================================================
   TECHNOOCEAN DESIGN SYSTEM — CSS Custom Properties & Reset
   ============================================================ */

/* ----------------------------------------------------------
   1. CSS Reset / Normalize
   ---------------------------------------------------------- */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  -moz-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  min-height: 100vh;
  line-height: 1.6;
  text-rendering: optimizeLegibility;
}

img,
picture,
video,
canvas,
svg {
  display: block;
  max-width: 100%;
}

input,
button,
textarea,
select {
  font: inherit;
  color: inherit;
}

button {
  cursor: pointer;
  border: none;
  background: none;
}

a {
  color: inherit;
  text-decoration: none;
}

ul,
ol {
  list-style: none;
}

table {
  border-collapse: collapse;
  border-spacing: 0;
}

h1, h2, h3, h4, h5, h6 {
  overflow-wrap: break-word;
  line-height: 1.2;
}

p {
  overflow-wrap: break-word;
}

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

::selection {
  background: var(--color-primary);
  color: #fff;
}

/* ----------------------------------------------------------
   2. Custom Properties — Color Palette
   ---------------------------------------------------------- */
:root {
  /* Brand Colors */
  --color-primary: #2563eb;
  --color-primary-light: #3b82f6;
  --color-primary-dark: #1d4ed8;
  --color-primary-rgb: 37, 99, 235;

  --color-secondary: #ff6b35;
  --color-secondary-light: #ff8a5c;
  --color-secondary-dark: #e55a2b;
  --color-secondary-rgb: 255, 107, 53;

  --color-success: #10b981;
  --color-success-light: #34d399;
  --color-success-dark: #059669;
  --color-success-rgb: 16, 185, 129;

  --color-warning: #f59e0b;
  --color-warning-light: #fbbf24;
  --color-warning-dark: #d97706;
  --color-warning-rgb: 245, 158, 11;

  --color-danger: #ef4444;
  --color-danger-light: #f87171;
  --color-danger-dark: #dc2626;
  --color-danger-rgb: 239, 68, 68;

  /* Neutral Colors */
  --color-text: #1e293b;
  --color-text-light: #64748b;
  --color-text-muted: #94a3b8;
  --color-text-inverse: #ffffff;

  --color-bg: #ffffff;
  --color-bg-alt: #f8fafc;
  --color-bg-dark: #0f172a;
  --color-bg-darker: #020617;

  --color-border: #e2e8f0;
  --color-border-light: #f1f5f9;

  /* ----------------------------------------------------------
     3. Typography
     ---------------------------------------------------------- */
  --font-heading: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono: 'Fira Code', 'Cascadia Code', 'JetBrains Mono', monospace;

  /* Type Scale */
  --text-xs: 0.75rem;
  --text-sm: 0.875rem;
  --text-base: 1rem;
  --text-lg: 1.125rem;
  --text-xl: 1.25rem;
  --text-2xl: 1.5rem;
  --text-3xl: 1.875rem;
  --text-4xl: 2.25rem;

  @media (min-width: 768px) {
    --text-3xl: 2.25rem;
    --text-4xl: 3rem;
  }

  @media (min-width: 992px) {
    --text-4xl: 3.5rem;
  }

  /* Font Weights */
  --fw-regular: 400;
  --fw-medium: 500;
  --fw-semibold: 600;
  --fw-bold: 700;
  --fw-extrabold: 800;

  /* ----------------------------------------------------------
     4. Spacing Scale
     ---------------------------------------------------------- */
  --space-xs: 0.25rem;
  --space-sm: 0.5rem;
  --space-md: 1rem;
  --space-lg: 1.5rem;
  --space-xl: 2rem;
  --space-2xl: 3rem;
  --space-3xl: 4rem;
  --space-4xl: 6rem;

  /* ----------------------------------------------------------
     5. Border Radius
     ---------------------------------------------------------- */
  --radius-sm: 0.25rem;
  --radius-md: 0.5rem;
  --radius-lg: 0.75rem;
  --radius-xl: 1rem;
  --radius-2xl: 1.5rem;
  --radius-full: 9999px;

  /* ----------------------------------------------------------
     6. Shadows
     ---------------------------------------------------------- */
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
  --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
  --shadow-2xl: 0 25px 50px -12px rgb(0 0 0 / 0.25);

  --shadow-glow-primary: 0 0 20px rgb(var(--color-primary-rgb) / 0.3);
  --shadow-glow-secondary: 0 0 20px rgb(var(--color-secondary-rgb) / 0.3);
  --shadow-glow-success: 0 0 20px rgb(var(--color-success-rgb) / 0.3);
  --shadow-glow-danger: 0 0 20px rgb(var(--color-danger-rgb) / 0.3);

  /* ----------------------------------------------------------
     7. Transitions
     ---------------------------------------------------------- */
  --transition-fast: 150ms ease;
  --transition-base: 300ms ease;
  --transition-slow: 500ms ease;
  --transition-spring: 500ms cubic-bezier(0.34, 1.56, 0.64, 1);

  /* ----------------------------------------------------------
     8. Z-Index Scale
     ---------------------------------------------------------- */
  --z-dropdown: 1000;
  --z-sticky: 1020;
  --z-fixed: 1030;
  --z-modal-backdrop: 1040;
  --z-modal: 1050;
  --z-popover: 1060;
  --z-tooltip: 1070;
  --z-toast: 1080;

  /* ----------------------------------------------------------
     9. Layout
     ---------------------------------------------------------- */
  --container-sm: 540px;
  --container-md: 720px;
  --container-lg: 960px;
  --container-xl: 1140px;
  --container-2xl: 1320px;

  --navbar-height: 4.5rem;
}

/* ----------------------------------------------------------
   10. Base Typography
   ---------------------------------------------------------- */
body {
  font-family: var(--font-body);
  font-size: var(--text-base);
  font-weight: var(--fw-regular);
  color: var(--color-text);
  background-color: var(--color-bg);
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: var(--fw-bold);
  color: var(--color-text);
  margin-bottom: 0.5em;
}

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

p {
  margin-bottom: var(--space-md);
  color: var(--color-text-light);
}

small {
  font-size: var(--text-sm);
}

strong, b {
  font-weight: var(--fw-semibold);
}

code {
  font-family: var(--font-mono);
  font-size: 0.9em;
  padding: 0.15em 0.4em;
  background: var(--color-bg-alt);
  border-radius: var(--radius-sm);
  border: 1px solid var(--color-border);
}

hr {
  border: none;
  height: 1px;
  background: var(--color-border);
  margin: var(--space-xl) 0;
}

/* ----------------------------------------------------------
   11. Base Form Resets
   ---------------------------------------------------------- */
input,
textarea,
select {
  width: 100%;
  padding: 0.625rem 0.875rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-bg);
  font-size: var(--text-base);
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

input:focus,
textarea:focus,
select:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgb(var(--color-primary-rgb) / 0.15);
}
