/* R.U.N. — RUST.USAGI.NETWORK
   USAGI.NETWORK style + Rust industrial/savage feel
   Typography: Orbitron (display), Noto Sans JP (body) */

:root {
  --bg-dark: #0d0d0c;
  --bg-mid: #161614;
  --bg-card: #1c1b18;
  --bg-elevated: #242320;
  --border: #2e2c28;
  --text: #e8e6e1;
  --text-muted: #9a968d;
  --accent: #e07c24;
  --accent-dim: #b85f18;
  --accent-glow: rgba(224, 124, 36, 0.25);
  --rust: #8b4513;
  --metal: #6b6b6b;
  --success: #6b9e6b;
  --font-display: 'Orbitron', sans-serif;
  --font-body: 'Noto Sans JP', sans-serif;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.65;
  color: var(--text);
  background: var(--bg-dark);
  -webkit-font-smoothing: antialiased;
}

/* Header */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: rgba(13, 13, 12, 0.92);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(8px);
}

.header-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0.75rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.logo {
  text-decoration: none;
  color: var(--text);
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}

.logo-run {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.35rem;
  letter-spacing: 0.08em;
  color: var(--accent);
}

.logo-sub {
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  color: var(--text-muted);
  text-transform: uppercase;
}

.nav {
  display: flex;
  gap: 1.5rem;
}

.nav a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  transition: color 0.2s;
}

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

.nav-toggle {
  display: none;
  width: 2rem;
  height: 2rem;
  padding: 0;
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text);
  cursor: pointer;
  border-radius: 4px;
  position: relative;
}

.nav-toggle::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 14px;
  height: 2px;
  background: currentColor;
  box-shadow: 0 -5px 0, 0 5px 0;
}

/* Status bar (server / maintenance) */
.status-bar {
  margin-top: 52px; /* below fixed header */
  padding: 0.5rem 1rem;
  min-height: 2.25rem;
  background: var(--bg-mid);
  border-bottom: 1px solid var(--border);
  font-size: 0.8rem;
  flex-shrink: 0;
}

.status-bar-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem 1.5rem;
}

.status-item {
  color: var(--text-muted);
}

.status-label {
  margin-right: 0.25rem;
}

.status-value.status-active {
  color: var(--success);
  font-weight: 500;
}

.status-value.status-inactive {
  color: var(--accent);
  font-weight: 500;
}

.status-maintenance-msg {
  margin: 0.5rem 0 0;
  padding: 0.5rem 0.75rem;
  background: rgba(224, 124, 36, 0.12);
  border-left: 3px solid var(--accent);
  font-size: 0.85rem;
  color: var(--text);
  line-height: 1.5;
}

.status-ok-msg {
  margin: 0.35rem 0 0;
  padding: 0;
  width: 100%;
  font-size: 0.8rem;
  color: var(--success);
  line-height: 1.4;
}

.status-ok-msg[hidden] {
  display: none;
}

.status-maintenance-msg[hidden] {
  display: none;
}

@media (max-width: 768px) {
  .nav {
    position: fixed;
    top: 3.5rem;
    left: 0;
    right: 0;
    flex-direction: column;
    padding: 1rem;
    background: var(--bg-mid);
    border-bottom: 1px solid var(--border);
    display: none;
  }

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

  .nav-toggle {
    display: block;
  }
}

/* Hero */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 6rem 1.5rem 4rem;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 50% at 50% 20%, var(--accent-glow) 0%, transparent 50%),
    linear-gradient(180deg, var(--bg-dark) 0%, var(--bg-mid) 100%);
  pointer-events: none;
}

.hero-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    repeating-linear-gradient(
      0deg,
      transparent,
      transparent 2px,
      rgba(0,0,0,0.03) 2px,
      rgba(0,0,0,0.03) 4px
    );
  pointer-events: none;
}

.hero-content {
  position: relative;
  max-width: 720px;
  text-align: center;
}

.hero-label {
  font-size: 0.8rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 0.5rem;
}

.hero-title {
  margin: 0 0 0.75rem;
}

.hero-title-main {
  display: block;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(2.5rem, 8vw, 4rem);
  letter-spacing: 0.15em;
  color: var(--text);
  text-shadow: 0 0 40px var(--accent-glow);
}

.hero-title-sub {
  display: block;
  font-size: clamp(0.75rem, 2.5vw, 1rem);
  letter-spacing: 0.25em;
  color: var(--text-muted);
  margin-top: 0.25rem;
}

.hero-tagline {
  font-size: 1.25rem;
  font-weight: 500;
  color: var(--accent);
  margin: 0 0 1rem;
}

.hero-desc {
  color: var(--text-muted);
  margin: 0 0 2rem;
  font-size: 0.95rem;
  line-height: 1.75;
}

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: center;
}

.hero-scroll {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  width: 24px;
  height: 40px;
  border: 2px solid var(--border);
  border-radius: 12px;
  animation: scroll-hint 2s ease-in-out infinite;
}

