/* ==========================================================================
   open source color system — site styles
   Vanilla reproduction of the Framer site.
   Breakpoints (identical to Framer): desktop ≥1200 / tablet 810–1199 / phone ≤809
   ========================================================================== */

/* ---------- fonts ---------- */

@font-face {
  font-family: "PP Fraktion Mono";
  src: url("../fonts/PPFraktionMono-Light.woff2") format("woff2");
  font-weight: 300;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "PP Fraktion Mono";
  src: url("../fonts/PPFraktionMono-Regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "PP Fraktion Mono";
  src: url("../fonts/PPFraktionMono-Bold.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

/* ---------- reset + base ---------- */

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

html {
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: "PP Fraktion Mono", monospace;
  font-weight: 300;
  color: #000;
  background: #fff;
}

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

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

button {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  cursor: pointer;
}

/* ---------- shared vars ---------- */

:root {
  --ink: #000;
  --ink-soft: #5a5e61;       /* secondary text rgb(90,94,97) */
  --line: #d5d8db;           /* full-width dividers */
  --card-line: #dbdbdc;      /* card + button borders */
  --pad-x: 5%;               /* page gutter (72px @1440, 51px @1024) */
}

@media (max-width: 809px) {
  :root {
    --pad-x: 20px;
  }
}

/* ---------- typography helpers ---------- */

.txt-body {
  font-size: 17px;
  font-weight: 300;
  letter-spacing: -0.04em;
  line-height: 1.2;
}

.txt-small {
  font-size: 15px;
  font-weight: 300;
  letter-spacing: -0.04em;
  line-height: 1.2;
}

/* ==========================================================================
   home
   ========================================================================== */

.home-hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 52px var(--pad-x) 0;
}

.home-pill {
  display: inline-block;
  padding: 6px 12px;
  background: #000;
  border-radius: 4px;
  color: #fff;
  font-size: 12px;
  font-weight: 300;
  letter-spacing: -0.04em;
  line-height: 1.2;
}

.home-pill:hover {
  text-decoration: underline;
}

.home-hero-img {
  width: 713px;
  max-width: 100%;
  margin-top: 30px;
}

.home-label {
  margin-top: 64px;
  font-size: 19px;
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1.2;
  text-align: center;
}

.home-headline {
  margin-top: 20px;
  max-width: 1037px;
  font-size: 48px;
  font-weight: 400;
  letter-spacing: -0.08em;
  line-height: 1.15;
  text-align: center;
}

/* ---------- hero action buttons (home + subpages) ---------- */

.hero-actions {
  display: flex;
  justify-content: center;
  gap: 10px;
}

.home-hero .hero-actions {
  margin-top: 63px;
}

.btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 16px 24px;
  background: #fff;
  border: 1px solid var(--card-line);
  border-radius: 4px;
  font-size: 17px;
  font-weight: 300;
  letter-spacing: -0.04em;
  line-height: 1.2;
  color: #000;
  transition: background 0.2s ease, color 0.2s ease;
}

.btn:hover {
  background: #000;
  color: #fff;
}

/* ---------- home nav list ---------- */

.nav-list {
  margin-top: 65px;
}

.nav-row {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 64px 0;
  border-top: 1px solid var(--line);
  font-size: 28px;
  font-weight: 400;
  letter-spacing: -0.04em;
  line-height: 1.2;
  text-align: center;
  transition: background 0.2s ease, color 0.2s ease;
}

a.nav-row:hover {
  background: #000;
  color: #fff;
}

.nav-row.is-disabled {
  color: var(--ink-soft);
  cursor: default;
}

/* ---------- footer bar ---------- */

.footer-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 72px;
  background: #000;
  color: #fff;
  font-size: 18px;
  font-weight: 400;
  letter-spacing: -0.04em;
  line-height: 1.2;
  text-align: center;
}

.footer-bar:hover {
  text-decoration: underline;
}

/* ==========================================================================
   subpage hero
   ========================================================================== */

.page-hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 157px var(--pad-x) 102px;
  text-align: center;
}

.page-hero h1 {
  font-size: 64px;
  font-weight: 400;
  letter-spacing: -0.08em;
  line-height: 0.9;
}

.page-hero .page-hero-sub {
  margin-top: 40px;
  max-width: 778px;
  font-size: 28px;
  font-weight: 300;
  letter-spacing: -0.04em;
  line-height: 1.2;
}

