/* ATLAS — Factorio companion (WIP) */
:root {
  --fc-bg: #0c0e10;
  --fc-ink: #121518;
  --fc-sand: #e8ebe6;
  --fc-mist: #a8b0a4;
  --fc-ember: #c46a2b;
  --fc-flame: #e08a3c;
  --fc-line: rgba(196, 106, 43, 0.4);
  --font-display: "Orbitron", system-ui, sans-serif;
  --font-body: "Exo 2", system-ui, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

html,
body {
  margin: 0;
  min-height: 100%;
  background: var(--fc-bg);
  color: var(--fc-sand);
  font-family: var(--font-body);
}

.fc-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse 70% 45% at 75% 15%, rgba(196, 106, 43, 0.18), transparent 55%),
    radial-gradient(ellipse 50% 40% at 15% 85%, rgba(40, 50, 40, 0.35), transparent 50%),
    linear-gradient(180deg, #151a16 0%, #0c0e10 55%, #080a0b 100%);
}

.fc-topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.85rem 5vw;
  background: rgba(10, 4, 4, 0.9);
  border-bottom: 1px solid var(--fc-line);
  backdrop-filter: blur(12px);
}

.fc-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  color: inherit;
  text-decoration: none;
}

.fc-brand strong {
  font-family: var(--font-display);
  letter-spacing: 0.16em;
  font-size: 0.82rem;
}

.fc-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem 1.15rem;
}

.fc-nav a {
  color: var(--fc-mist);
  text-decoration: none;
  font-size: 0.88rem;
  border-bottom: 1px solid transparent;
  transition: color 0.2s ease, border-color 0.2s ease;
}

.fc-nav a:hover,
.fc-nav a:focus-visible {
  color: var(--fc-sand);
  border-bottom-color: var(--fc-ember);
  outline: none;
}

.fc-lang {
  display: inline-flex;
  gap: 0.3rem;
}

.fc-lang button {
  border: 1px solid var(--fc-line);
  background: transparent;
  color: var(--fc-mist);
  font: inherit;
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  padding: 0.32rem 0.5rem;
  border-radius: 4px;
  cursor: pointer;
}

.fc-lang button.active {
  color: #140606;
  background: var(--fc-ember);
  border-color: var(--fc-ember);
}

main {
  position: relative;
  z-index: 1;
}

.fc-wip {
  width: min(var(--atlas-content-max, 880px), 92vw);
  margin: 1.25rem auto 0;
  padding: 1rem 1.15rem;
  border: 1px solid rgba(255, 138, 61, 0.45);
  border-left: 4px solid var(--fc-flame);
  border-radius: 6px;
  background: rgba(40, 12, 8, 0.75);
  animation: fc-in 0.7s ease-out both;
}

.fc-wip strong {
  display: inline-block;
  margin-bottom: 0.35rem;
  font-family: var(--font-display);
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--fc-flame);
}

.fc-wip p {
  margin: 0;
  color: var(--fc-mist);
  line-height: 1.5;
  max-width: 48rem;
}

.fc-hero {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 2rem;
  align-items: center;
  width: min(var(--atlas-content-max, 880px), 92vw);
  margin: 0 auto;
  padding: 2rem 0 2.75rem;
  animation: fc-in 0.8s ease-out both;
}

.fc-hero-art {
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid rgba(232, 90, 42, 0.35);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.5);
}

.fc-hero-art img {
  display: block;
  width: 100%;
  height: auto;
}

.fc-kicker {
  margin: 0 0 0.65rem;
  color: var(--fc-flame);
  font-family: var(--font-display);
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.fc-hero-copy h1 {
  margin: 0 0 0.85rem;
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 4vw, 2.7rem);
  letter-spacing: 0.06em;
  line-height: 1.1;
}

.fc-hero-copy h1 span {
  color: var(--fc-ember);
}

.fc-lead {
  margin: 0 0 1.5rem;
  color: var(--fc-mist);
  line-height: 1.55;
  max-width: 28rem;
}

.fc-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.fc-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.15rem;
  background: var(--fc-ember);
  color: #140606;
  text-decoration: none;
  font-family: var(--font-display);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border-radius: 4px;
  transition: transform 0.2s ease, background 0.2s ease;
}

.fc-btn:hover,
.fc-btn:focus-visible {
  background: var(--fc-flame);
  transform: translateY(-2px);
  outline: none;
}

.fc-btn.ghost {
  background: transparent;
  color: var(--fc-sand);
  border: 1px solid rgba(232, 90, 42, 0.45);
}

.fc-btn.ghost:hover,
.fc-btn.ghost:focus-visible {
  border-color: var(--fc-flame);
  color: var(--fc-flame);
  background: transparent;
}

.fc-section {
  width: min(var(--atlas-content-max, 880px), 92vw);
  margin: 0 auto;
  padding: 2.5rem 0 1rem;
  animation: fc-in 0.8s ease-out both;
}

.fc-section-head {
  margin-bottom: 1.5rem;
}

