/* Forgeworks family interface contract v1.6.0. Keep this file identical across projects. */

@font-face {
  font-family: "IBM Plex Sans";
  src: url("/fonts/ibm-plex-sans.ttf") format("truetype");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: "IBM Plex Sans";
  src: url("/fonts/ibm-plex-sans-bold.ttf") format("truetype");
  font-style: normal;
  font-weight: 700;
  font-display: swap;
}

:root,
:root[data-theme="light"] {
  --paper: #f6f8f5;
  --surface: #ffffff;
  --surface-soft: #f5faf6;
  --ink: #17211d;
  --muted: #66726c;
  --faint: #87918b;
  --line: #dfe5e1;
  --line-strong: #b9c2bd;
  --topbar: rgb(246 248 245 / 78%);
  --glass: rgb(255 255 255 / 70%);
  --shadow-color: rgb(31 62 46 / 5%);
  --family-content: 1180px;
  --family-gutter: 40px;
  --family-gutter-mobile: 28px;
  --family-header-height: 72px;
  --family-header-blur: 18px;
  --family-card-radius: 18px;
  --family-control-radius: 10px;
  --family-small-radius: 8px;
  --family-font-sans: "IBM Plex Sans", Arial, Helvetica, sans-serif;
}

:root[data-theme="gray"] {
  --paper: #171b19;
  --surface: #222725;
  --surface-soft: #1c2b23;
  --ink: #f1f6f3;
  --muted: #a4b0aa;
  --faint: #9aa69f;
  --line: #38413c;
  --line-strong: #505954;
  --topbar: rgb(23 27 25 / 86%);
  --glass: rgb(35 42 38 / 82%);
  --shadow-color: rgb(0 0 0 / 22%);
}

:root[data-theme="black"] {
  --paper: #000000;
  --surface: #090b0a;
  --surface-soft: #08130d;
  --ink: #f4f7f5;
  --muted: #9ba49f;
  --faint: #909a94;
  --line: #242926;
  --line-strong: #3e4541;
  --topbar: rgb(0 0 0 / 90%);
  --glass: #090b0a;
  --shadow-color: rgb(0 0 0 / 70%);
}

* {
  box-sizing: border-box;
}

html {
  background: var(--paper);
  scroll-behavior: smooth;
}

body {
  min-width: 320px;
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 75% 0%, var(--family-accent-glow) 0, transparent 28rem),
    var(--paper);
  font-family: var(--family-font-sans);
  font-size: 16px;
  line-height: 1.6;
  text-rendering: optimizeLegibility;
  transition: background 200ms ease, color 200ms ease;
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  color: inherit;
}

::selection {
  color: var(--ink);
  background: var(--family-accent-soft);
}

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

.site-frame {
  min-height: 100vh;
}

.site-header {
  position: sticky;
  z-index: 20;
  top: 0;
  width: 100%;
  margin: 0;
  padding: 0;
  border-bottom: 1px solid var(--line);
  background: var(--topbar);
  -webkit-backdrop-filter: blur(var(--family-header-blur));
  backdrop-filter: blur(var(--family-header-blur));
}

.site-header-inner,
.site-footer,
.family-container {
  width: min(calc(100% - var(--family-gutter)), var(--family-content));
  margin-inline: auto;
}

.site-header-inner {
  display: flex;
  min-height: var(--family-header-height);
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.site-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  font-size: 1.22rem;
  font-weight: 700;
  letter-spacing: -0.035em;
  line-height: 1;
  text-decoration: none;
}

.site-brand-accent {
  color: var(--family-accent);
}

.theme-switch {
  display: flex;
  align-items: center;
  gap: 2px;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--glass);
}

.theme-switch button {
  display: grid;
  width: 27px;
  height: 27px;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 50%;
  color: var(--muted);
  background: transparent;
  cursor: pointer;
}

.theme-switch button:hover {
  color: var(--ink);
}

