/* Hounds Project website. One file, no framework; the page must work under the CSP in site/WebSite.cpp
   (no inline styles or scripts). */
:root {
  --bg: #0e0f0c;
  --bg-2: #14160f;
  --surface: #1a1c15;
  --surface-2: #22251c;
  --line: #31352a;
  --text: #ece8dc;
  --muted: #a3a291;
  --accent: #d99a36;
  --accent-hi: #f0b24c;
  --accent-ink: #1b1306;
  --ok: #73c26b;
  --bad: #e06456;
  --radius: 10px;
  --head: "Bahnschrift", "Barlow Semi Condensed", "Roboto Condensed", "Arial Narrow", "Segoe UI", sans-serif;
  --body: "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
  --wrap: 1180px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 72px; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 16px/1.6 var(--body); -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: var(--accent-hi); }
h1, h2, h3 { font-family: var(--head); line-height: 1.1; margin: 0 0 .5em; letter-spacing: .01em; }
h2 { font-size: clamp(28px, 4vw, 40px); text-transform: uppercase; }
h3 { font-size: 21px; }
p { margin: 0 0 1em; }
[hidden] { display: none !important; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 20px; }
.muted { color: var(--muted); }
.small { font-size: 14px; }
.kicker {
  font: 600 13px/1 var(--head); text-transform: uppercase; letter-spacing: .22em;
  color: var(--accent); margin-bottom: 12px;
}

/* ---------------------------------------------------------------- buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font: 600 15px/1 var(--head); text-transform: uppercase; letter-spacing: .08em;
  padding: 12px 20px; border-radius: 6px; border: 1px solid transparent;
  text-decoration: none; cursor: pointer; transition: background .15s, border-color .15s, color .15s, transform .15s;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn:focus-visible, .tab:focus-visible, .link:focus-visible, a:focus-visible, input:focus-visible {
  outline: 2px solid var(--accent-hi); outline-offset: 2px;
}
.btn-primary { background: var(--accent); color: var(--accent-ink); }
.btn-primary:hover { background: var(--accent-hi); }
.btn-primary[aria-disabled="true"], .btn-primary:disabled { background: #5b4a2a; color: #b9a98a; cursor: default; }
.btn-ghost { background: rgba(14, 15, 12, .4); color: var(--text); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--accent); color: var(--accent-hi); }
.btn-lg { padding: 16px 28px; font-size: 17px; }
.btn-block { width: 100%; }
.link { background: none; border: 0; padding: 0; color: var(--accent-hi); cursor: pointer; font: inherit; text-decoration: underline; }

/* ---------------------------------------------------------------- top bar */
.topbar {
  position: sticky; top: 0; z-index: 20;
  background: rgba(14, 15, 12, .82); backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(49, 53, 42, .7);
}
.topbar-in { display: flex; align-items: center; gap: 24px; height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; font: 600 20px/1 var(--head); letter-spacing: .06em; }
.brand b { color: var(--accent); font-weight: 700; }
.nav { display: flex; gap: 4px; margin-left: 12px; }
.nav a {
  color: var(--muted); text-decoration: none; font: 600 14px/1 var(--head);
  text-transform: uppercase; letter-spacing: .12em; padding: 10px 12px; border-radius: 6px;
}
.nav a:hover { color: var(--text); background: var(--surface); }
.account-bar { margin-left: auto; display: flex; gap: 10px; align-items: center; }
.account-bar .who { color: var(--muted); font-size: 14px; }
.menu-toggle { display: none; }

/* ---------------------------------------------------------------- hero */
.hero { position: relative; min-height: min(86vh, 760px); display: flex; align-items: center; overflow: hidden; }
.hero-bg {
  position: absolute; inset: 0;
  background: linear-gradient(90deg, rgba(14, 15, 12, .96) 0%, rgba(14, 15, 12, .75) 38%, rgba(14, 15, 12, .2) 75%),
              linear-gradient(0deg, var(--bg) 0%, rgba(14, 15, 12, 0) 28%),
              url(img/hero.jpg) center 30% / cover no-repeat;
  transform: scale(1.03);
}
.hero-in { position: relative; padding-top: 60px; padding-bottom: 80px; }
.hero h1 { font-size: clamp(42px, 7vw, 82px); text-transform: uppercase; margin-bottom: 20px; }
.hero h1 span { color: var(--accent); }
.lead { font-size: clamp(17px, 2vw, 20px); color: #d6d2c4; max-width: 620px; }
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; margin: 28px 0 26px; }
.server-status {
  display: inline-flex; align-items: center; gap: 10px; margin: 0;
  padding: 8px 14px; border-radius: 999px; background: rgba(26, 28, 21, .8); border: 1px solid var(--line);
  font-size: 14px; color: var(--muted);
}
.dot { width: 9px; height: 9px; border-radius: 50%; background: var(--muted); }
.server-status.up .dot { background: var(--ok); box-shadow: 0 0 0 4px rgba(115, 194, 107, .18); }
.server-status.down .dot { background: var(--bad); }

