/* ==========================================================================
   Artemis – styles
   Change the look of the whole site from the tokens in :root.
   ========================================================================== */

:root {
  /* Colour */
  --forest-950: #0a1f1b;
  --forest-900: #0f2a25;
  --forest-800: #153630;
  --forest-700: #1d4a41;
  --moss: #7fa896;
  --mist: #e8eeea;
  --moon: #f5f6f1;
  --brass: #c9a050;
  --brass-deep: #7d5a18;
  --ink: #0e1b18;
  --muted: #4a5d57;
  --up: #1b6e4c;
  --down: #a63d2c;
  --line: #cfd9d3;

  /* Type */
  --font-display: "Young Serif", Georgia, "Times New Roman", serif;
  --font-body: "Hanken Grotesk", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  /* Shape and space */
  --radius-control: 10px;
  --radius-surface: 20px;
  --wrap: 1180px;
  --gutter: clamp(1.25rem, 4vw, 2.5rem);
  --section-space: clamp(4rem, 8vw, 7rem);

  /* Surface-aware colours (overridden on dark surfaces) */
  --text: var(--ink);
  --text-soft: var(--muted);
  --focus: var(--forest-700);
}

.on-dark {
  --text: #f3f5f0;
  --text-soft: #b9c8c1;
  --focus: var(--brass);
}

/* Reset ------------------------------------------------------------------ */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 5rem; }
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--ink);
  background: var(--moon);
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, p, ul, ol, figure, dl { margin: 0; }
ul, ol { padding: 0; list-style: none; }
img, svg { display: block; max-width: 100%; }
a { color: inherit; }
button, input, select { font: inherit; color: inherit; }

:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }

.visually-hidden {
  position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.skip {
  position: absolute; left: 1rem; top: -4rem; z-index: 100;
  background: var(--brass); color: var(--ink); padding: .6rem 1rem;
  border-radius: var(--radius-control); font-weight: 600;
}
.skip:focus { top: 1rem; }

.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: var(--gutter); }

/* Type ------------------------------------------------------------------- */
h1, h2 { font-family: var(--font-display); font-weight: 400; letter-spacing: -0.01em; }
h1 { font-size: clamp(2.35rem, 5.4vw, 4rem); line-height: 1.06; }
h2 { font-size: clamp(1.75rem, 3.4vw, 2.6rem); line-height: 1.12; }
h3 { font-family: var(--font-body); font-size: 1.2rem; font-weight: 700; line-height: 1.3; }
.lede { font-size: 1.2rem; line-height: 1.55; color: var(--text-soft); max-width: 36em; }
.fineprint { font-size: .9rem; color: var(--text-soft); max-width: 40em; }
.fineprint a, .attrib a { text-underline-offset: 3px; }

