/* Malang Limited — single-page corporate site */

@font-face {
  font-family: "Inter";
  src: url("/assets/fonts/inter-latin-var.woff2") format("woff2");
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Outfit";
  src: url("/assets/fonts/outfit-latin-500.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

:root {
  --blue: #4a83ff;
  --blue-deep: #2f64e0;
  --navy: #0e3fab;
  --navy-dark: #0a2c78;
  --space: #0b1240;
  --violet: #9774ff;
  --cyan: #41add3;
  --ink: #111827;
  --ink-soft: #2a2a30;
  --muted: #6b7280;
  --tint: #eef3ff;
  --line: #e5e7eb;
  --white: #ffffff;
  --radius-lg: 24px;
  --radius-md: 16px;
  --shadow: 0 10px 30px rgba(17, 24, 39, 0.08);
  --header-h: 76px;
  --container: 1200px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: var(--header-h); }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
h1, h2, h3 { margin: 0; line-height: 1.25; }
p { margin: 0; }

.container { width: 100%; max-width: var(--container); margin: 0 auto; padding-left: 24px; padding-right: 24px; }
.narrow { max-width: 760px; }

/* Placeholder text awaiting client confirmation.
   Once confirmed, replace the text and remove the <span class="tbc"> wrapper. */
.tbc {
  background: #fff4c2;
  color: #7a5200;
  border-radius: 4px;
  padding: 0 4px;
  font-weight: 600;
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
}

/* ---------- Buttons & links ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 26px;
  border-radius: 9999px;
  font-weight: 600;
  font-size: 15px;
  text-decoration: none;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn:focus-visible, .site-nav a:focus-visible, .nav-toggle:focus-visible, .brand:focus-visible, .text-link:focus-visible {
  outline: 3px solid rgba(74, 131, 255, 0.45);
  outline-offset: 3px;
}
.btn-primary { background: var(--blue); color: var(--white); box-shadow: 0 6px 16px rgba(74, 131, 255, 0.35); }
.btn-primary:hover { background: var(--blue-deep); }
.btn-light { background: var(--white); color: var(--navy); box-shadow: 0 6px 20px rgba(0, 0, 0, 0.18); }

.text-link { color: var(--violet); font-weight: 600; text-decoration: none; display: inline-flex; align-items: center; gap: 6px; }
.text-link::after { content: "→"; transition: transform 0.2s ease; }
.text-link:hover::after { transform: translateX(4px); }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: saturate(180%) blur(8px);
  transition: box-shadow 0.25s ease;
}
.site-header.scrolled { box-shadow: 0 4px 20px rgba(17, 24, 39, 0.08); }
.header-inner { height: var(--header-h); display: flex; align-items: center; justify-content: space-between; gap: 24px; }

.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; }
.brand img { width: 40px; height: 40px; }
.brand span { font-family: "Outfit", "Inter", sans-serif; font-weight: 500; font-size: 20px; color: #1c2b35; letter-spacing: -0.01em; }

.site-nav { display: flex; align-items: center; gap: 32px; }
.site-nav a:not(.btn) { text-decoration: none; font-size: 15px; font-weight: 500; color: #191919; position: relative; }
.site-nav a:not(.btn)::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -4px; height: 2px;
  background: var(--blue); transform: scaleX(0); transform-origin: left; transition: transform 0.2s ease;
}
.site-nav a:not(.btn):hover::after { transform: scaleX(1); }

.nav-toggle { display: none; background: none; border: 0; padding: 8px; cursor: pointer; }
.nav-toggle span { display: block; width: 22px; height: 2px; margin: 5px 0; background: var(--ink); border-radius: 2px; transition: transform 0.25s ease, opacity 0.25s ease; }
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- Hero (space theme) ---------- */
.hero {
  position: relative;
  overflow: hidden;
  color: var(--white);
  background:
    radial-gradient(ellipse at 80% 30%, rgba(151, 116, 255, 0.45), transparent 55%),
    radial-gradient(ellipse at 15% 85%, rgba(65, 173, 211, 0.35), transparent 50%),
    linear-gradient(160deg, var(--space) 0%, #1a2a8c 55%, var(--blue-deep) 100%);
}
/* star field: two layers of tiny dots that twinkle out of phase */
.hero-sky, .hero-sky::after {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-repeat: repeat;
}
.hero-sky {
  background-image:
    radial-gradient(1.5px 1.5px at 20px 30px, #fff, transparent),
    radial-gradient(1px 1px at 120px 80px, #fff, transparent),
    radial-gradient(1.5px 1.5px at 200px 150px, #cfe0ff, transparent),
    radial-gradient(1px 1px at 60px 190px, #fff, transparent),
    radial-gradient(1px 1px at 260px 40px, #fff, transparent);
  background-size: 300px 220px;
  opacity: 0.7;
  animation: twinkle 5s ease-in-out infinite;
}
.hero-sky::after {
  content: "";
  background-image:
    radial-gradient(1px 1px at 90px 20px, #fff, transparent),
    radial-gradient(1.5px 1.5px at 170px 110px, #e6dcff, transparent),
    radial-gradient(1px 1px at 30px 140px, #fff, transparent),
    radial-gradient(1px 1px at 230px 190px, #fff, transparent);
  background-size: 260px 240px;
  animation: twinkle 5s ease-in-out 2.5s infinite;
}
@keyframes twinkle { 0%, 100% { opacity: 0.35; } 50% { opacity: 1; } }

.hero-inner {
  position: relative;
  min-height: 620px;
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  align-items: center;
  gap: 48px;
  padding-top: 72px;
  padding-bottom: 72px;
}
.eyebrow { font-size: 16px; font-weight: 500; letter-spacing: 0.01em; opacity: 0.9; margin-bottom: 18px; }
.hero h1 { font-size: clamp(38px, 5.4vw, 64px); font-weight: 700; letter-spacing: -0.025em; line-height: 1.2; }

.hero-art .orbit { width: 100%; max-width: 480px; margin-left: auto; display: block; overflow: visible; animation: float 7s ease-in-out infinite; }
.orbit .moon { transform-origin: 200px 200px; animation: orbit 18s linear infinite; }
.orbit .sparkle { transform-box: fill-box; transform-origin: center; animation: sparkle 3s ease-in-out infinite; }
.orbit .s2 { animation-delay: 1s; }
.orbit .s3 { animation-delay: 2s; }

@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-14px); } }
@keyframes orbit { to { transform: rotate(360deg); } }
@keyframes sparkle { 0%, 100% { opacity: 0.3; transform: scale(0.7); } 50% { opacity: 1; transform: scale(1.1); } }

/* ---------- Sections ---------- */
.section { padding: 100px 0; }
.section-title { font-size: clamp(30px, 3.4vw, 42px); font-weight: 700; letter-spacing: -0.02em; color: var(--navy); text-align: center; margin-bottom: 36px; }

/* About */
.prose { text-align: center; }
.prose p { font-size: 17px; color: #374151; }
.prose p + p { margin-top: 20px; }

/* Brands */
.brands { background: var(--tint); }
.brand-card {
  max-width: 620px;
  margin: 0 auto;
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 40px;
  box-shadow: var(--shadow);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.brand-card:hover { transform: translateY(-4px); box-shadow: 0 16px 40px rgba(17, 24, 39, 0.12); }
.brand-card h3 { font-size: 22px; font-weight: 700; color: var(--ink-soft); margin: 24px 0 12px; }
.brand-card p { color: #374151; }
.brand-card p + p { margin-top: 14px; }
.brand-card .text-link { margin-top: 20px; }

/* Spinnerbet logo panel: dark backdrop so the gold wordmark reads well,
   with a soft light glow behind it so the dark-grey accents in the "N"s stay visible */
.brand-logo {
  height: 140px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 32px;
  background:
    radial-gradient(ellipse 55% 70% at 50% 50%, rgba(255, 255, 255, 0.22), transparent 70%),
    radial-gradient(ellipse at 85% 15%, rgba(151, 116, 255, 0.45), transparent 60%),
    linear-gradient(135deg, var(--space), #1a2a8c);
  overflow: hidden;
}
.brand-logo img { width: 100%; max-width: 380px; filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.35)); }

/* Contact band ("Find out more") */
.contact {
  padding: 100px 0;
  text-align: center;
  color: var(--white);
  background: linear-gradient(180deg, var(--blue-deep) 0%, var(--navy) 100%);
}
.contact .eyebrow { color: #a9c4ff; opacity: 1; }
.contact h2 { font-size: clamp(32px, 4vw, 46px); font-weight: 700; letter-spacing: -0.02em; }
.contact .lead { margin: 16px auto 32px; max-width: 560px; font-size: 18px; color: rgba(255, 255, 255, 0.88); }

/* Footer */
.site-footer { background: var(--navy-dark); color: rgba(255, 255, 255, 0.8); text-align: center; padding: 36px 0; font-size: 14px; }
.footer-meta { margin-top: 8px; font-size: 13px; color: rgba(255, 255, 255, 0.6); }
.footer-meta a { text-decoration: none; }
.footer-meta a:hover { text-decoration: underline; }

/* ---------- Scroll reveal ---------- */
/* uses `translate` so it doesn't clash with hover `transform` on cards */
.js .reveal {
  opacity: 0;
  translate: 0 24px;
  transition: opacity 0.7s ease, translate 0.7s ease, transform 0.3s ease, box-shadow 0.3s ease;
}
.js .reveal.is-visible { opacity: 1; translate: none; }
@media (prefers-reduced-motion: reduce) {
  .js .reveal { opacity: 1; translate: none; transition: none; }
  .hero-sky, .hero-sky::after, .hero-art .orbit, .orbit .moon, .orbit .sparkle { animation: none; }
}

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .hero-inner { grid-template-columns: 1fr; text-align: center; min-height: 0; padding-top: 64px; padding-bottom: 56px; gap: 24px; }
  .hero-art .orbit { margin: 0 auto; max-width: 340px; }
}

@media (max-width: 820px) {
  .nav-toggle { display: block; }
  .site-nav {
    position: absolute;
    top: var(--header-h);
    left: 0; right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 8px 24px 24px;
    background: var(--white);
    box-shadow: 0 16px 24px rgba(17, 24, 39, 0.08);
    display: none;
  }
  .site-nav.open { display: flex; }
  .site-nav a:not(.btn) { padding: 14px 0; border-bottom: 1px solid var(--line); }
  .site-nav a:not(.btn)::after { display: none; }
  .site-nav .btn { margin-top: 18px; }
}

@media (max-width: 720px) {
  .section, .contact { padding: 72px 0; }
  .brand-card { padding: 28px 22px; }
}

@media (max-width: 480px) {
  .container { padding-left: 16px; padding-right: 16px; }
  .brand span { font-size: 18px; }
  .brand img { width: 34px; height: 34px; }
}