.hero-scroll::before {
  content: '';
  position: absolute;
  top: 8px;
  left: 50%;
  transform: translateX(-50%);
  width: 4px;
  height: 8px;
  background: var(--accent);
  border-radius: 2px;
}

@keyframes scroll-hint {
  0%, 100% { opacity: 0.6; transform: translateX(-50%) translateY(0); }
  50% { opacity: 1; transform: translateX(-50%) translateY(6px); }
}

/* Buttons */
.btn {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 600;
  text-decoration: none;
  border-radius: 6px;
  transition: background 0.2s, color 0.2s, box-shadow 0.2s;
  cursor: pointer;
  border: none;
}

.btn-primary {
  background: var(--accent);
  color: #0d0d0c;
}

.btn-primary:hover {
  background: var(--accent-dim);
  box-shadow: 0 0 20px var(--accent-glow);
}

.btn-secondary {
  background: var(--bg-elevated);
  color: var(--text);
  border: 1px solid var(--border);
}

.btn-secondary:hover {
  background: var(--border);
  color: var(--accent);
}

/* Sections */
.section {
  padding: 4rem 1.5rem;
}

.container {
  max-width: 960px;
  margin: 0 auto;
}

.section-title {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 4vw, 2rem);
  font-weight: 600;
  letter-spacing: 0.05em;
  margin: 0 0 0.5rem;
  color: var(--text);
}

.section-lead {
  color: var(--text-muted);
  margin: 0 0 2rem;
  font-size: 0.95rem;
}

/* About */
.about {
  background: var(--bg-mid);
}

.about-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.25rem;
}

.about-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1.5rem;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.about-card:hover {
  border-color: var(--accent-dim);
  box-shadow: 0 0 24px var(--accent-glow);
}

.about-icon {
  font-size: 1.75rem;
  display: block;
  margin-bottom: 0.5rem;
}

.about-card h3 {
  font-size: 1.05rem;
  font-weight: 700;
  margin: 0 0 0.5rem;
  color: var(--text);
}

.about-card p {
  margin: 0;
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.6;
}

.about-footnote {
  margin: 1.75rem 0 0;
  padding-top: 1.25rem;
  border-top: 1px solid var(--border);
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.65;
}

/* Features */
.features {
  background: var(--bg-dark);
}

.features-block {
  margin-bottom: 2rem;
}

.features-block:last-child {
  margin-bottom: 0;
}

.features-subtitle {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--accent);
  margin: 0 0 0.75rem;
}

.features-block p {
  margin: 0 0 0.5rem;
  color: var(--text-muted);
  font-size: 0.95rem;
}

.event-list {
  margin: 0;
  padding-left: 1.25rem;
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.9;
}

.event-list strong {
  color: var(--accent);
  font-weight: 600;
}

/* Join */
.join {
  background: var(--bg-mid);
}

.join-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.join-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1.75rem;
}

.join-card-primary {
  border-color: var(--accent-dim);
  box-shadow: 0 0 0 1px var(--accent-dim);
}

.join-card h3 {
  font-size: 1.05rem;
  font-weight: 700;
  margin: 0 0 0.75rem;
  color: var(--text);
}

.join-card p {
  margin: 0 0 1rem;
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.65;
}

.join-security-note {
  background: rgba(224, 124, 36, 0.08);
  border: 1px solid var(--accent-dim);
  border-radius: 6px;
  padding: 1rem 1.25rem;
  margin-bottom: 1.5rem;
}

.join-security-note p {
  margin: 0;
  font-size: 0.9rem;
  color: var(--text);
  line-height: 1.6;
}

.join-note {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 1rem 1.25rem;
}

.join-card code {
  font-size: 0.88em;
  padding: 0.15em 0.4em;
  background: var(--bg-elevated);
  border-radius: 4px;
  color: var(--accent);
}

.join-note p {
  margin: 0;
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.6;
}

/* Rules */
.rules-content {
  display: grid;
  gap: 1.5rem;
}

.rules-block {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1.5rem;
}

.rules-block h3 {
  font-size: 1rem;
  font-weight: 700;
  margin: 0 0 0.5rem;
  color: var(--accent);
}

.rules-block p {
  margin: 0;
  font-size: 0.95rem;
  color: var(--text-muted);
  line-height: 1.65;
}

/* CTA */
.cta {
  background: linear-gradient(180deg, var(--bg-dark) 0%, var(--bg-mid) 100%);
  text-align: center;
}

.cta .section-title {
  margin-bottom: 0.5rem;
}

.cta-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: center;
  margin-top: 1.5rem;
}

/* Footer */
.site-footer {
  padding: 2rem 1.5rem;
  border-top: 1px solid var(--border);
  text-align: center;
  background: var(--bg-mid);
}

.footer-brand {
  font-family: var(--font-display);
  font-size: 0.85rem;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  margin: 0 0 0.25rem;
}

.footer-copy {
  font-size: 0.8rem;
  color: var(--text-muted);
  opacity: 0.8;
  margin: 0;
}
