:root {
  --bg: #0b1113;
  --bg-elevated: #11191c;
  --bg-popup: #182326;
  --bg-hover: #223033;
  --bg-active: #304144;
  --bg-selection: #365156;
  --fg: #d8e3e0;
  --fg-soft: #a4b4b2;
  --fg-muted: #718688;
  --accent: #33b8a8;
  --cyan: #59d6c5;
  --emerald: #4dba7a;
  --blue: #5e9bff;
  --yellow: #d9c76b;
  --orange: #f4a259;
  --red: #e16f73;
  --shadow: 0 30px 80px rgba(2, 4, 5, 0.55);
  --radius-xl: 28px;
  --radius-lg: 20px;
  --radius-md: 16px;
  --radius-sm: 12px;
  --page-width: 1180px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background:
    radial-gradient(circle at top left, rgba(51, 184, 168, 0.12), transparent 30%),
    radial-gradient(circle at top right, rgba(89, 214, 197, 0.10), transparent 26%),
    linear-gradient(180deg, #091012 0%, #0b1113 24%, #020405 100%);
  color: var(--fg);
  line-height: 1.5;
}

body.has-nav-open {
  overflow: hidden;
}

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

a:hover {
  color: var(--cyan);
}

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

.page-loader {
  position: fixed;
  inset: 0;
  z-index: 999;
  display: grid;
  place-items: center;
  background: rgba(2, 4, 5, 0.72);
  backdrop-filter: blur(18px);
  opacity: 1;
  transition: opacity 180ms ease, visibility 180ms ease;
}

.page-loader.is-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.page-loader-card {
  display: grid;
  justify-items: center;
  gap: 14px;
  padding: 26px 30px;
  border-radius: 24px;
  background: rgba(17, 25, 28, 0.94);
  border: 1px solid rgba(34, 48, 51, 0.92);
  box-shadow: var(--shadow);
}

.page-loader-mark {
  width: 58px;
  height: 58px;
  border-radius: 18px;
  border: 2px solid rgba(89, 214, 197, 0.16);
  border-top-color: var(--cyan);
  border-right-color: var(--accent);
  animation: loader-spin 0.9s linear infinite;
}

.page-loader-title {
  font-weight: 700;
  letter-spacing: 0.02em;
}

.page-loader-subtitle {
  color: var(--fg-muted);
  font-size: 0.94rem;
}

@keyframes loader-spin {
  to { transform: rotate(360deg); }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .page-loader,
  .page-loader-mark,
  .button,
  .button-secondary,
  .button-inline,
  .nav,
  .nav a,
  .nav-toggle,
  .nav-backdrop,
  .nav-toggle-bars span {
    transition: none;
    animation: none;
  }

  .button:hover,
  .button-secondary:hover,
  .button-inline:hover,
  .nav a:hover,
  .nav-toggle:hover {
    transform: none;
  }
}

.page {
  width: min(var(--page-width), calc(100% - 32px));
  margin: 0 auto;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  backdrop-filter: blur(18px);
  background: rgba(11, 17, 19, 0.86);
  border-bottom: 1px solid rgba(34, 48, 51, 0.8);
}

.topbar-inner {
  width: min(var(--page-width), calc(100% - 32px));
  margin: 0 auto;
  position: relative;
  z-index: 21;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 16px 0;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.brand-logo {
  width: 150px;
  height: 34px;
  border-radius: 0px;
  object-fit: cover;
  box-shadow: inset 0 0 0 1px rgba(242, 248, 246, 0.12);
}

.brand-mark {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--accent), var(--cyan));
  box-shadow: inset 0 0 0 1px rgba(242, 248, 246, 0.12);
}

.nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
}

.nav-toggle {
  display: none;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid rgba(34, 48, 51, 0.95);
  background: rgba(17, 25, 28, 0.88);
  color: var(--fg);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.nav-toggle:hover {
  transform: translateY(-1px);

  background: rgba(24, 36, 39, 0.92);
  border-color: rgba(51, 184, 168, 0.65);

  box-shadow:
    0 8px 24px rgba(2, 4, 5, 0.28),
    0 0 18px rgba(51, 184, 168, 0.1);
}

.nav-toggle:active {
  transform: scale(0.96);
}

.nav-toggle-bars {
  width: 18px;
  display: grid;
  gap: 3px;
}

.nav-toggle-bars span {
  display: block;
  height: 2px;
  border-radius: 999px;
  background: currentColor;
  transition: transform 180ms ease, opacity 180ms ease;
}

.topbar.is-nav-open .nav-toggle-bars span:nth-child(1) {
  transform: translateY(5px) rotate(45deg);
}

.topbar.is-nav-open .nav-toggle-bars span:nth-child(2) {
  opacity: 0;
}

.topbar.is-nav-open .nav-toggle-bars span:nth-child(3) {
  transform: translateY(-5px) rotate(-45deg);
}

.nav-toggle:focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 3px;
}