.fc-section-head h2 {
  margin: 0 0 0.4rem;
  font-family: var(--font-display);
  font-size: clamp(1.2rem, 2.5vw, 1.55rem);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.fc-section-head p {
  margin: 0;
  color: var(--fc-mist);
  line-height: 1.5;
}

.fc-news-head-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.65rem 1rem;
  margin-bottom: 0.4rem;
}

.fc-news-head-row h2 {
  margin: 0;
}

.fc-news-refresh {
  border: 1px solid rgba(196, 106, 43, 0.5);
  background: rgba(20, 24, 18, 0.85);
  color: #e8f0d8;
  font: inherit;
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0.4rem 0.85rem;
  border-radius: 4px;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s, opacity 0.15s;
}

.fc-news-refresh:hover,
.fc-news-refresh:focus-visible {
  border-color: rgba(220, 160, 80, 0.75);
  background: rgba(196, 106, 43, 0.35);
  outline: none;
}

.fc-news-refresh:disabled {
  opacity: 0.55;
  cursor: wait;
}

.fc-news-status {
  margin: 0.35rem 0 0;
  font-size: 0.78rem;
  color: rgba(159, 239, 255, 0.7);
}

.fc-news {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.9rem;
}

.fc-news-item {
  display: grid;
  gap: 0;
  border: 1px solid var(--fc-line);
  border-radius: 6px;
  background: rgba(20, 6, 6, 0.55);
  transition: border-color 0.2s ease, transform 0.2s ease;
}

.fc-news-item:hover,
.fc-news-item:focus-within {
  border-color: rgba(220, 160, 80, 0.55);
  transform: translateY(-2px);
}

.fc-news a {
  display: grid;
  gap: 0.35rem;
  padding: 1rem 1.1rem 0.55rem;
  color: inherit;
  text-decoration: none;
  border: none;
  border-radius: 0;
  background: transparent;
}

.fc-news a:focus-visible {
  outline: none;
}

.fc-news-translate {
  justify-self: start;
  margin: 0 1.1rem 0.9rem;
  border: 1px solid rgba(196, 106, 43, 0.45);
  background: rgba(20, 24, 18, 0.75);
  color: #e8f0d8;
  font: inherit;
  font-size: 0.68rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0.32rem 0.7rem;
  border-radius: 4px;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s, opacity 0.15s;
}

.fc-news-translate:hover,
.fc-news-translate:focus-visible {
  border-color: rgba(220, 160, 80, 0.75);
  background: rgba(196, 106, 43, 0.3);
  outline: none;
}

.fc-news-translate:disabled {
  opacity: 0.55;
  cursor: wait;
}

.fc-news-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 0.85rem;
  font-size: 0.75rem;
  color: var(--fc-mist);
  letter-spacing: 0.04em;
}

.fc-news h3 {
  margin: 0;
  font-size: 1.05rem;
  line-height: 1.3;
}

.fc-news p {
  margin: 0;
  color: rgba(242, 230, 220, 0.78);
  line-height: 1.45;
  font-size: 0.92rem;
}

.fc-facts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.9rem;
  margin-bottom: 1.5rem;
}

.fc-fact {
  padding: 1rem 1.05rem;
  border: 1px solid rgba(232, 90, 42, 0.22);
  border-radius: 6px;
  background: rgba(10, 4, 4, 0.55);
}

.fc-fact h3 {
  margin: 0 0 0.4rem;
  font-family: var(--font-display);
  font-size: 0.78rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--fc-ember);
}

.fc-fact p {
  margin: 0;
  color: var(--fc-mist);
  line-height: 1.45;
  font-size: 0.92rem;
}

.fc-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
}

.fc-links a {
  color: var(--fc-flame);
  text-decoration: none;
  font-size: 0.9rem;
  border-bottom: 1px solid rgba(255, 138, 61, 0.35);
  padding-bottom: 0.1rem;
}

.fc-links a:hover,
.fc-links a:focus-visible {
  color: var(--fc-sand);
  border-bottom-color: var(--fc-ember);
  outline: none;
}

.fc-footer {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem 1.5rem;
  margin-top: 3rem;
  padding: 1.5rem 5vw 2.25rem;
  border-top: 1px solid rgba(196, 168, 160, 0.15);
  color: rgba(196, 168, 160, 0.65);
  font-size: 0.8rem;
}

.fc-footer .build-version {
  margin: 0;
  font-family: var(--font-display);
  font-size: 0.7rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(232, 90, 42, 0.55);
}

.fc-footer p {
  margin: 0;
}

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

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  .fc-hero,
  .fc-section,
  .fc-wip,
  .fc-btn,
  .fc-news-item,
  .fc-news a {
    animation: none !important;
    transition: none !important;
  }
}

@media (max-width: 860px) {
  .fc-hero {
    grid-template-columns: 1fr;
  }

  .fc-nav {
    display: none;
  }

  .fc-facts {
    grid-template-columns: 1fr;
  }
}