/* Buttons ---------------------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 3rem; padding: 0 1.4rem;
  border: 1.5px solid transparent; border-radius: var(--radius-control);
  font-weight: 600; text-decoration: none; cursor: pointer;
  transition: background-color .2s ease, border-color .2s ease, color .2s ease;
}
.btn--brass { background: var(--brass); color: var(--ink); }
.btn--brass:hover { background: #d8b266; }
.btn--ghost { border-color: rgba(255, 255, 255, .4); color: #fff; background: transparent; }
.btn--ghost:hover { border-color: #fff; background: rgba(255, 255, 255, .08); }
.btn--small { min-height: 2.5rem; padding: 0 1rem; font-size: .95rem; }

/* Header ----------------------------------------------------------------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: var(--forest-950); color: var(--text);
  border-bottom: 1px solid rgba(255, 255, 255, .08);
}
.site-header__bar { display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; min-height: 4.25rem; }

.brand { display: inline-flex; align-items: center; gap: .6rem; text-decoration: none; color: var(--text); }
.brand__mark { width: 1.9rem; height: 1.9rem; }
.brand__lit { fill: var(--moon); }
.brand__shadow { fill: var(--forest-950); }
.footer .brand__shadow { fill: var(--forest-950); }
.brand__name { font-family: var(--font-display); font-size: 1.5rem; line-height: 1; }

.nav { display: flex; align-items: center; gap: 1.6rem; }
.nav a:not(.btn) { text-decoration: none; color: var(--text-soft); font-weight: 500; }
.nav a:not(.btn):hover { color: #fff; }

.nav-toggle { display: none; }

@media (max-width: 860px) {
  .nav-toggle {
    display: inline-flex; align-items: center; min-height: 2.5rem; padding: 0 1rem;
    background: transparent; border: 1.5px solid rgba(255, 255, 255, .35);
    border-radius: var(--radius-control); cursor: pointer; font-weight: 600;
  }
  .nav {
    flex-direction: column; align-items: stretch; gap: 0;
    position: absolute; left: 0; right: 0; top: 100%;
    background: var(--forest-950); padding: .5rem var(--gutter) 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, .08);
  }
  .nav a:not(.btn) { padding: .9rem 0; border-bottom: 1px solid rgba(255, 255, 255, .08); }
  .nav .btn { margin-top: 1rem; }
  .js .nav { display: none; }
  .js .nav.is-open { display: flex; }
}

/* Hero ------------------------------------------------------------------- */
.hero {
  background: var(--forest-900); color: var(--text);
  padding-block: clamp(3rem, 7vw, 6rem);
}
.hero__grid { display: grid; gap: clamp(2.5rem, 5vw, 4rem); align-items: center; }
.hero__copy { display: grid; gap: 1.5rem; justify-items: start; }
.hero h1 { max-width: 14em; }
.actions { display: flex; flex-wrap: wrap; gap: .85rem; }

@media (min-width: 960px) {
  .hero__grid { grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); }
}

/* Escrow demo ------------------------------------------------------------ */
.escrow {
  background: var(--forest-950);
  border: 1px solid rgba(255, 255, 255, .12);
  border-radius: var(--radius-surface);
  padding: clamp(1.1rem, 2.4vw, 1.6rem);
  display: grid; gap: 1.25rem;
  width: 100%; max-width: 31rem; justify-self: center;
}
.escrow__head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .6rem; font-size: .9rem; color: var(--text-soft); }

.pill {
  display: inline-flex; align-items: center; padding: .25rem .7rem; border-radius: 999px;
  border: 1px solid var(--brass); color: var(--brass); font-weight: 600; font-size: .85rem;
}

