/* CryptoTracker - stylesheet
   Three base colors:
     Ink     #0E1116   RGB(14, 17, 22)
     Indigo  #4F46E5   RGB(79, 70, 229)
     White   #FFFFFF   RGB(255, 255, 255)
   Grays are only transparent shades of Ink. */

:root {
  --ink: #0E1116;
  --indigo: #4F46E5;
  --white: #FFFFFF;
  --line: rgba(14, 17, 22, 0.10);
  --muted: rgba(14, 17, 22, 0.55);
  --tint: rgba(79, 70, 229, 0.06);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: "Segoe UI", system-ui, -apple-system, Roboto, Arial, sans-serif;
  color: var(--ink);
  background: var(--white);
  line-height: 1.65;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-wrap: break-word;
}

/* .wrap centers the content and limits its width */
.wrap {
  width: 100%;
  max-width: 1040px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.section {
  padding-top: 3rem;
  padding-bottom: 3rem;
}

/* ---------- Header and navigation ---------- */

.site-header {
  border-bottom: 1px solid var(--line);
}

/* Flex rows whose items wrap and stay vertically centered */
.site-header .wrap,
.coin,
.logo-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
}

.site-header .wrap {
  justify-content: space-between;
  gap: 0.5rem 1.5rem;
  padding-top: 1.1rem;
  padding-bottom: 1.1rem;
}

.brand {
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--ink);
  text-decoration: none;
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
}

.site-nav a {
  padding: 0.4rem 0.8rem;
  border-radius: 6px;
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--muted);
  text-decoration: none;
}

.site-nav a:hover {
  color: var(--ink);
  background: var(--tint);
}

.site-nav a.active {
  color: var(--indigo);
}

/* ---------- Main area ---------- */

main {
  flex: 1;
}

/* ---------- Hero (homepage only) ---------- */

.hero {
  color: var(--white);
  background:
    linear-gradient(rgba(14, 17, 22, 0.74), rgba(14, 17, 22, 0.84)),
    url("../img/hero.jpg") center / cover no-repeat;
}

.hero .wrap {
  padding-top: 5rem;
  padding-bottom: 5rem;
}

.hero h1 {
  max-width: 620px;
  font-size: 2.5rem;
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin-bottom: 1rem;
}

.hero p {
  max-width: 560px;
  font-size: 1.05rem;
  color: rgba(255, 255, 255, 0.8);
  margin-bottom: 1.75rem;
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-block;
  padding: 0.7rem 1.4rem;
  border-radius: 8px;
  font-size: 0.95rem;
  font-weight: 600;
  text-decoration: none;
  background: var(--indigo);
  color: var(--white);
}

.btn:hover {
  opacity: 0.9;
}

/* ---------- Headings and body text ---------- */

.section-title {
  font-size: 1.5rem;
  letter-spacing: -0.01em;
  margin-bottom: 1.5rem;
}

.prose p {
  max-width: 720px;
  margin-bottom: 0.9rem;
}

/* ---------- Price cards (homepage) ---------- */

.cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}

.card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding: 1.5rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  color: var(--ink);
  text-decoration: none;
  transition: border-color 0.15s, transform 0.15s;
}

.card:hover {
  border-color: var(--indigo);
  transform: translateY(-2px);
}

.card img {
  height: 38px;
  margin-bottom: 0.9rem;
}

.card .name {
  font-weight: 600;
  font-size: 1.05rem;
}

.sym {
  font-size: 0.8rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}

.card .price {
  margin-top: 0.6rem;
  font-size: 1.55rem;
  font-weight: 700;
}

/* ---------- Coin panel (subpages) ---------- */

.coin {
  gap: 2.5rem;
  padding: 2.25rem;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--tint);
  margin-bottom: 2.75rem;
}

.coin-logo {
  height: 120px;
}

.coin-meta {
  flex: 1;
  min-width: 240px;
}

.coin-meta h1 {
  font-size: 2rem;
  letter-spacing: -0.02em;
  margin: 0.15rem 0 1.1rem;
}

.price-label {
  display: block;
  font-size: 0.8rem;
  color: var(--muted);
  margin-bottom: 0.25rem;
}

.coin-price {
  font-size: 2.6rem;
  font-weight: 700;
  line-height: 1;
  color: var(--indigo);
  margin-bottom: 1.4rem;
}

/* ---------- Logo row (about page) ---------- */

.logo-row {
  gap: 2.5rem;
  margin-bottom: 2.5rem;
}

.logo-row img {
  height: 60px;
}

/* ---------- Image credits ---------- */

.credits {
  margin-top: 2.5rem;
  padding-top: 2rem;
  border-top: 1px solid var(--line);
}

.credits li {
  margin-bottom: 0.6rem;
  list-style: none;
  font-size: 0.92rem;
  color: var(--muted);
}

/* ---------- Footer ---------- */

.site-footer {
  margin-top: auto;
  background: var(--ink);
  color: var(--white);
}

.site-footer .wrap {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.4rem;
  padding-top: 1.75rem;
  padding-bottom: 1.75rem;
  font-size: 0.9rem;
}

.site-footer .dim {
  color: rgba(255, 255, 255, 0.55);
}

/* ---------- Responsive (mobile) ---------- */

@media (max-width: 720px) {
  .site-header .wrap {
    justify-content: center;
  }

  .site-nav {
    width: 100%;
    justify-content: center;
  }

  .hero .wrap {
    padding-top: 3.5rem;
    padding-bottom: 3.5rem;
  }

  .hero h1 {
    font-size: 1.9rem;
  }

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

  .coin {
    gap: 1.5rem;
    padding: 1.5rem;
  }

  .coin-price {
    font-size: 2.1rem;
  }

  .site-footer .wrap {
    justify-content: center;
    text-align: center;
  }
}
