/* BraxCode Digitals Foundation — homepage styles.
   Mobile-first. Reuses the palette and fonts already defined in the chat app. */

:root {
  --bg: #050507;
  --bg2: #0a0a0f;
  --bg3: #0f0f18;
  --coral: #ff4c4c;
  --coral2: #ff6b6b;
  --coral-dim: rgba(255, 76, 76, 0.12);
  --coral-glow: rgba(255, 76, 76, 0.35);
  --glass: rgba(255, 255, 255, 0.04);
  --glass2: rgba(255, 255, 255, 0.07);
  --border: rgba(255, 255, 255, 0.07);
  --border2: rgba(255, 76, 76, 0.25);
  --text: #f0f0f0;
  --text2: #999;
  --text3: #8a8a8a;
  --font-h: "Orbitron", sans-serif;
  --font-b: "Rajdhani", sans-serif;
  --font-c: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

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

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

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

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-b);
  font-size: 1rem;
  line-height: 1.6;
  letter-spacing: 0.2px;
  overflow-x: hidden;
}

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

a {
  color: var(--coral);
  text-decoration: none;
}

a:hover {
  text-decoration: none;
}

.text-link {
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
}

[hidden] {
  display: none !important;
}

:focus-visible {
  outline: 2px solid var(--coral);
  outline-offset: 3px;
  border-radius: 4px;
}

.svg-sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

.wrap {
  width: 100%;
  max-width: 1320px;
  margin: 0 auto;
  padding: 0 20px;
}

.icon {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
}

/* ===== SKIP LINK ===== */
.skip-link {
  position: absolute;
  top: -70px;
  left: 12px;
  z-index: 200;
  padding: 10px 16px;
  background: var(--coral);
  color: #000;
  border-radius: 8px;
  font-weight: 600;
  transition: top 0.2s ease;
}

.skip-link:focus {
  top: 12px;
  text-decoration: none;
}

/* ===== HEADER ===== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 60;
  background: rgba(5, 5, 7, 0.88);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 64px;
  padding-top: 10px;
  padding-bottom: 10px;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  text-decoration: none;
}

.brand:hover {
  text-decoration: none;
}

.brand-logo {
  flex: 0 0 auto;
  filter: drop-shadow(0 0 10px var(--coral-glow));
  transition: transform 0.4s cubic-bezier(0.2, 0.7, 0.3, 1), filter 0.4s ease;
}

.brand:hover .brand-logo {
  transform: rotate(-8deg) scale(1.07);
  filter: drop-shadow(0 0 18px var(--coral-glow));
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

.brand-name {
  font-family: var(--font-h);
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: 0.02em;
}

.brand-sub {
  font-size: 0.875rem;
  color: var(--text2);
  letter-spacing: 0.4px;
}

.nav-toggle {
  transition: background 0.2s ease, border-color 0.2s ease, transform 0.15s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  flex: 0 0 auto;
  background: var(--glass);
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--text);
  cursor: pointer;
}

.nav-toggle-bars {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.nav-toggle:hover {
  border-color: var(--border2);
}

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

.nav-toggle-bars span {
  display: block;
  width: 18px;
  height: 2px;
  background: currentColor;
  border-radius: 2px;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.nav-toggle[aria-expanded="true"] .nav-toggle-bars span:nth-child(1) {
  transform: translateY(6px) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] .nav-toggle-bars span:nth-child(2) {
  opacity: 0;
}

.nav-toggle[aria-expanded="true"] .nav-toggle-bars span:nth-child(3) {
  transform: translateY(-6px) rotate(-45deg);
}

.site-nav {
  position: absolute;
  left: 0;
  right: 0;
  top: 100%;
  display: none;
  flex-direction: column;
  gap: 2px;
  padding: 10px 20px 20px;
  background: var(--bg2);
  border-bottom: 1px solid var(--border);
  box-shadow: 0 24px 40px rgba(0, 0, 0, 0.55);
}

.site-nav.open {
  display: flex;
}

.site-nav > a:not(.btn) {
  padding: 12px 8px;
  color: var(--text);
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  border-radius: 8px;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
}

.site-nav > a:not(.btn):hover {
  background: var(--glass);
  color: var(--coral);
  text-decoration: none;
}


/* ===== BUTTONS ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 48px;
  max-width: 100%;
  padding: 12px 22px;
  border: 1px solid transparent;
  border-radius: 10px;
  font-family: var(--font-b);
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 0.4px;
  text-align: center;
  overflow-wrap: anywhere;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease, transform 0.15s ease;
}

.btn:hover {
  text-decoration: none;
}

.btn-primary {
  background: var(--coral);
  color: #000;
}

.btn-primary:hover {
  background: var(--coral2);
  box-shadow: 0 8px 28px rgba(255, 76, 76, 0.28);
  transform: translateY(-2px);
}

.btn-ghost {
  background: var(--glass);
  border-color: var(--border);
  color: var(--text);
}

.btn-ghost:hover {
  background: var(--glass2);
  border-color: var(--border2);
  transform: translateY(-2px);
}

.btn:active {
  transform: translateY(0);
}



.text-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 1rem;
  font-weight: 600;
  color: var(--coral);
}

.text-link .icon {
  transition: transform 0.3s ease;
}

.text-link:hover {
  text-decoration: none;
}

.text-link:hover .icon {
  transform: rotate(12deg) scale(1.12);
}

/* ===== HERO ===== */
.hero {
  position: relative;
  padding: 40px 0 48px;
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  left: 50%;
  top: -260px;
  width: 900px;
  height: 640px;
  transform: translateX(-50%);
  background: radial-gradient(closest-side, rgba(255, 76, 76, 0.16), transparent);
  pointer-events: none;
}

