/**
 * FKI Traders Sdn. Bhd. - Base CSS
 * Reset, typography, accessibility skip-link, container, grid, light section utilities
 */

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

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

/* Custom Scrollbar */
html {
  scrollbar-width: thin;
  scrollbar-color: var(--brand-blue-2) var(--bg-1);
}

::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

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

::-webkit-scrollbar-thumb {
  background-color: var(--brand-blue-2);
  border-radius: var(--radius-full);
  border: 2px solid var(--bg-1);
}

::-webkit-scrollbar-thumb:hover {
  background-color: var(--brand-blue);
}

/* Text Selection */
::selection {
  background: rgba(212, 175, 55, 0.35);
  color: var(--charcoal);
}

body {
  font-family: var(--font-body);
  font-size: var(--text-body);
  line-height: var(--lh-body);
  color: var(--text-700);
  background-color: var(--bg-0);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

main {
  flex: 1 0 auto;
}

/* Accessibility: Skip to Content */
.skip-link {
  position: absolute;
  top: -100px;
  left: 1rem;
  background: var(--charcoal);
  color: var(--white);
  padding: 0.75rem 1.5rem;
  z-index: 9999;
  border-radius: var(--radius-sm);
  font-weight: 600;
  text-decoration: none;
  transition: top 0.2s ease;
  border: 2px solid var(--brand-gold);
}

.skip-link:focus {
  top: 1rem;
}

/* Screen reader only utility */
.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;
}

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

h1 {
  font-size: var(--text-h1);
  line-height: var(--lh-h1);
  font-weight: 800;
  letter-spacing: -0.02em;
}

h2 {
  font-size: var(--text-h2);
  line-height: var(--lh-h2);
  letter-spacing: -0.015em;
}

h3 {
  font-size: var(--text-h3);
  line-height: var(--lh-h3);
}

p {
  margin-bottom: 1.25rem;
  max-width: 68ch;
  color: var(--text-700);
}

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

.lead {
  font-size: 1.15rem;
  line-height: 1.65;
  color: var(--text-500);
}

/* Eyebrow Label */
.eyebrow {
  display: inline-block;
  font-family: var(--font-heading);
  font-size: var(--text-eyebrow);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--gold-text);
  margin-bottom: 0.75rem;
}

.eyebrow--gold {
  color: var(--gold-text);
}

.eyebrow--blue {
  color: var(--brand-blue-2);
}

/* Signature Motif: Gold line with centered diamond */
.signature-divider {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 12px;
  margin: 1rem 0 1.75rem;
}

.signature-divider--center {
  justify-content: center;
}

.signature-divider__line {
  height: 2px;
  width: 60px;
  background: var(--grad-gold);
  border-radius: 2px;
}

.signature-divider__diamond {
  width: 9px;
  height: 9px;
  background-color: var(--brand-gold);
  transform: rotate(45deg);
}

/* Links */
a {
  color: var(--brand-blue-2);
  text-decoration: none;
  transition: color var(--transition-fast);
}

a:hover {
  color: var(--brand-blue);
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: none;
  box-shadow: var(--focus-ring);
}

/* Container & Layout Utilities */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin-left: auto;
  margin-right: auto;
  padding-left: var(--container-pad);
  padding-right: var(--container-pad);
}

.section {
  padding-top: var(--section-pad-y);
  padding-bottom: var(--section-pad-y);
  position: relative;
  background-color: var(--bg-0);
}

/* Section Background Progression */
.section--bg-0 {
  background-color: var(--bg-0);
}

.section--bg-1,
.section--ice,
.section--light {
  background-color: var(--bg-1);
}

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

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

/* Safe overrides for any legacy dark section classes to preserve light theme */
.section--navy,
.section--dark {
  background: var(--bg-1);
  color: var(--text-700);
}

.section--navy h1,
.section--navy h2,
.section--navy h3,
.section--dark h1,
.section--dark h2,
.section--dark h3 {
  color: var(--text-900);
}

.section--navy p,
.section--dark p {
  color: var(--text-700);
}

/* Section Header text blocks */
.section-header {
  margin-bottom: 3.5rem;
}

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

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

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

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

/* Unstyled List */
.list-unstyled {
  list-style: none;
  padding: 0;
  margin: 0;
}
