/* Design system based on DESIGN.md — getmonero.org visual language */

:root {
  /* Accent */
  --color-primary:        #d26e2b;
  --color-primary-dark:   #ce5e14;
  --color-primary-alt:    #eb912c;

  /* Text */
  --color-text:           #4c4c4c;
  --color-text-dark:      #393939;
  --color-text-black:     #000000;
  --color-muted:          #9ca1ac;

  /* Surfaces */
  --color-bg:             #edeef0;
  --color-surface:        #ffffff;
  --color-surface-alt:    #fcfcfc;
  --color-footer-bg:      #4c4c4c;
  --color-footer-text:    #efefef;

  /* Code */
  --color-code-bg:        #fff1e8;
  --color-code-text:      #2f6f9f;

  /* Lines */
  --color-line:           #edeef0;
  --color-line-strong:    #d0d4dd;
  --color-link-underline: #a1aabb;

  /* Shadows */
  --shadow-card: 0 2px 4px rgba(50, 50, 93, .1);
  --shadow-btn:  0 1px 5px 0 rgba(0,0,0,.07), 0 7px 17px 0 rgba(0,0,0,.1);

  /* Radii */
  --radius-code: .2rem;
  --radius-round: 50%;

  /* Typography scale */
  --font-base:     1.0625rem;
  --font-h1:       2.3rem;
  --font-h1-hero:  2.6rem;
  --font-h2:       1.75rem;
  --font-h3:       1.5rem;
  --font-h3-block: 1.3rem;
  --font-btn:      1rem;
  --font-nav:      1.35rem;
  --font-small:    0.9375rem;
  --font-meta:     0.9rem;

  /* Breakpoints as reference */
  --bp-sm: 48rem;
  --bp-md: 62rem;
  --bp-lg: 75rem;
}

/* Reset & base */
*, *::before, *::after {
  box-sizing: border-box;
}

html {
  font-size: 100%;
  -webkit-text-size-adjust: 100%;
  -webkit-tap-highlight-color: transparent;
}

body {
  margin: 0;
  padding: 0;
  font-family: 'Open Sans', system-ui, -apple-system, sans-serif;
  font-size: var(--font-base);
  font-weight: 400;
  line-height: 1.7;
  color: var(--color-text);
  background: var(--color-bg);
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--color-text-black);
  text-decoration: none;
  transition: color .2s ease;
}

a:hover {
  border-bottom: 2px dotted var(--color-link-underline);
}

a:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
}

/* Headings */
h1, h2, h3, h4 {
  font-family: 'Hind', system-ui, sans-serif;
  font-weight: 700;
  line-height: 1.3;
  color: var(--color-text-dark);
  margin: 0 0 1rem;
  letter-spacing: -0.01em;
}

h1 {
  font-size: var(--font-h1);
}

h2 {
  font-size: var(--font-h2);
  text-align: center;
  margin-bottom: 1.5rem;
}

h3 {
  font-size: var(--font-h3);
  font-weight: 500;
}

/* Page header block */
.page-header {
  text-align: center;
  padding-bottom: 2.5rem;
}

.page-header h1 {
  margin-bottom: 0.5rem;
}

.page-lead {
  font-size: 1.15rem;
  color: var(--color-muted);
  margin: 0.5rem auto 0;
  max-width: 36rem;
  line-height: 1.6;
}

/* Container */
.container {
  margin: 0 auto;
  width: 100%;
  max-width: 46rem;
  padding: 0 1rem;
}

@media (min-width: 62rem) {
  .container {
    max-width: 61rem;
  }
}

@media (min-width: 75rem) {
  .container {
    max-width: 71rem;
  }
}

/* Info block (card) — MUST */
.info-block {
  background: var(--color-surface);
  box-shadow: var(--shadow-card);
  padding: 3.5rem 2.5rem;
  margin-bottom: 1.25rem;
}

@media (max-width: 75rem) {
  .info-block {
    padding: 3rem 2rem;
  }
}

@media (max-width: 62rem) {
  .info-block {
    padding: 2.25rem 1.5rem;
  }
}

@media (max-width: 30rem) {
  .info-block {
    padding: 1.75rem 1.1rem;
    margin-bottom: 0.75rem;
  }
}

/* Text adapted */
.text-adapted {
  max-width: 40rem;
  margin: 0 auto;
}

