/* Inter v4.1 (https://github.com/rsms/inter/releases/tag/v4.1)
   Copyright (c) 2016 The Inter Project Authors. Licensed under SIL OFL 1.1 (/assets/LICENSE-Inter.txt). */
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/assets/fonts/Inter-Regular.woff2") format("woff2");
}

@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("/assets/fonts/Inter-SemiBold.woff2") format("woff2");
}

:root {
  --czar-canvas: #080b10;
  --czar-inset: #0b1118;
  --czar-surface: #10161e;
  --czar-raised: #19222d;
  --czar-divider: #273340;
  --czar-control-border: #61758a;
  --czar-ink: #f2f6fa;
  --czar-secondary-ink: #a3b2c2;
  --czar-primary: #bfefff;
  --czar-on-primary: #071117;
  --czar-accent: #4fc9f2;
  --czar-pending: #85d8f2;
  --czar-warning: #e5c384;
  --czar-focus: #bfefff;

  --font-sans: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono: "Roboto Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  --font-figures: Roboto, Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", "Helvetica Neue", Arial, sans-serif;

  --shell-max: 75rem;
  --shell-pad: 1.5rem;
  --section-gap: 3rem;
  color-scheme: dark;
}

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

html {
  background: var(--czar-canvas);
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}

body {
  margin: 0;
  min-width: 0;
  background: var(--czar-canvas);
  color: var(--czar-ink);
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.5;
  overflow-wrap: break-word;
}

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

h1,
h2,
h3,
p,
figure {
  margin: 0;
}

a {
  color: inherit;
}

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

#main:focus,
#explore:focus {
  outline: none;
}

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

.skip-link {
  position: absolute;
  top: 0.75rem;
  left: 0.75rem;
  z-index: 10;
  padding: 0.75rem 1rem;
  min-height: 3rem;
  border-radius: 0.75rem;
  background: var(--czar-primary);
  color: var(--czar-on-primary);
  font-weight: 600;
  text-decoration: none;
  transform: translateY(-200%);
}

.skip-link:focus,
.skip-link:focus-visible {
  transform: none;
}

.shell {
  width: 100%;
  max-width: calc(var(--shell-max) + 2 * var(--shell-pad));
  margin-inline: auto;
  padding-inline: var(--shell-pad);
}

.rule {
  height: 1px;
  margin: 0;
  border: 0;
  background: var(--czar-divider);
}

/* Type roles from the R2 marketing text styles. */
.utility {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  line-height: 1rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--czar-secondary-ink);
}

.utility--accent {
  color: var(--czar-accent);
}

.utility--plain {
  text-transform: none;
}

.caption {
  font-size: 0.8125rem;
  line-height: 1.125rem;
  color: var(--czar-secondary-ink);
}

/* Masthead */
.masthead {
  padding-top: 1.5rem;
}

.masthead__row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem 1.5rem;
  padding-bottom: 1.5rem;
}

.masthead__wordmark {
  width: 7.375rem;
}

/* Hero */
main {
  display: flex;
  flex-direction: column;
  gap: var(--section-gap);
  padding-top: var(--section-gap);
}

main:focus {
  outline: none;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 2.5rem;
  align-items: start;
}

.hero__copy {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1.5rem;
  min-width: 0;
}

.hero__copy > * {
  max-width: 100%;
}

.hero__title {
  font-size: clamp(2.375rem, 2.35rem + 2.667vw, 4.75rem);
  line-height: 1.07;
  font-weight: 600;
  letter-spacing: -0.03em;
  color: var(--czar-ink);
}

.hero__line {
  display: block;
}

.hero__aperture {
  order: 0;
  width: 100%;
  max-width: 32.5rem;
}

.hero__body {
  font-size: 1rem;
  line-height: 1.5rem;
  color: var(--czar-secondary-ink);
}

.availability {
  font-size: 0.8125rem;
  line-height: 1.125rem;
  color: var(--czar-secondary-ink);
}

/* Actions */
.action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 3.5rem;
  padding: 1rem;
  border: 1px solid transparent;
  border-radius: 0.75rem;
  font-size: 0.9375rem;
  line-height: 1.25rem;
  font-weight: 600;
  text-align: center;
  text-decoration: none;
}

.action--primary {
  background: var(--czar-primary);
  color: var(--czar-on-primary);
}

.action--secondary {
  background: var(--czar-raised);
  border-color: var(--czar-control-border);
  color: var(--czar-ink);
}

a.action--primary:hover {
  background: #d6f5ff;
}

.hero__action {
  width: 100%;
}

/* Product study and illustrated testnet preview */
.study {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  min-width: 0;
  padding: 1rem 0;
  background: var(--czar-inset);
  scroll-margin-top: 1.5rem;
}

.study__caption {
  align-self: stretch;
}

.device {
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 24.375rem;
  border: 1px solid var(--czar-divider);
  border-radius: 1.75rem;
  background: linear-gradient(180deg, var(--czar-surface) 0%, var(--czar-canvas) 100%);
  overflow: hidden;
}