.hero-inner {
  position: relative;
  display: grid;
  gap: 30px;
}

/* Small entrance for the hero copy — no scroll library needed. */
.hero-copy > * {
  animation: rise-in 0.65s cubic-bezier(0.2, 0.7, 0.3, 1) both;
}

.hero-copy > *:nth-child(2) {
  animation-delay: 0.07s;
}

.hero-copy > *:nth-child(3) {
  animation-delay: 0.14s;
}

.hero-copy > *:nth-child(4) {
  animation-delay: 0.21s;
}

.hero-copy > *:nth-child(5) {
  animation-delay: 0.28s;
}

@keyframes rise-in {
  from {
    opacity: 0;
    transform: translateY(14px);
  }

  to {
    opacity: 1;
    transform: none;
  }
}

.eyebrow {
  margin-bottom: 14px;
  font-family: var(--font-c);
  font-size: 0.875rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--coral);
}

.hero h1 {
  margin-bottom: 18px;
  font-family: var(--font-h);
  font-weight: 900;
  font-size: clamp(1.65rem, 7.2vw, 3.1rem);
  line-height: 1.16;
  letter-spacing: -0.2px;
}

.hero-lead {
  max-width: 34em;
  margin-bottom: 26px;
  font-size: 1.0625rem;
  color: var(--text2);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 18px;
}

.hero-actions .btn {
  flex: 1 1 190px;
}

.hero-art {
  display: none;
}

.hero-glow {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 70%;
  aspect-ratio: 1;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: radial-gradient(closest-side, rgba(255, 76, 76, 0.22), transparent);
  pointer-events: none;
}

/* Only a slow vertical float: no rotation, no breathing glow. */
@keyframes logo-float {
  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-6px);
  }
}

/* ===== SECTIONS ===== */
.section {
  padding: 52px 0;
  border-top: 1px solid var(--border);
  scroll-margin-top: 76px;
}

.section-eyebrow {
  margin-bottom: 10px;
  font-family: var(--font-c);
  font-size: 0.875rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--coral);
}

.section h2 {
  margin-bottom: 24px;
  font-family: var(--font-h);
  font-weight: 700;
  font-size: clamp(1.5rem, 5vw, 2.1rem);
  line-height: 1.2;
}

.section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 26px;
}

.section-head h2 {
  margin-bottom: 0;
}

/* ===== CARDS ===== */
.card-grid {
  list-style: none;
  display: grid;
  gap: 16px;
  grid-template-columns: 1fr;
}

