/* Tokens mirror src/themes/palette.ts (service.*) */
:root {
  --a100: #1b1b21;
  --b100: #9e9fa6;
  --b300: #393b4a;
  --b500: #232535;
  --text-muted: #a5a6ac;
  --text-faq: #c8c9cd;
  --line: #4d4d51;
  --white: #ffffff;
  --radius: 7px;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--a100);
  color: var(--white);
  font-family: Muli, Mulish, Helvetica, Arial, sans-serif;
  font-weight: 300;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
}

img {
  max-width: 100%;
}

.ext::after {
  content: '';
  display: inline-block;
  width: 0.8em;
  height: 0.8em;
  margin-left: 6px;
  vertical-align: baseline;
  background: currentColor;
  -webkit-mask: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="black" stroke-width="1.6" stroke-linecap="round" stroke-linejoin="round"><path d="M14 3h7v7"/><path d="M21 3 10 14"/><path d="M19 14v5a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V7a2 2 0 0 1 2-2h5"/></svg>') center / contain no-repeat;
  mask: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="black" stroke-width="1.6" stroke-linecap="round" stroke-linejoin="round"><path d="M14 3h7v7"/><path d="M21 3 10 14"/><path d="M19 14v5a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V7a2 2 0 0 1 2-2h5"/></svg>') center / contain no-repeat;
}

/* ---------- Announcement + Header ---------- */
.topbar {
  position: sticky;
  top: 0;
  z-index: 1000;
}

.announce {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 4px 18px;
  padding: 10px 15px;
  background: var(--white);
  color: var(--a100);
  font-size: 15px;
  font-weight: 400;
  text-align: center;
}

.announce a {
  color: var(--a100);
  font-weight: 700;
  text-underline-offset: 3px;
}

.announce a:hover {
  text-decoration-thickness: 2px;
}

.header {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px 30px;
  padding: 22px 15px 45px;
  background: linear-gradient(to bottom, var(--a100) 70%, rgba(27, 27, 33, 0) 100%);
}

.logo {
  display: inline-flex;
  height: 33px;
  align-items: center;
}

.logo img {
  height: 22px;
}

.nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 30px;
}

.nav a {
  color: var(--b100);
  font-size: 18px;
  text-decoration: none;
  white-space: nowrap;
}

.nav a:hover {
  color: var(--white);
  text-decoration: underline;
}

.nav {
  margin-left: auto;
}

/* Phones: keep logo + Contact on one row; Developers stays reachable via the Protocolink section */
@media (max-width: 599px) {
  .header {
    flex-wrap: nowrap;
    padding-bottom: 30px;
  }

  .nav .ext {
    display: none;
  }

  .announce {
    font-size: 14px;
    padding: 8px 12px;
  }
}

.nav .nav-cta {
  color: var(--white);
  border-color: var(--b100);
}

.nav .nav-cta:hover {
  text-decoration: none;
  border-color: var(--white);
}

/* ---------- Page container (HomePage) ---------- */
.container {
  width: 100%;
  overflow-x: clip;
  padding: 30px 15px 0;
}

section,
details {
  scroll-margin-top: 170px;
}

.lead {
  margin: 20px 0 0;
  color: var(--text-muted);
  font-size: 18px;
  max-width: 560px;
}

.btn-outline.cta {
  margin-top: 36px;
  border-color: var(--white);
  color: var(--white);
}

.btn-outline.cta:hover {
  background: var(--white);
  color: var(--a100);
}

.contact-cta .lead {
  margin: 16px auto 0;
}

.contact-cta .button-row {
  margin-top: 0;
}

.h-title {
  font-size: 34px;
  font-weight: 300;
  line-height: 1.3;
  margin: 0;
}

.section-title {
  font-size: 34px;
  font-weight: 300;
  margin: 0 0 38px;
}

/* Dashed underline animation on <strong> (Headline/styles.ts) — pure CSS */
.dash strong {
  font-weight: 300;
  background: linear-gradient(90deg, white 50%, transparent 50%) repeat-x;
  background-size: 8px 4px;
  background-position: 0% 100%;
  padding-bottom: 3px;
  animation: dash 3.3s linear infinite;
}

.dash.slow strong {
  animation-duration: 13s;
}

@keyframes dash {
  to {
    background-position: 100% 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  .dash strong {
    animation: none;
  }
}

/* Outlined button (MUI outlined + startButtonSx) */
.btn-outline {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 220px;
  padding: 2px 16px;
  border: 1px solid var(--b300);
  border-radius: var(--radius);
  color: var(--b100);
  font-size: 22px;
  text-decoration: none;
  transition: border-color 0.15s, color 0.15s;
}

.btn-outline:hover {
  border-color: var(--white);
  color: var(--white);
}

.btn-outline.sm {
  min-width: 0;
  height: 34px;
  padding: 0 16px;
}

/* ---------- Headline ---------- */
.headline {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  row-gap: 30px;
  margin-bottom: 100px;
}

.headline > .copy,
.headline > .media {
  width: 100%;
}

.headline .media img {
  display: block;
  width: 100%;
  height: auto;
  padding-top: 20px;
}

.create-media {
  position: relative;
}

.headline .create-media .secondary {
  display: none;
}

.steps {
  display: flex;
  flex-direction: column;
  gap: 5px;
  margin-top: 20px;
}

.step {
  min-height: 55px;
  display: flex;
  align-items: center;
  padding: 0 15px;
  border-radius: var(--radius);
  background: var(--white);
  color: #1b1b22;
  font-size: 18px;
}

/* ---------- DeFi logos ---------- */
.defi-logos {
  text-align: center;
  margin: 100px 0;
}

.logo-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 4px;
}

