/*
  Simulares — Shared base styles
  Built from common tokens found in the Figma CSS export (all.css).
  Keep page-specific positioning/layout out of this file.
*/

:root {
  /* Typography */
  --font-sans: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --font-serif: "IBM Plex Serif", Georgia, "Times New Roman", serif;

  /* Colors (Figma tokens) */
  --bg-page: #F7F9FC;
  --surface: #FFFFFF;

  --text-primary: #0F172A;
  --text-secondary: #475569;
  --text-tertiary: #6B7280;

  --text-light-primary: #FFFFFF;
  --text-light-secondary: #E6E9EF;
  --text-light-tertiary: #AEB6C3;

  --border: #D8DEE5;
  --border-dark: #304170;

  --accent: #0065FF;
  --accent-dark: #012356;

  --panel: #E5EDFF;
  --panel-orange: #FFF8EB;

  --dark-surface: #18213A;
  --dark-secondary: #121A2F;

  --success: #447744;

  /* Layout */
  --container: 1200px;
  --gutter-desktop: 40px;
  --gutter-mobile: 16px;

  /* Radii */
  --r-4: 4px;
  --r-8: 8px;
  --r-12: 12px;

  /* Shadows */
  --shadow-soft: 0 8px 24px rgba(15, 23, 42, 0.08);
}

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

html,
body {
  height: 100%;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  color: var(--text-primary);
  background: var(--bg-page);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

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

a:hover {
  text-decoration: underline;
}

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

/* ---------- Layout helpers ---------- */

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

.section {
  padding: 48px 0;
}

.stack {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.row {
  display: flex;
  flex-direction: row;
  gap: 24px;
  align-items: center;
}

.grid {
  display: grid;
  gap: 24px;
}

@media (max-width: 768px) {
  .container {
    padding: 0 var(--gutter-mobile);
  }

  .section {
    padding: 32px 0;
  }
}

/* ---------- Typography tokens (from Figma) ---------- */

.t-display {
  font-family: var(--font-sans);
  font-weight: 400;
  font-size: 80px;
  line-height: 80px;
}

.t-h1,
h1 {
  font-family: var(--font-serif);
  font-weight: 400;
  font-size: 56px;
  line-height: 64px;
  margin: 0;
}

.t-h2,
h2 {
  font-family: var(--font-serif);
  font-weight: 500;
  font-size: 48px;
  line-height: 56px;
  margin: 0;
}

.t-h3,
h3 {
  font-family: var(--font-sans);
  font-weight: 400;
  font-size: 32px;
  line-height: 48px;
  margin: 0;
}

.t-h3-bold {
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 32px;
  line-height: 48px;
  margin: 0;
}

.t-h4,
h4 {
  font-family: var(--font-sans);
  font-weight: 400;
  font-size: 24px;
  line-height: 32px;
  margin: 0;
}

.t-h4-bold {
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 24px;
  line-height: 32px;
  margin: 0;
}

.t-h5,
h5 {
  font-family: var(--font-sans);
  font-weight: 400;
  font-size: 20px;
  line-height: 32px;
  margin: 0;
}

.t-h5-bold {
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 20px;
  line-height: 32px;
  margin: 0;
}

.t-p,
p {
  font-family: var(--font-sans);
  font-weight: 400;
  font-size: 16px;
  line-height: 24px;
  margin: 0;
}

.t-p-bold {
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: 16px;
  line-height: 24px;
  margin: 0;
}

.t-p-small {
  font-family: var(--font-sans);
  font-weight: 400;
  font-size: 14px;
  line-height: 18px;
  margin: 0;
}

.t-kpi {
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 48px;
  line-height: 45px;
}

@media (max-width: 768px) {
  .t-display {
    font-size: 48px;
    line-height: 52px;
  }

  .t-h1,
  h1 {
    font-size: 36px;
    line-height: 44px;
  }

  .t-h2,
  h2 {
    font-size: 32px;
    line-height: 40px;
  }

  .t-h3,
  .t-h3-bold,
  h3 {
    font-size: 24px;
    line-height: 32px;
  }
}

/* ---------- Color helpers ---------- */

.text-primary { color: var(--text-primary); }
.text-secondary { color: var(--text-secondary); }
.text-tertiary { color: var(--text-tertiary); }

.text-light { color: var(--text-light-primary); }
.text-light-secondary { color: var(--text-light-secondary); }
.text-light-tertiary { color: var(--text-light-tertiary); }

.bg-surface { background: var(--surface); }
.bg-panel { background: var(--panel); }
.bg-panel-orange { background: var(--panel-orange); }
.bg-dark { background: var(--dark-surface); color: var(--text-light-primary); }

/* ---------- Buttons (shared) ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 24px 10px;
  border-radius: var(--r-4);
  border: 1px solid transparent;
  cursor: pointer;
  user-select: none;
  text-decoration: none;
  white-space: nowrap;
}

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

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

.btn-outline {
  background: transparent;
  border-color: var(--border);
  color: var(--text-primary);
}

.btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* ---------- Cards (shared) ---------- */

.card {
  background: var(--panel);
  border-radius: var(--r-12);
  padding: 10px;
}

.card__inner {
  background: var(--surface);
  border-radius: var(--r-8);
  padding: 14px;
}

/* ---------- Header/Nav (shared scaffold) ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  backdrop-filter: blur(8px);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 0;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.logo__mark {
  width: 14px;
  height: 14px;
  border-radius: 3px;
  background: var(--accent);
  box-shadow: 0 0 0 2px rgba(0, 101, 255, 0.15);
}

.logo__text {
  font-weight: 600;
}

.nav__burger {
  display: none;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: var(--r-8);
  padding: 10px;
  cursor: pointer;
}

.nav__burger span {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--text-primary);
}

.nav__burger span + span {
  margin-top: 5px;
}

.nav__panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 10px;
  border-radius: var(--r-8);
  background: var(--surface);
  border: 1px solid var(--border);
}

.nav__links {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav__link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 7px 8px 8px;
  border-radius: var(--r-4);
}

.nav__link[aria-current="page"] {
  background: rgba(0, 101, 255, 0.10);
}

@media (max-width: 768px) {
  .nav__burger {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
  }

  .nav__panel {
    display: none;
    position: absolute;
    top: 64px;
    right: var(--gutter-mobile);
    left: var(--gutter-mobile);
    flex-direction: column;
    align-items: stretch;
    background: var(--surface);
    box-shadow: var(--shadow-soft);
  }

  .nav__panel.is-open {
    display: flex;
  }

  .nav__links {
    flex-direction: column;
    align-items: stretch;
  }

  .nav__link {
    justify-content: flex-start;
  }
}
