/* Kisdarts — site-wide styles */
:root {
  --bg: #0f1216;
  --surface: #181c22;
  --surface-2: #222830;
  --text: #e8eaed;
  --text-muted: #9aa0a6;
  --accent: #c41e3a;
  --accent-dim: #9a1830;
  --green: #1e6f4a;
  --green-glow: rgba(30, 111, 74, 0.35);
  --gold: #c9a227;
  --radius: 12px;
  --font: "Segoe UI", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  background-image:
    radial-gradient(ellipse 120% 80% at 50% -30%, var(--green-glow), transparent),
    radial-gradient(ellipse 60% 40% at 100% 50%, rgba(196, 30, 58, 0.08), transparent);
}

a {
  color: var(--gold);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

a:hover {
  color: #e4bc4a;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 1rem;
  padding: 0.875rem 1.5rem;
  background: rgba(15, 18, 22, 0.85);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  justify-self: start;
  min-width: 0;
  text-decoration: none;
  color: var(--text);
}

.brand:hover {
  color: var(--text);
}

.brand-logo {
  display: block;
  flex: 0 0 40px;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  object-fit: cover;
  border: 1px solid rgba(255, 255, 255, 0.14);
}

.nav {
  grid-column: 2;
  justify-self: center;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1.25rem;
}

.nav a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.9375rem;
}

.nav a:hover {
  color: var(--text);
}

.nav a[aria-current="page"] {
  color: var(--text);
  font-weight: 600;
}

/* Phones / narrow portrait: keep brand left, nav right — avoids overlap with centred nav */
@media (max-width: 720px) {
  .site-header {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 0.75rem;
    padding-left: 1rem;
    padding-right: 1rem;
  }

  .nav {
    grid-column: 2;
    justify-self: end;
    justify-content: flex-end;
    gap: 0.5rem 0.75rem;
  }

  .nav a {
    font-size: 0.875rem;
  }
}

main {
  max-width: 720px;
  margin: 0 auto;
  padding: 2.5rem 1.5rem 4rem;
}

.hero {
  text-align: center;
  padding: 2rem 0 2.5rem;
}

.hero-heading {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
  margin: 0 0 0.75rem;
  text-align: center;
}

.hero .hero-title-main {
  margin: 0;
  font-size: clamp(1.75rem, 5vw, 2.25rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.2;
}

.hero .hero-title-sub {
  margin: 0;
  font-size: clamp(1rem, 3.8vw, 1.2rem);
  font-weight: 600;
  color: var(--text-muted);
  letter-spacing: -0.02em;
  line-height: 1.35;
  max-width: 24rem;
}

.hero .app-features {
  margin: 0 auto 1.25rem;
  padding: 0;
  max-width: 32rem;
  list-style: none;
  text-align: left;
}

.hero .app-features li {
  position: relative;
  margin: 0 0 0.75rem;
  padding-left: 1.25rem;
  font-size: 1.0625rem;
  line-height: 1.5;
  color: var(--text);
}

.hero .app-features li:last-child {
  margin-bottom: 0;
}

.hero .app-features li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
}

.hero .tagline {
  margin: 0 auto 1.75rem;
  max-width: 28rem;
  color: var(--text-muted);
  font-size: 1rem;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: center;
  align-items: center;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.35rem;
  font-size: 0.9375rem;
  font-weight: 600;
  font-family: inherit;
  border-radius: var(--radius);
  border: none;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.15s ease, transform 0.1s ease, box-shadow 0.15s ease;
}

.btn:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}

.btn-primary {
  background: linear-gradient(180deg, var(--accent), var(--accent-dim));
  color: #fff;
  box-shadow: 0 4px 20px rgba(196, 30, 58, 0.35);
}

.btn-primary:hover {
  color: #fff;
  filter: brightness(1.06);
  transform: translateY(-1px);
}

