/* ====================================
   AUREX — Finance Ecosystem
   Design System & Styles
   ==================================== */

/* --- Reset & Base --- */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

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

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-weight: 400;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  transition: background-color 0.4s ease, color 0.4s ease;
}

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

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

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

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

/* --- Theme Variables --- */
:root {
  --color-bg: #f8f6f2;
  --color-bg-alt: #f0ede8;
  --color-bg-card: #ffffff;
  --color-text: #1c1a16;
  --color-text-secondary: #7a746a;
  --color-text-muted: #b0aaa0;
  --color-border: #e3dfd8;
  --color-gold: #b8953a;
  --color-gold-light: #d4af37;
  --color-gold-dark: #8a6e2b;
  --color-gold-bg: rgba(184, 149, 58, 0.08);
  --color-shadow: rgba(28, 26, 22, 0.04);
  --color-shadow-strong: rgba(28, 26, 22, 0.08);
  --color-live: #2d8a4e;
  --color-live-bg: rgba(45, 138, 78, 0.1);
  --color-soon: #8a6e2b;
  --color-soon-bg: rgba(184, 149, 58, 0.1);
  --nav-bg: rgba(248, 246, 242, 0.85);
  --nav-border: rgba(227, 223, 216, 0.6);
  --card-border: rgba(227, 223, 216, 0.5);
  --hero-gradient: linear-gradient(180deg, rgba(248, 246, 242, 0) 0%, rgba(240, 237, 232, 0.4) 100%);
}

[data-theme="dark"] {
  --color-bg: #0d0c0a;
  --color-bg-alt: #12110f;
  --color-bg-card: #181614;
  --color-text: #e8e4de;
  --color-text-secondary: #9a948a;
  --color-text-muted: #6a645a;
  --color-border: #2a2722;
  --color-gold: #c4a35a;
  --color-gold-light: #d4af37;
  --color-gold-dark: #9a7d3a;
  --color-gold-bg: rgba(196, 163, 90, 0.08);
  --color-shadow: rgba(0, 0, 0, 0.2);
  --color-shadow-strong: rgba(0, 0, 0, 0.4);
  --color-live-bg: rgba(45, 138, 78, 0.15);
  --color-soon-bg: rgba(196, 163, 90, 0.12);
  --nav-bg: rgba(13, 12, 10, 0.85);
  --nav-border: rgba(42, 39, 34, 0.6);
  --card-border: rgba(42, 39, 34, 0.5);
  --hero-gradient: linear-gradient(180deg, rgba(13, 12, 10, 0) 0%, rgba(18, 17, 15, 0.6) 100%);
}

/* --- Typography --- */
h1, h2, h3, h4, h5 {
  font-family: 'Playfair Display', Georgia, 'Times New Roman', serif;
  font-weight: 700;
  line-height: 1.2;
  color: var(--color-text);
}

/* --- Container --- */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

@media (min-width: 768px) {
  .container {
    padding: 0 40px;
  }
}

@media (min-width: 1200px) {
  .container {
    padding: 0 64px;
  }
}

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: 'Inter', sans-serif;
  font-weight: 500;
  font-size: 0.9rem;
  letter-spacing: 0.02em;
  padding: 12px 28px;
  border-radius: 4px;
  transition: all 0.25s ease;
  cursor: pointer;
  white-space: nowrap;
}

.btn-primary {
  background: var(--color-gold);
  color: #ffffff;
  border: 1px solid var(--color-gold);
}

.btn-primary:hover {
  background: var(--color-gold-dark);
  border-color: var(--color-gold-dark);
}

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

.btn-outline:hover {
  background: var(--color-gold);
  color: #ffffff;
}

.btn-ghost {
  background: var(--color-gold-bg);
  color: var(--color-gold);
  border: 1px solid transparent;
}

.btn-ghost:hover {
  background: var(--color-gold);
  color: #ffffff;
}

.btn-small {
  padding: 8px 18px;
  font-size: 0.8rem;
}

/* --- Navbar --- */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: var(--nav-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--nav-border);
  transition: background 0.4s ease, border-color 0.4s ease;
}

.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

@media (min-width: 768px) {
  .nav-container {
    padding: 0 40px;
  }
}

@media (min-width: 1200px) {
  .nav-container {
    padding: 0 64px;
  }
}

.nav-logo {
  display: flex;
  align-items: center;
  width: 148px;
  height: 44px;
  overflow: hidden;
  border-radius: 4px;
  background: #ffffff;
}

.nav-logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.nav-links {
  display: none;
  align-items: center;
  gap: 32px;
}

