/* ============================================================
   Redneck Engineering — redneckengineering.se
   Mörk modern tech med röda accenter
   ============================================================ */

:root {
  --bg: #08080b;
  --bg-2: #0d0d13;
  --panel: #101018;
  --panel-2: #14141d;
  --line: rgba(255, 255, 255, 0.08);
  --line-strong: rgba(255, 255, 255, 0.14);
  --red: #e0202c;
  --red-bright: #ff2d3a;
  --red-deep: #8f0f18;
  --text: #f4f4f7;
  --muted: #a0a0b0;
  --muted-2: #6d6d7c;
  --nav-h: 72px;
  --radius: 18px;
  --font-head: "Chakra Petch", "Segoe UI", system-ui, sans-serif;
  --font-body: "Inter", "Segoe UI", system-ui, sans-serif;
}

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

html { scroll-behavior: smooth; scroll-padding-top: calc(var(--nav-h) + 16px); overflow-x: clip; }

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

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
::selection { background: rgba(224, 32, 44, 0.55); color: #fff; }

h1, h2, h3, h4 { font-family: var(--font-head); line-height: 1.12; text-wrap: balance; }

.container { width: min(1180px, 92vw); margin: 0 auto; }

/* ---------- Scroll progress ---------- */
.scroll-progress {
  position: fixed; top: 0; left: 0; height: 3px; width: 0;
  background: linear-gradient(90deg, var(--red-deep), var(--red-bright));
  z-index: 1001;
  box-shadow: 0 0 6px rgba(255, 45, 58, 0.45);
}

/* ---------- Navbar ---------- */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
  height: var(--nav-h);
  display: flex; align-items: center;
  background: rgba(8, 8, 11, 0.55);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid transparent;
  transition: background 0.35s ease, border-color 0.35s ease, height 0.35s ease;
}
.nav.scrolled {
  height: 60px;
  background: rgba(8, 8, 11, 0.85);
  border-bottom-color: var(--line);
}
.nav-inner {
  width: min(1320px, 94vw); margin: 0 auto;
  display: flex; align-items: center; gap: 18px;
}

.brand {
  display: flex; align-items: center; gap: 10px;
  font-family: var(--font-head); font-weight: 700;
  font-size: 17px; letter-spacing: 0.06em; text-transform: uppercase;
  white-space: nowrap;
}
.brand .star { color: var(--red-bright); font-size: 20px; transform: translateY(-1px); }
.brand b { color: var(--red-bright); font-weight: 700; }

.nav-apps {
  display: flex; align-items: center; gap: 6px;
  margin-left: auto;
}
.nav-app {
  position: relative;
  display: flex; align-items: center; justify-content: center;
  width: 58px; height: 44px; border-radius: 10px;
  transition: background 0.25s ease, transform 0.25s ease;
}
.nav-app img { height: 34px; width: auto; filter: drop-shadow(0 2px 5px rgba(0,0,0,0.6)); transition: transform 0.25s ease; }
.nav-app:hover { background: rgba(255, 255, 255, 0.06); }
.nav-app:hover img { transform: scale(1.12); }
.nav-app.active { background: rgba(224, 32, 44, 0.14); box-shadow: inset 0 0 0 1px rgba(224, 32, 44, 0.4); }
.nav-app .tip {
  position: absolute; top: calc(100% + 8px); left: 50%; transform: translateX(-50%) translateY(-4px);
  background: #17171f; border: 1px solid var(--line-strong);
  color: var(--text); font-size: 12px; font-weight: 600; letter-spacing: 0.03em;
  padding: 4px 10px; border-radius: 7px; white-space: nowrap;
  opacity: 0; pointer-events: none; transition: opacity 0.2s ease, transform 0.2s ease;
}
.nav-app:hover .tip { opacity: 1; transform: translateX(-50%) translateY(0); }