/* ---------------------------------------------------------------- sections */
.section { padding: 88px 0; position: relative; }
.section-dark { background: var(--bg-2); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 32px; flex-wrap: wrap; }
.section-head h2 { margin: 0; }
.section-lead { color: var(--muted); max-width: 760px; margin: -12px 0 32px; }

/* news */
.news-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.news-card {
  display: flex; flex-direction: column; text-align: left; padding: 0; overflow: hidden; cursor: pointer;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); color: var(--text);
  font: inherit; transition: border-color .15s, transform .15s;
}
.news-card:hover { border-color: var(--accent); transform: translateY(-2px); }
.news-img { aspect-ratio: 16 / 7; background: #222 center / cover no-repeat; }
.cat-duyuru .news-img { background-image: url(img/news-duyuru.jpg); }
.cat-guncelleme .news-img { background-image: url(img/news-guncelleme.jpg); }
.cat-etkinlik .news-img { background-image: url(img/news-etkinlik.jpg); }
.news-text { padding: 18px 20px 22px; }
.news-meta { font: 600 12px/1 var(--head); text-transform: uppercase; letter-spacing: .14em; color: var(--accent); margin-bottom: 10px; }
.news-card h3 { margin-bottom: 8px; }
.news-card p { color: var(--muted); margin: 0; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.empty { border: 1px dashed var(--line); border-radius: var(--radius); padding: 28px; color: var(--muted); grid-column: 1 / -1; }

/* story + features */
.story { display: grid; grid-template-columns: 1.05fr 1fr; gap: 48px; align-items: center; margin-bottom: 64px; }
.story-text p { color: #cfcbbd; }
.story-art {
  aspect-ratio: 16 / 10; border-radius: var(--radius); border: 1px solid var(--line);
  background: url(img/story.jpg) center / cover no-repeat; box-shadow: 0 30px 60px rgba(0, 0, 0, .45);
}
.feature-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 22px; }
.feature { display: grid; grid-template-columns: 200px 1fr; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.feature-img { background: #222 center / cover no-repeat; min-height: 170px; }
.feature-coop .feature-img { background-image: url(img/coop.jpg); }
.feature-pvp .feature-img { background-image: url(img/pvp.jpg); }
.feature-town .feature-img { background-image: url(img/town.jpg); }
.feature-gear .feature-img { background-image: url(img/creature.jpg); }
.feature-body { padding: 22px 24px; }
.feature-body p { color: var(--muted); margin: 0; }

/* classes */
.class-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.class-card {
  background: linear-gradient(180deg, var(--surface-2), var(--surface)); border: 1px solid var(--line);
  border-top: 3px solid var(--accent); border-radius: var(--radius); padding: 24px 22px;
}
.class-card h3 { font-size: 28px; text-transform: uppercase; }
.class-card p { color: var(--muted); }
.class-card ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; }
.class-card li { padding: 6px 10px; background: rgba(14, 15, 12, .5); border-radius: 6px; font-size: 14px; }
.class-tag {
  display: inline-block; font: 600 11px/1 var(--head); letter-spacing: .16em; text-transform: uppercase;
  color: var(--accent); border: 1px solid rgba(217, 154, 54, .4); border-radius: 999px; padding: 6px 10px; margin-bottom: 14px;
}

/* ranking */
.tabs { display: flex; gap: 6px; background: var(--surface); padding: 5px; border-radius: 8px; border: 1px solid var(--line); }
.tab {
  background: none; border: 0; color: var(--muted); padding: 9px 16px; border-radius: 6px; cursor: pointer;
  font: 600 14px/1 var(--head); text-transform: uppercase; letter-spacing: .1em;
}
.tab.active { background: var(--accent); color: var(--accent-ink); }
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
#siralama .table-wrap { max-height: 620px; overflow-y: auto; }
#siralama .ranking th { position: sticky; top: 0; z-index: 1; }
.ranking { width: 100%; border-collapse: collapse; font-size: 15px; }
.ranking th, .ranking td { padding: 12px 16px; text-align: left; border-bottom: 1px solid var(--line); white-space: nowrap; }
.ranking th { font: 600 12px/1 var(--head); text-transform: uppercase; letter-spacing: .14em; color: var(--muted); background: var(--surface-2); }
.ranking tr:last-child td { border-bottom: 0; }
.ranking td:first-child { width: 56px; color: var(--muted); font-family: var(--head); }
.ranking tr.top td:first-child { color: var(--accent-hi); font-weight: 700; }
.ranking tbody tr:hover td { background: rgba(217, 154, 54, .05); }

/* download */
.download { overflow: hidden; }
.download-bg {
  position: absolute; inset: 0; opacity: .28;
  background: linear-gradient(90deg, var(--bg) 10%, rgba(14, 15, 12, .3)), url(img/download.jpg) center / cover no-repeat;
}
.download-in { position: relative; display: grid; grid-template-columns: 1.4fr 1fr; gap: 48px; align-items: start; }
.steps { padding: 0; margin: 0 0 28px; list-style: none; counter-reset: s; display: grid; gap: 14px; }
.steps li { counter-increment: s; position: relative; padding-left: 52px; color: #cfcbbd; }
.steps li::before {
  content: counter(s); position: absolute; left: 0; top: -2px; width: 36px; height: 36px; border-radius: 50%;
  display: grid; place-items: center; background: var(--surface-2); border: 1px solid var(--accent); color: var(--accent-hi);
  font: 700 17px/1 var(--head);
}
.steps b { color: var(--text); }
.download-actions { display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 14px; }
.requirements { background: rgba(26, 28, 21, .92); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px; }
.requirements dl { margin: 0; display: grid; grid-template-columns: auto 1fr; gap: 12px 18px; }
.requirements dt { color: var(--muted); font-size: 14px; }
.requirements dd { margin: 0; }

/* footer */
.footer { border-top: 1px solid var(--line); padding: 36px 0; background: var(--bg); }
.footer-in { display: flex; gap: 32px; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.footer p { max-width: 640px; margin: 0; }

/* ---------------------------------------------------------------- modals and forms */
.modal { position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; padding: 20px; background: rgba(5, 6, 4, .78); backdrop-filter: blur(4px); }
.modal-card {
  position: relative; width: 100%; max-width: 420px; max-height: calc(100vh - 40px); overflow-y: auto;
  background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 30px 28px 24px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, .6);
}
.modal-wide { max-width: 720px; }
.modal-card h2 { font-size: 28px; }
.modal-card h3 { margin-top: 26px; font-size: 18px; text-transform: uppercase; letter-spacing: .06em; }
.modal-close {
  position: absolute; top: 14px; right: 14px; width: 34px; height: 34px; border-radius: 50%;
  border: 1px solid var(--line); background: var(--surface-2); color: var(--muted); cursor: pointer;
}
.modal-close::before { content: "\00d7"; font-size: 22px; line-height: 1; }
.modal-close:hover { color: var(--text); border-color: var(--accent); }
form label { display: block; font-size: 14px; color: var(--muted); margin-bottom: 14px; }
form small { display: block; margin-top: 4px; font-size: 12px; }
input {
  display: block; width: 100%; margin-top: 6px; padding: 11px 12px; font: inherit; color: var(--text);
  background: var(--bg); border: 1px solid var(--line); border-radius: 6px;
}
input:focus { border-color: var(--accent); outline: none; }
.form-msg { min-height: 1.5em; font-size: 14px; margin: 4px 0 12px; }
.form-msg.ok { color: var(--ok); }
.form-msg.bad { color: var(--bad); }
.form-row { display: grid; grid-template-columns: 1fr 1fr auto; gap: 12px; align-items: end; }
.form-row label { margin: 0; }
.form-row .form-msg { grid-column: 1 / -1; margin: 0; }
.account-summary { display: flex; gap: 12px; flex-wrap: wrap; }
.stat { background: var(--surface-2); border: 1px solid var(--line); border-radius: 8px; padding: 12px 16px; min-width: 150px; }
.stat span { display: block; font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: .12em; }
.stat b { font: 700 22px/1.3 var(--head); }
[data-logout] { margin-top: 22px; }
.article p { color: #d4d0c2; }

/* ---------------------------------------------------------------- narrow screens */
@media (max-width: 980px) {
  .news-grid { grid-template-columns: repeat(2, 1fr); }
  .class-grid { grid-template-columns: repeat(2, 1fr); }
  .feature-grid, .story, .download-in { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  .topbar-in { gap: 12px; }
  .menu-toggle {
    display: block; margin-left: auto; width: 40px; height: 40px; border-radius: 6px; cursor: pointer;
    border: 1px solid var(--line); background: var(--surface);
    background-image: linear-gradient(var(--text), var(--text)), linear-gradient(var(--text), var(--text)), linear-gradient(var(--text), var(--text));
    background-size: 18px 2px; background-repeat: no-repeat; background-position: center 13px, center 19px, center 25px;
  }
  .nav {
    display: none; position: absolute; top: 64px; left: 0; right: 0; margin: 0; flex-direction: column;
    background: var(--bg); border-bottom: 1px solid var(--line); padding: 10px 20px 16px;
  }
  .nav.open { display: flex; }
  .account-bar { margin-left: 0; }
  .account-bar .btn { padding: 10px 12px; font-size: 13px; }
  .account-bar .who { display: none; }
  .brand span { display: none; }
  .news-grid, .class-grid { grid-template-columns: 1fr; }
  .feature { grid-template-columns: 1fr; }
  .feature-img { min-height: 150px; }
  .section { padding: 64px 0; }
  .form-row { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}
