/* Dustline Studio — dustline.studio
   Dark, edgy, ember-lit game-studio theme. Custom CSS, no frameworks. */

:root {
  --bg: #0b0908;
  --bg-soft: #131010;
  --bg-card: #161210;
  --bg-card-hover: #1c1512;
  --line: #2a211c;
  --text: #f2ece4;
  --muted: #a89e92;
  --ember: #ff5a1f;
  --ember-deep: #c93a08;
  --amber: #ffb347;
  --radius: 14px;
  --font-display: "Space Grotesk", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* Film grain overlay */
.grain {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 60;
  opacity: 0.05;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23n)' opacity='1'/%3E%3C/svg%3E");
}

.container { max-width: 1180px; margin: 0 auto; padding: 0 24px; }

.sr-only {
  position: absolute; width: 1px; height: 1px;
  clip: rect(0 0 0 0); overflow: hidden; white-space: nowrap;
}

/* ---------- Nav ---------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(11, 9, 8, 0.82);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}

.nav-inner {
  max-width: 1180px;
  margin: 0 auto;
  padding: 14px 24px;
  display: flex;
  align-items: center;
  gap: 32px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--text);
  margin-right: auto;
}

.brand-mark {
  width: 26px; height: 26px; border-radius: 7px; flex-shrink: 0;
  background: linear-gradient(135deg, var(--ember) 0%, var(--ember-deep) 100%);
  clip-path: polygon(0 70%, 38% 20%, 55% 48%, 72% 8%, 100% 70%, 0 70%);
}

.brand-word {
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: 0.12em;
  font-size: 0.95rem;
}

.brand-word-thin { font-weight: 400; color: var(--muted); margin-left: 6px; }

.nav-links { display: flex; gap: 26px; }

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

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

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: 0.02em;
  padding: 13px 28px;
  border-radius: 10px;
  text-decoration: none;
  cursor: pointer;
  border: 1px solid transparent;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.2s, color 0.2s, border-color 0.2s;
}

.btn:active { transform: translateY(1px); }

.btn-primary {
  background: linear-gradient(135deg, var(--ember), var(--ember-deep));
  color: #fff;
  box-shadow: 0 6px 24px rgba(255, 90, 31, 0.28);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 32px rgba(255, 90, 31, 0.4);
}

.btn-ghost {
  background: transparent;
  color: var(--text);
  border-color: var(--line);
}

.btn-ghost:hover { border-color: var(--ember); color: var(--amber); }

.btn-small { padding: 9px 18px; font-size: 0.85rem; }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  padding: 130px 0 110px;
  overflow: hidden;
  background:
    radial-gradient(900px 420px at 18% -10%, rgba(255, 90, 31, 0.14), transparent 60%),
    radial-gradient(700px 380px at 85% 20%, rgba(255, 179, 71, 0.07), transparent 60%),
    var(--bg);
}

.hero-inner { max-width: 1180px; margin: 0 auto; padding: 0 24px; position: relative; z-index: 2; }

.kicker {
  font-family: var(--font-display);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--ember);
  margin-bottom: 18px;
}

.hero-title {
  font-family: var(--font-display);
  font-size: clamp(3rem, 8vw, 6.2rem);
  font-weight: 700;
  line-height: 1.02;
  letter-spacing: -0.02em;
  margin-bottom: 22px;
  max-width: 14ch;
}

.ember {
  background: linear-gradient(120deg, var(--amber), var(--ember) 60%, var(--ember-deep));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-sub {
  font-size: 1.12rem;
  color: var(--muted);
  max-width: 60ch;
  margin-bottom: 36px;
}

.hero-cta { display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 64px; }

.hero-stats { display: flex; gap: 56px; flex-wrap: wrap; }

.stat { display: flex; flex-direction: column; }

.stat-num {
  font-family: var(--font-display);
  font-size: 2.2rem;
  font-weight: 700;
  color: var(--text);
}

.stat-label { font-size: 0.85rem; color: var(--muted); }

.hero-fade {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 90px;
  background: linear-gradient(to bottom, transparent, var(--bg));
  z-index: 1;
}

/* ---------- Sections ---------- */
.section { padding: 96px 0; }

.section-alt { background: var(--bg-soft); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }

.section-title {
  font-family: var(--font-display);
  font-size: clamp(1.9rem, 4vw, 2.9rem);
  font-weight: 700;
  letter-spacing: -0.01em;
  margin-bottom: 12px;
}

