/* ==========================================================================
   Converter M — design tokens
   ========================================================================== */
:root{
  --ink: #0A0E17;
  --ink-soft: #10151F;
  --panel: #141B2B;
  --panel-line: rgba(201,162,75,0.16);

  --paper: #F5EFDD;
  --paper-shade: #E7DBB8;
  --paper-line: rgba(28,35,51,0.14);

  --gold: #C9A24B;
  --gold-soft: #8A7434;
  --emerald: #1F5C46;
  --emerald-bright: #35916A;
  --rose: #9C3B3B;

  --cream: #EFE9D8;
  --text-dark: #1C2333;
  --muted: #8791A8;
  --muted-paper: #8B7F5E;

  --font-display: "Fraunces", "Iowan Old Style", serif;
  --font-body: "Inter", -apple-system, "Helvetica Neue", sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, monospace;

  --radius-lg: 22px;
  --radius-md: 14px;
  --radius-sm: 8px;

  --ease: cubic-bezier(.22,.9,.32,1);
}

*{ box-sizing: border-box; }
html{ scroll-behavior: smooth; }

body{
  margin:0;
  background: var(--ink);
  color: var(--cream);
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
  position: relative;
  overflow-x: hidden;
}

@media (prefers-reduced-motion: reduce){
  html{ scroll-behavior: auto; }
  *{ animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; }
}

::selection{ background: var(--gold); color: var(--ink); }

a{ color: inherit; text-decoration: none; }

.wrap{
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 28px;
}

/* focus visibility */
a:focus-visible, button:focus-visible, select:focus-visible, input:focus-visible{
  outline: 2px solid var(--gold);
  outline-offset: 3px;
  border-radius: 4px;
}

/* background engraving texture */
.bg-engrave{
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  color: var(--gold);
  opacity: 0.05;
  pointer-events: none;
  z-index: 0;
}

/* ==========================================================================
   Header
   ========================================================================== */
.site-header{
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(10,14,23,0.82);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--panel-line);
}
.header-inner{
  display:flex;
  align-items:center;
  justify-content: space-between;
  height: 76px;
}
.wordmark{
  display:flex;
  align-items:center;
  gap: 12px;
}
.wordmark-mark{
  width: 36px; height:36px;
  border-radius: 50%;
  border: 1px solid var(--gold);
  display:flex; align-items:center; justify-content:center;
  font-family: var(--font-display);
  font-size: 18px;
  color: var(--gold);
  flex-shrink: 0;
}
.wordmark-mark.small{ width:30px; height:30px; font-size:15px; }
.wordmark-text{
  font-family: var(--font-display);
  font-weight: 500;
  letter-spacing: 0.12em;
  font-size: 15px;
  color: var(--cream);
}
.site-nav{ display:flex; gap: 32px; }
.site-nav a{
  font-size: 13.5px;
  letter-spacing: 0.02em;
  color: var(--muted);
  transition: color .2s var(--ease);
}
.site-nav a:hover{ color: var(--gold); }

@media (max-width: 640px){
  .site-nav{ display:none; }
}

/* ==========================================================================
   Hero
   ========================================================================== */
.hero{
  position: relative;
  z-index: 1;
  padding: 76px 0 60px;
}
.hero-inner{
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: 56px;
  align-items: center;
}
@media (max-width: 940px){
  .hero-inner{ grid-template-columns: 1fr; gap: 40px; }
}

.eyebrow{
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold);
  margin: 0 0 18px;
}
.hero-copy h1{
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(34px, 4.4vw, 54px);
  line-height: 1.08;
  margin: 0 0 20px;
  color: var(--cream);
}
.hero-sub{
  font-size: 16px;
  line-height: 1.65;
  color: var(--muted);
  max-width: 42ch;
  margin: 0;
}

/* ---- Banknote card ---- */
.note-card{
  position: relative;
  filter: drop-shadow(0 30px 60px rgba(0,0,0,0.45));
}
.note-border{
  position: relative;
  background: var(--paper);
  color: var(--text-dark);
  border-radius: var(--radius-lg);
  border: 1px solid var(--gold);
  outline: 1px solid rgba(201,162,75,0.35);
  outline-offset: -6px;
  padding: 26px 26px 22px;
}

.note-corner{
  position: absolute;
  width: 46px; height: 46px;
  color: var(--gold-soft);
  opacity: 0.55;
}
.note-corner svg{ width:100%; height:100%; }
.note-corner.tl{ top: 10px; left: 10px; }
.note-corner.tr{ top: 10px; right: 10px; }
.note-corner.bl{ bottom: 10px; left: 10px; }
.note-corner.br{ bottom: 10px; right: 10px; }

.note-top{
  display:flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 22px;
  padding: 0 6px;
}
.note-label{
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: 0.14em;
  font-size: 13px;
  color: var(--gold-soft);
}
.note-serial{
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.06em;
  color: var(--muted-paper);
}

.note-form{
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-areas:
    "amount amount"
    "from swap"
    "to swap2";
  gap: 14px 12px;
  padding: 0 6px;
  position: relative;
}

.field{
  display:flex;
  flex-direction: column;
  gap: 6px;
  background: rgba(28,35,51,0.04);
  border: 1px solid var(--paper-line);
  border-radius: var(--radius-md);
  padding: 10px 14px;
}
.field label{
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted-paper);
}
.field-amount{ grid-area: amount; }
#amount{
  font-family: var(--font-display);
  font-size: 30px;
  font-weight: 500;
  border: none;
  background: transparent;
  color: var(--text-dark);
  width: 100%;
  padding: 0;
}
#amount:focus{ outline: none; }

