/* ============================================================= */
/*  Ace Technology — site styles (flat design)                   */
/* ============================================================= */

:root {
  --bg: #0a0a0a;
  --surface: #141414;
  --border: #242424;

  --text: #ffffff;
  --text-heading: #e0e0e0;
  --text-muted: #a0a0a0;
  --text-faint: #707070;
  --text-faintest: #555555;

  --font: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
}

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

body {
  margin: 0;
  font-family: var(--font);
  color: var(--text);
}

/* ============================================================= */
/*  Shared layout                                                */
/* ============================================================= */

.modern-body {
  background-color: var(--bg);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.modern-navbar {
  padding: 20px 40px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--bg);
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 1px solid var(--border);
}

.modern-logo-text {
  color: var(--text);
  text-decoration: none;
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -0.5px;
}

.modern-nav-links {
  display: flex;
  gap: 30px;
}

.modern-nav-links a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  position: relative;
  transition: color 0.25s ease;
}

.modern-nav-links a::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -4px;
  width: 100%;
  height: 1.5px;
  background: var(--text);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.3s ease;
}

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

.modern-nav-links a:hover::after {
  transform: scaleX(1);
  transform-origin: left;
}

.modern-hamburger {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 5px;
}

.modern-hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background-color: var(--text);
  margin: 5px 0;
  transition: 0.3s;
}

.modern-main-content {
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 80px 20px;
}

/* ============================================================= */
/*  App showcase (home / Luna) — single, centered, flat          */
/* ============================================================= */

.modern-app {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  max-width: 560px;
  width: 100%;
}

.modern-app-icon {
  width: 140px;
  height: 140px;
  border-radius: 32px;
  margin-bottom: 32px;
}

.modern-app-title {
  font-size: 44px;
  font-weight: 800;
  letter-spacing: -1px;
  margin: 0 0 20px;
  color: var(--text);
}

.modern-app-desc {
  font-size: 18px;
  color: var(--text-muted);
  line-height: 1.7;
  margin: 0 0 40px;
}

.modern-download-btn {
  display: inline-block;
  transition: transform 0.25s ease, filter 0.25s ease;
}

.modern-download-btn:hover {
  transform: translateY(-3px);
  filter: brightness(1.05) drop-shadow(0 10px 20px rgba(0, 0, 0, 0.4));
}

.modern-download-btn:active {
  transform: translateY(-1px);
}

.modern-download-btn img {
  height: 54px;
  width: auto;
}

/* ============================================================= */
/*  Footer                                                       */
/* ============================================================= */

.modern-footer {
  padding: 60px 20px 40px;
  text-align: center;
  margin-top: auto;
}

.modern-footer-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
}

.modern-footer-links {
  display: flex;
  gap: 30px;
}

.modern-footer-links a {
  color: var(--text-faint);
  text-decoration: none;
  font-size: 14px;
  transition: color 0.2s ease;
}

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

.modern-copyright {
  color: var(--text-faintest);
  font-size: 13px;
}

/* ============================================================= */
/*  Legal pages                                                  */
/* ============================================================= */

.modern-legal-container {
  max-width: 800px;
  width: 100%;
  margin: 0 auto;
  padding: 60px 40px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
}

.modern-legal-title {
  font-size: 36px;
  font-weight: 800;
  margin-bottom: 40px;
  color: var(--text);
  text-align: center;
}

.modern-legal-h1 {
  font-size: 24px;
  font-weight: 700;
  margin-top: 40px;
  margin-bottom: 20px;
  color: var(--text);
  border-bottom: 1px solid var(--border);
  padding-bottom: 10px;
}

.modern-legal-h2 {
  font-size: 18px;
  font-weight: 600;
  margin-top: 30px;
  margin-bottom: 16px;
  color: var(--text-heading);
}

.modern-legal-text {
  font-size: 16px;
  color: var(--text-muted);
  line-height: 1.8;
  margin-bottom: 20px;
}

.modern-legal-text strong {
  color: var(--text);
  font-weight: 600;
}

.modern-legal-link {
  color: var(--text);
  text-decoration: underline;
}

.modern-legal-list {
  color: var(--text-muted);
  font-size: 16px;
  line-height: 1.8;
  margin-bottom: 20px;
  padding-left: 20px;
}

.modern-legal-list li {
  margin-bottom: 10px;
}

/* Collapsible sections (<details>/<summary>) */
.modern-legal-section {
  border-bottom: 1px solid var(--border);
  padding-bottom: 10px;
  margin-bottom: 20px;
}