.nav-actions { display: flex; align-items: center; gap: 10px; }
.lang-btn {
  background: none; border: 1px solid var(--line-strong); color: var(--muted);
  font-family: var(--font-head); font-weight: 600; font-size: 13px; letter-spacing: 0.08em;
  padding: 7px 12px; border-radius: 8px; cursor: pointer;
  transition: color 0.25s, border-color 0.25s;
}
.lang-btn:hover { color: var(--text); border-color: var(--text); }

.btn {
  display: inline-flex; align-items: center; gap: 9px;
  font-family: var(--font-head); font-weight: 600; font-size: 14px; letter-spacing: 0.05em;
  padding: 11px 22px; border-radius: 10px; cursor: pointer; border: none;
  transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
}
.btn-red {
  background: linear-gradient(135deg, var(--red-bright), var(--red));
  color: #fff;
  box-shadow: 0 4px 20px rgba(224, 32, 44, 0.35);
}
.btn-red:hover { transform: translateY(-2px); box-shadow: 0 8px 30px rgba(255, 45, 58, 0.5); }
.btn-ghost {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
  box-shadow: inset 0 0 0 1px var(--line-strong);
}
.btn-ghost:hover { background: rgba(255, 255, 255, 0.1); transform: translateY(-2px); }
.btn .arr { transition: transform 0.25s ease; }
.btn:hover .arr { transform: translateX(4px); }

.nav-toggle {
  display: none; background: none; border: none; cursor: pointer;
  width: 44px; height: 44px; border-radius: 10px;
  flex-direction: column; align-items: center; justify-content: center; gap: 5px;
}
.nav-toggle span { display: block; width: 22px; height: 2px; background: var(--text); border-radius: 2px; transition: transform 0.3s, opacity 0.3s; }
.nav-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.mobile-menu {
  position: fixed; top: var(--nav-h); left: 0; right: 0; z-index: 999;
  background: rgba(10, 10, 14, 0.97);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--line);
  padding: 14px 4vw 22px;
  display: none; flex-direction: column; gap: 4px;
}
.mobile-menu.open { display: flex; }
.mobile-menu a {
  display: flex; align-items: center; gap: 14px;
  padding: 12px 14px; border-radius: 12px;
  font-family: var(--font-head); font-weight: 600; font-size: 16px;
  transition: background 0.2s;
}
.mobile-menu a:hover { background: rgba(255, 255, 255, 0.06); }
.mobile-menu img { height: 34px; width: auto; }

/* ---------- Hero ---------- */
.hero {
  position: relative; min-height: 100svh;
  display: flex; align-items: center; justify-content: center;
  text-align: center; overflow: hidden;
  padding: calc(var(--nav-h) + 40px) 0 140px;
}
.hero-bg { position: absolute; inset: 0; z-index: -2; background: radial-gradient(ellipse at 50% 0%, #14141f 0%, var(--bg) 60%); }
.glow {
  position: absolute; border-radius: 50%; filter: blur(90px); opacity: 0.5; z-index: -1;
  animation: drift 14s ease-in-out infinite alternate;
}
.glow-1 { width: 560px; height: 560px; background: rgba(224, 32, 44, 0.32); top: -12%; left: -8%; }
.glow-2 { width: 460px; height: 460px; background: rgba(143, 15, 24, 0.4); bottom: -14%; right: -6%; animation-delay: -6s; }
.glow-3 { width: 300px; height: 300px; background: rgba(255, 45, 58, 0.18); top: 40%; left: 55%; animation-delay: -3s; }
@keyframes drift {
  from { transform: translate(0, 0) scale(1); }
  to { transform: translate(60px, 40px) scale(1.15); }
}
.hero-grid {
  position: absolute; inset: 0; z-index: -1; opacity: 0.35;
  background-image:
    linear-gradient(rgba(255,255,255,0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.035) 1px, transparent 1px);
  background-size: 56px 56px;
  -webkit-mask-image: radial-gradient(ellipse at 50% 40%, black 30%, transparent 75%);
  mask-image: radial-gradient(ellipse at 50% 40%, black 30%, transparent 75%);
}

.hero-badge {
  display: inline-flex; align-items: center; gap: 9px;
  font-family: var(--font-head); font-size: 13px; font-weight: 600;
  letter-spacing: 0.16em; text-transform: uppercase; color: var(--muted);
  border: 1px solid var(--line-strong); border-radius: 999px;
  padding: 8px 18px; margin-bottom: 28px;
  background: rgba(255, 255, 255, 0.03);
}
.hero-badge .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--red-bright); box-shadow: 0 0 10px var(--red-bright); animation: pulse 2s infinite; }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.35; } }

