/* =========================================================
   BRANDNEW LOOK — Base Styles
   Reset, typography, layout primitives, utilities
   ========================================================= */

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

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

body {
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: 1.65;
  color: var(--color-text-primary);
  background-color: var(--color-bg-page);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

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

img {
  height: auto;
}

a {
  color: var(--color-primary);
  text-decoration: none;
  transition: color var(--duration-fast) var(--ease-out);
}

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

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

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

ul, ol {
  list-style: none;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: var(--ink-900);
}

/* Section-dark heading overrides */
.section--dark h1,
.section--dark h2,
.section--dark h3,
.section--dark h4 {
  color: var(--white);
}

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

p {
  font-size: var(--text-base);
  line-height: 1.75;
  color: var(--color-text-primary);
}

p + p {
  margin-top: 1em;
}

strong { font-weight: 600; }

/* ── Accessibility ──────────────────────────────────────── */
.skip-link {
  position: absolute;
  top: -100px;
  left: var(--space-4);
  padding: var(--space-2) var(--space-4);
  background: var(--blue-500);
  color: var(--white);
  font-weight: 600;
  font-size: var(--text-sm);
  border-radius: var(--radius-sm);
  z-index: 9999;
  text-decoration: none;
  transition: top var(--duration-fast);
}

.skip-link:focus {
  top: var(--space-4);
}

:focus-visible {
  outline: none;
  box-shadow: var(--focus-ring);
  border-radius: var(--radius-sm);
}

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

.container--narrow {
  max-width: 860px;
}

.container--wide {
  max-width: 1600px;
}

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

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

.section--dark {
  background: var(--navy-900);
  color: var(--white);
}

.section--alt {
  background: var(--paper-100);
}

.section--blue {
  background: var(--gradient-blue);
  color: var(--white);
}

/* Grid */
.grid {
  display: grid;
  gap: var(--gutter);
}

.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

/* Responsive product/category grid (used on all product listing pages) */
.product-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--gutter);
}

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

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

/* Responsive two-column content layouts (info + sidebar, feature sections) */
.two-col-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: start;
}

.two-col-layout--center { align-items: center; }
.two-col-layout--feature { gap: clamp(3rem, 6vw, 5rem); align-items: center; }

.two-col-gutter {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--gutter);
}

.apply-grid {
  display: grid;
  grid-template-columns: 1fr 360px;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: start;
}

@media (max-width: 768px) {
  .two-col-layout,
  .two-col-gutter,
  .apply-grid { grid-template-columns: 1fr; }
}

/* Flex */
.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.items-start { align-items: flex-start; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.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); }

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

.text-white  { color: var(--white) !important; }
.text-gold   { color: var(--gold-500) !important; }
.text-blue   { color: var(--blue-500) !important; }
.text-muted  { color: var(--color-text-muted); }
.text-navy   { color: var(--navy-900); }

.font-display { font-family: var(--font-display); }
.font-800     { font-weight: 800; }
.font-700     { font-weight: 700; }
.font-600     { font-weight: 600; }
.font-400     { font-weight: 400; }

.uppercase     { text-transform: uppercase; }
.tracking-wide { letter-spacing: 0.08em; }
.tracking-wider { letter-spacing: 0.12em; }

/* ── Section header pattern ─────────────────────────────── */
.section-label {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-family: var(--font-display);
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold-500);
  margin-bottom: var(--space-3);
}

.section-label::before {
  content: '';
  display: block;
  width: 24px;
  height: 2px;
  background: var(--gold-500);
  border-radius: 2px;
}

.section-heading {
  font-size: var(--text-4xl);
  font-weight: 800;
  letter-spacing: -0.025em;
  line-height: 1.1;
  margin-bottom: var(--space-4);
}

.section-subheading {
  font-size: var(--text-lg);
  color: var(--color-text-muted);
  line-height: 1.7;
  max-width: 52ch;
}

.section-header {
  margin-bottom: clamp(1.5rem, 3vw, 2.5rem);
}

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

.section-header--center .section-label {
  justify-content: center;
}

.section-header--center .section-subheading {
  margin-inline: auto;
}

/* Tagline "Style. · Quality. · Security. · Trust." */
.tagline-lockup {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--text-sm);
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--white);
}