.section-sub {
  color: var(--muted);
  font-size: 1.05rem;
  max-width: 64ch;
  margin-bottom: 48px;
}

/* ---------- Game cards ---------- */
.game-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 22px;
}

.game-card {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  position: relative;
  overflow: hidden;
  transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.game-card::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--ember), var(--amber));
  opacity: 0;
  transition: opacity 0.2s;
}

.game-card:hover {
  transform: translateY(-4px);
  border-color: #4a3628;
  background: var(--bg-card-hover);
}

.game-card:hover::before { opacity: 1; }

.game-card.featured { border-color: #4a2c1a; background: #191210; }

.card-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 4px;
}

.genre {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}

.price {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--amber);
  background: rgba(255, 179, 71, 0.1);
  border: 1px solid rgba(255, 179, 71, 0.25);
  padding: 4px 12px;
  border-radius: 999px;
}

.price.free { color: #7ee787; background: rgba(126, 231, 135, 0.08); border-color: rgba(126, 231, 135, 0.25); }

.game-card h3 {
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 700;
  letter-spacing: 0.03em;
}

.game-card .tagline {
  font-size: 0.95rem;
  color: var(--amber);
  font-style: italic;
}

.game-card .desc { color: var(--muted); font-size: 0.96rem; flex: 1; }

.game-card .btn { margin-top: 8px; align-self: flex-start; }

/* ---------- Product cards ---------- */
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 18px;
}

.product-card {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px;
  text-decoration: none;
  color: var(--text);
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.product-card:hover { transform: translateY(-3px); border-color: #4a3628; }

.product-card .price { align-self: flex-start; }

.product-card h3 {
  font-family: var(--font-display);
  font-size: 1.08rem;
  font-weight: 600;
}

.product-card p { color: var(--muted); font-size: 0.9rem; flex: 1; }

.card-link {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--ember);
}

/* ---------- About ---------- */
.about-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 56px;
  align-items: start;
}

.about-copy { color: var(--muted); margin-bottom: 18px; max-width: 58ch; }
.about-copy strong { color: var(--text); }

.about-list { list-style: none; margin-top: 26px; display: flex; flex-direction: column; gap: 14px; }

.about-list li {
  padding-left: 30px;
  position: relative;
  color: var(--muted);
}

.about-list li::before {
  content: "▸";
  position: absolute;
  left: 6px;
  color: var(--ember);
  font-weight: 700;
}

.about-list strong { color: var(--text); }

.about-card {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 30px;
}

.about-card h3 {
  font-family: var(--font-display);
  font-size: 1.15rem;
  margin-bottom: 18px;
  letter-spacing: 0.04em;
}

.about-stat {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 0;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.95rem;
}

.about-stat strong { font-family: var(--font-display); color: var(--amber); font-size: 1.1rem; }

/* ---------- Contact / newsletter ---------- */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: center;
}

.contact-grid .section-sub { margin-bottom: 0; }

.newsletter { display: flex; gap: 10px; flex-wrap: wrap; }

.newsletter input {
  flex: 1;
  min-width: 220px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 13px 18px;
  color: var(--text);
  font-size: 1rem;
  font-family: var(--font-body);
  transition: border-color 0.2s;
}

.newsletter input:focus { outline: none; border-color: var(--ember); }

.newsletter input::placeholder { color: #6b6259; }

.form-note {
  width: 100%;
  font-size: 0.92rem;
  color: var(--amber);
  min-height: 1.4em;
}

/* ---------- Footer ---------- */
.footer {
  border-top: 1px solid var(--line);
  padding: 44px 0;
}

.footer-inner {
  display: flex;
  flex-direction: column;
  gap: 18px;
  align-items: flex-start;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: 0.12em;
  font-size: 0.9rem;
}

.footer-links { display: flex; gap: 24px; }

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

.footer-links a:hover { color: var(--amber); }

.footer-copy { color: #6b6259; font-size: 0.82rem; }

/* ---------- Reveal on scroll ---------- */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity 0.6s ease, transform 0.6s ease; }
.reveal.visible { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
}

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
  .about-grid, .contact-grid { grid-template-columns: 1fr; gap: 36px; }
  .nav-links { display: none; }
  .hero { padding: 90px 0 80px; }
  .section { padding: 64px 0; }
  .hero-stats { gap: 36px; }
}