.hero h1 {
  font-size: clamp(44px, 8.5vw, 104px);
  font-weight: 700; text-transform: uppercase; letter-spacing: 0.015em;
}
.hero-logo {
  width: min(620px, 86vw); margin: 0 auto;
  filter: drop-shadow(0 24px 60px rgba(0, 0, 0, 0.7)) drop-shadow(0 0 45px rgba(224, 32, 44, 0.22));
  position: relative; z-index: 1002;
  transform-origin: 0 0;
  will-change: transform;
  animation: logoIn 0.9s ease both;
}
@keyframes logoIn {
  from { opacity: 0; }
  to { opacity: 1; }
}
.brand-logo {
  height: 46px; width: auto;
  filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.6));
  transition: opacity 0.25s ease, height 0.35s ease;
}
.nav.scrolled .brand-logo { height: 40px; }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.footer-logo { height: 74px; width: auto; margin-bottom: 6px; }
.hero h1 .line2 {
  display: block;
  background: linear-gradient(100deg, var(--red-bright) 10%, var(--red) 50%, var(--red-deep) 95%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 0 26px rgba(224, 32, 44, 0.4));
}
.hero .tagline {
  max-width: 620px; margin: 26px auto 0;
  font-size: clamp(17px, 2.2vw, 21px); color: var(--muted);
}
.hero-cta { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; margin-top: 40px; }

.hero-scroll {
  position: absolute; bottom: 30px; left: 50%; transform: translateX(-50%);
  color: var(--muted-2); font-size: 12px; letter-spacing: 0.2em; text-transform: uppercase;
  font-family: var(--font-head);
  display: flex; flex-direction: column; align-items: center; gap: 10px;
}
.hero-scroll .mouse {
  width: 24px; height: 38px; border: 2px solid var(--muted-2); border-radius: 14px;
  display: flex; justify-content: center; padding-top: 6px;
}
.hero-scroll .wheel { width: 3px; height: 8px; background: var(--red-bright); border-radius: 3px; animation: wheel 1.8s infinite; }
@keyframes wheel { 0% { transform: translateY(0); opacity: 1; } 70% { transform: translateY(12px); opacity: 0; } 100% { opacity: 0; } }

/* ---------- Reveal on scroll ---------- */
.reveal { opacity: 0; transform: translateY(42px); transition: opacity 0.8s cubic-bezier(0.2, 0.6, 0.2, 1), transform 0.8s cubic-bezier(0.2, 0.6, 0.2, 1); }
.reveal.from-left { transform: translateX(-60px); }
.reveal.from-right { transform: translateX(60px); }
.reveal.zoom { transform: scale(0.86); }
.reveal.visible { opacity: 1; transform: none; }
.reveal.d1 { transition-delay: 0.1s; }
.reveal.d2 { transition-delay: 0.2s; }
.reveal.d3 { transition-delay: 0.3s; }
.reveal.d4 { transition-delay: 0.4s; }

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

/* ---------- Sections ---------- */
.section { padding: 110px 0; position: relative; }
.section-head { text-align: center; margin-bottom: 70px; }
.kicker {
  font-family: var(--font-head); font-size: 13px; font-weight: 600;
  letter-spacing: 0.22em; text-transform: uppercase; color: var(--red-bright);
  margin-bottom: 14px;
}
.section-head h2 { font-size: clamp(30px, 4.5vw, 46px); text-transform: uppercase; }
.section-head p { color: var(--muted); max-width: 560px; margin: 16px auto 0; font-size: 17px; }