.moon { width: min(15rem, 62%); margin-inline: auto; overflow: visible; }
.moon__ring { fill: none; stroke: rgba(255, 255, 255, .14); stroke-width: 2; }
.moon__progress {
  fill: none; stroke: var(--brass); stroke-width: 3; stroke-linecap: round;
  stroke-dasharray: 653.45; stroke-dashoffset: 653.45;
  transition: stroke-dashoffset .9s cubic-bezier(.4, 0, .2, 1);
}
.moon__dark { fill: var(--forest-800); }
.moon__lit { fill: var(--moon); }
.moon__dot { fill: var(--forest-950); stroke: rgba(255, 255, 255, .3); stroke-width: 2; transition: fill .4s ease, stroke .4s ease; }
.moon__dot.is-done { fill: var(--brass); stroke: var(--brass); }
.moon__dot.is-active { fill: var(--brass); stroke: #fff; }
#moon-shadow { transition: transform .9s cubic-bezier(.4, 0, .2, 1); }

.escrow__tabs { display: grid; grid-template-columns: repeat(4, 1fr); gap: .4rem; }
.escrow__tab {
  min-height: 2.75rem; padding: 0 .25rem; cursor: pointer;
  background: transparent; border: 1px solid rgba(255, 255, 255, .18);
  border-radius: var(--radius-control); font-size: .9rem; font-weight: 600; color: var(--text-soft);
  transition: background-color .2s ease, color .2s ease, border-color .2s ease;
}
.escrow__tab:hover { border-color: rgba(255, 255, 255, .5); color: #fff; }
.escrow__tab[aria-selected="true"] { background: var(--brass); border-color: var(--brass); color: var(--ink); }

.escrow__panel { display: grid; gap: .6rem; min-height: 11.5rem; align-content: start; }
.escrow__title { font-family: var(--font-body); font-size: 1.15rem; font-weight: 700; }
.escrow__text { color: var(--text-soft); font-size: 1rem; }
.escrow__held {
  display: flex; justify-content: space-between; align-items: baseline; gap: 1rem;
  margin-top: .4rem; padding-top: .9rem; border-top: 1px solid rgba(255, 255, 255, .12);
  font-size: .95rem; color: var(--text-soft);
}
.escrow__held strong { font-size: 1.5rem; color: #fff; font-variant-numeric: tabular-nums; }

/* Sections --------------------------------------------------------------- */
.section { padding-block: var(--section-space); }
.section--mist { background: var(--mist); }
.section--dark { background: var(--forest-900); color: var(--text); }
.section__title { max-width: 18em; }
.section__intro { margin-top: .9rem; color: var(--text-soft); max-width: 36em; }

/* Why */
.why { display: grid; gap: 2.5rem; }
.why__statement { max-width: 20em; }
.why__cols { display: grid; gap: 2rem; }
.why__cols h3 { margin-bottom: .5rem; }
.why__cols p { color: var(--muted); max-width: 30em; }
@media (min-width: 860px) {
  .why { grid-template-columns: 1.3fr 1fr; align-items: start; gap: 4rem; }
}

/* How */
.how { display: grid; gap: 2.5rem; margin-top: 2.75rem; }
.how__side h3 { margin-bottom: 1.1rem; padding-bottom: .8rem; border-bottom: 2px solid var(--forest-900); }
.steps { counter-reset: step; display: grid; gap: 1.1rem; }
.steps li { counter-increment: step; position: relative; padding-left: 2.25rem; color: var(--muted); }
.steps li::before {
  content: counter(step); position: absolute; left: 0; top: -.05rem;
  font-family: var(--font-display); font-size: 1.35rem; line-height: 1.3; color: var(--brass-deep);
}
.steps strong { color: var(--ink); }
@media (min-width: 860px) {
  .how { grid-template-columns: 1fr 1fr; gap: 4rem; }
}

/* Features */
.features { display: grid; gap: 2.5rem; }
.features__list { border-top: 1px solid var(--line); }
.feature { padding-block: 1.6rem; border-bottom: 1px solid var(--line); display: grid; gap: .5rem; }
.feature p { color: var(--muted); max-width: 34em; }
@media (min-width: 960px) {
  .features { grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: 5rem; align-items: start; }
  .features__intro { position: sticky; top: 6.5rem; }
}

/* Dashboard mock */
.dash {
  margin-top: 2.75rem; background: #fff; border: 1px solid var(--line);
  border-radius: var(--radius-surface); padding: clamp(1.1rem, 3vw, 2rem);
  display: grid; gap: 1.75rem;
}
.dash__top { display: grid; gap: 1.5rem; align-items: end; }
.dash__label { color: var(--muted); font-size: .95rem; }
.dash__value { font-family: var(--font-display); font-size: clamp(2rem, 5vw, 3rem); line-height: 1.1; font-variant-numeric: tabular-nums; }
.dash__delta { color: var(--up); font-weight: 600; font-variant-numeric: tabular-nums; }
.dash__chart { width: 100%; height: auto; }
.dash__area { fill: rgba(201, 160, 80, .18); }
.dash__line { fill: none; stroke: var(--brass-deep); stroke-width: 2.5; stroke-linejoin: round; stroke-linecap: round; }
@media (min-width: 760px) { .dash__top { grid-template-columns: 1fr 1.4fr; gap: 3rem; } }

.dash__table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.dash__table th, .dash__table td { text-align: left; padding: .85rem .5rem; border-top: 1px solid var(--line); font-size: .98rem; }
.dash__table thead th { color: var(--muted); font-weight: 600; font-size: .9rem; border-top: 0; padding-top: 0; }
.dash__table tbody th { font-weight: 600; }
.dash__note { color: var(--muted); font-size: .9rem; }

.chip { display: inline-block; padding: .2rem .65rem; border-radius: 999px; font-size: .85rem; font-weight: 600; white-space: nowrap; }
.chip--locked { background: #efe4cc; color: #5f4410; }
.chip--progress { background: #dce8f0; color: #1f4a66; }
.chip--released { background: #d8ebe0; color: #14573a; }

@media (max-width: 560px) {
  .dash__table th, .dash__table td { padding-inline: .3rem; font-size: .9rem; }
  .chip { white-space: normal; }
}

/* Markets */
.ledger { display: grid; margin-top: 2.25rem; border-bottom: 1px solid var(--line); }
.coin {
  display: grid; grid-template-columns: 2.5rem 1fr auto; align-items: center; gap: .85rem;
  padding: 1rem .25rem; border-top: 1px solid var(--line);
}
.coin__icon {
  width: 2.5rem; height: 2.5rem; border-radius: 50%; overflow: hidden;
  display: grid; place-items: center; background: var(--mist);
  font-size: .6rem; font-weight: 700; color: var(--forest-700);
}
.coin__icon img { width: 100%; height: 100%; object-fit: cover; }
.coin__id, .coin__quote { display: grid; line-height: 1.3; }
.coin__quote { text-align: right; }
.coin__name { font-weight: 600; }
.coin__sym { font-size: .88rem; color: var(--muted); }
.coin__price { font-weight: 600; font-variant-numeric: tabular-nums; }
.coin__change { font-size: .9rem; font-variant-numeric: tabular-nums; color: var(--muted); }
.coin__change.is-up { color: var(--up); }
.coin__change.is-down { color: var(--down); }
.attrib { margin-top: 1.1rem; font-size: .9rem; color: var(--muted); }
@media (min-width: 700px) {
  .ledger { grid-template-columns: 1fr 1fr; column-gap: 3rem; }
}
@media (min-width: 1040px) {
  .ledger { grid-template-columns: repeat(4, 1fr); column-gap: 2rem; border-bottom: 0; }
  .coin { grid-template-columns: 2.5rem 1fr; row-gap: .25rem; }
  .coin__quote { grid-column: 1 / -1; text-align: left; grid-template-columns: 1fr auto; padding-top: .25rem; }
  .coin__quote .coin__change { text-align: right; }
}

/* Wallet + waitlist */
.wallet { display: grid; gap: 3rem; align-items: center; }
.wallet__copy { display: grid; gap: 1.5rem; justify-items: start; }
@media (min-width: 960px) { .wallet { grid-template-columns: 1.15fr .85fr; gap: 5rem; } }

.form { display: grid; gap: 1rem; width: 100%; max-width: 28rem; }
.form__row { display: grid; gap: .4rem; }
.form label { font-weight: 600; font-size: .95rem; }
.form input, .form select {
  min-height: 3rem; padding: 0 .9rem; width: 100%;
  background: var(--forest-950); border: 1.5px solid rgba(255, 255, 255, .25);
  border-radius: var(--radius-control); color: #fff;
}
.form input::placeholder { color: #8ea39b; }
.form input:hover, .form select:hover { border-color: rgba(255, 255, 255, .5); }
.form input[aria-invalid="true"] { border-color: #f0a090; }
.form .btn { justify-self: start; }
.form .btn[disabled] { opacity: .6; cursor: progress; }
.form__status { min-height: 1.5rem; font-weight: 500; }
.form__status.is-error { color: #ffb3a3; }
.form__status.is-ok { color: #a9e3c4; }
.form__trap { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.phone-wrap { display: grid; gap: 1rem; justify-items: center; }
.phone {
  width: min(17rem, 100%); padding: .7rem;
  background: var(--forest-950); border: 1px solid rgba(255, 255, 255, .18);
  border-radius: 2.4rem;
}
.phone__screen { background: var(--moon); color: var(--ink); border-radius: 1.8rem; padding: 1.6rem 1.25rem 1.5rem; display: grid; gap: 1rem; }
.phone__label { font-size: .85rem; color: var(--muted); }
.phone__value { font-family: var(--font-display); font-size: 2rem; line-height: 1.1; margin-top: -.6rem; font-variant-numeric: tabular-nums; }
.phone__actions { display: grid; grid-template-columns: repeat(4, 1fr); gap: .4rem; }
.phone__actions span { text-align: center; padding: .55rem 0; border-radius: 10px; background: var(--forest-900); color: #fff; font-size: .8rem; font-weight: 600; }
.phone__list li { display: flex; justify-content: space-between; padding: .7rem 0; border-top: 1px solid var(--line); font-size: .9rem; font-variant-numeric: tabular-nums; }
.phone__note { font-size: .85rem; color: var(--text-soft); text-align: center; max-width: 18rem; }

/* FAQ */
.faq { display: grid; gap: 2.5rem; }
.faq__list { border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary {
  list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 1rem;
  padding: 1.25rem 0; font-weight: 600; font-size: 1.1rem;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: ""; flex: none; width: .65rem; height: .65rem;
  border-right: 2px solid var(--forest-700); border-bottom: 2px solid var(--forest-700);
  transform: rotate(45deg); transition: transform .2s ease;
}
.faq details[open] summary::after { transform: rotate(-135deg); }
.faq details p { padding-bottom: 1.4rem; color: var(--muted); max-width: 40em; }
@media (min-width: 960px) {
  .faq { grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: 5rem; align-items: start; }
  .faq .section__title { position: sticky; top: 6.5rem; }
}

/* Footer */
.footer { background: var(--forest-950); color: var(--text); padding-block: 3.5rem 2.5rem; }
.footer__grid { display: grid; gap: 2rem; }
.footer__entity { margin-top: .9rem; font-size: .9rem; color: var(--text-soft); max-width: 24em; }
.footer__entity:empty { display: none; }
.footer__nav { display: flex; flex-wrap: wrap; gap: .6rem 1.5rem; }
.footer__nav a { text-decoration: none; color: var(--text-soft); }
.footer__nav a:hover { color: #fff; text-decoration: underline; text-underline-offset: 3px; }
.footer__risk { font-size: .9rem; color: var(--text-soft); max-width: 60em; padding-top: 1.75rem; border-top: 1px solid rgba(255, 255, 255, .12); }
.footer__copy { font-size: .85rem; color: var(--text-soft); }
@media (min-width: 860px) {
  .footer__grid { grid-template-columns: 1fr auto; align-items: start; }
  .footer__risk, .footer__copy { grid-column: 1 / -1; }
}

/* Legal page */
.legal { padding-block: clamp(3rem, 6vw, 5rem); }
.legal__body { display: grid; gap: 3rem; max-width: 44rem; }
.legal h1 { font-size: clamp(2rem, 4.5vw, 3rem); margin-bottom: 2rem; }
.legal section { display: grid; gap: .9rem; }
.legal h2 { font-size: 1.6rem; }
.legal p, .legal li { color: var(--muted); }
.legal ul { display: grid; gap: .5rem; padding-left: 1.2rem; list-style: disc; }
.legal__draft { padding: 1rem 1.2rem; border-left: 4px solid var(--brass); background: #fff; }

/* Motion preferences ----------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; }
}
