@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,400;0,700;0,900;1,400;1,700&family=Inter:wght@300;400;500;600;700&display=swap');

:root {
  --burgundy-deep: #3A0818;
  --burgundy: #6B1028;
  --burgundy-light: #8E1535;
  --burgundy-surface: #4E0C1E;
  --burgundy-darker: #2A0610;
  --gold: #C9A84C;
  --gold-light: #DBBF6A;
  --gold-dark: #B8912E;
  --cream: #F5EDE0;
  --cream-light: #FDF8F0;
  --white: #FFFFFF;
  --black: #2A0610;
  --charcoal: #3A0818;
  --gray-dark: #4E0C1E;
  --gray: #c4a0a0;
  --glass-bg: rgba(255, 255, 255, 0.07);
  --glass-border: rgba(255, 255, 255, 0.12);
  --glass-bg-dark: rgba(0, 0, 0, 0.25);
  --shadow: 0 8px 32px rgba(30, 5, 15, 0.5);
  --shadow-lg: 0 16px 48px rgba(30, 5, 15, 0.6);
  --radius: 24px;
  --radius-lg: 40px;
  --radius-pill: 100px;
  --transition: all 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}

*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: 'Inter', sans-serif;
  background: var(--burgundy-darker);
  color: var(--white);
  overflow-x: hidden;
  min-height: 100vh;
}

h1,
h2,
h3,
h4,
h5 {
  font-family: 'Playfair Display', serif;
}

a {
  text-decoration: none;
  color: inherit;
}

img {
  max-width: 100%;
}

/* ========== NAVBAR ========== */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  padding: 20px 40px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: var(--transition);
  background: transparent;
}

.navbar.scrolled {
  background: rgba(74, 10, 31, 0.95);
  backdrop-filter: blur(20px);
  padding: 14px 40px;
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
}

.nav-logo {
  font-family: 'Playfair Display', serif;
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--gold);
  letter-spacing: 1px;
}

.nav-logo span {
  color: var(--white);
  font-weight: 400;
}

.nav-links {
  display: flex;
  gap: 32px;
  list-style: none;
  align-items: center;
}

.nav-links a {
  font-size: 0.9rem;
  font-weight: 500;
  letter-spacing: 0.5px;
  transition: var(--transition);
  opacity: 0.85;
}

.nav-links a:hover {
  color: var(--gold);
  opacity: 1;
}

.nav-cta {
  background: var(--gold) !important;
  color: var(--black) !important;
  padding: 10px 24px;
  border-radius: var(--radius-pill);
  font-weight: 600 !important;
  opacity: 1 !important;
  transition: var(--transition);
}

.nav-cta:hover {
  background: var(--gold-light) !important;
  transform: scale(1.05);
}

.nav-menu-btn {
  display: none;
  background: none;
  border: none;
  color: var(--white);
  font-size: 1.5rem;
  cursor: pointer;
}

/* ========== HERO ========== */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  background: var(--burgundy-deep);
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -30%;
  width: 80vw;
  height: 80vw;
  background: radial-gradient(circle, rgba(212, 168, 67, 0.08) 0%, transparent 70%);
  border-radius: 50%;
  animation: float 20s ease-in-out infinite;
}

.hero::after {
  content: '';
  position: absolute;
  bottom: -20%;
  left: -20%;
  width: 60vw;
  height: 60vw;
  background: radial-gradient(circle, rgba(123, 17, 49, 0.4) 0%, transparent 70%);
  border-radius: 50%;
  animation: float 15s ease-in-out infinite reverse;
}

@keyframes float {

  0%,
  100% {
    transform: translate(0, 0) rotate(0deg);
  }

  33% {
    transform: translate(30px, -30px) rotate(2deg);
  }

  66% {
    transform: translate(-20px, 20px) rotate(-1deg);
  }
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 800px;
  padding: 0 24px;
}

.hero-badge {
  display: inline-block;
  padding: 8px 24px;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-pill);
  font-size: 0.75rem;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 32px;
  backdrop-filter: blur(10px);
}