.card {
  padding: 22px 20px;
  background: var(--glass);
  border: 1px solid var(--border);
  border-radius: 14px;
  transition: border-color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.card:hover {
  background: var(--glass2);
  border-color: var(--border2);
  transform: translateY(-2px);
}

.card h3 {
  margin-bottom: 8px;
  font-family: var(--font-h);
  font-weight: 700;
  font-size: 1rem;
  line-height: 1.35;
  letter-spacing: 0.2px;
}

.card p {
  font-size: 0.9375rem;
  color: var(--text2);
}

/* ===== TECH STACK ===== */
.chips {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.chips li {
  padding: 7px 14px;
  background: var(--glass);
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 0.9375rem;
}

/* ===== PROJECTS ===== */
.project-grid {
  list-style: none;
  display: grid;
  gap: 18px;
  grid-template-columns: 1fr;
}

.project-card {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  background: var(--glass);
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
  transition: border-color 0.2s ease, transform 0.2s ease;
}

.project-card:hover {
  border-color: var(--border2);
  transform: translateY(-3px);
}

.project-media {
  aspect-ratio: 16 / 9;
  background: var(--bg3);
  overflow: hidden;
}

.project-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.project-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 10px;
  padding: 18px;
}

.project-body h3 {
  font-family: var(--font-h);
  font-weight: 700;
  font-size: 1rem;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.project-desc {
  font-size: 0.9375rem;
  color: var(--text2);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  line-clamp: 3;
}

.project-tags {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.project-tags li {
  padding: 3px 10px;
  border: 1px solid var(--border2);
  border-radius: 999px;
  font-family: var(--font-c);
  font-size: 0.875rem;
  color: var(--coral);
}

.project-links {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-top: auto;
  padding-top: 4px;
}

.project-links a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.9375rem;
  font-weight: 600;
}

/* ===== SKELETONS ===== */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.project-skeleton {
  pointer-events: none;
}

.skeleton-block,
.skeleton-line,
.skeleton-pill {
  background: var(--glass2);
  border-radius: 6px;
  position: relative;
  overflow: hidden;
}

.skeleton-block::after,
.skeleton-line::after,
.skeleton-pill::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent 0%, rgba(255, 255, 255, 0.08) 50%, transparent 100%);
  transform: translateX(-100%);
  animation: skeleton-shimmer 1.4s ease-in-out infinite;
}

@keyframes skeleton-shimmer {
  100% {
    transform: translateX(100%);
  }
}

.skeleton-line {
  height: 12px;
  margin-bottom: 8px;
}

.skeleton-title {
  height: 16px;
  width: 65%;
}

.skeleton-short {
  width: 45%;
}

.skeleton-links {
  display: flex;
  gap: 12px;
  margin-top: auto;
  padding-top: 4px;
}

.skeleton-pill {
  width: 64px;
  height: 16px;
  border-radius: 999px;
}

.project-media-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text3);
  font-size: 0.875rem;
  background: var(--bg3);
}

/* ===== PRICING ===== */
.price-card {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.price-label {
  font-family: var(--font-c);
  font-size: 0.875rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text3);
}

.price-card .price {
  margin-bottom: 6px;
  font-family: var(--font-h);
  font-weight: 900;
  font-size: 1.75rem;
  line-height: 1.1;
  color: var(--coral);
}

.fine-print {
  margin-top: 18px;
  font-size: 0.9375rem;
  color: var(--text3);
}

/* ===== ABOUT ===== */
.about-grid {
  display: grid;
  gap: 16px;
}

.about-block {
  padding: 22px 20px;
  background: var(--glass);
  border: 1px solid var(--border);
  border-radius: 14px;
}

.about-block h3 {
  margin-bottom: 10px;
  font-family: var(--font-h);
  font-weight: 700;
  font-size: 1rem;
  letter-spacing: 0.02em;
  color: var(--coral);
}

.about-block p {
  color: var(--text2);
}

/* ===== CONTACT ===== */
.contact-inner {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.contact-inner h2 {
  margin-bottom: 8px;
}

.contact-loc {
  margin-bottom: 18px;
  font-family: var(--font-c);
  font-size: 0.9375rem;
  letter-spacing: 0.02em;
  color: var(--text2);
}

.contact-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 16px;
}

.contact-actions .btn {
  flex: 1 1 240px;
}

.contact-links {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  font-size: 0.9375rem;
  padding-top: 4px;
  border-top: 1px solid var(--border);
}

.contact-links a {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--text2);
  font-weight: 600;
}

.contact-links a:hover {
  color: var(--coral);
}

/* ===== FOOTER ===== */
.site-footer {
  padding: 28px 0 36px;
  background: var(--bg2);
  border-top: 1px solid var(--border);
}

.footer-inner {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.9375rem;
  color: var(--text2);
}

.footer-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  font-size: 0.9375rem;
}

