@import './theme.css';

/* Base styles mirror balancer-deprecated-exit-ui/src/styles/app.css.
   Font, noise texture and logo come from frontend-monorepo (balancer.fi). */

@font-face {
  font-family: 'Satoshi';
  src: url('/fonts/Satoshi-Regular.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Satoshi';
  src: url('/fonts/Satoshi-Medium.woff2') format('woff2');
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Satoshi';
  src: url('/fonts/Satoshi-Bold.woff2') format('woff2');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
}

body {
  /* Same layering as frontend-monorepo Noise.tsx: translucent base over the noise texture */
  background-color: var(--bg-level0);
  background-image:
    linear-gradient(var(--bg-level0-opacity), var(--bg-level0-opacity)),
    url('/images/background-noise.png');
  color: var(--text-tertiary);
  font-family:
    'Satoshi', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  font-size: 15px;
  line-height: 1.5;
  min-height: 100vh;
}

main {
  max-width: 960px;
  margin: 0 auto;
  padding: 0 16px 64px;
}

h1,
h2,
h3 {
  color: var(--text-primary);
  text-shadow: var(--shadow-font);
  font-weight: 700;
}

h1.gradient-text {
  background: var(--gradient-text-special);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  text-shadow: none;
}

h2 {
  font-size: 20px;
  margin: 40px 0 12px;
}

h3 {
  font-size: 16px;
  margin: 0;
}

p {
  margin: 0 0 8px;
}

a {
  color: var(--primary-400);
  text-decoration: none;
}
a:hover {
  text-decoration: underline;
}

.card {
  background: var(--bg-level1);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  padding: 16px;
}

.muted {
  color: var(--text-secondary);
  font-size: 13px;
}

.mono {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 13px;
}

.badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  background: var(--bg-level4);
  color: var(--text-secondary);
  white-space: nowrap;
}

.badge-green {
  background: rgba(0, 211, 149, 0.15);
  color: var(--green-400);
}

.badge-orange {
  background: rgba(249, 115, 22, 0.15);
  color: var(--orange-300);
}

.warning-box {
  background: var(--gradient-warning);
  border: 1px solid rgba(253, 186, 116, 0.35);
  border-radius: var(--radius-md);
  padding: 10px 12px;
  color: var(--orange-300);
  font-size: 14px;
}

.btn {
  display: inline-block;
  border-radius: var(--radius-md);
  padding: 8px 16px;
  font-weight: 600;
  text-align: center;
  transition: filter 0.15s ease;
}
.btn:hover {
  filter: brightness(1.08);
  text-decoration: none;
}

.btn-primary {
  background: var(--gradient-sand);
  color: var(--gray-800);
}

.btn-disabled {
  background: var(--bg-level4);
  color: var(--text-disabled);
  border: 1px solid var(--border-default);
  cursor: not-allowed;
}

/* Date-driven visibility, toggled by the inline script in index.html.
   Without JS, the pre-date state shows. */
html:not(.js) [data-from],
.off {
  display: none !important;
}

/* Navbar */

.navbar {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(49, 55, 63, 0.8);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-subtle);
}

.navbar-inner {
  max-width: 960px;
  margin: 0 auto;
  padding: 0 16px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  display: inline-flex;
  color: var(--text-primary);
}
.logo:hover {
  opacity: 0.85;
  text-decoration: none;
}

.logo-type {
  width: 106px;
  height: 20px;
}

.logo-mark {
  width: 26px;
  height: 21px;
}

.navbar-link {
  color: var(--text-secondary);
  font-weight: 500;
  font-size: 14px;
}
.navbar-link:hover {
  color: var(--text-primary);
  text-decoration: none;
}

/* Header */

header {
  padding: 40px 0 8px;
}

header h1 {
  margin: 0;
  font-size: 32px;
}

.lead {
  font-size: 16px;
  max-width: 680px;
  margin: 8px 0 16px;
}

/* App cards */

.apps,
.groups {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

/* Odd card out spans the full row */
.apps > .card:last-child:nth-child(odd),
.groups > .card:last-child:nth-child(odd) {
  grid-column: 1 / -1;
}

@media (max-width: 640px) {
  .apps,
  .groups {
    grid-template-columns: 1fr;
  }
}

.app {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.app-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
}

.app p {
  flex: 1;
}

.app .btn {
  margin-top: 4px;
}

/* Audience section */

.groups ul {
  margin: 8px 0 0;
  padding-left: 18px;
}

.groups li {
  margin-bottom: 4px;
}

/* Timeline */

.timeline {
  list-style: none;
  margin: 0;
  padding: 0;
}

.timeline li {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border-subtle);
}

.timeline li:last-child {
  border-bottom: none;
}

.timeline .when {
  color: var(--text-primary);
  font-weight: 600;
  font-size: 14px;
}

.timeline li.past .when,
.timeline li.past .what {
  color: var(--text-disabled);
}

.timeline li.next {
  background: var(--bg-level2);
  border-radius: var(--radius-md);
  margin: 0 -8px;
  padding: 10px 8px;
}

@media (max-width: 520px) {
  .timeline li {
    grid-template-columns: 1fr;
    gap: 2px;
  }
}

/* Resources + footer */

.links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
}

footer {
  margin-top: 48px;
  padding-top: 24px;
  border-top: 1px solid var(--border-subtle);
}

.footer-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.socials {
  display: flex;
  gap: 16px;
}

.socials a {
  display: inline-flex;
  color: var(--text-secondary);
}
.socials a:hover {
  color: var(--text-primary);
}

.socials svg {
  width: 20px;
  height: 20px;
}