.hero h1 {
  font-size: clamp(2.8rem, 7vw, 5.5rem);
  font-weight: 900;
  line-height: 1.05;
  margin-bottom: 24px;
  color: var(--white);
}

.hero h1 em {
  font-style: italic;
  color: var(--gold);
}

.hero p {
  font-size: 1.1rem;
  line-height: 1.8;
  opacity: 0.8;
  max-width: 560px;
  margin: 0 auto 48px;
  color: var(--cream);
}

.hero-buttons {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 16px 36px;
  border-radius: var(--radius-pill);
  font-family: 'Inter', sans-serif;
  font-size: 0.95rem;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: var(--transition);
}

.btn-primary {
  background: var(--gold);
  color: var(--black);
}

.btn-primary:hover {
  background: var(--gold-light);
  transform: scale(1.05);
  box-shadow: 0 8px 30px rgba(212, 168, 67, 0.3);
}

.btn-outline {
  background: transparent;
  color: var(--white);
  border: 2px solid var(--glass-border);
}

.btn-outline:hover {
  border-color: var(--gold);
  color: var(--gold);
}

.btn:active {
  transform: scale(0.95);
}

/* Hero wave divider */
.hero-wave {
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 100%;
  z-index: 3;
}

.hero-wave svg {
  display: block;
  width: 100%;
  height: auto;
}

/* ========== FEATURES SECTION ========== */
.features {
  padding: 100px 40px 80px;
  background: var(--burgundy-darker);
  position: relative;
}

.section-title {
  text-align: center;
  margin-bottom: 60px;
}

.section-title h2 {
  font-size: clamp(2rem, 4vw, 3rem);
  margin-bottom: 16px;
  color: var(--white);
}

.section-title h2 em {
  color: var(--gold);
  font-style: italic;
}

.section-title p {
  color: var(--gray);
  font-size: 1rem;
  max-width: 500px;
  margin: 0 auto;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
  max-width: 1100px;
  margin: 0 auto;
}

.feature-card {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  padding: 40px 32px;
  backdrop-filter: blur(20px);
  transition: var(--transition);
}

.feature-card:hover {
  transform: translateY(-8px);
  border-color: var(--gold);
  box-shadow: 0 20px 40px rgba(212, 168, 67, 0.1);
}

.feature-icon {
  width: 56px;
  height: 56px;
  background: linear-gradient(135deg, var(--burgundy), var(--burgundy-light));
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  margin-bottom: 20px;
}

.feature-card h3 {
  font-size: 1.3rem;
  margin-bottom: 12px;
  color: var(--cream);
}

.feature-card p {
  font-size: 0.9rem;
  line-height: 1.7;
  color: var(--gray);
}

/* ========== CARDS PAGE ========== */
.cards-page {
  padding-top: 100px;
  min-height: 100vh;
  background: var(--burgundy-darker);
}

.cards-header {
  text-align: center;
  padding: 40px 24px;
  background: var(--burgundy-deep);
  border-radius: 0 0 var(--radius-lg) var(--radius-lg);
  margin-bottom: 40px;
  position: relative;
  overflow: hidden;
}

.cards-header::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -20%;
  width: 50vw;
  height: 50vw;
  background: radial-gradient(circle, rgba(212, 168, 67, 0.06) 0%, transparent 70%);
  border-radius: 50%;
}

.cards-header h1 {
  font-size: clamp(2rem, 5vw, 3.5rem);
  margin-bottom: 12px;
  position: relative;
}

.cards-header h1 em {
  color: var(--gold);
  font-style: italic;
}

.cards-header p {
  color: var(--cream);
  opacity: 0.7;
  position: relative;
}

/* Search bar */
.search-container {
  max-width: 600px;
  margin: 30px auto 0;
  position: relative;
}

.search-input {
  width: 100%;
  padding: 16px 24px 16px 52px;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-pill);
  font-family: 'Inter', sans-serif;
  font-size: 1rem;
  color: var(--white);
  outline: none;
  transition: var(--transition);
  backdrop-filter: blur(10px);
}

