/* ============================================================
   PERLYN-IT | main.css
   Global Styles — All pages inherit from this file
   ============================================================ */

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

/* ── CSS Custom Properties ── */
:root {
  /* Backgrounds */
  --bg-primary:    #0A0F1E;
  --bg-secondary:  #0D1B2A;
  --bg-card:       #111927;
  --bg-card-hover: #162033;
  --bg-overlay:    rgba(10, 15, 30, 0.85);

  /* Accents */
  --accent-teal:   #0D7377;
  --accent-teal-light: #14A5AB;
  --accent-cyan:   #00B4D8;
  --accent-gold:   #C9A84C;
  --accent-gold-light: #E0BF6F;

  /* Text */
  --text-primary:   #F0F4F8;
  --text-secondary: #9BAFCA;
  --text-muted:     #5E7491;
  --text-inverse:   #0A0F1E;

  /* Borders */
  --border-subtle:  rgba(155, 175, 202, 0.10);
  --border-card:    rgba(155, 175, 202, 0.12);
  --border-accent:  rgba(13, 115, 119, 0.40);

  /* Gradients */
  --gradient-hero:     linear-gradient(135deg, #0A0F1E 0%, #0D1B2A 50%, #0A1628 100%);
  --gradient-teal:     linear-gradient(135deg, #0D7377 0%, #14A5AB 100%);
  --gradient-gold:     linear-gradient(135deg, #C9A84C 0%, #E0BF6F 100%);
  --gradient-card:     linear-gradient(145deg, #111927 0%, #0D1B2A 100%);
  --gradient-glow-teal: radial-gradient(ellipse at center, rgba(13, 115, 119, 0.18) 0%, transparent 70%);
  --gradient-glow-cyan: radial-gradient(ellipse at center, rgba(0, 180, 216, 0.12) 0%, transparent 70%);

  /* Typography */
  --font-heading: 'Sora', sans-serif;
  --font-body:    'Inter', sans-serif;

  /* 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;
  --space-5xl:  8rem;

  /* Radius */
  --radius-sm:  6px;
  --radius-md:  12px;
  --radius-lg:  18px;
  --radius-xl:  24px;
  --radius-full: 9999px;

  /* Shadows */
  --shadow-card:    0 4px 24px rgba(0, 0, 0, 0.35);
  --shadow-card-hover: 0 8px 40px rgba(0, 0, 0, 0.50);
  --shadow-teal:    0 0 40px rgba(13, 115, 119, 0.22);
  --shadow-gold:    0 0 40px rgba(201, 168, 76, 0.18);
  --shadow-nav:     0 2px 32px rgba(0, 0, 0, 0.60);

  /* Transitions */
  --transition-fast:   0.15s ease;
  --transition-base:   0.25s ease;
  --transition-slow:   0.40s ease;

  /* Layout */
  --container-max:  1280px;
  --container-pad:  clamp(1.25rem, 5vw, 2.5rem);
  --nav-height:     76px;
  --section-pad:    clamp(3rem, 7vw, 6rem);
}

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

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

body {
  background-color: var(--bg-primary);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 400;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

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

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

ul, ol {
  list-style: none;
}

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

/* ── Typography ── */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: 1.2;
  color: var(--text-primary);
  letter-spacing: -0.02em;
}

h1 { font-size: clamp(2.25rem, 5vw, 3.75rem); }
h2 { font-size: clamp(1.75rem, 3.5vw, 2.75rem); }
h3 { font-size: clamp(1.25rem, 2.5vw, 1.75rem); }
h4 { font-size: clamp(1.1rem, 2vw, 1.35rem); }
h5 { font-size: 1.1rem; }
h6 { font-size: 1rem; }

p {
  color: var(--text-secondary);
  line-height: 1.75;
}

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

/* ── Layout Utilities ── */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: var(--container-pad);
}

.section {
  padding-block: var(--section-pad);
}

.section--alt {
  background-color: var(--bg-secondary);
}

/* ── Flex & Grid Utilities ── */
.flex         { display: flex; }
.flex-center  { display: flex; align-items: center; justify-content: center; }
.flex-between { display: flex; align-items: center; justify-content: space-between; }
.flex-col     { display: flex; flex-direction: column; }
.flex-wrap    { flex-wrap: wrap; }
.gap-sm  { gap: var(--space-sm); }
.gap-md  { gap: var(--space-md); }
.gap-lg  { gap: var(--space-lg); }
.gap-xl  { gap: var(--space-xl); }
.gap-2xl { gap: var(--space-2xl); }

.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); }
.grid-auto-fit  { grid-template-columns: repeat(auto-fit, minmax(min(280px, 100%), 1fr)); }

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

.text-primary   { color: var(--text-primary); }
.text-secondary { color: var(--text-secondary); }
.text-muted     { color: var(--text-muted); }
.text-teal      { color: var(--accent-teal-light); }
.text-cyan      { color: var(--accent-cyan); }
.text-gold      { color: var(--accent-gold); }

.font-heading   { font-family: var(--font-heading); }
.font-bold      { font-weight: 700; }
.font-semibold  { font-weight: 600; }
.font-medium    { font-weight: 500; }

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

.gradient-text-gold {
  background: var(--gradient-gold);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.gradient-text-cyan {
  background: linear-gradient(135deg, var(--accent-cyan) 0%, var(--accent-teal-light) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ── Section Header ── */
.section-header {
  margin-bottom: var(--space-3xl);
}

.section-header.text-center {
  max-width: 640px;
  margin-inline: auto;
  margin-bottom: var(--space-3xl);
}

.section-label {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  font-family: var(--font-heading);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent-teal-light);
  margin-bottom: var(--space-md);
}

.section-label::before {
  content: '';
  display: block;
  width: 28px;
  height: 2px;
  background: var(--gradient-teal);
  border-radius: 2px;
}

.section-title {
  margin-bottom: var(--space-md);
}

.section-subtitle {
  font-size: 1.0625rem;
  color: var(--text-secondary);
  line-height: 1.75;
}

/* ── Divider ── */
.divider {
  width: 60px;
  height: 3px;
  background: var(--gradient-teal);
  border-radius: 3px;
  margin-block: var(--space-lg);
}

.divider--center {
  margin-inline: auto;
}

.divider--gold {
  background: var(--gradient-gold);
}

/* ── Visibility ── */
.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;
}

/* ── Spacing Utilities ── */
.mt-sm  { margin-top: var(--space-sm); }
.mt-md  { margin-top: var(--space-md); }
.mt-lg  { margin-top: var(--space-lg); }
.mt-xl  { margin-top: var(--space-xl); }
.mt-2xl { margin-top: var(--space-2xl); }
.mt-3xl { margin-top: var(--space-3xl); }
.mb-sm  { margin-bottom: var(--space-sm); }
.mb-md  { margin-bottom: var(--space-md); }
.mb-lg  { margin-bottom: var(--space-lg); }
.mb-xl  { margin-bottom: var(--space-xl); }
.mb-2xl { margin-bottom: var(--space-2xl); }
.mb-3xl { margin-bottom: var(--space-3xl); }

/* ── Responsive Breakpoints ── */
/* Mobile-first. Add layout changes at these widths: */
/* sm:  640px  */
/* md:  768px  */
/* lg:  1024px */
/* xl:  1280px */

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

@media (max-width: 768px) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .section-header.text-center { margin-bottom: var(--space-2xl); }
}