.field-currency:nth-of-type(1){ grid-area: from; }
select{
  font-family: var(--font-mono);
  font-size: 15px;
  font-weight: 500;
  color: var(--text-dark);
  background: transparent;
  border: none;
  appearance: none;
  -webkit-appearance: none;
  padding: 2px 0;
}
select:focus{ outline: none; }

.note-form > .field-currency:first-of-type{ grid-area: from; }
.note-form > .field-currency:last-of-type{ grid-area: to; }

.swap-btn{
  grid-area: swap;
  align-self: center;
  justify-self: center;
  width: 44px; height: 44px;
  border-radius: 50%;
  border: 1px solid var(--gold);
  background: var(--paper);
  color: var(--gold-soft);
  cursor: pointer;
  display:flex; align-items:center; justify-content:center;
  transition: transform .35s var(--ease), background .2s var(--ease), color .2s var(--ease);
}
.swap-btn:hover{ background: var(--emerald); color: var(--cream); border-color: var(--emerald); }
.swap-btn:active svg{ transform: rotate(180deg); }
.swap-btn svg{ transition: transform .35s var(--ease); }

.note-result{
  margin-top: 22px;
  padding: 18px 20px;
  background: var(--paper-shade);
  border-radius: var(--radius-md);
  display:flex;
  flex-direction: column;
  gap: 4px;
}
.result-amount{
  font-family: var(--font-display);
  font-size: clamp(30px, 4vw, 40px);
  font-weight: 600;
  color: var(--emerald);
  line-height: 1.1;
}
.result-rate{
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: var(--muted-paper);
}

.note-bottom{
  display:flex;
  justify-content: space-between;
  margin-top: 18px;
  padding: 0 6px;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.06em;
  color: var(--muted-paper);
  text-transform: uppercase;
}
.note-tag{ color: var(--gold-soft); }

/* ==========================================================================
   Trend
   ========================================================================== */
.trend{
  position: relative;
  z-index: 1;
  padding: 20px 0 70px;
}
.trend-inner{
  background: var(--panel);
  border: 1px solid var(--panel-line);
  border-radius: var(--radius-lg);
  padding: 34px 36px;
}
.trend-head h2{
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 22px;
  margin: 0 0 6px;
  color: var(--cream);
}
.trend-sub{
  font-size: 13.5px;
  color: var(--muted);
  margin: 0 0 20px;
}
.trend-chart-wrap{ position: relative; }
#trend-chart{ width: 100%; height: 180px; display:block; }
.trend-empty{
  font-size: 13px;
  color: var(--muted);
  font-family: var(--font-mono);
  margin: 0;
}

/* ==========================================================================
   Popular pairs
   ========================================================================== */
.pairs{
  position: relative;
  z-index: 1;
  padding: 10px 0 80px;
}
.section-head{ margin-bottom: 30px; }
.section-head h2{
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 28px;
  margin: 0;
  color: var(--cream);
}
.pairs-grid{
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}
@media (max-width: 860px){ .pairs-grid{ grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 480px){ .pairs-grid{ grid-template-columns: 1fr; } }

.pair-card{
  background: var(--panel);
  border: 1px solid var(--panel-line);
  border-radius: var(--radius-md);
  padding: 18px 18px;
  cursor: pointer;
  text-align: left;
  color: var(--cream);
  font-family: var(--font-body);
  transition: border-color .2s var(--ease), transform .2s var(--ease);
}
.pair-card:hover{ border-color: var(--gold); transform: translateY(-2px); }
.pair-card .pair-names{
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--muted);
  letter-spacing: 0.04em;
  display:block;
  margin-bottom: 10px;
}
.pair-card .pair-rate{
  font-family: var(--font-display);
  font-size: 22px;
  color: var(--gold);
  display:block;
}

/* ==========================================================================
   About / steps
   ========================================================================== */
.about{
  position: relative;
  z-index: 1;
  padding: 10px 0 100px;
}
.steps{
  list-style: none;
  margin: 0; padding: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
}
@media (max-width: 760px){ .steps{ grid-template-columns: 1fr; } }
.steps li{
  border-top: 1px solid var(--panel-line);
  padding-top: 18px;
}
.step-num{
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--gold);
  display:block;
  margin-bottom: 10px;
}
.steps h3{
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 19px;
  margin: 0 0 8px;
  color: var(--cream);
}
.steps p{
  font-size: 14px;
  line-height: 1.6;
  color: var(--muted);
  margin: 0;
}

/* ==========================================================================
   Footer
   ========================================================================== */
.site-footer{
  position: relative;
  z-index: 1;
  border-top: 1px solid var(--panel-line);
  padding: 40px 0 48px;
}
.footer-inner{
  display:flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 30px;
  flex-wrap: wrap;
}
.footer-brand{ display:flex; align-items:center; gap: 12px; }
.footer-title{
  font-family: var(--font-display);
  font-size: 14px;
  letter-spacing: 0.1em;
  margin: 0;
  color: var(--cream);
}
.footer-powered{
  font-size: 12.5px;
  color: var(--muted);
  margin: 2px 0 0;
}
.footer-powered strong{ color: var(--gold); font-weight: 600; }
.footer-note{
  max-width: 40ch;
  font-size: 12.5px;
  line-height: 1.6;
  color: var(--muted);
  margin: 0;
}