.page-hero .hero-actions {
  margin-top: 64px;
}

/* ==========================================================================
   palette sections (system-palette)
   ========================================================================== */

.palette-section {
  padding: 64px var(--pad-x) 0;
}

.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 5px 0 32px;
  border-bottom: 1px solid var(--line);
}

.section-head h2 {
  font-size: 40px;
  font-weight: 400;
  letter-spacing: -0.04em;
  line-height: 1.2;
}

/* switcher : code syntax | figma Libraries */

.switcher {
  display: flex;
  align-items: center;
}

.switcher-tab {
  padding: 8px 30px;
  border: 1px solid var(--card-line);
  border-radius: 6px;
  background: #fff;
  font-size: 17px;
  font-weight: 300;
  letter-spacing: -0.04em;
  line-height: 1.2;
  color: var(--ink-soft);
  white-space: nowrap;
}

.switcher-tab.is-active {
  background: #000;
  border-color: #000;
  color: #fff;
}

/* sub-section title */

.subsection-head {
  padding: 32px 0;
}

.subsection-head h3 {
  font-size: 28px;
  font-weight: 400;
  letter-spacing: -0.04em;
  line-height: 1.2;
}

.subsection-head p {
  margin-top: 10px;
  font-size: 17px;
  font-weight: 300;
  letter-spacing: -0.04em;
  line-height: 1.2;
  color: var(--ink-soft);
}

/* swatch cards grid : first 2 cards wide, then 4 columns */

.swatch-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-top: 10px;
}

.swatch-grid > .swatch-card:nth-child(-n + 2) {
  grid-column: span 2;
}

.swatch-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 24px;
  padding: 32px;
  border: 1px solid var(--card-line);
  border-radius: 8px;
  background: #fff;
}

.swatch-code {
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 15px;
  font-weight: 300;
  letter-spacing: -0.04em;
  line-height: 1.2;
  color: var(--ink-soft);
  overflow-wrap: anywhere;
}

.swatch-card img {
  width: 150px;
  height: 57px;
  object-fit: contain;
}

.swatch-meta {
  display: flex;
  flex-direction: column;
  gap: 10px;
  font-size: 15px;
  letter-spacing: -0.04em;
  line-height: 1.2;
}

.swatch-meta .swatch-name {
  font-weight: 400;
  color: #000;
}

.swatch-meta .swatch-desc {
  font-weight: 300;
  color: var(--ink-soft);
}

/* accordion : X.hover & pressed */

.accordion {
  margin-top: 10px;
}

.accordion-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 32px 0;
  text-align: left;
}

.accordion-head h3 {
  font-size: 28px;
  font-weight: 400;
  letter-spacing: -0.04em;
  line-height: 1.2;
}

.accordion-head p {
  margin-top: 10px;
  font-size: 17px;
  font-weight: 300;
  letter-spacing: -0.04em;
  line-height: 1.2;
  color: var(--ink-soft);
}

.accordion-icon {
  position: relative;
  flex: none;
  width: 24px;
  height: 24px;
  transition: transform 0.25s ease;
}

.accordion-icon::before,
.accordion-icon::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  background: #000;
  transform: translate(-50%, -50%);
}

.accordion-icon::before {
  width: 22px;
  height: 1.5px;
}

.accordion-icon::after {
  width: 1.5px;
  height: 22px;
}

.accordion.is-open .accordion-icon {
  transform: rotate(45deg);
}

.accordion-body {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.35s ease;
}

.accordion-body > div {
  overflow: hidden;
}

.accordion.is-open .accordion-body {
  grid-template-rows: 1fr;
}

.accordion .swatch-grid {
  margin: 0 0 32px;
}

/* state cards are all single width */
.swatch-grid.swatch-grid-states > .swatch-card:nth-child(-n + 2) {
  grid-column: auto;
}

/* ==========================================================================
   bottom navigation (subpages)
   ========================================================================== */

.bottom-nav {
  margin-top: 64px;
}

.bottom-nav-flush {
  margin-top: 0;
}

.bottom-nav-contrib {
  margin-top: 135px;
}

/* per-page hero paddings (measured on the Framer site, desktop) */