/* Buttons */
.btn {
  display: inline-block;
  background: none;
  border: 2px solid var(--color-primary);
  color: var(--color-primary);
  font-family: 'Hind', sans-serif;
  font-weight: 700;
  font-size: var(--font-btn);
  text-transform: uppercase;
  text-align: center;
  text-decoration: none;
  white-space: nowrap;
  height: 2.9rem;
  line-height: 3rem;
  padding: 0 1rem;
  min-width: 10rem;
  box-shadow: var(--shadow-btn);
  cursor: pointer;
  transition: background .15s ease, transform .15s ease, box-shadow .15s ease, color .15s ease;
}

.btn:hover,
.btn:focus-visible {
  background: var(--color-primary);
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 7px 14px rgba(50,50,93,.1), 0 3px 6px rgba(0,0,0,.08);
  border-bottom: none;
}

.btn:active {
  transform: translateY(1px);
  box-shadow: 0 4px 6px rgba(50,50,93,.11), 0 1px 3px rgba(0,0,0,.08);
}

.btn:disabled,
.btn[aria-disabled="true"] {
  opacity: .5;
  pointer-events: none;
}

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

.btn-primary:hover,
.btn-primary:focus-visible {
  background: var(--color-primary-dark);
  border-color: var(--color-primary-dark);
  box-shadow: 0 0 30px rgba(50,50,93,.2), 0 3px 30px rgba(0,0,0,.2);
}

/* Top bar */
.top-bar {
  background: var(--color-surface);
  border-bottom: 1px solid var(--color-line);
  padding: .75rem 0;
  font-size: var(--font-meta);
}

.top-bar-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 71rem;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.logo {
  font-family: 'Hind', sans-serif;
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--color-text-dark);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: .5rem;
}

.logo:hover {
  border-bottom: none;
  color: var(--color-primary);
}

.logo-mark {
  width: 1.6rem;
  height: 1.6rem;
  background: var(--color-primary);
  border-radius: var(--radius-code);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: .75rem;
  font-weight: 700;
}

.top-links {
  display: flex;
  gap: 1.25rem;
  align-items: center;
}

.top-links a {
  color: var(--color-text);
  font-size: var(--font-meta);
}

.top-links a:hover {
  color: var(--color-primary);
  border-bottom: none;
}

/* Navigation — desktop */
.nav-wrap {
  background: var(--color-surface);
  box-shadow: var(--shadow-card);
  position: relative;
  z-index: 100;
}

.nav-container {
  position: relative;
  max-width: 71rem;
  padding: 0;
}

.nav {
  display: flex;
  max-width: 71rem;
  margin: 0 auto;
}

.nav-item {
  position: relative;
  flex: 1;
  text-align: center;
}

.nav-item > a {
  display: block;
  padding: 1.5rem 1rem;
  font-family: 'Hind', sans-serif;
  font-weight: 500;
  font-size: var(--font-nav);
  color: var(--color-text);
  text-decoration: none;
  transition: color .2s ease-out;
}

.nav-item > a:hover,
.nav-item > a:focus-visible {
  color: var(--color-primary);
  border-bottom: none;
}

.nav-item.active > a {
  color: var(--color-primary);
}

/* Mobile burger */
.burger-check {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.burger {
  display: none;
  width: 2.5rem;
  height: 2.5rem;
  position: relative;
  cursor: pointer;
  z-index: 200;
}

.burger span {
  display: block;
  width: 1.5rem;
  height: 2px;
  background: #4c4c4c;
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  transition: transform .3s ease, opacity .3s ease;
}

.burger span:nth-child(1) { top: 0.7rem; }
.burger span:nth-child(2) { top: 1.15rem; }
.burger span:nth-child(3) { top: 1.6rem; }

.burger-check:checked + .burger span:nth-child(1) {
  transform: translateX(-50%) rotate(45deg);
  top: 1.15rem;
}

.burger-check:checked + .burger span:nth-child(2) {
  opacity: 0;
}

.burger-check:checked + .burger span:nth-child(3) {
  transform: translateX(-50%) rotate(-45deg);
  top: 1.15rem;
}

/* Mobile nav */
@media (max-width: 62rem) {
  .nav {
    display: none;
    flex-direction: column;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--color-surface);
    box-shadow: var(--shadow-card);
    padding: 1rem 0;
  }

  .burger-check:checked ~ .nav {
    display: flex;
  }

  .burger {
    display: block;
  }

  .nav-item {
    text-align: left;
    border-bottom: 1px solid var(--color-line);
  }

  .nav-item > a {
    padding: 1rem 1.5rem;
    font-size: 1.125rem;
    text-transform: uppercase;
  }

  .top-bar-inner {
    padding: 0 1rem;
  }

  .top-links {
    gap: .75rem;
  }
}

