/**
 * Base styles - ИК Море Section Library
 * Minimal reset + typography foundation.
 * Requires tokens.css to be loaded first.
 */

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

/* Explicit body reset — type selectors outrank the universal one
   above, so browser defaults (e.g. `body { margin: 8px }`) would
   otherwise win. Visible when sections are iframed and scaled down. */
html, body { margin: 0; padding: 0; }

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

body {
  font-family: var(--font-body);
  font-size: var(--text-base);
  font-weight: var(--weight-regular);
  line-height: var(--leading-normal);
  color: var(--color-text);
  background: var(--color-bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

a {
  color: var(--color-link);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
}

ul, ol {
  list-style: none;
}

/* ─── Shared layout primitive ──────────────────────────────── */

.container {
  width: 100%;
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: var(--container-padding);
}

/* ─── Utility: visually hidden (for accessibility) ─────────── */

.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;
}

/* ─── Shared button styles ──────────────────────────────────── */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-6);
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-weight: var(--weight-medium);
  line-height: 1;
  border-radius: var(--radius-full);
  transition: opacity var(--transition-fast), background var(--transition-fast);
  white-space: nowrap;
  cursor: pointer;
  text-decoration: none;
}

.btn:hover { opacity: 0.88; text-decoration: none; }

.btn-primary {
  background: var(--color-accent);
  color: var(--color-primary);
}

.btn-secondary {
  background: transparent;
  color: var(--color-text);
  border: 1px solid var(--color-border);
}

.btn-dark {
  background: var(--color-primary);
  color: #fff;
}

.btn-ghost-dark {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.btn-lg {
  padding: var(--space-4) var(--space-8);
  font-size: var(--text-base);
}

.btn-sm {
  padding: var(--space-2) var(--space-4);
  font-size: var(--text-xs);
}

/* ─── Shared badge ──────────────────────────────────────────── */

.badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  padding: var(--space-1) var(--space-3);
  font-size: var(--text-xs);
  font-weight: var(--weight-medium);
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
  border-radius: var(--radius-full);
  background: var(--color-accent-light);
  color: var(--color-primary);
}

/* ─── Shared section label / eyebrow ───────────────────────── */

.section-label {
  display: inline-block;
  font-size: var(--text-sm);
  font-weight: var(--weight-medium);
  letter-spacing: var(--tracking-wider);
  text-transform: uppercase;
  color: var(--color-text-subtle);
  margin-bottom: var(--space-4);
}

/* ─── Heading utility classes ───────────────────────────────── */

.h1 { font-family: var(--font-heading); font-size: var(--text-6xl); font-weight: var(--weight-medium); line-height: var(--leading-tight); letter-spacing: var(--tracking-tight); }
.h2 { font-family: var(--font-heading); font-size: var(--text-5xl); font-weight: var(--weight-medium); line-height: var(--leading-tight); letter-spacing: var(--tracking-tight); }
.h3 { font-family: var(--font-heading); font-size: var(--text-3xl); font-weight: var(--weight-medium); line-height: var(--leading-snug); }
.h4 { font-family: var(--font-body);    font-size: var(--text-xl);  font-weight: var(--weight-semibold); line-height: var(--leading-snug); }

@media (max-width: 809px) {
  .h1 { font-size: var(--text-4xl); }
  .h2 { font-size: var(--text-3xl); }
  .h3 { font-size: var(--text-2xl); }
}