.hero-sp        { padding-top: 157px; padding-bottom: 102px; }
.hero-und       { padding-top: 174px; padding-bottom: 119px; }
.hero-uc        { padding-top: 186px; padding-bottom: 131px; }
.hero-contrib   { padding-top: 232px; padding-bottom: 186px; }

.hero-uc .hero-actions  { margin-top: 39px; }
.hero-und .hero-actions { margin-top: 63px; }

@media (max-width: 1199px) {
  .hero-sp, .hero-und, .hero-uc { padding-top: 117px; padding-bottom: 66px; }
  .hero-contrib { padding-top: 204px; padding-bottom: 160px; }
}

@media (max-width: 809px) {
  .hero-sp, .hero-und, .hero-uc { padding-top: 93px; padding-bottom: 42px; }
  .hero-contrib { padding-top: 210px; padding-bottom: 173px; }
}

/* ==========================================================================
   understand-the-system : guide sections
   ========================================================================== */

.guide-section {
  padding: 64px var(--pad-x) 0;
}

.guide-section .subsection-head {
  padding-top: 0;
}

.use-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.use-card {
  position: relative;
  overflow: hidden;
  height: 400px;
  padding: 32px;
  border: 1px solid var(--card-line);
  border-radius: 8px;
  background: #fff;
}

.use-card-short {
  height: 360px;
}

.use-card-text h3 {
  font-size: 24px;
  font-weight: 400;
  letter-spacing: -0.04em;
  line-height: 1.2;
}

.use-card-text p {
  margin-top: 8px;
  font-size: 17px;
  font-weight: 300;
  letter-spacing: -0.04em;
  line-height: 1.2;
  color: var(--ink-soft);
}

.use-card img {
  position: absolute;
  left: 0;
  bottom: -32px;
  width: 468px;
  max-width: none;
}

.guide-section:last-of-type {
  padding-bottom: 64px;
}

/* ==========================================================================
   explore-use-cases : examples
   ========================================================================== */

.example-section {
  padding: 64px var(--pad-x) 0;
}

.example-section:last-of-type {
  padding-bottom: 64px;
}

.example-section:first-of-type {
  padding-top: 0;
}

.example-section .subsection-head {
  padding-top: 0;
}

.demo-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-auto-rows: 1fr;
  gap: 29px 20px;
  margin-top: 18px;
}

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

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

.demo-panel {
  padding: 24px 24px 56px;
  border: 1px solid var(--card-line);
  border-radius: 8px;
  background: #fff;
}

/* alerts */

.alert {
  margin: 38px 0 36px;
  padding: 24px;
  border-radius: 8px;
}

.alert p {
  font-size: 19px;
  font-weight: 400;
  letter-spacing: -0.04em;
  line-height: 1.2;
}

.alert-info {
  background: var(--bg-info-soft);
}

.alert-info p {
  color: var(--cnt-info);
}

.alert-warning {
  background: var(--bg-warning-soft);
  border: 1px solid var(--brd-warning);
}

.alert-warning p {
  color: var(--cnt-warning);
}

/* mini token cards */

.mini-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.mini-card {
  display: flex;
  flex-direction: column;
  flex: 1;
  max-width: 191px;
  padding: 12px;
  border: 1px solid var(--card-line);
  border-radius: 8px;
  background: #fff;
}

.mini-card p {
  font-size: 15px;
  font-weight: 300;
  letter-spacing: -0.04em;
  line-height: 1.2;
  color: var(--ink-soft);
  overflow-wrap: anywhere;
}

.mini-card p + p {
  margin-top: 8px;
}

.mini-card img {
  width: 100px;
  height: 38px;
  margin-top: auto;
  object-fit: contain;
}

/* demo buttons */

.demo-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 302px;
  max-width: 100%;
  height: 68px;
  margin: 24px auto 42px;
  border-radius: 8px;
  font-size: 19px;
  font-weight: 400;
  letter-spacing: -0.04em;
  line-height: 1.2;
}

.demo-btn-bold          { background: var(--bg-accent-bold);          color: var(--cnt-on-bold); }
.demo-btn-bold-hover    { background: var(--bg-accent-bold-hover);    color: var(--cnt-on-bold); }
.demo-btn-bold-pressed  { background: var(--bg-accent-bold-pressed);  color: var(--cnt-on-bold); }
.demo-btn-soft          { background: var(--bg-accent-soft);          color: var(--cnt-accent); }
.demo-btn-soft-hover    { background: var(--bg-accent-soft-hover);    color: var(--cnt-accent); }
.demo-btn-soft-pressed  { background: var(--bg-accent-soft-pressed);  color: var(--cnt-accent); }