@media (max-width: 30rem) {
  .top-links span {
    display: none;
  }
}

/* Page wrapper */
.page-wrapper {
  padding: 1.75rem 0 3.5rem;
}

.site-wrap {
  /* container already applied */
}

/* Hero */
.hero {
  margin-bottom: 1.25rem;
}

.hero-grid {
  display: flex;
  gap: 2.5rem;
  align-items: center;
}

.hero h1 {
  font-family: 'Hind', sans-serif;
  font-weight: 700;
  font-size: var(--font-h1-hero);
  line-height: 1.15;
  margin: 0;
  color: var(--color-text-dark);
  letter-spacing: -0.02em;
}

.hero-sub {
  font-size: 1.25rem;
  letter-spacing: .02rem;
  margin: 0.6rem 0 1.1rem;
  color: var(--color-primary);
  font-family: 'Hind', sans-serif;
  font-weight: 500;
}

.hero-text > p {
  max-width: 34rem;
}

.hero-actions {
  display: flex;
  gap: 1rem;
  margin-top: 1.75rem;
  flex-wrap: wrap;
}

.hero-media {
  flex: 0 0 38%;
  text-align: center;
}

.hero-media svg {
  max-width: 100%;
  height: auto;
}

@media (max-width: 62rem) {
  .hero-grid {
    flex-direction: column;
    text-align: center;
    gap: 1.5rem;
  }

  .hero-media {
    order: -1;
    flex: none;
    max-width: 260px;
    margin: 0 auto;
  }

  .hero-text > p {
    max-width: none;
  }

  .hero-actions {
    justify-content: center;
  }

  h1 {
    font-size: 1.8rem;
  }

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

@media (max-width: 30rem) {
  .hero h1 {
    font-size: 1.75rem;
  }

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

/* Feature list & rows */
.feature-list {
  display: flex;
  flex-direction: column;
  gap: 2.25rem;
  margin-top: 0.5rem;
}

.feature-row {
  display: flex;
  gap: 1.75rem;
  align-items: flex-start;
}

.feature-icon {
  flex: 0 0 72px;
  text-align: center;
  padding-top: 0.15rem;
}

.feature-icon svg {
  width: 64px;
  height: 64px;
}

.feature-text h3 {
  font-family: 'Hind', sans-serif;
  font-size: var(--font-h3-block);
  font-weight: 600;
  line-height: 1.4;
  margin: 0 0 0.4rem;
  text-align: left;
}

.feature-text p {
  margin: 0;
  padding-top: 0;
  color: var(--color-text);
}

@media (max-width: 62rem) {
  .feature-row {
    flex-direction: column;
    text-align: center;
    align-items: center;
    gap: 1rem;
  }

  .feature-text h3 {
    text-align: center;
  }

  .feature-icon {
    flex: none;
  }
}

/* Stats grid */
.stats-grid {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  margin: 1.5rem 0;
}

.stat-card {
  flex: 1 1 calc(25% - .5rem);
  background: var(--color-surface-alt);
  padding: 1.25rem 1rem;
  text-align: center;
  border: 1px solid var(--color-line);
}

.stat-value {
  font-family: 'Hind', sans-serif;
  font-weight: 700;
  font-size: 1.6rem;
  color: var(--color-primary);
  display: block;
}

.stat-label {
  font-size: var(--font-meta);
  color: var(--color-muted);
  margin-top: .25rem;
}

@media (max-width: 62rem) {
  .stat-card {
    flex: 1 1 calc(50% - .5rem);
  }
}

@media (max-width: 30rem) {
  .stat-card {
    flex: 1 1 100%;
  }
}

/* Accordion (FAQ) */
.tab {
  border-top: 1px solid var(--color-line);
  color: var(--color-text);
}

.tab:last-of-type {
  border-bottom: 1px solid var(--color-line);
}

input.accordion {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

label.accordion {
  display: block;
  padding: 1.3rem 2rem 1.3rem 0;
  font-family: 'Hind', sans-serif;
  font-size: 1.2rem;
  font-weight: 700;
  cursor: pointer;
  position: relative;
  color: var(--color-text-dark);
}

label.accordion::after {
  content: "";
  position: absolute;
  top: 50%;
  right: 0;
  border: 4px solid transparent;
  border-top-color: var(--color-text);
  transform: translateY(-25%);
  transition: transform .2s;
}

input.accordion:checked + label.accordion::after {
  transform: translateY(-75%) rotateX(180deg);
}

.tab-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height .3s ease;
}

input.accordion:checked ~ .tab-content {
  max-height: 40rem;
}

.tab-content p {
  margin: 0 0 1.5rem;
  padding-right: 1rem;
}

/* Footer */
footer {
  background: var(--color-footer-bg);
  color: var(--color-footer-text);
  margin-top: 2rem;
}

.footer-wrapper {
  padding: 2.5rem 1.5rem;
  max-width: 71rem;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
}

.footer-col {
  flex: 1 1 200px;
}

.footer-col h4 {
  font-family: 'Hind', sans-serif;
  font-size: 1rem;
  font-weight: 700;
  color: #fff;
  margin: 0 0 1rem;
  text-transform: uppercase;
  letter-spacing: .03em;
}

footer a {
  color: var(--color-footer-text);
  font-size: var(--font-small);
  text-decoration: none;
  display: block;
  margin-bottom: .5rem;
}

footer a:hover,
footer a:focus-visible {
  border-bottom: 2px dotted var(--color-footer-text);
}

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,.1);
  padding: 1.25rem 1.5rem;
  text-align: center;
  font-size: var(--font-meta);
  color: var(--color-muted);
  max-width: 71rem;
  margin: 0 auto;
}

