/* ============================================
   SINGHAL ENTERPRISES — Design System
   main.css — Tokens, Reset, Typography, Utilities
   ============================================ */

/* --- Google Fonts --- */
/* Fraunces — editorial serif w/ authority (display) · Hanken Grotesk — humanist body · JetBrains Mono — technical labels */
@import url('https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght@9..144,400;9..144,500;9..144,600;9..144,700;9..144,900&family=Hanken+Grotesk:wght@400;500;600;700;800&family=JetBrains+Mono:wght@400;500;600&display=swap');

/* --- Design Tokens --- */
:root {
  /* Brand Colors — cobalt + signal-orange, drawn from the rope-access logo */
  --ink:         #05091A;
  --navy:        #0B1B3E;
  --navy-light:  #13285A;
  --navy-dark:   #060F22;
  --cobalt:      #2F57D6;
  --cobalt-glow: #3B6BF5;
  --steel:       #2C7DB0;
  --steel-light: #3E9BD0;
  --steel-dark:  #1A5A82;
  --orange:      #F26A1B;
  --orange-light:#FF8A3D;
  --orange-dark: #C8530F;
  --amber:       #E8951F;
  --ice:         #F3F5FB;
  --ice-dark:    #E6EAF3;
  --paper:       #FCFCFE;
  --charcoal:    #14161D;
  --white:       #FFFFFF;
  --gray-100:    #F6F7FB;
  --gray-200:    #E7EAF1;
  --gray-300:    #CDD3DF;
  --gray-400:    #969DAD;
  --gray-500:    #656C7C;
  --gray-600:    #444B5A;

  /* Glassmorphism */
  --glass:        rgba(255, 255, 255, 0.05);
  --glass-border: rgba(255, 255, 255, 0.10);
  --glass-light:  rgba(255, 255, 255, 0.12);
  --glass-hover:  rgba(255, 255, 255, 0.15);

  /* Gradients */
  --grad-navy:    linear-gradient(135deg, #0B1B3E 0%, #13285A 50%, #1B3B7A 100%);
  --grad-hero:    linear-gradient(155deg, #05091A 0%, #0B1B3E 45%, #10245A 100%);
  --grad-steel:   linear-gradient(135deg, #1A5A82 0%, #2C7DB0 100%);
  --grad-orange:  linear-gradient(120deg, #FF8A3D 0%, #F26A1B 55%, #C8530F 100%);
  --grad-card:    linear-gradient(180deg, rgba(5,9,26,0) 0%, rgba(5,9,26,0.9) 100%);

  /* Typography */
  --font-display: 'Fraunces', Georgia, 'Times New Roman', serif;
  --font-body:    'Hanken Grotesk', system-ui, sans-serif;
  --font-accent:  'Hanken Grotesk', system-ui, sans-serif;
  --font-mono:    'JetBrains Mono', ui-monospace, 'SF Mono', monospace;

  /* Font Sizes (fluid) */
  --text-xs:    clamp(0.694rem, 0.05vw + 0.68rem, 0.75rem);
  --text-sm:    clamp(0.833rem, 0.1vw + 0.8rem, 0.875rem);
  --text-base:  clamp(0.938rem, 0.15vw + 0.9rem, 1rem);
  --text-lg:    clamp(1.063rem, 0.2vw + 1rem, 1.125rem);
  --text-xl:    clamp(1.188rem, 0.3vw + 1.1rem, 1.25rem);
  --text-2xl:   clamp(1.375rem, 0.5vw + 1.25rem, 1.5rem);
  --text-3xl:   clamp(1.625rem, 0.8vw + 1.4rem, 1.875rem);
  --text-4xl:   clamp(2rem, 1.2vw + 1.6rem, 2.25rem);
  --text-5xl:   clamp(2.5rem, 2vw + 1.8rem, 3rem);
  --text-6xl:   clamp(3rem, 3vw + 2rem, 3.75rem);
  --text-hero:  clamp(3.5rem, 4vw + 2rem, 5rem);

  /* Spacing */
  --space-1:  0.25rem;
  --space-2:  0.5rem;
  --space-3:  0.75rem;
  --space-4:  1rem;
  --space-5:  1.25rem;
  --space-6:  1.5rem;
  --space-8:  2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;
  --space-16: 4rem;
  --space-20: 5rem;
  --space-24: 6rem;
  --space-32: 8rem;

  /* Borders */
  --radius-sm:  0.375rem;
  --radius-md:  0.5rem;
  --radius-lg:  0.75rem;
  --radius-xl:  1rem;
  --radius-2xl: 1.5rem;
  --radius-full: 9999px;

  /* Shadows */
  --shadow-sm:   0 1px 2px rgba(0,0,0,0.05);
  --shadow-md:   0 4px 6px -1px rgba(0,0,0,0.1), 0 2px 4px -2px rgba(0,0,0,0.1);
  --shadow-lg:   0 10px 15px -3px rgba(0,0,0,0.1), 0 4px 6px -4px rgba(0,0,0,0.1);
  --shadow-xl:   0 20px 25px -5px rgba(0,0,0,0.1), 0 8px 10px -6px rgba(0,0,0,0.1);
  --shadow-glow: 0 0 40px rgba(47,87,214,0.28);
  --shadow-orange: 0 0 40px rgba(242,106,27,0.30);
  --shadow-lift: 0 24px 60px -20px rgba(5,9,26,0.35);

  /* Transitions */
  --ease-out:    cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --duration-fast: 200ms;
  --duration-base: 350ms;
  --duration-slow: 500ms;

  /* Z-index */
  --z-behind:  -1;
  --z-default: 1;
  --z-sticky:  100;
  --z-nav:     1000;
  --z-modal:   2000;
  --z-toast:   3000;

  /* Layout */
  --container-max: 1280px;
  --container-wide: 1440px;
  --nav-height: 98px;
}

/* --- CSS 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);
  line-height: 1.7;
  color: var(--charcoal);
  background-color: var(--white);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

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

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

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

ul, ol {
  list-style: none;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: -0.015em;
  color: var(--charcoal);
  font-optical-sizing: auto;
}

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

/* --- Typography Scale --- */
.text-xs    { font-size: var(--text-xs); }
.text-sm    { font-size: var(--text-sm); }
.text-base  { font-size: var(--text-base); }
.text-lg    { font-size: var(--text-lg); }
.text-xl    { font-size: var(--text-xl); }
.text-2xl   { font-size: var(--text-2xl); }
.text-3xl   { font-size: var(--text-3xl); }
.text-4xl   { font-size: var(--text-4xl); }
.text-5xl   { font-size: var(--text-5xl); }
.text-6xl   { font-size: var(--text-6xl); }
.text-hero  { font-size: var(--text-hero); }

.font-display { font-family: var(--font-display); }
.font-body    { font-family: var(--font-body); }
.font-accent  { font-family: var(--font-accent); }

.font-light    { font-weight: 300; }
.font-regular  { font-weight: 400; }
.font-medium   { font-weight: 500; }
.font-semibold { font-weight: 600; }
.font-bold     { font-weight: 700; }
.font-extrabold{ font-weight: 800; }
.font-black    { font-weight: 900; }

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

.container-wide {
  max-width: var(--container-wide);
  margin: 0 auto;
  padding: 0 var(--space-6);
}

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

.section-sm {
  padding: var(--space-16) 0;
}

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

/* --- 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; }
.items-end   { align-items: flex-end; }
.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); }
.gap-10 { gap: var(--space-10); }
.gap-12 { gap: var(--space-12); }

/* --- 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); }

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

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

/* --- Text Utilities --- */
.text-center { text-align: center; }
.text-left   { text-align: left; }
.text-right  { text-align: right; }
.uppercase   { text-transform: uppercase; }
.tracking-wide   { letter-spacing: 0.05em; }
.tracking-wider  { letter-spacing: 0.1em; }
.tracking-widest { letter-spacing: 0.2em; }
.leading-tight   { line-height: 1.2; }
.leading-snug    { line-height: 1.4; }
.leading-relaxed { line-height: 1.8; }

/* --- Color Utilities --- */
.text-navy    { color: var(--navy); }
.text-steel   { color: var(--steel); }
.text-orange  { color: var(--orange); }
.text-white   { color: var(--white); }
.text-gray    { color: var(--gray-500); }
.text-charcoal{ color: var(--charcoal); }

.bg-navy  { background-color: var(--navy); }
.bg-steel { background-color: var(--steel); }
.bg-orange{ background-color: var(--orange); }
.bg-ice   { background-color: var(--ice); }
.bg-white { background-color: var(--white); }
.bg-charcoal { background-color: var(--charcoal); }

/* --- Section Headers --- */
.section-label {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.22em;
  color: var(--orange-dark);
  margin-bottom: var(--space-5);
  display: inline-flex;
  align-items: center;
  gap: var(--space-3);
}

.section-label::before {
  content: '';
  display: inline-block;
  width: 28px;
  height: 1px;
  background: var(--orange);
}

.section-label.light {
  color: var(--orange-light);
}

.section-label.light::before {
  background: var(--orange-light);
}

.section-title {
  font-family: var(--font-display);
  font-size: var(--text-5xl);
  font-weight: 500;
  line-height: 1.04;
  letter-spacing: -0.02em;
  margin-bottom: var(--space-6);
}

.section-title.light {
  color: var(--white);
}

.section-title em {
  font-style: italic;
  font-weight: 400;
  color: var(--orange);
}

.section-subtitle {
  font-size: var(--text-lg);
  color: var(--gray-500);
  max-width: 620px;
  line-height: 1.7;
}

.section-subtitle.light {
  color: rgba(255, 255, 255, 0.62);
}

/* --- Accent Underline --- */
.accent-underline {
  position: relative;
  display: inline-block;
}

.accent-underline::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 100%;
  height: 4px;
  background: var(--grad-orange);
  border-radius: 2px;
}

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

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

::-webkit-scrollbar-thumb {
  background: var(--gray-300);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--gray-400);
}

/* --- Selection --- */
::selection {
  background: var(--orange);
  color: var(--white);
}

/* --- Mono eyebrow / technical label --- */
.mono-label {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gray-400);
}

/* --- Hairline rule --- */
.rule {
  height: 1px;
  width: 100%;
  background: var(--gray-200);
  border: 0;
}
.rule-light { background: rgba(255,255,255,0.10); }
