/* ============================================================
   Heat Roleplay - shared design-system chrome
   navbar · mobile drawer · footer · TOC · back-to-top · legal blocks
   tokens/fonts/reset live in styles.css (load it first)
   ============================================================ */

html { scroll-behavior: smooth; scroll-padding-top: 96px; }
::selection { background: var(--ember); color: #0c0a09; text-shadow: none; }
::-moz-selection { background: var(--ember); color: #0c0a09; text-shadow: none; }

@keyframes hnav-blink { 0%, 50% { opacity: 1; } 50.01%, 100% { opacity: 0; } }

/* ---- navbar ---- */
.hnav { position: fixed; top: 0; left: 0; right: 0; z-index: 60; background: rgba(12, 10, 9, 0.86); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.hnav__in { width: 100%; max-width: 1240px; margin: 0 auto; padding: 0 clamp(20px, 4vw, 56px); height: 68px; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.hnav__brand { display: flex; align-items: center; flex-shrink: 0; }
.hnav__brand img { height: 26px; width: auto; }
.hnav__links { display: flex; align-items: center; gap: 14px; font: 600 12px/1 var(--mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--mut); white-space: nowrap; }
.hnav__link { color: inherit; padding: 7px 11px; border: 1px solid transparent; transition: color 0.2s, background 0.2s, border-color 0.2s; }
.hnav__link:hover { color: var(--ember); background: var(--tint); border-color: var(--eline); }
.hterm { display: inline-flex; align-items: center; justify-content: flex-end; flex-shrink: 0; min-width: 220px; }
.hterm__box { display: inline-flex; align-items: center; gap: 11px; font: 600 13px/1 var(--mono); letter-spacing: 0.02em; color: var(--ink); white-space: nowrap; padding: 7px 11px; border: 1px solid transparent; transition: color 0.2s, background 0.2s, border-color 0.2s; }
.hterm:hover .hterm__box { color: var(--ember); background: var(--tint); border-color: var(--eline); }
.hterm__p { color: var(--ember); font-weight: 700; }
.hterm__cursor { display: inline-block; width: 2px; height: 14px; background: var(--ember); margin: 0 1px; vertical-align: middle; animation: hnav-blink 1s step-end infinite; }
.hnav__menu { display: none; align-items: center; justify-content: center; width: 42px; height: 42px; padding: 0; background: transparent; border: 1px solid var(--line); color: var(--ink); cursor: pointer; flex-shrink: 0; }
.hnav-spacer { height: 68px; }

/* ---- mobile drawer ---- */
.hdrawer { position: fixed; inset: 0; z-index: 90; display: none; flex-direction: column; background: rgba(12, 10, 9, 0.97); backdrop-filter: blur(12px); padding: 14px clamp(22px, 7vw, 40px) 36px; }
.hdrawer.is-open { display: flex; }
.hdrawer__top { display: flex; align-items: center; justify-content: space-between; height: 56px; }
.hdrawer__top img { height: 24px; width: auto; }
.hdrawer__close { display: inline-flex; align-items: center; justify-content: center; width: 42px; height: 42px; padding: 0; background: transparent; border: 1px solid var(--line); color: var(--ink); cursor: pointer; }
.hdrawer__nav { display: flex; flex-direction: column; margin-top: 30px; }
.hdrawer__link { font: 700 26px/1 var(--display); text-transform: uppercase; letter-spacing: 0.01em; color: var(--ink); padding: 18px 0; border-bottom: 1px solid var(--line); }

@media (max-width: 760px) {
  .hnav__links, .hterm { display: none !important; }
  .hnav__menu { display: inline-flex !important; }
}

/* ---- footer ---- */
.hfoot { position: relative; z-index: 1; border-top: 1px solid var(--line); background: var(--surface); font-family: var(--body); }
.hfoot__wrap { width: 100%; max-width: 1240px; margin: 0 auto; padding: 34px clamp(20px, 4vw, 56px) 28px; display: flex; gap: clamp(36px, 7vw, 96px); justify-content: space-between; }
.hfoot__left { max-width: 340px; flex-shrink: 0; display: flex; flex-direction: column; gap: 14px; }
.hfoot__copy { font: 700 12px/1.5 var(--mono); color: rgba(250, 246, 242, 0.62); }
.hfoot__disc { margin: 0; font-size: 10.5px; line-height: 1.7; color: rgba(250, 246, 242, 0.38); text-align: justify; }
.hfoot__cols { display: grid; grid-template-columns: repeat(4, auto); gap: 28px clamp(28px, 4vw, 56px); align-content: start; }
.hfoot__label { margin: 0 0 12px; font: 700 10px/1 var(--mono); letter-spacing: 0.2em; text-transform: uppercase; color: var(--ember); }
.hfoot__list { display: flex; flex-direction: column; gap: 1px; }
.hfoot__list a { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 5px 0; color: var(--mut); font: 500 13px/1.4 var(--body); transition: color 0.2s; }
.hfoot__list a svg { flex-shrink: 0; opacity: 0.35; transition: opacity 0.2s ease, transform 0.2s ease; }
.hfoot__list a:hover { color: var(--ember); }
.hfoot__list a:hover svg { opacity: 1; transform: translateX(4px); }
@media (max-width: 760px) {
  .hfoot__wrap { flex-direction: column !important; gap: 32px !important; }
  .hfoot__left { max-width: none !important; }
  .hfoot__disc { text-align: left !important; }
}
@media (max-width: 600px) {
  .hfoot__cols { grid-template-columns: 1fr 1fr !important; }
}

/* ---- TOC (collapsible scroll-spy tree) ---- */
.htoc { font-family: var(--body); }
.htoc__head { display: flex; align-items: center; gap: 9px; width: 100%; padding: 0; margin: 0 0 12px; background: transparent; border: none; cursor: pointer; text-align: left; }
.htoc__bar { width: 4px; height: 12px; background: var(--ember); flex-shrink: 0; }
.htoc__title { font: 700 10px/1 var(--mono); letter-spacing: 0.2em; text-transform: uppercase; color: var(--ember); }
.htoc__chev { margin-left: auto; display: inline-flex; color: var(--mut); transition: transform 0.22s ease, color 0.18s ease; }
.htoc__head[data-open="true"] .htoc__chev { transform: rotate(90deg); }
.htoc__head:hover .htoc__chev { color: var(--ember); }
.htoc__tree[hidden] { display: none; }
.htoc__row { display: flex; align-items: stretch; text-decoration: none; color: inherit; }
.htoc__label { align-self: center; padding: 6px 4px 6px 6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font: 500 12.5px/1.35 var(--body); color: color-mix(in srgb, var(--mut) 80%, transparent); transition: color 0.18s ease; }
.htoc__row[data-depth="1"] .htoc__label { font: 600 13.5px/1.35 var(--body); color: var(--ink); padding-top: 7px; padding-bottom: 7px; }
.htoc__row:hover .htoc__label { color: var(--ember); }
.htoc__row[data-onpath="true"] .htoc__label { color: var(--ember); }
.htoc__cell { position: relative; flex: 0 0 19px; align-self: stretch; }
.htoc__cell[data-type="line"]::before, .htoc__cell[data-type="mid"]::before { content: ""; position: absolute; left: 9px; top: 0; bottom: 0; width: 1.5px; background: var(--line); }
.htoc__cell[data-type="last"]::before { content: ""; position: absolute; left: 9px; top: 0; height: 50%; width: 1.5px; background: var(--line); }
.htoc__cell[data-type="mid"]::after, .htoc__cell[data-type="last"]::after { content: ""; position: absolute; left: 9px; top: 50%; right: 3px; height: 1.5px; background: var(--line); transition: background 0.18s ease; }
.htoc__cell[data-hember="true"]::after { background: var(--ember); }
.htoc__ev { display: none; position: absolute; left: 9px; width: 1.5px; background: var(--ember); pointer-events: none; }
.htoc__cell[data-vember="full"] .htoc__ev { display: block; top: 0; bottom: 0; }
.htoc__cell[data-vember="half"] .htoc__ev { display: block; top: 0; height: 50%; }

/* ---- back-to-top ---- */
.htotop { position: fixed; right: 22px; bottom: 22px; z-index: 70; display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; background: var(--surface2); border: 1px solid var(--eline); color: var(--ember); transition: background 0.2s, transform 0.2s; }
.htotop:hover { background: var(--tint-2); transform: translateY(-2px); }

/* ---- legal document blocks (bölüm / madde / fıkra / bent) ---- */
.lg-pad { position: relative; z-index: 1; width: 100%; max-width: 1240px; margin: 0 auto; }
.lg-title-wrap { padding: clamp(46px, 7vw, 80px) clamp(20px, 4vw, 56px) clamp(26px, 3vw, 40px); }
.lg-title { margin: 0; font: 800 clamp(38px, 5.4vw, 68px)/1 var(--display); letter-spacing: -0.025em; }
.lg-updated { margin: 16px 0 0; font: 600 12px/1.5 var(--mono); letter-spacing: 0.02em; color: rgba(250, 246, 242, 0.5); }
.lg-title-rule { height: 1px; margin-top: 34px; background: var(--line); }
.lg-intro { margin: 0 0 34px; color: rgba(250, 246, 242, 0.72); }
.lg-intro strong { color: var(--ink); font-weight: 600; }
.lg-fikra a, .lg-bent a, .lg-intro a { color: var(--ember); text-decoration: underline; text-underline-offset: 2px; }
.lg-body { padding: 0 clamp(20px, 4vw, 56px) clamp(60px, 8vw, 110px); }
.lg-article { max-width: 100%; font-size: 15.5px; line-height: 1.72; color: rgba(250, 246, 242, 0.82); }
.lg-toc-slot { margin: 0 0 38px; }
@media (max-width: 880px) {
  .lg-title { font-size: clamp(34px, 9vw, 52px) !important; }
  .lg-title-wrap, .lg-body { padding-left: 20px !important; padding-right: 20px !important; }
}
.lg-bolum { margin: 46px 0 18px; scroll-margin-top: 96px; padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.lg-bolum__ey { display: inline-block; font: 700 10px/1 var(--mono); letter-spacing: 0.22em; text-transform: uppercase; color: var(--ember); margin-bottom: 8px; }
.lg-bolum__h { margin: 0; font: 700 clamp(20px, 2.3vw, 27px)/1.16 var(--display); letter-spacing: -0.01em; color: var(--ink); }
.lg-madde { margin: 0 0 30px; scroll-margin-top: 96px; }
.lg-madde__h { margin: 0 0 14px; font: 700 16.5px/1.3 var(--display); letter-spacing: -0.005em; color: var(--ink); }
.lg-madde__h span { color: var(--ember); }
.lg-fikras { display: flex; flex-direction: column; gap: 13px; }
.lg-fikra { margin: 0; scroll-margin-top: 96px; display: flex; gap: 10px; }
.lg-fikra__n { flex-shrink: 0; font: 700 14px/1.72 var(--mono); color: var(--ember); }
.lg-bentler { margin: 9px 0 2px; padding-left: 34px; display: flex; flex-direction: column; gap: 8px; }
.lg-bent { margin: 0; scroll-margin-top: 96px; display: flex; gap: 9px; }
.lg-bent__l { flex-shrink: 0; font: 700 13.5px/1.6 var(--mono); color: var(--ember); }

@media print {
  .hnav, .hnav-spacer, .lg-toc-slot, .htotop, .hdrawer { display: none !important; }
  body { background: #fff !important; color: #111 !important; }
}