.nav-backdrop {
  position: fixed;
  inset: 0;
  z-index: 19;
  background: rgba(2, 4, 5, 0.58);
  backdrop-filter: blur(4px);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 220ms ease, visibility 220ms ease;
}

.nav-backdrop.is-visible {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.nav a {
  padding: 9px 14px;
  border-radius: 999px;
  color: var(--fg-soft);
  border: 1px solid transparent;
}

.nav a[aria-current="page"],
.nav a.is-active {
  color: var(--fg);

  background:
    linear-gradient(
      90deg,
      rgba(51, 184, 168, 0.16),
      rgba(51, 184, 168, 0.05)
    );

  border-color: rgba(51, 184, 168, 0.26);
}

.nav a[aria-current="page"]::before,
.nav a.is-active::before {
  content: "";

  width: 4px;
  height: 18px;
  flex-shrink: 0;

  border-radius: 999px;

  background: linear-gradient(
    to bottom,
    var(--accent),
    var(--cyan)
  );

  box-shadow: 0 0 12px rgba(51, 184, 168, 0.45);
}

.topbar.is-nav-open .nav {
  max-height: min(72vh, 420px);

  overflow-y: auto;
  overscroll-behavior: contain;

  scrollbar-width: none;
}

.topbar.is-nav-open .nav::-webkit-scrollbar {
  display: none;
}

.hero,
.section,
.product-hero {
  padding: 30px 0;
}

.hero-grid,
.product-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 28px;
  align-items: start;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid rgba(51, 184, 168, 0.2);
  background: rgba(17, 25, 28, 0.8);
  color: var(--cyan);
  font-size: 0.92rem;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  font-size: clamp(3rem, 7vw, 5.8rem);
  line-height: 0.96;
  margin: 18px 0 18px;
  letter-spacing: -0.05em;
}

h2 {
  font-size: clamp(2rem, 4vw, 3rem);
  line-height: 1;
  letter-spacing: -0.04em;
  margin-bottom: 14px;
}

h3 {
  font-size: 1.2rem;
  margin-bottom: 10px;
}

.lede {
  max-width: 62ch;
  color: var(--fg-soft);
  font-size: 1.08rem;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

.button,
.button-secondary,
.button-inline {
  position: relative;
  overflow: hidden;

  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;

  min-height: 46px;
  padding: 0 18px;

  border-radius: 999px;
  border: 1px solid transparent;

  font-weight: 700;
  cursor: pointer;

  transition:
    transform .28s cubic-bezier(.22,1,.36,1),
    box-shadow .28s cubic-bezier(.22,1,.36,1),
    background-color .28s ease,
    border-color .28s ease,
    color .28s ease;
}

.button-mini {
  min-height: 40px;
  padding: 0 14px;
  font-size: 0.94rem;
}

.button {
  color: #061013;

  background: linear-gradient(
      135deg,
      var(--accent),
      var(--cyan)
  );

  background-size: 200% 200%;

  box-shadow:
      0 8px 24px rgba(51,184,168,.18);
}

.button-secondary,
.button-inline {
  background: rgba(17,25,28,.85);

  border-color: rgba(51,184,168,.6);

  box-shadow:
      inset 0 0 0 0 rgba(51,184,168,.15);
}

.button-secondary:hover,
.button-inline:hover {
  transform: translateY(-3px);

  background: rgba(51,184,168,.14);

  border-color: var(--accent);

  box-shadow:
      inset 0 0 20px rgba(51,184,168,.08),
      0 10px 30px rgba(51,184,168,.18);
}

.button:hover {
  transform: translateY(-3px) scale(1.02);

  background-position: 100% 0;

  box-shadow:
      0 16px 40px rgba(51,184,168,.28),
      0 0 24px rgba(51,184,168,.25);

  color: #061013;
}

.button-secondary:hover,
.button-inline:hover {
  color: var(--fg);
}

.button::before,
.button-secondary::before,
.button-inline::before {
    content: "";

    position: absolute;
    inset: 0;

    background: linear-gradient(
        120deg,
        transparent 20%,
        rgba(255,255,255,.35) 50%,
        transparent 80%
    );

    transform: translateX(-120%);
    transition: transform .7s ease;
}

.button:hover::before,
.button-secondary:hover::before,
.button-inline:hover::before {
    transform: translateX(120%);
}

.button:active,
.button-secondary:active,
.button-inline:active {
    transform: translateY(1px) scale(.98);
    transition-duration: .08s;
}

.panel {
  background: rgba(17, 25, 28, 0.88);
  border: 1px solid rgba(34, 48, 51, 0.95);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow);
}