.theme-switch button.active,
.theme-switch button.active:hover {
  color: var(--paper);
  background: var(--ink);
  box-shadow: 0 2px 7px var(--shadow-color);
}

.theme-switch .black-dot span {
  width: 12px;
  height: 12px;
  border: 1px solid #69716d;
  border-radius: 50%;
  background: #000;
}

.theme-switch .black-dot.active span {
  border-color: var(--paper);
}

.family-hero-title {
  margin: 0;
  font-size: clamp(42px, 6vw, 72px);
  font-weight: 800;
  letter-spacing: -0.06em;
  line-height: 0.98;
}

.family-hero-description {
  max-width: 620px;
  margin: 21px 0 0;
  color: var(--muted);
  font-size: 17px;
  line-height: 1.65;
}

.family-intro-offset {
  padding-top: 62px;
}

.eyebrow {
  color: var(--family-accent);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.family-card {
  border: 1px solid var(--line);
  border-radius: var(--family-card-radius);
  background: var(--surface);
  box-shadow: 0 16px 50px var(--shadow-color);
}

.family-primary {
  display: inline-flex;
  min-height: 46px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 17px;
  border: 0;
  border-radius: var(--family-control-radius);
  color: var(--family-accent-contrast);
  background: var(--family-accent);
  box-shadow: 0 7px 18px var(--family-accent-shadow);
  font-size: 0.875rem;
  font-weight: 700;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
  transition: background 180ms ease, transform 180ms ease;
}

.family-primary:hover:not(:disabled) {
  color: var(--family-accent-contrast);
  background: var(--family-accent-strong);
  transform: translateY(-1px);
}

.family-primary:disabled {
  box-shadow: none;
  cursor: not-allowed;
  opacity: 0.58;
}

.family-guide-layout {
  display: grid;
  grid-template-columns: 210px minmax(0, 1fr);
  gap: clamp(50px, 8vw, 110px);
  align-items: start;
  padding-top: 62px;
  padding-bottom: 100px;
}

.family-guide-index {
  position: sticky;
  top: 130px;
  font-size: 0.8rem;
}

.family-guide-index > p {
  margin: 0;
  font-weight: 700;
}

.family-guide-index > span {
  display: block;
  margin: 3px 0 20px;
  color: var(--muted);
}

.family-guide-index nav {
  display: flex;
  flex-direction: column;
  border-top: 1px solid var(--line);
}

.family-guide-index a {
  padding: 8px 0;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  text-decoration: none;
}

.family-guide-index a:hover {
  color: var(--ink);
}

.family-guide-content {
  min-width: 0;
  margin: 0;
}

.site-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  margin-top: 38px;
  padding: 24px 0 30px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.75rem;
  line-height: 1.5;
}

.site-footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0 6px;
  text-align: right;
}

.site-footer a {
  color: var(--muted);
  text-underline-offset: 2px;
}

.site-footer a:hover {
  color: var(--family-accent);
}

@media (max-width: 820px) {
  .family-intro-offset {
    padding-top: 40px;
  }

  .family-guide-layout {
    grid-template-columns: 1fr;
    gap: 46px;
    padding-top: 40px;
  }

  .family-guide-index {
    position: static;
  }

  .family-guide-index nav {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: 18px;
  }
}

@media (max-width: 650px) {
  .site-header-inner,
  .site-footer,
  .family-container {
    width: min(calc(100% - var(--family-gutter-mobile)), var(--family-content));
  }

  .site-header-inner {
    gap: 12px;
  }

  .site-footer {
    justify-content: flex-start;
    margin-top: 20px;
  }

  .site-footer-links {
    justify-content: flex-start;
    text-align: left;
  }

  .family-guide-index nav {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 520px) {
  .family-intro-offset {
    padding-top: 32px;
  }

  .family-hero-description {
    font-size: 14px;
  }

  .family-guide-layout {
    padding-top: 32px;
    padding-bottom: 72px;
  }
}

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

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