.nav-links a {
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: var(--color-text-secondary);
  transition: color 0.2s ease;
  position: relative;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 1px;
  background: var(--color-gold);
  transition: width 0.25s ease;
}

.nav-links a:hover {
  color: var(--color-gold);
}

.nav-links a:hover::after {
  width: 100%;
}

@media (min-width: 768px) {
  .nav-links {
    display: flex;
  }
}

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

.theme-toggle {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-text-secondary);
  transition: background 0.25s ease, color 0.25s ease;
}

.theme-toggle:hover {
  background: var(--color-gold-bg);
  color: var(--color-gold);
}

[data-theme="light"] .sun-icon,
[data-theme="dark"] .moon-icon {
  display: none;
}

[data-theme="light"] .moon-icon,
[data-theme="dark"] .sun-icon {
  display: block;
}

.mobile-menu-toggle {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  width: 36px;
  height: 36px;
  gap: 5px;
  color: var(--color-text);
}

@media (min-width: 768px) {
  .mobile-menu-toggle {
    display: none;
  }
}

.mobile-menu-toggle span {
  display: block;
  width: 20px;
  height: 1.5px;
  background: currentColor;
  border-radius: 1px;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.mobile-menu-toggle.active span:nth-child(1) {
  transform: translateY(6.5px) rotate(45deg);
}

.mobile-menu-toggle.active span:nth-child(2) {
  opacity: 0;
}

.mobile-menu-toggle.active span:nth-child(3) {
  transform: translateY(-6.5px) rotate(-45deg);
}

/* Mobile Nav */
.mobile-nav {
  position: fixed;
  top: 64px;
  left: 0;
  right: 0;
  background: var(--nav-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--nav-border);
  padding: 16px 24px;
  display: none;
  flex-direction: column;
  gap: 12px;
  z-index: 99;
}

.mobile-nav.open {
  display: flex;
}

.mobile-nav a {
  padding: 10px 0;
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--color-text-secondary);
  transition: color 0.2s ease;
  border-bottom: 1px solid var(--color-border);
}

.mobile-nav a:last-child {
  border-bottom: none;
}

.mobile-nav a:hover {
  color: var(--color-gold);
}

/* --- Hero Section --- */
#hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  padding: 120px 0 80px;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background: var(--hero-gradient);
  pointer-events: none;
}

.hero-container {
  text-align: center;
  position: relative;
  z-index: 1;
}

.hero-logo-image {
  width: min(440px, 88vw);
  aspect-ratio: 1230 / 1135;
  margin: 0 auto 32px;
  object-fit: contain;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 18px 48px var(--color-shadow);
  opacity: 0;
  animation: fadeInUp 0.8s ease 0.1s forwards;
}

.hero-title {
  font-size: 3rem;
  font-weight: 800;
  letter-spacing: 0.3em;
  color: var(--color-text);
  margin-bottom: 12px;
  opacity: 0;
  animation: fadeInUp 0.8s ease 0.2s forwards;
}

.hero-tagline {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 1.15rem;
  font-weight: 400;
  font-style: italic;
  color: var(--color-gold);
  letter-spacing: 0.08em;
  margin-bottom: 24px;
  opacity: 0;
  animation: fadeInUp 0.8s ease 0.3s forwards;
}

.hero-divider {
  width: 48px;
  height: 1px;
  background: var(--color-gold);
  margin: 0 auto 28px;
  opacity: 0;
  animation: fadeInUp 0.8s ease 0.35s forwards;
}

.hero-mission {
  font-size: 1rem;
  font-weight: 400;
  color: var(--color-text-secondary);
  max-width: 600px;
  margin: 0 auto 40px;
  line-height: 1.7;
  opacity: 0;
  animation: fadeInUp 0.8s ease 0.4s forwards;
}

#hero .btn-primary {
  opacity: 0;
  animation: fadeInUp 0.8s ease 0.5s forwards;
}

@media (min-width: 768px) {
  .hero-title {
    font-size: 4.5rem;
    letter-spacing: 0.4em;
  }
  .hero-tagline {
    font-size: 1.4rem;
  }
  .hero-mission {
    font-size: 1.1rem;
  }
}

/* --- Section Shared --- */
section {
  padding: 80px 0;
}

@media (min-width: 768px) {
  section {
    padding: 120px 0;
  }
}

#ecosystem {
  background: var(--color-bg-alt);
  transition: background 0.4s ease;
}

.section-header {
  text-align: center;
  margin-bottom: 56px;
}

.section-header h2 {
  font-size: 2rem;
  letter-spacing: 0.02em;
  margin-bottom: 16px;
}