.modern-legal-section:last-of-type {
  border-bottom: none;
}

.modern-legal-section > .modern-legal-h1 {
  border-bottom: none;
  padding-bottom: 0;
  margin-bottom: 10px;
  cursor: pointer;
  list-style: none;
  position: relative;
  display: flex;
  justify-content: space-between;
  align-items: center;
  user-select: none;
}

.modern-legal-section > .modern-legal-h1::-webkit-details-marker {
  display: none;
}

.modern-legal-section > .modern-legal-h1::after {
  content: '+';
  font-size: 28px;
  font-weight: 300;
  color: var(--text-muted);
  transition: transform 0.2s ease;
}

.modern-legal-section[open] > .modern-legal-h1::after {
  transform: rotate(45deg);
}

.modern-legal-content {
  padding-top: 10px;
}

/* ============================================================= */
/*  Responsive                                                   */
/* ============================================================= */

@media (max-width: 768px) {
  .modern-hamburger {
    display: block;
  }

  .modern-navbar {
    padding: 15px 20px;
    flex-wrap: wrap;
  }

  .modern-nav-links {
    width: 100%;
    display: none;
    flex-direction: column;
    gap: 15px;
    align-items: center;
    padding-top: 15px;
    border-top: 1px solid var(--border);
    margin-top: 10px;
  }

  .modern-nav-links.active {
    display: flex;
  }

  .modern-nav-links a {
    font-size: 15px;
    padding: 10px 0;
    width: 100%;
    text-align: center;
  }

  .modern-main-content {
    padding: 60px 20px;
  }

  .modern-app-icon {
    width: 110px;
    height: 110px;
    border-radius: 26px;
    margin-bottom: 24px;
  }

  .modern-app-title {
    font-size: 32px;
  }

  .modern-app-desc {
    font-size: 16px;
    margin-bottom: 32px;
  }

  .modern-download-btn img {
    height: 48px;
  }

  .modern-footer {
    padding: 40px 20px 30px;
  }

  .modern-footer-links {
    gap: 15px;
    flex-wrap: wrap;
    justify-content: center;
  }

  .modern-legal-container {
    padding: 40px 20px;
    margin: 20px 10px;
    width: auto;
  }

  .modern-legal-title {
    font-size: 28px;
    margin-bottom: 30px;
  }

  .modern-legal-h1 {
    font-size: 20px;
  }

  .modern-legal-h2 {
    font-size: 16px;
  }

  .modern-legal-text,
  .modern-legal-list {
    font-size: 14px;
  }
}

/* ============================================================= */
/*  Motion & micro-interactions                                  */
/* ============================================================= */

@keyframes navIn {
  from { opacity: 0; transform: translateY(-14px); }
  to   { opacity: 1; transform: none; }
}

@keyframes rise {
  from { opacity: 0; transform: translateY(22px); }
  to   { opacity: 1; transform: none; }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

@keyframes glowPulse {
  0%, 100% { box-shadow: 0 18px 40px rgba(0, 0, 0, 0.5); }
  50%      { box-shadow: 0 26px 60px rgba(0, 0, 0, 0.55),
                         0 0 55px rgba(255, 255, 255, 0.09); }
}

.modern-navbar {
  animation: navIn 0.6s ease both;
}

/* Staggered hero entrance */
.modern-app-icon {
  animation: rise 0.7s cubic-bezier(0.22, 1, 0.36, 1) 0.15s both,
             glowPulse 5s ease-in-out 1s infinite;
  transition: filter 0.3s ease;
}

.modern-app-title {
  animation: rise 0.7s cubic-bezier(0.22, 1, 0.36, 1) 0.28s both;
}

.modern-app-desc {
  animation: rise 0.7s cubic-bezier(0.22, 1, 0.36, 1) 0.4s both;
}

.modern-download-btn {
  animation: fadeIn 0.8s ease 0.55s both;
}

.modern-app-icon:hover {
  filter: brightness(1.08) drop-shadow(0 0 28px rgba(255, 255, 255, 0.14));
}

/* Legal pages: gentle fade-in */
.modern-legal-container {
  animation: rise 0.6s ease both;
}

.modern-legal-content {
  animation: fadeIn 0.4s ease both;
}

/* Rotating expander marker eases open/closed */
.modern-legal-section > .modern-legal-h1::after {
  transition: transform 0.25s ease;
}

/* Respect users who prefer reduced motion */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