.footer-bottom a {
  display: inline;
  color: var(--color-footer-text);
}

@media (max-width: 30rem) {
  .footer-col {
    flex: 1 1 100%;
  }
}

/* Disclaimer */
.disclaimer {
  font-size: var(--font-meta);
  color: var(--color-muted);
  border-top: 1px solid var(--color-line-strong);
  padding-top: 1.5rem;
  margin-top: 0.5rem;
  line-height: 1.65;
}

.footer-note {
  font-size: 0.9rem;
  margin: 0;
  color: #c0c0c0;
  line-height: 1.55;
}

/* Back to top */
.back-to-top {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  width: 3rem;
  height: 3rem;
  border-radius: var(--radius-round);
  background: var(--color-surface);
  border: 1px solid var(--color-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-card);
  opacity: 0;
  visibility: hidden;
  transition: opacity .2s, visibility .2s, background .2s;
  z-index: 50;
  text-decoration: none;
}

.back-to-top.visible {
  opacity: 1;
  visibility: visible;
}

.back-to-top:hover {
  background: var(--color-primary);
  border-bottom: none;
}

.back-to-top svg {
  width: 1rem;
  height: 1rem;
  fill: var(--color-primary);
  transition: fill .2s;
}

.back-to-top:hover svg {
  fill: #fff;
}

/* Utility */
.center {
  text-align: center;
}

.mt-1 { margin-top: 1rem; }
.mt-2 { margin-top: 2rem; }
.mb-1 { margin-bottom: 1rem; }
.mb-2 { margin-bottom: 2rem; }

p + p {
  margin-top: 1rem;
}

ul, ol {
  padding-left: 1.5rem;
}

li + li {
  margin-top: .4rem;
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    transition: none !important;
    animation: none !important;
  }
}

/* Target offset for fixed elements if any */
:target::before {
  content: "";
  display: block;
  height: 80px;
  margin-top: -60px;
}

/* Code */
code {
  background: var(--color-code-bg);
  color: var(--color-code-text);
  padding: .15rem .4rem;
  border-radius: var(--radius-code);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: .9em;
}

/* 404 */
.error-page {
  text-align: center;
  padding: 4rem 1rem;
}

.error-page h1 {
  font-size: 4rem;
  color: var(--color-primary);
  margin-bottom: .5rem;
}