.search-input::placeholder {
  color: rgba(255, 255, 255, 0.4);
}

.search-input:focus {
  border-color: var(--gold);
  box-shadow: 0 0 20px rgba(212, 168, 67, 0.15);
}

.search-icon {
  position: absolute;
  left: 20px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1.1rem;
  opacity: 0.5;
}

/* Filters - Elegant Tab Bar */
.filters-container {
  max-width: 800px;
  margin: 0 auto 40px;
  padding: 0 24px;
  display: flex;
  gap: 0;
  border-bottom: 1px solid var(--glass-border);
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.filters-container::-webkit-scrollbar {
  display: none;
}

.filter-btn {
  padding: 14px 24px;
  border-radius: 0;
  border: none;
  border-bottom: 3px solid transparent;
  background: transparent;
  color: var(--gray);
  font-family: 'Inter', sans-serif;
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
  white-space: nowrap;
  position: relative;
  flex: 1;
  text-align: center;
}

.filter-btn:hover {
  color: var(--cream);
  background: rgba(255, 255, 255, 0.03);
}

.filter-btn.active {
  color: var(--gold);
  border-bottom-color: var(--gold);
  font-weight: 600;
  background: transparent;
}

/* Cards grid */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 20px;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px 80px;
}

.card-item {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  overflow: hidden;
  cursor: pointer;
  transition: var(--transition);
  position: relative;
}

.card-item:hover {
  transform: translateY(-8px) scale(1.02);
  border-color: var(--gold);
  box-shadow: var(--shadow-lg);
}

.card-image {
  width: 100%;
  aspect-ratio: 3/4;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 12px;
  position: relative;
  overflow: hidden;
}

.card-image.arcanos-maiores {
  background: linear-gradient(160deg, #3A0818, #6B1028);
}

.card-image.copas {
  background: linear-gradient(160deg, #3A0820, #5A1038);
}

.card-image.ouros {
  background: linear-gradient(160deg, #3A1808, #5A2810);
}

.card-image.espadas {
  background: linear-gradient(160deg, #2A0818, #4A1028);
}

.card-image.paus {
  background: linear-gradient(160deg, #2A1808, #4A2818);
}

.card-numeral {
  font-family: 'Playfair Display', serif;
  font-size: 2.8rem;
  font-weight: 700;
  color: var(--gold);
  opacity: 0.9;
}

.card-suit-symbol {
  font-size: 2rem;
  opacity: 0.6;
}

.card-image::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 60%;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.6), transparent);
}

.card-info {
  padding: 16px;
  position: relative;
}

.card-info h3 {
  font-size: 1rem;
  margin-bottom: 4px;
  color: var(--cream);
}

.card-info .card-keyword {
  font-size: 0.75rem;
  color: var(--gold);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.card-category-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  padding: 4px 12px;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(10px);
  border-radius: var(--radius-pill);
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--gold);
  z-index: 2;
}

/* No results */
.no-results {
  text-align: center;
  padding: 60px 24px;
  grid-column: 1 / -1;
  color: var(--gray);
}

.no-results h3 {
  font-size: 1.5rem;
  margin-bottom: 8px;
  color: var(--cream);
}

/* ========== CARD DETAIL PAGE ========== */
.detail-page {
  padding-top: 80px;
  min-height: 100vh;
  background: var(--burgundy-darker);
}

.detail-hero {
  display: flex;
  gap: 48px;
  max-width: 1100px;
  margin: 0 auto;
  padding: 40px 24px;
  align-items: flex-start;
}

.detail-card-visual {
  flex-shrink: 0;
  width: 280px;
  aspect-ratio: 3/4;
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 16px;
  position: relative;
  overflow: hidden;
  border: 2px solid var(--glass-border);
  box-shadow: var(--shadow-lg);
}

.detail-card-visual .card-numeral {
  font-size: 5rem;
}

.detail-card-visual .card-suit-symbol {
  font-size: 3rem;
}

.detail-header {
  flex: 1;
}

.detail-back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--gold);
  font-size: 0.9rem;
  font-weight: 500;
  margin-bottom: 24px;
  transition: var(--transition);
}