.tagline-lockup .dot {
  color: var(--gold-500);
  margin-inline: 0.4em;
}

/* ── Swoosh Motif ───────────────────────────────────────── */
.swoosh-underline {
  position: relative;
  display: inline-block;
}

.swoosh-underline::after {
  content: '';
  position: absolute;
  bottom: -8px;
  left: 0;
  width: 100%;
  height: 4px;
  background: var(--gradient-gold-line);
  border-radius: 2px;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.6s var(--ease-out);
}

.swoosh-underline.is-visible::after,
.swoosh-underline--always::after {
  transform: scaleX(1);
}

/* Gold rule divider */
.gold-rule {
  width: 60px;
  height: 4px;
  background: var(--gradient-gold-line);
  border-radius: 2px;
  margin: var(--space-4) 0;
}

.gold-rule--center {
  margin-inline: auto;
}

/* ── Badge / Pill ───────────────────────────────────────── */
.badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  padding: 0.2em 0.7em;
  border-radius: var(--radius-full);
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.badge--gold {
  background: rgba(240,170,29,0.15);
  color: var(--gold-500);
  border: 1px solid rgba(240,170,29,0.3);
}

.badge--blue {
  background: rgba(7,119,188,0.1);
  color: var(--blue-500);
  border: 1px solid rgba(7,119,188,0.2);
}

.badge--navy {
  background: var(--navy-900);
  color: var(--white);
}

.badge--trade {
  background: var(--gold-500);
  color: var(--navy-900);
  font-weight: 800;
}

.badge--green {
  background: rgba(16,185,129,0.1);
  color: #047857;
  border: 1px solid rgba(16,185,129,0.2);
}

/* ── Breadcrumb ─────────────────────────────────────────── */
.breadcrumb {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  flex-wrap: wrap;
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  margin-bottom: var(--space-6);
}

.breadcrumb a {
  color: var(--color-text-muted);
  transition: color var(--duration-fast);
}

.breadcrumb a:hover { color: var(--blue-500); }

.breadcrumb__sep {
  color: var(--line);
}

.breadcrumb__current {
  color: var(--ink-900);
  font-weight: 500;
}

/* ── Reveal animations ──────────────────────────────────── */
/* Only applied when JS has confirmed it's running (js-ready on <html>) */
/* Without JS, content is always visible — no blank pages */
html.js-ready [data-reveal] {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity var(--duration-enter) var(--ease-out),
              transform var(--duration-enter) var(--ease-out);
}

[data-reveal].is-revealed,
html.js-ready [data-reveal].is-revealed {
  opacity: 1 !important;
  transform: translateY(0) !important;
}

/* Stagger via delay utility (set in JS) */
html.js-ready [data-reveal-stagger] > * {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity var(--duration-enter) var(--ease-out),
              transform var(--duration-enter) var(--ease-out);
}

[data-reveal-stagger].is-revealed > *,
html.js-ready [data-reveal-stagger].is-revealed > * {
  opacity: 1 !important;
  transform: translateY(0) !important;
}

/* ── 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: 0;
}

.hide-mobile  { display: none !important; }

@media (min-width: 768px) {
  .hide-mobile  { display: unset !important; }
  .hide-desktop { display: none !important; }
}

/* ── Misc ───────────────────────────────────────────────── */
.mt-auto { margin-top: auto; }
.w-full  { width: 100%; }
.overflow-hidden { overflow: hidden; }
.relative { position: relative; }
.z-raised { z-index: var(--z-raised); }

/* Aspect ratio helpers */
.aspect-video    { aspect-ratio: 16 / 9; }
.aspect-square   { aspect-ratio: 1; }
.aspect-portrait { aspect-ratio: 3 / 4; }
.aspect-wide     { aspect-ratio: 21 / 9; }

.object-cover {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Lazy-load blur-up */
img[loading="lazy"] {
  transition: filter 0.4s var(--ease-out);
}

/* Scroll progress bar */
#scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  width: 0%;
  height: 3px;
  background: var(--gradient-gold-line);
  z-index: calc(var(--z-nav) + 1);
  transition: width 100ms linear;
  pointer-events: none;
}

/* ── Reduced motion ─────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }

  [data-reveal],
  [data-reveal-stagger] > * {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }
}