.divider {
  height: 1px; width: min(1180px, 92vw); margin: 0 auto;
  background: linear-gradient(90deg, transparent, var(--line-strong), transparent);
}

/* ---------- App sections ---------- */
.app-section { padding: 90px 0; }
.app-row {
  display: grid; grid-template-columns: 1fr 1fr; gap: clamp(40px, 6vw, 90px);
  align-items: center;
}
.app-row.flip .app-media { order: 2; }

.app-media { position: relative; display: flex; align-items: center; justify-content: center; }
.app-media::before {
  content: ""; position: absolute; width: 78%; aspect-ratio: 1;
  background: radial-gradient(circle, rgba(224, 32, 44, 0.22) 0%, transparent 70%);
  filter: blur(30px);
}
.app-media img {
  width: min(430px, 88%); position: relative;
  filter: drop-shadow(0 18px 45px rgba(0, 0, 0, 0.65));
  transition: transform 0.5s cubic-bezier(0.2, 0.6, 0.2, 1);
}
.app-media:hover img { transform: scale(1.045) rotate(-1.2deg); }

.status {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--font-head); font-size: 12px; font-weight: 600;
  letter-spacing: 0.14em; text-transform: uppercase;
  padding: 6px 14px; border-radius: 999px; margin-bottom: 18px;
}
.status.live { color: #4ade80; background: rgba(74, 222, 128, 0.09); border: 1px solid rgba(74, 222, 128, 0.3); }
.status.dev { color: #fbbf24; background: rgba(251, 191, 36, 0.08); border: 1px solid rgba(251, 191, 36, 0.28); }
.status .dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; box-shadow: 0 0 8px currentColor; animation: pulse 2s infinite; }

.app-info h3 { font-size: clamp(28px, 3.6vw, 40px); text-transform: uppercase; margin-bottom: 6px; }
.app-info .app-tag { color: var(--red-bright); font-family: var(--font-head); font-weight: 600; font-size: 15px; letter-spacing: 0.04em; margin-bottom: 18px; }
.app-info .app-desc { color: var(--muted); font-size: 16.5px; margin-bottom: 26px; max-width: 52ch; }

.app-feats { list-style: none; display: grid; gap: 12px; margin-bottom: 34px; }
.app-feats li { display: flex; gap: 12px; align-items: flex-start; color: #cfcfda; font-size: 15.5px; }
.app-feats .check {
  flex: none; width: 22px; height: 22px; margin-top: 1px; border-radius: 7px;
  display: flex; align-items: center; justify-content: center;
  background: rgba(224, 32, 44, 0.14); border: 1px solid rgba(224, 32, 44, 0.4);
  color: var(--red-bright); font-size: 12px; font-weight: 700;
}
.app-cta { display: flex; gap: 12px; flex-wrap: wrap; }

/* ---------- Why / features grid ---------- */
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.card {
  background: linear-gradient(160deg, var(--panel-2), var(--panel));
  border: 1px solid var(--line); border-radius: var(--radius);
  padding: 34px 28px;
  transition: transform 0.35s ease, border-color 0.35s ease, box-shadow 0.35s ease;
}
.card:hover {
  transform: translateY(-6px);
  border-color: rgba(224, 32, 44, 0.45);
  box-shadow: 0 20px 45px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(224, 32, 44, 0.2);
}
.card .icon {
  width: 48px; height: 48px; border-radius: 13px; margin-bottom: 20px;
  display: flex; align-items: center; justify-content: center; font-size: 22px;
  background: linear-gradient(135deg, rgba(224, 32, 44, 0.22), rgba(143, 15, 24, 0.12));
  border: 1px solid rgba(224, 32, 44, 0.35);
}
.card h3 { font-size: 19px; margin-bottom: 10px; }
.card p { color: var(--muted); font-size: 15px; }

/* ---------- Contact ---------- */
.contact-wrap {
  display: grid; grid-template-columns: 1.1fr 1fr; gap: clamp(40px, 5vw, 80px);
  align-items: center;
  background: linear-gradient(160deg, var(--panel-2), var(--panel));
  border: 1px solid var(--line); border-radius: 26px;
  padding: clamp(34px, 5vw, 64px);
  position: relative; overflow: hidden;
}
.contact-wrap::before {
  content: ""; position: absolute; width: 420px; height: 420px; border-radius: 50%;
  background: radial-gradient(circle, rgba(224, 32, 44, 0.16), transparent 70%);
  top: -160px; right: -120px; pointer-events: none;
}
.contact-wrap h2 { font-size: clamp(28px, 3.6vw, 40px); text-transform: uppercase; margin-bottom: 16px; }
.contact-wrap .lead { color: var(--muted); margin-bottom: 30px; }
.contact-list { list-style: none; display: grid; gap: 16px; }
.contact-list a { display: flex; align-items: center; gap: 14px; color: #d6d6e0; font-size: 15.5px; transition: color 0.2s; }
.contact-list a:hover { color: var(--red-bright); }
.contact-list .ci {
  flex: none; width: 42px; height: 42px; border-radius: 12px;
  display: flex; align-items: center; justify-content: center; font-size: 18px;
  background: rgba(255, 255, 255, 0.05); border: 1px solid var(--line-strong);
}

/* ---------- Footer ---------- */
footer { border-top: 1px solid var(--line); padding: 50px 0 40px; }
.footer-inner { display: flex; flex-wrap: wrap; gap: 30px; align-items: center; justify-content: space-between; }
.footer-inner .brand { font-size: 15px; }
.footer-meta { color: var(--muted-2); font-size: 13.5px; line-height: 1.9; }
.footer-apps { display: flex; gap: 8px; }
.footer-apps img { height: 30px; width: auto; opacity: 0.75; transition: opacity 0.2s, transform 0.2s; }
.footer-apps a:hover img { opacity: 1; transform: translateY(-3px); }
.footer-flag { font-size: 13px; color: var(--muted-2); display: flex; align-items: center; gap: 7px; }

/* ---------- Subpage (app pages) ---------- */
.subhero {
  position: relative; overflow: hidden; text-align: center;
  padding: calc(var(--nav-h) + 80px) 0 70px;
}
.subhero img.badge { width: min(420px, 80vw); margin: 0 auto 34px; filter: drop-shadow(0 20px 50px rgba(0, 0, 0, 0.7)); }
.subhero h1 { font-size: clamp(34px, 5.5vw, 58px); text-transform: uppercase; }
.subhero .tagline { color: var(--muted); font-size: clamp(16px, 2vw, 19px); max-width: 620px; margin: 18px auto 0; }
.subhero .hero-cta { margin-top: 34px; }

.back-link {
  display: inline-flex; align-items: center; gap: 8px;
  color: var(--muted); font-family: var(--font-head); font-weight: 600; font-size: 14px;
  transition: color 0.2s;
}
.back-link:hover { color: var(--text); }

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
  .nav-actions .btn { display: none; }
  .nav-app { width: 48px; height: 40px; }
  .nav-app img { height: 28px; }
  .brand { font-size: 15px; }
}
@media (max-width: 700px) {
  .nav-apps { display: none; }
  .nav-toggle { display: flex; }
  .nav-inner { justify-content: space-between; }
}
@media (max-width: 480px) {
  .brand { font-size: 14px; gap: 7px; }
  .brand .star { font-size: 16px; }
  .nav-inner { gap: 10px; }
  .lang-btn { padding: 6px 9px; }
}
@media (max-width: 900px) {
  .app-row { grid-template-columns: 1fr; gap: 40px; }
  .app-row.flip .app-media { order: 0; }
  .app-media img { width: min(360px, 82%); }
  .cards { grid-template-columns: 1fr; }
  .contact-wrap { grid-template-columns: 1fr; }
  .section { padding: 80px 0; }
}