/* demo field */

.demo-field {
  width: 471px;
  max-width: 100%;
  margin: 56px auto 0;
}

.demo-field-label {
  font-size: 19px;
  font-weight: 400;
  letter-spacing: -0.04em;
  line-height: 1.2;
  color: var(--cnt-secondary);
}

.demo-field-input {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 16px;
  padding: 16px;
  background: var(--bg-main);
  border: 2px solid var(--brd-danger);
  border-radius: 6px;
  font-size: 19px;
  font-weight: 400;
  letter-spacing: -0.04em;
  color: var(--cnt-danger);
}

.demo-field-error {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--cnt-danger);
  color: #fff;
  font-size: 15px;
  font-weight: 700;
}

.demo-field + .mini-row {
  margin-top: 61px;
}

.mini-row-4 {
  justify-content: center;
}

.mini-row-4 .mini-card {
  max-width: 252px;
  padding: 12px;
  min-height: 200px;
}

/* ==========================================================================
   contributors
   ========================================================================== */

.people {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 99px;
  padding: 0 var(--pad-x);
}

.person {
  width: 800px;
  max-width: 100%;
}

.person img {
  width: 100%;
  height: auto;
  aspect-ratio: 800 / 510;
  object-fit: cover;
}

.person-role {
  margin-top: 10px;
  font-size: 17px;
  font-weight: 300;
  letter-spacing: -0.04em;
  line-height: 1.4;
  color: var(--ink-soft);
}

.person-links {
  display: flex;
  gap: 24px;
  margin-top: 27px;
  font-size: 17px;
  font-weight: 300;
  letter-spacing: -0.04em;
  line-height: 1.2;
}

.person-links span {
  color: var(--ink-soft);
}

.person-links a {
  color: #000;
}

.person-links a:hover {
  text-decoration: underline;
}

/* ==========================================================================
   media queries — tablet 810–1199
   ========================================================================== */

@media (max-width: 1199px) {
  .page-hero {
    padding-top: 117px;
    padding-bottom: 90px;
  }

  .page-hero h1 {
    font-size: 40px;
  }

  .page-hero .page-hero-sub {
    font-size: 24px;
  }

  .home-headline {
    font-size: 28px;
  }

  .nav-row {
    font-size: 22px;
  }

  .section-head h2 {
    font-size: 32px;
  }

  /* switcher goes under the section title, full width */
  .section-head {
    flex-direction: column;
    align-items: stretch;
    gap: 24px;
  }

  .switcher-tab {
    flex: 1;
  }

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

  .swatch-grid > .swatch-card:nth-child(-n + 2) {
    grid-column: auto;
  }

  /* stacked full-width hero buttons */
  .hero-actions {
    flex-direction: column;
    align-self: stretch;
    gap: 10px;
  }

  .hero-actions .btn {
    width: 100%;
  }

  /* single column layouts (interactions grid keeps 3 columns on tablet) */
  .use-grid,
  .demo-grid-2,
  .demo-grid-3 {
    grid-template-columns: minmax(0, 1fr);
  }

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

  .use-card {
    height: 407px;
  }

  .use-card img {
    width: 100%;
  }

  .switcher-tab {
    padding: 8px 12px;
  }

  .mini-card {
    min-height: 200px;
  }
}

/* ==========================================================================
   media queries — phone ≤809
   ========================================================================== */

@media (max-width: 809px) {
  .page-hero {
    padding-top: 93px;
    padding-bottom: 80px;
  }

  .nav-row {
    font-size: 24px;
  }

  .use-grid-short {
    grid-template-columns: 1fr;
  }

  .use-card {
    height: 403px;
  }

  .use-card-short {
    height: 385px;
  }

  /* mini token cards go 2 per row */
  .mini-card,
  .mini-row-4 .mini-card {
    flex: 0 0 calc(50% - 6px);
    max-width: none;
    min-width: 0;
    min-height: 145px;
  }

  .mini-row-4 .mini-card {
    min-height: 190px;
  }

  /* on phone the warning alert panel comes first */
  .demo-grid-2 .demo-panel-info {
    order: 2;
  }
}
