/* ExergyNet Global Styles */

@import url("https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&family=Syne:wght@700;800&display=swap");

:root {
  --bg: #f6f4ef;
  --surface: #ffffff;
  --surface-soft: #fbfaf7;
  --text: #111111;
  --text-muted: #5f625f;
  --text-faint: #858883;
  --border: #dedbd3;
  --border-strong: #c9c5bb;
  --accent: #008f68;
  --accent-soft: #dff8ef;
  --accent-border: #8edfc4;
  --amber: #c97900;
  --amber-soft: #fff1d7;
  --gray-soft: #f1f0eb;
  --shadow: 0 18px 50px rgba(17, 17, 17, 0.05);
  --radius: 14px;
  --radius-sm: 9px;
  --max: 1080px;
}

[data-theme="dark"] {
  --bg: #0f1110;
  --surface: #171a18;
  --surface-soft: #121512;
  --text: #f4f4ef;
  --text-muted: #b6b9b2;
  --text-faint: #858a82;
  --border: #2b302c;
  --border-strong: #3a423c;
  --accent: #20d19d;
  --accent-soft: #0f3329;
  --accent-border: #237d62;
  --amber: #ffb84d;
  --amber-soft: #352613;
  --gray-soft: #202420;
  --shadow: 0 18px 50px rgba(0, 0, 0, 0.25);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.65;
  overflow-x: hidden;
}

a {
  color: inherit;
}

p {
  margin: 0 0 1rem;
  color: var(--text-muted);
}

h1,
h2,
h3 {
  margin: 0;
  color: var(--text);
  letter-spacing: -0.045em;
}

h1,
h2,
.nav-logo,
.brand-text {
  font-family: "Syne", "Inter", sans-serif;
}

h1 {
  font-size: clamp(3.2rem, 8vw, 6.8rem);
  line-height: 0.92;
  max-width: 980px;
}

h2 {
  font-size: clamp(1.75rem, 3vw, 3rem);
  line-height: 1.02;
  margin-bottom: 1rem;
}

h3 {
  font-size: 1.05rem;
  line-height: 1.15;
  margin-bottom: 0.65rem;
}

code,
pre,
.mono,
.address {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
}

code {
  display: inline-block;
  max-width: 100%;
  padding: 0.18rem 0.4rem;
  border: 1px solid var(--accent-border);
  border-radius: 6px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 0.82rem;
  overflow-wrap: anywhere;
  word-break: break-word;
}

pre {
  width: 100%;
  margin: 0 0 1rem;
  padding: 1.1rem;
  overflow-x: auto;
  white-space: pre;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
}

pre code {
  display: block;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--text);
  font-size: 0.86rem;
  line-height: 1.7;
}

/* Navigation */

nav {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
  min-height: 64px;
  padding: 0.85rem clamp(1rem, 4vw, 2rem);
  border-bottom: 1px solid var(--border);
  background: color-mix(in srgb, var(--bg) 91%, transparent);
  backdrop-filter: blur(16px);
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 0.48rem;
  flex: 0 0 auto;
  color: var(--text);
  text-decoration: none;
  font-weight: 800;
  font-size: 1.1rem;
  white-space: nowrap;
}

.dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  display: inline-block;
}

.nav-links {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.05rem;
  flex: 1;
  margin: 0;
  padding: 0;
  list-style: none;
}

.nav-links a {
  position: relative;
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.78rem;
  font-weight: 600;
}

.nav-links a:hover,
.nav-links a[aria-current="page"] {
  color: var(--accent);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  flex: 0 0 auto;
}

.theme-toggle,
.hamburger {
  width: 34px;
  height: 34px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
}

.hamburger {
  display: none;
}

/* Layout */

.page {
  padding: 0 clamp(1rem, 4vw, 2rem);
}

.container {
  width: min(100%, var(--max));
  margin: 0 auto;
}

section {
  padding: clamp(3rem, 7vw, 6rem) 0;
  border-top: 1px solid var(--border);
}

section:first-of-type {
  border-top: 0;
}

.section-label,
.hero-tag,
.code-label {
  margin-bottom: 0.75rem;
  color: var(--text-faint);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.68rem;
  font-weight: 800;
}

.hero {
  min-height: calc(100vh - 64px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  padding: clamp(4rem, 8vw, 7rem) 0 clamp(3rem, 6vw, 5rem);
}

.hero-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.38rem 0.6rem;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  margin-bottom: 1.3rem;
}

.pulse {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 0 rgba(0, 143, 104, 0.5);
  animation: pulse 1.8s infinite;
}

@keyframes pulse {
  70% {
    box-shadow: 0 0 0 10px rgba(0, 143, 104, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(0, 143, 104, 0);
  }
}

.hero-sub {
  width: min(680px, 100%);
  margin-top: 1.4rem;
  margin-bottom: 1.65rem;
  font-size: clamp(1.03rem, 1.5vw, 1.22rem);
}

.btn-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0.72rem 1rem;
  border-radius: 9px;
  border: 1px solid var(--border);
  text-decoration: none;
  font-size: 0.84rem;
  font-weight: 800;
  transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn-primary {
  background: var(--accent);
  border-color: var(--accent);
  color: #ffffff;
}

.btn-secondary {
  background: var(--surface);
  color: var(--text);
}

.btn-ghost {
  background: transparent;
  color: var(--text-muted);
}

.btn-ghost:hover,
.btn-secondary:hover {
  border-color: var(--accent-border);
  color: var(--accent);
}

/* Trust strip */

.trust-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin: 0 0 clamp(3rem, 6vw, 5rem);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  overflow: hidden;
  box-shadow: var(--shadow);
}