.section-subtitle {
  font-size: 1rem;
  color: var(--color-text-secondary);
  max-width: 540px;
  margin: 0 auto;
  line-height: 1.7;
}

@media (min-width: 768px) {
  .section-header h2 {
    font-size: 2.5rem;
  }
}

/* --- Product Grid --- */
.product-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
}

@media (min-width: 640px) {
  .product-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
  }
}

@media (min-width: 1024px) {
  .product-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 28px;
  }
}

.product-card {
  background: var(--color-bg-card);
  border: 1px solid var(--card-border);
  border-radius: 8px;
  padding: 32px;
  display: flex;
  flex-direction: column;
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease, background 0.4s ease;
}

.product-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 32px var(--color-shadow-strong);
  border-color: rgba(184, 149, 58, 0.2);
}

.card-icon {
  width: 48px;
  height: 48px;
  border-radius: 8px;
  background: var(--color-gold-bg);
  color: var(--color-gold);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
  flex-shrink: 0;
}

.card-name {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 1.2rem;
  font-weight: 600;
  margin-bottom: 10px;
}

.card-desc {
  font-size: 0.88rem;
  color: var(--color-text-secondary);
  line-height: 1.6;
  margin-bottom: 24px;
  flex-grow: 1;
}

.card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-top: 20px;
  border-top: 1px solid var(--card-border);
}

.status-badge {
  display: inline-flex;
  align-items: center;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  padding: 5px 12px;
  border-radius: 100px;
  text-transform: uppercase;
}

.status-badge.live {
  background: var(--color-live-bg);
  color: var(--color-live);
}

.status-badge.soon {
  background: var(--color-soon-bg);
  color: var(--color-gold);
}

/* --- Roadmap Section --- */
#roadmap {
  background: var(--color-bg);
  transition: background 0.4s ease;
}

.roadmap-timeline {
  position: relative;
  max-width: 840px;
  margin: 0 auto;
  display: grid;
  gap: 18px;
}

.roadmap-timeline::before {
  content: '';
  position: absolute;
  top: 24px;
  bottom: 24px;
  left: 24px;
  width: 1px;
  background: linear-gradient(180deg, transparent, var(--color-gold), var(--color-border), transparent);
  opacity: 0.55;
}

.roadmap-phase,
.guiding-card {
  position: relative;
  background: var(--color-bg-card);
  border: 1px solid var(--card-border);
  border-radius: 8px;
  box-shadow: 0 10px 28px var(--color-shadow);
  transition: border-color 0.3s ease, box-shadow 0.3s ease, background 0.4s ease;
}

.roadmap-phase {
  overflow: hidden;
}

.roadmap-phase:hover,
.roadmap-phase.open,
.guiding-card:hover {
  border-color: rgba(184, 149, 58, 0.28);
  box-shadow: 0 14px 34px var(--color-shadow-strong);
}

.roadmap-toggle {
  width: 100%;
  min-height: 96px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 18px;
  padding: 24px;
  color: inherit;
  text-align: left;
}

.phase-marker {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  background: var(--color-gold-bg);
  border: 1px solid rgba(184, 149, 58, 0.24);
  color: var(--color-gold);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  position: relative;
  z-index: 1;
}

.phase-summary {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.phase-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.phase-title {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 1.2rem;
  font-weight: 600;
  line-height: 1.25;
  color: var(--color-text);
}

.phase-goal {
  font-size: 0.88rem;
  color: var(--color-text-secondary);
}

.phase-chevron {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--color-gold);
  background: var(--color-gold-bg);
  transition: transform 0.25s ease, background 0.25s ease;
}

.roadmap-phase.open .phase-chevron {
  transform: rotate(180deg);
}

.roadmap-panel {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s ease;
}

.roadmap-tasks {
  list-style: none;
  display: grid;
  gap: 12px;
  padding: 0 24px 28px 90px;
}

.roadmap-tasks li {
  position: relative;
  padding-left: 18px;
  font-size: 0.9rem;
  color: var(--color-text-secondary);
  line-height: 1.55;
}

.roadmap-tasks li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.7em;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--color-gold);
  transform: translateY(-50%);
}

.guiding-card {
  max-width: 840px;
  margin: 28px auto 0;
  padding: 24px;
}

.guiding-header {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-bottom: 20px;
}

.guiding-header h3 {
  font-size: 1.25rem;
  font-weight: 600;
}

.guiding-list {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  padding: 0 0 0 66px;
}