.footer-nav a {
  color: var(--text2);
  font-weight: 600;
}

.footer-nav a:hover {
  color: var(--coral);
}

/* ===== LEGAL PAGES (privacy / terms) ===== */
.legal {
  max-width: 800px;
  margin: 0 auto;
  padding: 44px 0 72px;
}

.legal h1 {
  margin-bottom: 6px;
  font-family: var(--font-h);
  font-weight: 900;
  font-size: clamp(1.6rem, 5vw, 2.1rem);
  line-height: 1.2;
  color: var(--coral);
}

.legal .updated {
  margin-bottom: 30px;
  font-family: var(--font-c);
  font-size: 0.875rem;
  letter-spacing: 1px;
  color: var(--text3);
}

.legal h2 {
  margin: 30px 0 10px;
  font-family: var(--font-h);
  font-weight: 700;
  font-size: 1.05rem;
  line-height: 1.35;
  color: var(--coral);
}

.legal p,
.legal li {
  font-size: 1rem;
  color: var(--text2);
}

.legal p + p {
  margin-top: 12px;
}

.legal ul {
  margin-top: 10px;
  padding-left: 20px;
}

.legal li + li {
  margin-top: 6px;
}

.legal a {
  color: var(--coral);
}

/* ===== NOSCRIPT ===== */
.noscript-note {
  margin-top: 16px;
  padding: 14px 16px;
  background: var(--coral-dim);
  border: 1px solid var(--border2);
  border-radius: 12px;
  font-size: 0.9375rem;
}

/* ===== NETWORK CARDS (founder page) ===== */
.network-card {
  display: flex;
  flex-direction: column;
  gap: 4px;
  height: 100%;
  color: var(--text);
}

.network-card:hover {
  color: var(--text);
}

.network-card:focus-visible {
  outline: 2px solid var(--coral);
  outline-offset: 4px;
  border-radius: 10px;
}

.network-card h3 {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 0;
}

.network-card .icon {
  color: var(--coral);
}

.network-card p {
  font-family: var(--font-c);
  font-size: 0.8125rem;
  color: var(--text3);
  overflow-wrap: anywhere;
}

/* ===== BOOKS ===== */
.book-grid {
  list-style: none;
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.book-card {
  display: flex;
  flex-direction: column;
  min-width: 0;
  background: var(--glass);
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
  transition: border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.book-card:hover,
.book-card:focus-within {
  border-color: var(--border2);
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.38);
  transform: translateY(-2px);
}

.book-cover {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 4px;
  aspect-ratio: 2 / 3;
  padding: 14px;
  background: linear-gradient(160deg, rgba(255, 76, 76, 0.24), var(--bg3) 72%);
  border-bottom: 1px solid var(--border);
  overflow: hidden;
}

.book-cover-genre {
  font-family: var(--font-c);
  font-size: 0.625rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text3);
}

.book-cover-title {
  font-family: var(--font-h);
  font-weight: 900;
  font-size: clamp(1rem, 4.4vw, 1.35rem);
  line-height: 1.12;
  letter-spacing: 0.02em;
  color: var(--coral);
  overflow-wrap: anywhere;
}

.book-cover-sub {
  font-size: 0.75rem;
  color: var(--text2);
  overflow-wrap: anywhere;
}

.book-cover-media {
  padding: 0;
  background: var(--bg3);
}

.book-cover-img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.book-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 6px;
  padding: 14px;
}

.book-title {
  font-family: var(--font-h);
  font-weight: 700;
  font-size: clamp(0.9375rem, 3.6vw, 1.05rem);
  line-height: 1.3;
  overflow-wrap: anywhere;
}

.book-title a {
  color: inherit;
}

.book-title a:hover {
  color: var(--coral);
}

.book-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  font-family: var(--font-c);
  font-size: 0.6875rem;
  letter-spacing: 0.04em;
  color: var(--coral2);
}

.book-genre {
  color: var(--coral2);
}

.book-badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 7px;
  background: var(--coral);
  border-radius: 999px;
  font-family: var(--font-c);
  font-weight: 700;
  font-size: 0.6875rem;
  line-height: 1.4;
  letter-spacing: 0.04em;
  color: #050507;
}

.book-blurb {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  overflow: hidden;
  font-size: 0.8125rem;
  line-height: 1.45;
  color: var(--text2);
}