.trust-item {
  padding: 1.15rem 1.25rem;
  border-right: 1px solid var(--border);
  min-width: 0;
}

.trust-item:last-child {
  border-right: 0;
}

.trust-label {
  margin-bottom: 0.35rem;
  color: var(--text-faint);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.62rem;
  font-weight: 800;
}

.trust-value {
  color: var(--text);
  font-size: 0.88rem;
  font-weight: 800;
  overflow-wrap: anywhere;
}

.trust-value.accent {
  color: var(--accent);
}

/* Cards */

.card-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem;
  align-items: stretch;
}

.card,
.tx-card {
  min-width: 0;
  height: 100%;
  padding: 1.25rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.card p,
.tx-card p {
  font-size: 0.95rem;
}

.badge {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  max-width: 100%;
  padding: 0.25rem 0.48rem;
  border-radius: 7px;
  text-transform: none;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.7rem;
  font-weight: 800;
  overflow-wrap: anywhere;
}

.badge-green {
  background: var(--accent-soft);
  border: 1px solid var(--accent-border);
  color: var(--accent);
}

.badge-amber {
  background: var(--amber-soft);
  border: 1px solid color-mix(in srgb, var(--amber) 45%, transparent);
  color: var(--amber);
}

.badge-gray {
  background: var(--gray-soft);
  border: 1px solid var(--border);
  color: var(--text-muted);
}

.tx-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}

.address {
  display: block;
  width: 100%;
  padding: 0.75rem;
  border: 1px solid var(--accent-border);
  border-radius: 8px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 0.8rem;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.code-label {
  margin-top: 1rem;
  margin-bottom: 0.4rem;
}

/* Flow */

.flow {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.55rem;
}

.flow-step {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 0.48rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  color: var(--text-muted);
  font-size: 0.82rem;
  font-weight: 700;
}

.flow-step.active {
  border-color: var(--accent-border);
  background: var(--accent-soft);
  color: var(--accent);
}

.flow-arrow {
  color: var(--text-faint);
  font-weight: 800;
}

/* Footer */

footer {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 1.5rem;
  padding: 1.4rem clamp(1rem, 4vw, 2rem);
  border-top: 1px solid var(--border);
  color: var(--text-faint);
  font-size: 0.76rem;
}

.footer-links {
  display: flex;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.footer-links a {
  color: var(--text-faint);
  text-decoration: none;
}

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

/* Utility */

.small {
  font-size: 0.85rem;
}

.break {
  overflow-wrap: anywhere;
  word-break: break-word;
}

.status-ok {
  color: var(--accent);
}

.status-warn {
  color: var(--amber);
}

/* Tablet */

@media (max-width: 980px) {
  :root {
    --max: 820px;
  }

  nav {
    align-items: flex-start;
    flex-wrap: wrap;
  }

  .hamburger {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .nav-links {
    order: 3;
    display: none;
    width: 100%;
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    padding: 0.75rem 0 0;
  }

  .nav-links.open,
  .nav-links.active,
  .nav-links.show {
    display: flex;
  }

  .nav-links li {
    width: 100%;
  }

  .nav-links a {
    display: block;
    width: 100%;
    padding: 0.85rem 0;
    border-top: 1px solid var(--border);
  }

  .trust-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .trust-item:nth-child(2) {
    border-right: 0;
  }

  .trust-item:nth-child(1),
  .trust-item:nth-child(2) {
    border-bottom: 1px solid var(--border);
  }

  .card-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  footer {
    grid-template-columns: 1fr;
    text-align: center;
  }

  footer .nav-logo {
    justify-content: center;
  }
}

/* Mobile */

@media (max-width: 640px) {
  body {
    font-size: 15px;
  }

  nav {
    min-height: 58px;
    padding: 0.75rem 1rem;
  }

  .nav-logo {
    font-size: 1rem;
  }

  .page {
    padding: 0 1rem;
  }

  .hero {
    min-height: auto;
    padding: 4rem 0 3rem;
  }

  h1 {
    font-size: clamp(2.55rem, 13vw, 4.2rem);
    line-height: 0.95;
  }

  h2 {
    font-size: 1.75rem;
  }

  .hero-sub {
    font-size: 1rem;
  }

  .btn-row,
  .hero .btn-row {
    width: 100%;
    align-items: stretch;
  }

  .btn {
    width: 100%;
  }

  .hero > div[style*="display:flex"] {
    justify-content: flex-start !important;
  }

  .trust-strip {
    grid-template-columns: 1fr;
  }

  .trust-item {
    border-right: 0;
    border-bottom: 1px solid var(--border);
  }

  .trust-item:last-child {
    border-bottom: 0;
  }

  .card-grid {
    grid-template-columns: 1fr;
  }

  .card,
  .tx-card {
    padding: 1rem;
  }

  .flow {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.55rem;
  }

  .flow-arrow {
    display: none;
  }

  .flow-step {
    width: 100%;
    justify-content: center;
    border-radius: 9px;
  }

  pre {
    padding: 0.85rem;
  }

  pre code {
    font-size: 0.76rem;
  }

  code,
  .address {
    font-size: 0.72rem;
  }

  section {
    padding: 3.2rem 0;
  }

  footer {
    padding: 1.25rem 1rem;
  }

  .footer-links {
    flex-direction: column;
    gap: 0.55rem;
  }
}

/* Extra small */

@media (max-width: 390px) {
  h1 {
    font-size: 2.35rem;
  }

  .hero-tag {
    font-size: 0.58rem;
  }

  .trust-value {
    font-size: 0.78rem;
  }
}