.logo-row img {
  width: 40px;
  height: 40px;
  object-fit: contain;
}

.logo-row .lg-only {
  display: none;
}

.logo-row .eq {
  font-size: 34px;
  padding: 0 8px 0 10px;
  color: var(--white);
}

.defi-logos p {
  font-size: 34px;
  margin: 20px 0 0;
  line-height: 1.3;
}

/* ---------- Tutorial ---------- */
.tutorial {
  margin-bottom: 100px;
}

.tutorial-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 30px;
}

.card {
  position: relative;
  display: block;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  text-decoration: none;
  transition: border-color 0.15s;
}

.card:hover {
  border-color: var(--white);
}

.card .corner {
  position: absolute;
  top: 20px;
  right: 20px;
  color: var(--line);
}

.card:hover .corner {
  color: var(--white);
}

.card-large {
  width: 100%;
}

.card-large img {
  display: block;
  width: 100%;
  border-radius: var(--radius) var(--radius) 0 0;
}

.card-large .body {
  position: relative;
  padding: 15px;
}

.card-title {
  font-size: 22px;
  margin: 0 18px 8px 0;
  font-weight: 300;
}

.card-desc {
  font-size: 18px;
  color: var(--text-muted);
  margin: 0;
}

/* ---------- FAQ (Accordion -> native <details>) ---------- */
.faq {
  margin-bottom: 100px;
}

.faq details {
  margin-bottom: 3px;
  padding: 0 14px 0 34px;
  border-radius: var(--radius);
  background: var(--b500);
  color: var(--text-faq);
}

.faq summary {
  min-height: 79px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  font-size: 22px;
  cursor: pointer;
  list-style: none;
}

.faq summary::-webkit-details-marker {
  display: none;
}

.faq summary::after {
  content: '+';
  flex: none;
  width: 35px;
  text-align: center;
  font-size: 34px;
  font-weight: 200;
  line-height: 1;
}

.faq details[open] summary::after {
  content: '\00d7';
}

.faq .answer {
  padding-bottom: 28px;
  font-size: 18px;
  color: var(--text-muted);
}

.faq .answer p {
  margin: 0 0 12px;
}

.faq .answer a {
  color: var(--white);
}

/* ---------- Protocolink ---------- */
.center-block {
  text-align: center;
  margin-bottom: 100px;
}

.center-block .section-title {
  margin-bottom: 0;
}

.plink-note {
  margin: 12px 0 0;
  color: var(--text-muted);
  font-size: 18px;
}

.partner-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  margin-bottom: 40px;
}

.partner {
  height: 98px;
  padding: 20px;
  display: flex;
  justify-content: center;
  align-items: center;
  transition: transform 0.15s;
}

.partner:hover {
  transform: scale(1.05);
}

.partner img {
  max-height: 100%;
}

.button-row {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 25px;
}

.button-row .btn-outline {
  width: 300px;
}

 (MUI: sm 600, md 900, lg 1200, xl 1536) ---------- */main > section:last-child {
  margin-bottom: 0;
  padding-bottom: 120px;
}

/* ---------- Breakpoints (MUI: sm 600, md 900, lg 1200, xl 1536) ---------- */
@media (min-width: 600px) {
  .logo-row img {
    width: 64px;
    height: 64px;
  }

  .logo-row .eq {
    font-size: 48px;
  }

  .button-row {
    flex-direction: row;
  }

  .button-row .btn-outline {
    width: auto;
  }

  .card-title {
    font-size: 22px;
    margin-bottom: 13px;
  }

  .card-desc {
    font-size: 22px;
  }
}

@media (min-width: 900px) {
  .header {
    padding: 22px 35px 30px;
  }

  .logo img {
    height: 33px;
  }

  .container {
    padding: 30px 50px 0;
  }

  .lead {
    font-size: 20px;
  }
}

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

  .h-title {
    line-height: 1.5;
  }

  .headline > .copy {
    width: 40%;
  }

  .headline > .media {
    width: 60%;
  }

  .headline.create {
    margin-bottom: 200px;
  }

  /* Desktop: layered screenshots with steps pinned bottom-right, shown statically */
  .headline .create-media .primary {
    width: 60%;
  }

  .headline .create-media .secondary {
    display: block;
    position: absolute;
    top: -20px;
    right: -80px;
    height: 300px;
    width: auto;
    padding-top: 0;
    border-radius: 12px;
  }

  .create-media .steps {
    position: absolute;
    right: 0;
    bottom: 0;
    margin-top: 0;
  }

  .step {
    min-width: 395px;
  }

  .logo-row .lg-only {
    display: block;
  }

  .logo-row .eq {
    font-size: 60px;
    padding: 0 8px 0 15px;
  }

  .tutorial-grid {
    flex-wrap: nowrap;
    gap: 50px;
  }

  /* Single tutorial card: image left, copy right */
  .card-large {
    display: flex;
    align-items: stretch;
  }

  .card-large img {
    width: 50%;
    object-fit: cover;
    border-radius: var(--radius) 0 0 var(--radius);
  }

  .card-large .body {
    width: 50%;
    display: flex;
    flex-direction: column;
    justify-content: center;
  }

  .card-large .body {
    padding: 28px;
  }

  .card-large .card-title {
    font-size: 28px;
    margin-right: 0;
  }

  .center-block {
    margin-bottom: 200px;
  }
}

@media (min-width: 1536px) {
  .container {
    padding-left: 80px;
    padding-right: 80px;
  }

  .headline .create-media .secondary {
    top: -40px;
    height: 380px;
  }
}