.book-chapter-count {
  margin-top: auto;
  padding-top: 4px;
  font-family: var(--font-c);
  font-size: 0.6875rem;
  letter-spacing: 0.04em;
  color: var(--text3);
}

.book-btn {
  width: 100%;
  margin-top: 4px;
  padding: 9px 10px;
  font-size: 0.8125rem;
  text-align: center;
}

.book-btn:hover {
  border-color: var(--coral);
  color: var(--coral);
}

.book-card .fine-print {
  margin-top: 0;
}

/* ===== BOOK PAGES (server-rendered) ===== */
.book-page-head {
  max-width: 820px;
  margin-bottom: 28px;
}

.book-page-head h1 {
  margin-bottom: 12px;
  font-family: var(--font-h);
  font-weight: 900;
  font-size: clamp(1.75rem, 6vw, 2.6rem);
  line-height: 1.15;
}

.book-intro {
  max-width: 760px;
  margin-bottom: 26px;
  color: var(--text2);
}

.book-meta {
  font-family: var(--font-c);
  font-size: 0.8125rem;
  letter-spacing: 0.04em;
  color: var(--coral2);
}

.book-meta .book-age {
  color: var(--text2);
}

.book-empty {
  padding: 18px 20px;
  background: var(--glass);
  border: 1px dashed var(--border);
  border-radius: 12px;
  color: var(--text2);
}

.book-detail {
  display: grid;
  gap: 28px;
  grid-template-columns: 1fr;
}

.book-detail-cover .book-cover {
  max-width: 320px;
  margin: 0 auto;
}