.palette-panel {
  padding: 20px;
}

.palette-panel .section-title {
  margin-bottom: 18px;
}

.swatch-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.swatch {
  padding: 14px;
  border-radius: 18px;
  background: var(--bg-popup);
  border: 1px solid rgba(34, 48, 51, 0.9);
}

.swatch .sample {
  height: 50px;
  border-radius: 14px;
  border: 1px solid rgba(242, 248, 246, 0.08);
  margin-bottom: 10px;
}

.swatch strong,
.swatch span {
  display: block;
}

.swatch span {
  color: var(--fg-muted);
  font-size: 0.92rem;
}

.feature-grid,
.product-grid-cards,
.mini-grid {
  display: grid;
  gap: 16px;
}

.grid-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.swatch-grid-wide {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.product-grid-cards {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.product-card,
.detail-card,
.info-card,
.preview-card {
  background: rgba(17, 25, 28, 0.88);
  border: 1px solid rgba(34, 48, 51, 0.9);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}

.product-card {
  padding: 18px;
  display: grid;
  gap: 12px;
}

.product-heading {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 6px;
}

.product-mark-large {
  width: 200px;
  height: 200px;
  border-radius: 18px;
  flex: 0 0 auto;
}

.product-mark {
  width: 160px;
  height: 160px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  background: var(--bg-elevated);
  box-shadow: inset 0 0 0 1px rgba(242, 248, 246, 0.06);
  overflow: hidden;
}

.product-card .product-mark {
  width: 148px;
  height: 148px;
  justify-self: center;
}

.product-mark svg {
  width: 100%;
  height: 100%;
  display: block;
}

.product-mark img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
}

.mark-stroke {
  fill: none;
  stroke: #061013;
  stroke-width: 4;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.mark-fill {
  fill: #061013;
}

.mark-accent {
  fill: var(--bg);
}

.product-card p,
.detail-card p,
.info-card p {
  color: var(--fg-soft);
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tag {
  font-size: 0.65rem;
  padding: 6px 6px 3px 6px;
  border-radius: 9px;
  background: rgba(34, 48, 51, 0.75);
  color: var(--fg-soft);
  border: 1px solid rgba(34, 48, 51, 0.95);
}

.link-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 10px;
}

.link-row a {
  color: inherit;
}

.link-list a {
  color: var(--cyan);
}

.table-wrap {
  overflow-x: auto;
  border-radius: var(--radius-lg);
  border: 1px solid rgba(34, 48, 51, 0.9);
  background: rgba(17, 25, 28, 0.88);
  box-shadow: var(--shadow);
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 680px;
}

th,
td {
  padding: 14px 16px;
  border-bottom: 1px solid rgba(34, 48, 51, 0.8);
  text-align: left;
  vertical-align: top;
}

th {
  color: var(--fg);
  background: rgba(24, 35, 38, 0.85);
}

td {
  color: var(--fg-soft);
}

.table-swatch {
  width: 22px;
  height: 22px;
  border-radius: 6px;
  border: 2px solid rgb(255, 255, 255);
  display: inline-block;
  vertical-align: middle;
  flex: 0 0 auto;
}

.hex-with-swatch {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.hex-with-swatch code {
  padding: 0;
  background: transparent;
  border: 0;
  color: inherit;
}

.footer {
  padding: 34px 0 52px;
  color: var(--fg-muted);
  border-top: 1px solid rgba(34, 48, 51, 0.8);
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
}

.product-shell {
  padding-bottom: 56px;
}

.preview-card {
  overflow: hidden;
}

.preview-card img {
  width: 100%;
  height: auto;
}

.waybar-preview {
  grid-column: 1 / -1;
}

.waybar-preview .waybar-preview-shell {
  padding: 14px;
  background: rgba(17, 25, 28, 0.88);
  border: 1px solid rgba(34, 48, 51, 0.9);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}

.waybar-preview img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 12px;
}

.detail-card {
  padding: 24px;
}

.list {
  margin: 0;
  padding-left: 18px;
  color: var(--fg-soft);
}

.list li + li {
  margin-top: 8px;
}

.code {
  padding: 14px 16px;
  border-radius: 14px;
  background: #020405;
  color: var(--fg);
  border: 1px solid rgba(34, 48, 51, 0.9);
  overflow-x: auto;
}

.section-title {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: end;
  gap: 10px;
  margin-bottom: 22px;
}

.section-title p {
  max-width: 60ch;
  color: var(--fg-muted);
  margin: 0;
}

.tone-0 { background: #020405; }
.tone-100 { background: #0b1113; }
.tone-200 { background: #11191c; }
.tone-300 { background: #182326; }
.tone-400 { background: #223033; }
.tone-500 { background: #304144; }
.tone-600 { background: #4a5f62; }
.tone-700 { background: #718688; }
.tone-800 { background: #a4b4b2; }
.tone-900 { background: #d8e3e0; }
.tone-950 { background: #f2f8f6; }
.tone-cyan { background: #59d6c5; }
.tone-teal { background: #33b8a8; }
.tone-emerald { background: #4dba7a; }
.tone-blue { background: #5e9bff; }
.tone-yellow { background: #d9c76b; }
.tone-orange { background: #f4a259; }
.tone-red { background: #e16f73; }
.tone-selection { background: #365156; }

@media (max-width: 980px) {
  .hero-grid,
  .product-grid,
  .product-grid-cards,
  .grid-3 {
    grid-template-columns: 1fr;
  }

  /* .swatch-grid-wide {
    grid-template-columns: 1fr;
  } */

  .topbar-inner {
    align-items: center;
  }

  .nav-toggle {
    display: inline-flex;
    margin-left: auto;
  }

  .nav {
    position: absolute;
    top: calc(100% + 12px);
    left: 0;
    right: 0;
    z-index: 22;

    display: flex;
    flex-direction: column;
    gap: 6px;

    width: auto;
    padding: 10px;

    opacity: 0;
    visibility: hidden;
    pointer-events: none;

    transform: translateY(-10px) scale(0.98);
    transform-origin: top center;

    border: 1px solid rgba(51, 184, 168, 0.16);
    border-radius: 20px;

    background:
      linear-gradient(
        145deg,
        rgba(24, 35, 38, 0.98),
        rgba(13, 21, 23, 0.98)
      );

    box-shadow:
      0 24px 60px rgba(2, 4, 5, 0.48),
      inset 0 1px 0 rgba(255, 255, 255, 0.03);

    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);

    transition:
      opacity 220ms ease,
      transform 260ms cubic-bezier(.22, 1, .36, 1),
      visibility 220ms ease;
  }

  .topbar.is-nav-open .nav {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;

    transform: translateY(0) scale(1);
  }

  .topbar.is-nav-open .nav::-webkit-scrollbar {
    display: none;
  }

  .topbar.is-nav-open .nav a {
    width: 100%;
    justify-content: flex-start;
  }

  .nav a {
    position: relative;

    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 10px;

    width: 100%;
    min-height: 46px;
    padding: 11px 14px;

    color: var(--muted);
    text-align: left;
    text-decoration: none;

    border: 1px solid transparent;
    border-radius: 13px;

    transition:
      color 180ms ease,
      background-color 180ms ease,
      border-color 180ms ease,
      transform 220ms cubic-bezier(.22, 1, .36, 1);
  }

  .nav a:hover {
    color: var(--fg);

    background: rgba(51, 184, 168, 0.1);
    border-color: rgba(51, 184, 168, 0.22);

    transform: translateX(3px);
  }

  /* .swatch-grid {
    grid-template-columns: 1fr;
  } */
}

@media (max-width: 640px) {
  .page,
  .topbar-inner {
    width: min(var(--page-width), calc(100% - 24px));
  }

  .topbar-inner {
    padding: 12px 0 14px;
  }

  .nav-toggle {
    min-height: 40px;
    padding: 0 12px;
  }

  .nav-toggle-label {
    font-size: 0.94rem;
  }

  .topbar.is-nav-open .nav {
    gap: 8px;
    padding: 12px;
    top: calc(100% + 10px);
  }

  .topbar.is-nav-open .nav a {
    padding: 12px 12px;
  }

  .hero,
  .section,
  .product-hero {
    padding: 52px 0;
  }

  h1 {
    font-size: clamp(2.5rem, 14vw, 4.2rem);
  }
}