.detail-back:hover {
  opacity: 0.7;
}

.detail-header h1 {
  font-size: clamp(2.5rem, 5vw, 4rem);
  margin-bottom: 8px;
  color: var(--white);
}

.detail-keyword {
  display: inline-block;
  padding: 8px 20px;
  background: var(--gold);
  color: var(--black);
  border-radius: var(--radius-pill);
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 2px;
  margin-bottom: 24px;
}

.detail-general {
  font-size: 1.05rem;
  line-height: 1.8;
  color: var(--cream);
  opacity: 0.85;
}

/* Detail sections */
.detail-sections {
  max-width: 1100px;
  margin: 0 auto;
  padding: 20px 24px 80px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 20px;
}

.detail-section {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  padding: 32px;
  backdrop-filter: blur(20px);
  transition: var(--transition);
}

.detail-section:hover {
  border-color: rgba(212, 168, 67, 0.3);
}

.detail-section-icon {
  width: 44px;
  height: 44px;
  background: linear-gradient(135deg, var(--burgundy), var(--burgundy-light));
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  margin-bottom: 16px;
}

.detail-section h3 {
  font-size: 1.15rem;
  color: var(--gold);
  margin-bottom: 12px;
}

.detail-section p {
  font-size: 0.9rem;
  line-height: 1.75;
  color: var(--cream);
  opacity: 0.8;
}

.detail-section .sub-section {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--glass-border);
}

.detail-section .sub-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--gold);
  margin-bottom: 6px;
  font-weight: 600;
}

/* Obstacles section special styling */
.detail-section.obstacles {
  border-color: rgba(158, 27, 63, 0.4);
}

.detail-section.obstacles .detail-section-icon {
  background: linear-gradient(135deg, #6b1030, #9E1B3F);
}

/* ========== FOOTER ========== */
.footer {
  background: var(--burgundy-deep);
  padding: 40px;
  text-align: center;
  border-top: 1px solid var(--glass-border);
}

.footer p {
  color: var(--gray);
  font-size: 0.85rem;
}

.footer a {
  color: var(--gold);
}

/* ========== ANIMATIONS ========== */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.fade-in {
  animation: fadeInUp 0.6s cubic-bezier(0.22, 1, 0.36, 1) forwards;
  opacity: 0;
}

.fade-in:nth-child(1) {
  animation-delay: 0.05s;
}

.fade-in:nth-child(2) {
  animation-delay: 0.1s;
}

.fade-in:nth-child(3) {
  animation-delay: 0.15s;
}

.fade-in:nth-child(4) {
  animation-delay: 0.2s;
}

.fade-in:nth-child(5) {
  animation-delay: 0.25s;
}

.fade-in:nth-child(6) {
  animation-delay: 0.3s;
}

/* ========== RESPONSIVE ========== */
@media (max-width: 768px) {
  .navbar {
    padding: 16px 20px;
  }

  .nav-links {
    display: none;
  }

  .nav-links.open {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: rgba(74, 10, 31, 0.98);
    backdrop-filter: blur(20px);
    padding: 24px;
    gap: 20px;
  }

  .nav-menu-btn {
    display: block;
  }

  .hero {
    min-height: 90vh;
  }

  .detail-hero {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .detail-card-visual {
    width: 220px;
  }

  .detail-sections {
    grid-template-columns: 1fr;
  }

  .cards-grid {
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 14px;
  }

  .card-numeral {
    font-size: 2rem;
  }
}

@media (max-width: 480px) {
  .cards-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }

  .hero h1 {
    font-size: 2.4rem;
  }

  .filters-container {
    gap: 6px;
  }

  .filter-btn {
    padding: 8px 16px;
    font-size: 0.8rem;
  }
}