.book-detail-body {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.book-detail-body h1 {
  font-family: var(--font-h);
  font-weight: 900;
  font-size: clamp(1.75rem, 6vw, 2.4rem);
  line-height: 1.15;
}

.book-subtitle {
  color: var(--text2);
  font-size: 1.0625rem;
}

.book-series {
  font-family: var(--font-c);
  font-size: 0.8125rem;
  letter-spacing: 0.04em;
  color: var(--coral2);
}

.book-notice {
  padding: 14px 16px;
  background: rgba(255, 76, 76, 0.08);
  border: 1px solid var(--border2);
  border-radius: 12px;
  color: var(--text);
}

.book-chapters {
  margin-top: 40px;
}

.book-chapters h2 {
  margin-bottom: 20px;
  font-family: var(--font-h);
  font-weight: 700;
  font-size: clamp(1.35rem, 4vw, 1.75rem);
  line-height: 1.2;
}

.chapter-list {
  list-style: none;
  display: grid;
  gap: 12px;
  max-width: 820px;
}

.chapter-item {
  display: flex;
  gap: 16px;
  padding: 16px 18px;
  background: var(--glass);
  border: 1px solid var(--border);
  border-radius: 12px;
}

.chapter-num {
  flex: 0 0 auto;
  min-width: 2.25rem;
  font-family: var(--font-c);
  font-size: 1rem;
  color: var(--coral);
}

.chapter-body h3 {
  margin-bottom: 4px;
  font-family: var(--font-h);
  font-size: 1rem;
  line-height: 1.35;
}

.chapter-body p {
  font-size: 0.9375rem;
  color: var(--text2);
}

.breadcrumb {
  margin-bottom: 22px;
  font-family: var(--font-c);
  font-size: 0.8125rem;
  color: var(--text3);
}

.breadcrumb ol {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.breadcrumb li {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.breadcrumb li + li::before {
  content: "/";
  color: var(--text3);
}

.breadcrumb a {
  color: var(--text2);
}

.breadcrumb a:hover {
  color: var(--coral);
}

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

@media (min-width: 760px) {
  .book-detail {
    grid-template-columns: 300px 1fr;
    align-items: start;
    gap: 40px;
  }
}

/* ===== BOOKS LIBRARY HERO ===== */
.books-hero {
  padding: 40px 0 26px;
  background:
    radial-gradient(circle at 18% 0%, rgba(255, 76, 76, 0.13), transparent 62%),
    linear-gradient(180deg, var(--bg), var(--bg2));
  border-bottom: 1px solid var(--border);
}

.books-hero h1 {
  margin-bottom: 12px;
  font-family: var(--font-h);
  font-weight: 900;
  font-size: clamp(1.85rem, 7vw, 2.9rem);
  line-height: 1.1;
  letter-spacing: 0.01em;
}

.books-hero .book-intro {
  margin-bottom: 10px;
}

.books-publisher {
  font-family: var(--font-c);
  font-size: 0.6875rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--coral2);
}

.books-library {
  padding: 28px 0 68px;
}

.book-section-title,
.series-head h2 {
  font-family: var(--font-h);
  font-weight: 700;
  font-size: clamp(1.25rem, 4.5vw, 1.65rem);
  line-height: 1.2;
}

.series-block {
  margin-top: 34px;
}

.series-block:first-of-type {
  margin-top: 0;
}

.series-head {
  margin-bottom: 16px;
}

.series-head h2 {
  margin-top: 4px;
}

.book-section-title {
  margin: 38px 0 18px;
}

.book-read-actions {
  margin-top: 6px;
}

.chapter-item {
  align-items: flex-start;
  scroll-margin-top: 84px;
}

.chapter-body {
  flex: 1 1 200px;
  min-width: 0;
}

.chapter-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.chapter-actions .btn {
  padding: 7px 14px;
  font-size: 0.8125rem;
}

@media (min-width: 640px) {
  .book-grid {
    gap: 18px;
  }

  .book-body {
    gap: 8px;
    padding: 18px;
  }

  .book-title {
    font-size: 1.05rem;
  }

  .book-cover {
    padding: 18px;
  }

  .book-btn {
    width: auto;
  }
}

@media (min-width: 980px) {
  .book-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .books-library {
    padding-bottom: 84px;
  }
}

@media (min-width: 1180px) {
  .book-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (prefers-reduced-motion: reduce) {
  .book-card {
    transition: none;
  }

  .book-card:hover,
  .book-card:focus-within {
    transform: none;
  }
}

/* ===== QUESTIONS ===== */
.faq {
  display: grid;
  gap: 12px;
  max-width: 820px;
}

.faq details {
  padding: 16px 18px;
  background: var(--glass);
  border: 1px solid var(--border);
  border-radius: 12px;
}

.faq summary {
  cursor: pointer;
  font-weight: 600;
  color: var(--text);
}

.faq summary::marker {
  color: var(--coral);
}

.faq details[open] summary {
  margin-bottom: 10px;
  color: var(--coral);
}

.faq p {
  font-size: 0.9375rem;
  color: var(--text2);
}

/* ===== BREAKPOINTS ===== */
@media (min-width: 640px) {
  .wrap {
    padding: 0 28px;
  }

  .section {
    padding: 68px 0;
  }

  .card-grid,
  .project-grid,
  .book-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .contact-actions .btn {
    flex: 0 0 auto;
  }
}

@media (min-width: 900px) {
  .nav-toggle {
    display: none;
  }

  .site-nav {
    position: static;
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 2px;
    padding: 0;
    background: none;
    border: 0;
    box-shadow: none;
  }

  .site-nav > a:not(.btn) {
    padding: 10px 12px;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text2);
  }

  .site-nav > a:not(.btn):hover {
    background: none;
    color: var(--coral);
  }

  .site-nav > a.is-active {
    color: var(--coral);
  }

  .hero {
    padding: 76px 0 88px;
  }

  .hero-inner {
    grid-template-columns: 1.15fr 0.85fr;
    align-items: center;
    gap: 48px;
  }

  .hero-art {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .hero-logo {
    position: relative;
    width: min(100%, 320px);
    height: auto;
    filter: drop-shadow(0 0 60px var(--coral-glow));
    animation: logo-float 9s ease-in-out infinite;
  }

  .hero-actions .btn {
    flex: 0 0 auto;
  }

  .section {
    padding: 84px 0;
  }

  .about-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 22px;
  }
}

@media (min-width: 980px) {
  .card-grid,
  .project-grid,
  .book-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (min-width: 760px) {
  .footer-inner {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }
}

/* ===== WIDE DESKTOP ===== */
@media (min-width: 980px) {
  #pricing .card-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

@media (min-width: 1280px) {
  .wrap {
    padding: 0 24px;
  }

  .hero-logo {
    width: min(100%, 380px);
  }
}

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

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

  .skeleton-block::after,
  .skeleton-line::after,
  .skeleton-pill::after {
    animation: none;
  }

  @view-transition {
    navigation: none;
  }
}

@view-transition {
  navigation: auto;
}

::view-transition-old(root),
::view-transition-new(root) {
  animation-duration: 180ms;
}

.site-header {
  view-transition-name: site-header;
}