@media (max-width: 640px) {
  .roadmap-timeline {
    gap: 14px;
  }

  .roadmap-timeline::before {
    left: 18px;
  }

  .roadmap-toggle {
    min-height: 112px;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 14px;
    padding: 20px 18px;
  }

  .phase-marker {
    width: 38px;
    height: 38px;
    font-size: 0.64rem;
  }

  .phase-heading {
    align-items: flex-start;
    flex-direction: column;
    gap: 10px;
  }

  .phase-title {
    font-size: 1.08rem;
  }

  .phase-chevron {
    grid-column: 2;
    justify-self: end;
    width: 32px;
    height: 32px;
    margin-top: -42px;
  }

  .roadmap-tasks {
    padding: 0 18px 24px 70px;
  }

  .guiding-card {
    padding: 20px 18px;
  }

  .guiding-header {
    align-items: flex-start;
    gap: 14px;
  }

  .guiding-list {
    grid-template-columns: 1fr;
    padding-left: 56px;
  }
}

/* --- About Section --- */
#about {
  background: var(--color-bg);
  transition: background 0.4s ease;
}

.about-container {
  max-width: 800px;
}

.about-content {
  text-align: center;
}

.about-content h2 {
  font-size: 2rem;
  margin-bottom: 20px;
}

@media (min-width: 768px) {
  .about-content h2 {
    font-size: 2.5rem;
  }
}

.about-divider {
  width: 48px;
  height: 1px;
  background: var(--color-gold);
  margin: 0 auto 32px;
}

.about-text {
  font-size: 0.95rem;
  color: var(--color-text-secondary);
  line-height: 1.8;
  margin-bottom: 20px;
}

.about-emphasis {
  font-family: 'Playfair Display', Georgia, serif;
  font-style: italic;
  color: var(--color-gold);
  font-size: 1.05rem;
  margin-top: 32px;
}

@media (min-width: 768px) {
  .about-text {
    font-size: 1.05rem;
  }
  .about-emphasis {
    font-size: 1.2rem;
  }
}

/* --- Newsletter / Waitlist --- */
#waitlist {
  background: var(--color-bg-alt);
  transition: background 0.4s ease;
}

.waitlist-container {
  text-align: center;
  max-width: 600px;
}

.newsletter-form {
  max-width: 480px;
  margin: 0 auto;
}

.input-row {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

@media (min-width: 480px) {
  .input-row {
    flex-direction: row;
  }
}

.email-input {
  flex: 1;
  padding: 14px 18px;
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: 4px;
  font-family: 'Inter', sans-serif;
  font-size: 0.9rem;
  color: var(--color-text);
  outline: none;
  transition: border-color 0.25s ease, background 0.4s ease;
}

.email-input::placeholder {
  color: var(--color-text-muted);
}

.email-input:focus {
  border-color: var(--color-gold);
}

.btn-submit {
  padding: 14px 28px;
  flex-shrink: 0;
}

.form-message {
  margin-top: 16px;
  font-size: 0.85rem;
  min-height: 24px;
  transition: color 0.3s ease;
}

.form-message.success {
  color: var(--color-live);
}

.form-message.error {
  color: #c0392b;
}

/* --- Footer --- */
#footer {
  background: var(--color-bg);
  border-top: 1px solid var(--color-border);
  padding: 48px 0 32px;
  transition: background 0.4s ease, border-color 0.4s ease;
}

.footer-container {
  text-align: center;
}

.footer-logo {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: min(220px, 70vw);
  aspect-ratio: 1230 / 1135;
  margin-bottom: 24px;
  overflow: hidden;
  border-radius: 6px;
  background: #ffffff;
}

.footer-logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.footer-links {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 24px;
  margin-bottom: 24px;
}

.footer-links a {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--color-text-secondary);
  transition: color 0.2s ease;
}

.footer-links a:hover {
  color: var(--color-gold);
}

.footer-contact {
  margin-bottom: 24px;
}

.footer-contact a {
  font-size: 0.85rem;
  color: var(--color-text-muted);
  transition: color 0.2s ease;
}

.footer-contact a:hover {
  color: var(--color-gold);
}

.footer-copy {
  font-size: 0.75rem;
  color: var(--color-text-muted);
  letter-spacing: 0.03em;
}

/* --- Fade In Animation --- */
.fade-in {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* --- Selection --- */
::selection {
  background: var(--color-gold);
  color: #fff;
}

/* --- Scrollbar --- */
::-webkit-scrollbar {
  width: 6px;
}

::-webkit-scrollbar-track {
  background: var(--color-bg);
}

::-webkit-scrollbar-thumb {
  background: var(--color-border);
  border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--color-text-muted);
}
