:root {
  --bg: #090909;
  --bg-elev: rgba(18, 18, 18, 0.82);
  --surface: #161616;
  --surface-2: #222222;
  --text: #f4f4f4;
  --text-soft: #c7c7c7;
  --line: rgba(255, 255, 255, 0.16);
  --brand: #ab1f1a;
  --brand-2: #f14d41;
  --accent: #597cff;
  --ok: #22c55e;
  --shadow: 0 18px 50px rgba(0, 0, 0, 0.5);
}

html[data-theme="light"] {
  --bg: #f3f0ef;
  --bg-elev: rgba(255, 255, 255, 0.84);
  --surface: #ffffff;
  --surface-2: #f3ecea;
  --text: #1f1f1f;
  --text-soft: #525252;
  --line: rgba(30, 30, 30, 0.15);
  --brand: #ab1f1a;
  --brand-2: #f14d41;
  --accent: #597cff;
  --shadow: 0 20px 45px rgba(15, 23, 42, 0.14);
}

@font-face {
  font-family: "Morl";
  src: local("Morl"), url("../fonts/Morl-Regular.woff2") format("woff2"), url("../fonts/Morl-Regular.woff") format("woff");
  font-weight: 400 800;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Canva Sans";
  src: local("Canva Sans"), url("../fonts/CanvaSans-Regular.woff2") format("woff2"), url("../fonts/CanvaSans-Regular.woff") format("woff");
  font-weight: 300 700;
  font-style: normal;
  font-display: swap;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Canva Sans", "Inter", sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
}

h1,
h2,
h3,
h4,
h5,
h6,
.brand-title,
.hero-title,
.sample-title {
  font-family: "Morl", "Questrial", sans-serif;
  letter-spacing: -0.02em;
}

a {
  color: inherit;
  text-decoration: none;
}

.section-space {
  padding: 5.5rem 0;
}

.section-space-sm {
  padding: 1.5rem 0;
}

.section-head {
  margin-bottom: 1.8rem;
}

.section-head h2 {
  margin-bottom: 0.4rem;
  font-size: clamp(1.6rem, 2.4vw, 2.15rem);
}

.section-head p {
  margin: 0;
  color: var(--text-soft);
}

.site-bg {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
}

.glow {
  position: absolute;
  filter: blur(65px);
  opacity: 0.55;
}

.glow-a {
  width: 420px;
  height: 420px;
  background: radial-gradient(circle, rgba(171, 31, 26, 0.52), transparent 70%);
  left: -5%;
  top: 8%;
}

.glow-b {
  width: 360px;
  height: 360px;
  background: radial-gradient(circle, rgba(89, 124, 255, 0.24), transparent 72%);
  right: 0;
  top: 40%;
}

.grid-overlay {
  position: absolute;
  inset: 0;
  background-image: linear-gradient(to right, rgba(255, 255, 255, 0.06) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255, 255, 255, 0.06) 1px, transparent 1px);
  background-size: 42px 42px;
  mask-image: radial-gradient(ellipse at center, black 52%, transparent 95%);
}

.glass-nav {
  background: var(--bg-elev);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(10px);
}

.navbar {
  padding-top: 0.7rem;
  padding-bottom: 0.7rem;
}

.brand-title {
  display: inline-grid;
  grid-template-columns: auto 1fr;
  grid-template-areas:
    "logo title"
    "logo subtitle";
  align-items: center;
  column-gap: 0.65rem;
  color: var(--text);
  font-size: 1.05rem;
  font-weight: 700;
}

.brand-logo {
  grid-area: logo;
  width: 34px;
  height: 34px;
  border-radius: 8px;
  object-fit: contain;
}

.brand-title-text {
  grid-area: title;
  line-height: 1.05;
}