.device__status {
  padding: 0.5rem;
  font-size: 0.6875rem;
  line-height: 1rem;
}

.device__content {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  padding: 1.5rem;
}

.device__wordmark {
  width: 7.375rem;
}

.device__account {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.25rem 0.75rem;
}

.device__label {
  flex: 1 1 auto;
  font-size: 0.9375rem;
  line-height: 1.25rem;
  font-weight: 600;
}

.device__environment {
  flex: 0 1 12.125rem;
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  line-height: 1rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--czar-warning);
}

.balance {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.balance__heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.balance__toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 3rem;
  min-height: 3rem;
}

.balance__toggle img {
  width: 1.375rem;
}

.balance__amount {
  font-family: var(--font-figures);
  font-size: 3.5rem;
  line-height: 4rem;
  font-weight: 400;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}

.balance__asset {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.5rem;
}

.balance__code {
  min-width: 4rem;
  font-size: 0.9375rem;
  line-height: 1.25rem;
  font-weight: 600;
}

.balance__name,
.balance__detail {
  font-size: 0.8125rem;
  line-height: 1.125rem;
  color: var(--czar-secondary-ink);
}

.device__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.device__actions .action {
  flex: 1 1 6rem;
}

.activity {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.activity__heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  min-height: 3rem;
}

.activity__title {
  font-size: 1.125rem;
  line-height: 1.5rem;
  font-weight: 600;
}

.activity__more {
  font-size: 0.8125rem;
  line-height: 1.125rem;
  color: var(--czar-secondary-ink);
}

.activity__row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-height: 4.75rem;
}

.activity__icon {
  flex: none;
  display: flex;
  width: 2.5rem;
  padding: 0.5rem;
  border-radius: 0.5rem;
  background: var(--czar-surface);
}

.activity__icon img {
  width: 1.5rem;
}

.activity__text {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  gap: 0.25rem;
  min-width: 0;
}

.activity__name {
  font-size: 0.9375rem;
  line-height: 1.25rem;
  font-weight: 600;
}

.activity__state {
  font-size: 0.8125rem;
  line-height: 1.125rem;
}

.activity__state--pending {
  color: var(--czar-pending);
}

.activity__state--warning {
  color: var(--czar-warning);
}

.activity__amount {
  flex: none;
  font-size: 0.8125rem;
  line-height: 1.125rem;
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.activity__note {
  font-size: 0.8125rem;
  line-height: 1.125rem;
  color: var(--czar-secondary-ink);
}

.device__bar {
  padding: 1.5rem 1.5rem 2.5rem;
}

.tabs {
  display: flex;
  gap: 0.25rem;
  min-height: 4.5rem;
  padding: 0.5rem;
  border: 1px solid var(--czar-divider);
  border-radius: 1.75rem;
  background: var(--czar-raised);
}

.tab {
  display: flex;
  flex: 1 1 0;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
  min-width: 0;
  font-size: 0.6875rem;
  line-height: 1rem;
  color: var(--czar-secondary-ink);
}

.tab--current {
  color: var(--czar-ink);
}

.tab__icon {
  display: flex;
  justify-content: center;
  width: 3rem;
  padding: 0.25rem;
}

.tab__icon img {
  width: 1.375rem;
}

/* Principles and development status */
.principles {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 2rem;
}

.principle {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  min-width: 0;
}

.principle__title,
.status__title {
  font-size: 1.125rem;
  line-height: 1.5rem;
  font-weight: 600;
}

.status {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem 1.5rem;
  padding-top: var(--section-gap);
  padding-bottom: 2.5rem;
}

.footer__top {
  display: inline-flex;
  align-items: center;
  min-height: 3rem;
  font-size: 0.8125rem;
  line-height: 1.125rem;
  color: var(--czar-ink);
  text-decoration: underline;
  text-underline-offset: 0.2em;
}

.footer__top:hover {
  color: var(--czar-primary);
}

/* Narrow reflow at 320 CSS px and equivalent zoom levels. */
@media (max-width: 22.5em) {
  :root {
    --shell-pad: 1rem;
  }

  .device__content {
    padding: 1.25rem 1rem;
  }

  .device__bar {
    padding: 1rem 1rem 1.5rem;
  }

  .tab__icon {
    width: 100%;
  }
}

@media (min-width: 40em) {
  .principles {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .hero__action {
    width: auto;
    min-width: 16.25rem;
  }

  .study {
    padding: 2rem;
    border: 1px solid var(--czar-divider);
    border-radius: 1.25rem;
  }
}

@media (min-width: 60em) {
  :root {
    --shell-pad: 2.5rem;
  }

  .masthead {
    padding-top: 2.5rem;
  }

  .masthead__row {
    padding-bottom: 3rem;
  }

  .masthead__domain {
    min-width: 4.5rem;
  }

  .hero {
    grid-template-columns: minmax(0, 620fr) minmax(0, 540fr);
  }

  .hero__title {
    line-height: 1.0526;
  }

  .hero__aperture {
    order: 1;
  }

  .status {
    gap: 3rem;
  }
}
