:root {
  /* Paleta Light Base */
  --md-sys-color-primary: #6750a4;
  --md-sys-color-on-primary: #ffffff;
  --md-sys-color-secondary-container: #e8def8;
  --md-sys-color-on-secondary-container: #1d192b;
  --md-sys-color-background: #fef7ff;
  --md-sys-color-on-background: #1d1b20;
  --md-sys-color-surface: #fef7ff;
  --md-sys-color-on-surface: #1d1b20;
  --md-sys-color-surface-variant: #e7e0ec;
  --md-sys-color-on-surface-variant: #49454f;
  --md-sys-color-surface-container-low: #f7f2fa;
  --md-sys-color-outline: #79747e;

  --font-family: "Roboto", sans-serif;
}

body.dark {
  /* Paleta Dark Base */
  --md-sys-color-primary: #d0bcff;
  --md-sys-color-on-primary: #381e72;
  --md-sys-color-secondary-container: #4a4458;
  --md-sys-color-on-secondary-container: #e8def8;
  --md-sys-color-background: #141218;
  --md-sys-color-on-background: #e6e0e9;
  --md-sys-color-surface: #141218;
  --md-sys-color-on-surface: #e6e0e9;
  --md-sys-color-surface-variant: #49454f;
  --md-sys-color-on-surface-variant: #cac4d0;
  --md-sys-color-surface-container-low: #1d1b20;
  --md-sys-color-outline: #938f99;
}

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

body,
h1,
h2,
h3,
h4,
h5,
h6,
p,
ul,
ol,
dl,
figure,
blockquote {
  margin: 0;
  padding: 0;
}

/* Transição global suave para o tema */
body {
  font-family: var(--font-family);
  background-color: var(--md-sys-color-background);
  color: var(--md-sys-color-on-background);
  transition:
    background-color 0.3s ease,
    color 0.3s ease;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

/* Classes utilitárias */
.text-primary {
  color: var(--md-sys-color-primary);
}
.text-variant {
  color: var(--md-sys-color-on-surface-variant);
}
.text-on-surface {
  color: var(--md-sys-color-on-surface);
}
.mt-1 {
  margin-top: 8px;
}
.mt-2 {
  margin-top: 16px;
}

/* Tipografia */
.display-large {
  font-size: 57px;
  font-weight: 400;
  line-height: 64px;
  letter-spacing: -0.25px;
  margin-bottom: 8px;
}
.headline-medium {
  font-size: 28px;
  font-weight: 400;
  line-height: 36px;
  margin-bottom: 24px;
}
.title-large {
  font-size: 22px;
  font-weight: 500;
  line-height: 28px;
  margin-bottom: 16px;
}
.title-medium {
  font-size: 16px;
  font-weight: 500;
  line-height: 24px;
  letter-spacing: 0.15px;
}
.body-large {
  font-size: 16px;
  font-weight: 400;
  line-height: 24px;
  letter-spacing: 0.5px;
}
.body-medium {
  font-size: 14px;
  font-weight: 400;
  line-height: 20px;
  letter-spacing: 0.25px;
}
.body-small {
  font-size: 12px;
  font-weight: 400;
  line-height: 16px;
}

/* Layout Base */
.container {
  max-width: 840px;
  margin: 0 auto;
  padding: 0 24px;
}

/* App Bar */
.app-bar {
  position: sticky;
  top: 0;
  z-index: 10;
  background-color: var(--md-sys-color-surface);
  transition: background-color 0.3s ease;
  padding: 8px 0;
}

.app-bar-content {
  max-width: 840px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  font-weight: 500;
  font-size: 16px;
}

/* Hero */
.hero {
  padding: 80px 0 48px 0;
}
.hero-actions {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.section {
  padding: 32px 0;
}

/* Cards Interativos com Web Components (Elevação e Ripple) */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
}

.interactive-card {
  position: relative;
  background-color: var(--md-sys-color-surface-container-low);
  border-radius: 12px;
  overflow: hidden; /* Importante para o Ripple não vazar do card */
  cursor: pointer;
  transition: background-color 0.3s ease;
  /* Configurando a elevação para o md-elevation interno */
  --md-elevation-level: 1;
}

.interactive-card:hover {
  --md-elevation-level: 2;
}

.card-content {
  padding: 24px;
  position: relative;
  z-index: 1; /* Mantém o texto acima do ripple */
}

.interactive-card ul {
  padding-left: 20px;
}

/* Footer */
.footer {
  padding: 48px 0;
  background-color: var(--md-sys-color-surface);
}

.footer-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 24px;
}

.action-buttons {
  display: flex;
  gap: 8px;
}

@media (max-width: 600px) {
  .display-large {
    font-size: 40px;
    line-height: 48px;
  }
  .headline-medium {
    font-size: 24px;
    line-height: 32px;
  }
  .footer-content {
    flex-direction: column;
    align-items: flex-start;
  }
}