.brand-subtitle {
  grid-area: subtitle;
  display: block;
  font-size: 0.72rem;
  font-family: "Canva Sans", "Inter", sans-serif;
  color: var(--text-soft);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.nav-link {
  color: var(--text-soft);
  font-weight: 500;
}

.nav-link:hover,
.nav-link:focus,
.nav-link.active {
  color: var(--text);
}

.navbar-toggler {
  border-color: var(--line);
}

.navbar-toggler-icon {
  filter: contrast(0) brightness(2);
}

html[data-theme="light"] .navbar-toggler-icon {
  filter: none;
}

.btn-theme {
  border: 1px solid var(--line);
  color: var(--text);
  background: transparent;
}

.btn-theme:hover {
  background: var(--surface-2);
}

.btn-outline-info {
  --bs-btn-color: #f14d41;
  --bs-btn-border-color: rgba(241, 77, 65, 0.58);
  --bs-btn-hover-color: #fff;
  --bs-btn-hover-bg: #ab1f1a;
  --bs-btn-hover-border-color: #ab1f1a;
  --bs-btn-active-color: #fff;
  --bs-btn-active-bg: #8f1c18;
  --bs-btn-active-border-color: #8f1c18;
}

.hero {
  padding-top: 8rem;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  margin-bottom: 0.8rem;
  font-size: 0.82rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #f14d41;
}

.hero-title {
  font-size: clamp(2rem, 5vw, 3.25rem);
  margin-bottom: 1rem;
}

.hero-subtitle {
  margin-bottom: 0.8rem;
  font-weight: 600;
  color: var(--text);
}

.hero-description {
  max-width: 62ch;
  color: var(--text-soft);
}

.btn-premium {
  border-radius: 12px;
  padding: 0.74rem 1.1rem;
  font-weight: 600;
}

.btn-primary {
  background: linear-gradient(135deg, #ab1f1a, #7f1713);
  border: 0;
}

.btn-primary:hover {
  background: linear-gradient(135deg, #c22923, #8f1c18);
}

.hero-panel {
  border: 1px solid var(--line);
  background: linear-gradient(160deg, rgba(171, 31, 26, 0.18), rgba(50, 50, 50, 0.5));
  border-radius: 18px;
  padding: 1.2rem;
  box-shadow: var(--shadow);
}

html[data-theme="light"] .hero-panel {
  background: linear-gradient(165deg, rgba(171, 31, 26, 0.1), rgba(255, 255, 255, 0.96));
  border-color: rgba(171, 31, 26, 0.24);
}

html[data-theme="light"] .hero-panel-head {
  color: #1f1f1f;
}

html[data-theme="light"] .hero-list,
html[data-theme="light"] .hero-list li {
  color: #303030;
}

.principles-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.85rem;
  max-width: 700px;
}

.principle-item {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0.9rem;
  background: rgba(255, 255, 255, 0.03);
}

.principle-item h3 {
  margin: 0 0 0.35rem;
  font-size: 1rem;
}

.principle-item p {
  margin: 0;
  color: var(--text-soft);
  font-size: 0.92rem;
}

.hero-panel-head {
  margin-bottom: 0.8rem;
  font-weight: 700;
}

.hero-list {
  margin: 0 0 1rem;
  padding-left: 1.1rem;
  color: var(--text-soft);
}

.tech-card {
  border: 1px solid var(--line);
  background: linear-gradient(175deg, var(--surface), var(--surface-2));
  box-shadow: var(--shadow);
  border-radius: 16px;
  overflow: hidden;
  transition: transform 220ms ease, border-color 220ms ease;
}

.tech-card:hover {
  transform: translateY(-5px);
  border-color: rgba(241, 77, 65, 0.7);
}

.file-name {
  color: var(--text-soft);
  margin-bottom: 0.8rem;
}

.logo-preview {
  display: block;
  width: 100%;
  border: 0;
  padding: 1.1rem;
  background: rgba(255, 255, 255, 0.04);
  cursor: zoom-in;
}

.logo-preview img {
  display: block;
  width: 100%;
  max-height: 150px;
  object-fit: contain;
}

.color-card .card-body p {
  margin-bottom: 0.45rem;
}

.color-card .card-body,
.color-card .card-body h3,
.color-card .card-body p,
.color-card .card-body strong {
  color: var(--text);
}

.color-card .copy-hex {
  margin-top: 0.35rem;
}

/* Garante contraste visual entre amostra de cor e card em ambos os temas */
.color-card {
  position: relative;
}

.color-card .color-preview {
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
}

html[data-theme="light"] .color-card .color-preview {
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.12);
}

/* Amostras muito escuras ganham contorno mais evidente para nao "sumirem" */
.color-card .color-preview[style*="#090909"],
.color-card .color-preview[style*="#323232"] {
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.28);
}

html[data-theme="light"] .color-card .color-preview[style*="#090909"],
html[data-theme="light"] .color-card .color-preview[style*="#323232"] {
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.22);
}

.color-preview {
  width: 100%;
  height: 72px;
  display: block;
  border-bottom: 1px solid var(--line);
}

.font-note {
  color: var(--text-soft);
}

.sample-title {
  margin: 1rem 0 1.4rem;
  font-size: clamp(1.25rem, 2.6vw, 2rem);
}

.sample-text {
  margin: 1rem 0 1.2rem;
  color: var(--text);
}

.app-card .card-body {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}

.app-mock {
  height: 120px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--surface-2);
  position: relative;
  overflow: hidden;
}

.app-mock::before,
.app-mock::after {
  content: "";
  position: absolute;
}

.mock-card::before {
  inset: 14px;
  border-radius: 8px;
  background: linear-gradient(135deg, rgba(171, 31, 26, 0.55), rgba(50, 50, 50, 0.34));
}

