/* ============================================
   IT SUMON — Base Styles
   Reset, Typography, Utilities
   ============================================ */

/* ── Google Fonts Import ── */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Outfit:wght@400;500;600;700;800&family=JetBrains+Mono:wght@400;500&display=swap');

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  font-size: 16px;
}

body {
  font-family: var(--font-body);
  font-size: var(--text-base);
  font-weight: var(--font-normal);
  line-height: var(--leading-normal);
  color: var(--text-primary);
  background-color: var(--bg-primary);
  background-image: var(--gradient-dark);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

/* ── Scrollbar ── */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: var(--bg-primary);
}

::-webkit-scrollbar-thumb {
  background: var(--bg-tertiary);
  border-radius: var(--radius-full);
  border: 2px solid var(--bg-primary);
}

::-webkit-scrollbar-thumb:hover {
  background: var(--text-tertiary);
}

/* Firefox */
* {
  scrollbar-width: thin;
  scrollbar-color: var(--bg-tertiary) var(--bg-primary);
}

/* ── Selection ── */
::selection {
  background: rgba(14, 165, 233, 0.3);
  color: var(--text-primary);
}

/* ── Typography ── */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: var(--font-bold);
  line-height: var(--leading-tight);
  letter-spacing: var(--tracking-tight);
  color: var(--text-primary);
}

h1 {
  font-size: var(--text-5xl);
  font-weight: var(--font-extrabold);
}

h2 {
  font-size: var(--text-4xl);
}

h3 {
  font-size: var(--text-2xl);
}

h4 {
  font-size: var(--text-xl);
}

h5 {
  font-size: var(--text-lg);
}

h6 {
  font-size: var(--text-base);
  font-weight: var(--font-semibold);
}

p {
  color: var(--text-secondary);
  line-height: var(--leading-relaxed);
  margin-bottom: var(--space-4);
}

p:last-child {
  margin-bottom: 0;
}

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

strong {
  font-weight: var(--font-semibold);
  color: var(--text-primary);
}

/* ── Links ── */
a {
  color: var(--text-link);
  text-decoration: none;
  transition: color var(--transition-fast);
}

a:hover {
  color: var(--text-link-hover);
}

/* ── Lists ── */
ul, ol {
  list-style: none;
}

/* ── Images ── */
img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* ── Form Elements ── */
button, input, select, textarea {
  font-family: inherit;
  font-size: inherit;
  color: inherit;
  outline: none;
}

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

/* ── Tables ── */
table {
  border-collapse: collapse;
  width: 100%;
}

/* ── Horizontal Rule ── */
hr {
  border: none;
  height: 1px;
  background: var(--border-primary);
  margin: var(--space-8) 0;
}

/* ── Container ── */
.container {
  width: 100%;
  max-width: var(--container-xl);
  margin-left: auto;
  margin-right: auto;
  padding-left: var(--container-padding);
  padding-right: var(--container-padding);
}

.container-sm {
  max-width: var(--container-md);
}

.container-lg {
  max-width: var(--container-2xl);
}

/* ── Section Spacing ── */
.section {
  padding: var(--space-20) 0;
}

.section-lg {
  padding: var(--space-24) 0;
}

/* ── Utility Classes ── */

/* Screen reader only */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

/* Text gradient */
.text-gradient {
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Section heading */
.section-label {
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-weight: var(--font-semibold);
  text-transform: uppercase;
  letter-spacing: var(--tracking-widest);
  color: var(--color-primary);
  margin-bottom: var(--space-4);
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
}

.section-label::before {
  content: '';
  width: 24px;
  height: 2px;
  background: var(--gradient-primary);
  border-radius: var(--radius-full);
}

.section-title {
  font-size: var(--text-4xl);
  font-weight: var(--font-bold);
  margin-bottom: var(--space-4);
}

.section-subtitle {
  font-size: var(--text-lg);
  color: var(--text-secondary);
  max-width: 600px;
}

.section-header {
  margin-bottom: var(--space-12);
}

.section-header.center {
  text-align: center;
}

.section-header.center .section-subtitle {
  margin-left: auto;
  margin-right: auto;
}

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

/* Flex utilities */
.flex { display: flex; }
.flex-col { flex-direction: column; }
.flex-wrap { flex-wrap: wrap; }
.items-center { align-items: center; }
.items-start { align-items: flex-start; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.justify-end { justify-content: flex-end; }
.gap-1 { gap: var(--space-1); }
.gap-2 { gap: var(--space-2); }
.gap-3 { gap: var(--space-3); }
.gap-4 { gap: var(--space-4); }
.gap-6 { gap: var(--space-6); }
.gap-8 { gap: var(--space-8); }

/* Grid utilities */
.grid { display: grid; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

/* Visibility */
.hidden { display: none !important; }
.visible { display: block !important; }

/* Reveal animation placeholder */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.revealed {
  opacity: 1;
  transform: translateY(0);
}

/* ── Responsive Typography ── */
@media (max-width: 1024px) {
  h1 { font-size: var(--text-4xl); }
  h2 { font-size: var(--text-3xl); }
  h3 { font-size: var(--text-xl); }
  .section-title { font-size: var(--text-3xl); }
}

@media (max-width: 768px) {
  html { font-size: 15px; }
  h1 { font-size: var(--text-3xl); }
  h2 { font-size: var(--text-2xl); }
  h3 { font-size: var(--text-xl); }
  .section-title { font-size: var(--text-2xl); }
  
  .container {
    padding-left: var(--space-4);
    padding-right: var(--space-4);
  }
  
  .section { padding: var(--space-12) 0; }
  .section-lg { padding: var(--space-16) 0; }
  
  .grid-2, .grid-3, .grid-4 {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  html { font-size: 14px; }
}
