/* ============================================================
   SELLER EM FOCO — BASE STYLES
   Core element styling, typography, layout primitives
   ============================================================ */

/* ── BODY ──────────────────────────────────────────────── */
body {
  font-family: var(--sf-font-body);
  font-size: var(--sf-text-base);
  font-weight: var(--sf-weight-regular);
  line-height: var(--sf-leading-relaxed);
  color: var(--sf-text-secondary);
  background-color: var(--sf-bg-primary);
  overflow-x: hidden;
  transition: background-color 0.4s ease, color 0.4s ease;
}

/* Noise/grain texture overlay */
body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 9999;
  opacity: 0.025;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
  background-repeat: repeat;
  background-size: 256px 256px;
}

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

.sf-container--narrow {
  max-width: var(--sf-container-narrow);
}

.sf-section {
  position: relative;
  padding-top: var(--sf-space-section);
  padding-bottom: var(--sf-space-section);
}

.sf-section--compact {
  padding-top: var(--sf-space-16);
  padding-bottom: var(--sf-space-16);
}

/* Divider line between sections */
.sf-section + .sf-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: var(--sf-container-padding);
  right: var(--sf-container-padding);
  height: 1px;
  background: var(--sf-border-subtle);
}

/* ── TYPOGRAPHY ────────────────────────────────────────── */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--sf-font-display);
  color: var(--sf-text-primary);
  line-height: var(--sf-leading-snug);
}

.sf-heading-hero {
  font-size: var(--sf-text-hero);
  font-weight: var(--sf-weight-bold);
  line-height: var(--sf-leading-tight);
  letter-spacing: var(--sf-tracking-tight);
  color: var(--sf-text-primary);
}

.sf-heading-hero .sf-accent-text {
  background: var(--sf-accent-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.sf-heading-section {
  font-size: var(--sf-text-2xl);
  font-weight: var(--sf-weight-medium);
  line-height: var(--sf-leading-snug);
  color: var(--sf-text-primary);
  margin-bottom: var(--sf-space-4);
}

.sf-heading-subsection {
  font-size: var(--sf-text-xl);
  font-weight: var(--sf-weight-medium);
  color: var(--sf-text-primary);
  margin-bottom: var(--sf-space-3);
}

.sf-heading-card {
  font-size: var(--sf-text-md);
  font-weight: var(--sf-weight-medium);
  color: var(--sf-text-primary);
  margin-bottom: var(--sf-space-1);
}

.sf-lead {
  font-size: var(--sf-text-lg);
  line-height: var(--sf-leading-relaxed);
  color: var(--sf-text-primary);
  font-weight: var(--sf-weight-regular);
}

.sf-body {
  font-size: var(--sf-text-base);
  line-height: var(--sf-leading-relaxed);
  color: var(--sf-text-secondary);
}

.sf-body-sm {
  font-size: var(--sf-text-sm);
  line-height: var(--sf-leading-relaxed);
  color: var(--sf-text-secondary);
}

.sf-caption {
  font-size: var(--sf-text-xs);
  color: var(--sf-text-tertiary);
  font-style: italic;
}

.sf-label {
  font-size: var(--sf-text-xs);
  font-weight: var(--sf-weight-medium);
  letter-spacing: var(--sf-tracking-wider);
  text-transform: uppercase;
  color: var(--sf-text-tertiary);
}

.sf-mono {
  font-family: var(--sf-font-mono);
  font-size: var(--sf-text-2xs);
  color: var(--sf-text-tertiary);
}

/* Accent gradient text */
.sf-accent-text {
  background: var(--sf-accent-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ── LINKS ─────────────────────────────────────────────── */
.sf-link {
  color: var(--sf-text-primary);
  text-decoration: none;
  border-bottom: 1px solid var(--sf-border-subtle);
  transition: border-color var(--sf-transition-fast), color var(--sf-transition-fast);
}

.sf-link:hover {
  border-color: var(--sf-accent);
  color: var(--sf-accent);
}

/* ── GRIDS ─────────────────────────────────────────────── */
.sf-grid {
  display: grid;
  gap: var(--sf-space-4);
}

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

.sf-grid--asymmetric {
  grid-template-columns: 1fr 1.5fr;
}

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

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

/* ── FLEX UTILITIES ────────────────────────────────────── */
.sf-flex {
  display: flex;
}

.sf-flex--center {
  display: flex;
  align-items: center;
  justify-content: center;
}

.sf-flex--between {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.sf-flex--col {
  display: flex;
  flex-direction: column;
}

.sf-flex--wrap {
  flex-wrap: wrap;
}

.sf-flex--gap-2 { gap: var(--sf-space-2); }
.sf-flex--gap-3 { gap: var(--sf-space-3); }
.sf-flex--gap-4 { gap: var(--sf-space-4); }
.sf-flex--gap-6 { gap: var(--sf-space-6); }
.sf-flex--gap-8 { gap: var(--sf-space-8); }

/* ── SECTION HEADER ────────────────────────────────────── */
.sf-section-header {
  margin-bottom: var(--sf-space-12);
}

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

.sf-section-header .sf-label {
  margin-bottom: var(--sf-space-4);
  display: block;
}

.sf-section-header .sf-heading-section {
  max-width: 640px;
}

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

.sf-section-header .sf-lead {
  max-width: 560px;
  margin-top: var(--sf-space-4);
}

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

/* ══════════════════════════════════════════════════════════
   LIGHT MODE — Base Overrides
   ══════════════════════════════════════════════════════════ */

/* Grain nearly invisible on light */
[data-sf-theme="light"] body::before {
  opacity: 0.012;
}

/* Light scrollbar */
[data-sf-theme="light"] ::-webkit-scrollbar-track {
  background: var(--sf-bg-secondary);
}
[data-sf-theme="light"] ::-webkit-scrollbar-thumb {
  background: rgba(0, 0, 0, 0.12);
}
[data-sf-theme="light"] ::-webkit-scrollbar-thumb:hover {
  background: rgba(0, 0, 0, 0.20);
}

/* Light selection */
[data-sf-theme="light"] ::selection {
  background: rgba(224, 52, 43, 0.15);
  color: var(--sf-text-primary);
}