.mock-dashboard::before {
  inset: 10px;
  background: repeating-linear-gradient(90deg, rgba(241, 77, 65, 0.26), rgba(241, 77, 65, 0.26) 12px, transparent 12px, transparent 22px);
}

.mock-email::before {
  inset: 15px;
  border-radius: 8px;
  border: 1px dashed rgba(148, 163, 184, 0.4);
}

.mock-chat::before {
  left: 12px;
  top: 16px;
  width: 70%;
  height: 16px;
  border-radius: 30px;
  background: rgba(171, 31, 26, 0.68);
}

.mock-chat::after {
  left: 12px;
  top: 40px;
  width: 58%;
  height: 16px;
  border-radius: 30px;
  background: rgba(89, 124, 255, 0.38);
}

.mock-linkedin::before {
  inset: 12px;
  border-radius: 10px;
  background: linear-gradient(180deg, rgba(89, 124, 255, 0.22), rgba(89, 124, 255, 0.05));
}

.mock-shirt::before {
  left: 50%;
  top: 12px;
  transform: translateX(-50%);
  width: 72px;
  height: 90px;
  border-radius: 18px 18px 12px 12px;
  border: 2px solid rgba(148, 163, 184, 0.45);
}

.mock-favicon::before {
  width: 58px;
  height: 58px;
  border-radius: 16px;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: linear-gradient(135deg, #ab1f1a, #f14d41);
}

.section-downloads {
  padding-bottom: 6rem;
}

.download-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.8rem;
  padding: 0.95rem 1rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: linear-gradient(180deg, rgba(171, 31, 26, 0.14), rgba(89, 124, 255, 0.06));
  transition: transform 220ms ease, border-color 220ms ease;
  font-weight: 600;
}

.download-item:hover {
  transform: translateY(-3px);
  border-color: rgba(241, 77, 65, 0.72);
}

.usage-card {
  background: linear-gradient(180deg, rgba(171, 31, 26, 0.09), rgba(9, 9, 9, 0.5));
}

.usage-list {
  margin: 0;
  padding-left: 1.1rem;
  color: var(--text-soft);
}

html[data-theme="light"] .usage-card {
  background: linear-gradient(180deg, rgba(171, 31, 26, 0.08), rgba(255, 255, 255, 0.92));
  border-color: rgba(171, 31, 26, 0.25);
}

html[data-theme="light"] .usage-card .card-body,
html[data-theme="light"] .usage-card h3,
html[data-theme="light"] .usage-card p,
html[data-theme="light"] .usage-card li {
  color: #1f1f1f;
}

html[data-theme="light"] .usage-list {
  color: #303030;
}

html[data-theme="light"] .color-preview[style*="#ffffff"] {
  border-top: 1px solid #ddd;
}

html[data-theme="dark"] .color-card {
  background: linear-gradient(175deg, #151515, #232323);
}

html[data-theme="dark"] #tipografia .tech-card {
  background: linear-gradient(175deg, #1b1b1b, #2a2a2a);
  border-color: rgba(241, 77, 65, 0.25);
}

html[data-theme="dark"] #tipografia .font-note,
html[data-theme="dark"] #tipografia .sample-text,
html[data-theme="dark"] #tipografia .small,
html[data-theme="dark"] #tipografia p {
  color: #e3e3e3;
}

html[data-theme="dark"] #tipografia .h5,
html[data-theme="dark"] #tipografia .h6,
html[data-theme="dark"] #tipografia .sample-title {
  color: #ffffff;
}

html[data-theme="dark"] #tipografia .btn-outline-light {
  --bs-btn-color: #f5f5f5;
  --bs-btn-border-color: rgba(245, 245, 245, 0.55);
  --bs-btn-hover-color: #090909;
  --bs-btn-hover-bg: #ffffff;
  --bs-btn-hover-border-color: #ffffff;
}

html[data-theme="light"] .color-card {
  background: linear-gradient(175deg, #ffffff, #f6f0ef);
}

.offcanvas-tech {
  background: var(--surface);
  color: var(--text);
}

.list-group-tech .list-group-item {
  background: transparent;
  border-color: var(--line);
  color: var(--text);
}

.modal-tech {
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--line);
}

.modal-tech .modal-header {
  border-bottom-color: var(--line);
}

.footer {
  border-top: 1px solid var(--line);
  color: var(--text-soft);
}

.reveal-on-scroll {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 500ms ease, transform 500ms ease;
}

.reveal-on-scroll.revealed {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 991px) {
  .hero {
    padding-top: 7rem;
  }

  .principles-grid {
    grid-template-columns: 1fr;
  }

  .section-space {
    padding: 4.4rem 0;
  }
}

@media (max-width: 576px) {
  .hero-title {
    font-size: 1.9rem;
  }

  .logo-preview img {
    max-height: 120px;
  }
}