.btn-primary:disabled,
.btn-primary.is-disabled {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.btn-secondary {
  background: var(--surface-2);
  color: var(--text);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.btn-secondary:hover {
  color: var(--text);
  background: #2a3038;
}

.panel {
  margin-top: 2.5rem;
  padding: 1.5rem;
  background: var(--surface);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: var(--radius);
}

.panel h2 {
  margin: 0 0 0.75rem;
  font-size: 1.125rem;
  font-weight: 600;
}

.panel p {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.9375rem;
}

.panel p + p {
  margin-top: 0.75rem;
}

.notice {
  margin-top: 1.25rem;
  padding: 0.875rem 1rem;
  font-size: 0.8125rem;
  color: var(--gold);
  background: rgba(201, 162, 39, 0.1);
  border: 1px solid rgba(201, 162, 39, 0.25);
  border-radius: 8px;
}

.notice[hidden] {
  display: none;
}

.site-footer {
  margin-top: auto;
  padding: 1.5rem;
  text-align: center;
  font-size: 0.8125rem;
  color: var(--text-muted);
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.footer-links {
  margin: 0 0 0.6rem;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.65rem 0;
  line-height: 1.8;
}

.footer-links a {
  position: relative;
  padding: 0 0.65rem;
  color: var(--gold);
  text-decoration: none;
  font-size: 0.85rem;
}

.footer-links a + a {
  margin-left: 0.95rem;
}

.footer-links a + a::before {
  content: "|";
  position: absolute;
  left: -0.95rem;
  color: var(--text-muted);
}

.footer-links a:hover {
  color: #e4bc4a;
}

.legal-page main {
  max-width: 44rem;
}

.legal-page h1 {
  margin: 0 0 0.5rem;
  font-size: 1.75rem;
  letter-spacing: -0.03em;
}

.legal-page h2 {
  margin: 0 0 0.6rem;
  font-size: 1.125rem;
  font-weight: 600;
}

.legal-page section {
  margin-bottom: 1.5rem;
}

.legal-page p,
.legal-page li {
  color: var(--text-muted);
  font-size: 0.95rem;
}

.legal-page ul {
  margin: 0.5rem 0 0;
  padding-left: 1.25rem;
}

/* Web app (coming soon) page */
.app-web-page main {
  max-width: 42rem;
}

.app-web-page h1 {
  margin: 0 0 0.5rem;
  font-size: 1.75rem;
  letter-spacing: -0.03em;
}

/* Guide page */
.guide-page main {
  max-width: 42rem;
}

.guide-page h1 {
  margin: 0 0 0.5rem;
  font-size: 1.75rem;
  letter-spacing: -0.03em;
  scroll-margin-top: 5rem;
}

.guide-intro {
  color: var(--text-muted);
  margin-bottom: 1.25rem;
  font-size: 1rem;
}

.guide-toc {
  margin: 0 0 2rem;
  padding: 1.25rem 1.35rem;
  background: var(--surface);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: var(--radius);
}

.guide-toc-title {
  margin: 0 0 0.85rem;
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
}

.guide-toc-list {
  margin: 0;
  padding-left: 1.35rem;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.guide-toc-list li {
  color: var(--text-muted);
  font-size: 0.9375rem;
}

.guide-toc-list a {
  color: var(--gold);
  text-decoration: none;
}

.guide-toc-list a:hover {
  color: #e4bc4a;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.guide-back-to-top {
  position: fixed;
  right: 1rem;
  bottom: 1.25rem;
  z-index: 20;
  width: min-content;
  padding: 0.5rem 0.45rem;
  font-size: 0.8125rem;
  font-weight: 600;
  font-family: inherit;
  line-height: 1.2;
  text-align: center;
  color: var(--text);
  text-decoration: none;
  background: var(--surface-2);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.35);
}

.guide-back-to-top:hover {
  color: var(--text);
  background: #2a3038;
}

.guide-back-to-top:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}

.guide-page section {
  margin-bottom: 2rem;
  scroll-margin-top: 5rem;
}

.guide-page section h2 {
  margin: 0 0 0.75rem;
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--text);
}

.guide-page section p,
.guide-page section li {
  color: var(--text-muted);
  font-size: 0.9375rem;
}

.guide-page ul {
  margin: 0.5rem 0 0;
  padding-left: 1.25rem;
}

.guide-page li + li {
  margin-top: 0.35rem;
}

.back-link {
  display: inline-block;
  margin-bottom: 1.5rem;
  font-size: 0.875rem;
}
