/* ==========================================================
   Appcano — "Molten" redesign
   Deep volcanic dark theme with lava-gradient accents.
   ========================================================== */

/* Self-hosted variable fonts (latin subset) — no third-party
   font servers, one ~48KB + one ~22KB file, swap on load. */

@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("../assets/fonts/inter-var.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "Space Grotesk";
  font-style: normal;
  font-weight: 300 700;
  font-display: swap;
  src: url("../assets/fonts/space-grotesk-var.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --bg: #0d0a1a;
  --bg-raised: #151028;
  --card: rgba(255, 255, 255, 0.04);
  --card-border: rgba(255, 255, 255, 0.08);
  --text: #f4f1ff;
  --muted: #a29ac2;
  --lava-1: #ff3d00;
  --lava-2: #ff8a00;
  --lava-3: #ffc400;
  --violet: #8b5cf6;
  --grad-lava: linear-gradient(92deg, var(--lava-1), var(--lava-2) 55%, var(--lava-3));
  --radius-lg: 24px;
  --radius-md: 16px;
  --font-body: "Inter", "Helvetica Neue", Arial, sans-serif;
  --font-head: "Space Grotesk", var(--font-body);
}

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

html { scroll-behavior: smooth; }

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

img { max-width: 100%; display: block; }

a { color: var(--lava-2); text-decoration: none; }

::selection { background: var(--lava-1); color: #fff; }

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

h1, h2, h3 { font-family: var(--font-head); letter-spacing: -0.02em; }

.grad-text {
  background: var(--grad-lava);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* ---------- Header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(13, 10, 26, 0.75);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 16px 0;
}

.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  color: var(--text);
}

.brand img {
  width: 32px;
  filter: drop-shadow(0 0 12px rgba(255, 90, 0, 0.45));
}

.brand span {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 1.35rem;
  letter-spacing: -0.03em;
}

.main-nav { display: flex; align-items: center; gap: 32px; }

.main-nav a {
  color: var(--muted);
  font-weight: 500;
  font-size: 0.95rem;
  transition: color 0.2s ease;
}

.main-nav a:hover, .main-nav a.active { color: var(--text); }

.main-nav a.nav-cta {
  background: var(--grad-lava);
  color: #1a0800;
  font-weight: 700;
  padding: 9px 20px;
  border-radius: 999px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  box-shadow: 0 4px 20px rgba(255, 90, 0, 0.35);
}

.main-nav a.nav-cta:hover { transform: translateY(-1px); color: #1a0800; }

.nav-toggle {
  display: none;
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: 12px;
  width: 44px;
  height: 44px;
  cursor: pointer;
  font-size: 1.25rem;
  color: var(--text);
}

/* ---------- Hero ---------- */

.hero {
  position: relative;
  padding: 110px 0 70px;
  text-align: center;
}

/* magma glow */
.hero::before {
  content: "";
  position: absolute;
  inset: auto 0 -40%;
  height: 130%;
  background:
    radial-gradient(42% 55% at 50% 100%, rgba(255, 61, 0, 0.32), transparent 70%),
    radial-gradient(28% 40% at 32% 95%, rgba(255, 138, 0, 0.18), transparent 70%),
    radial-gradient(30% 45% at 72% 100%, rgba(139, 92, 246, 0.2), transparent 70%);
  z-index: -1;
  pointer-events: none;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--card-border);
  background: var(--card);
  color: var(--muted);
  border-radius: 999px;
  padding: 7px 18px;
  font-size: 0.85rem;
  font-weight: 500;
}

.hero-badge .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--grad-lava);
  box-shadow: 0 0 10px rgba(255, 138, 0, 0.9);
}

.hero h1 {
  margin: 26px auto 0;
  max-width: 850px;
  font-size: clamp(2.7rem, 7.5vw, 5.2rem);
  font-weight: 700;
  line-height: 1.05;
}

.hero .sub {
  margin: 24px auto 0;
  max-width: 620px;
  color: var(--muted);
  font-size: clamp(1rem, 2vw, 1.15rem);
}

.hero-actions {
  margin-top: 38px;
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}

.btn-lava {
  display: inline-block;
  background: var(--grad-lava);
  color: #1a0800;
  font-weight: 700;
  font-size: 1rem;
  padding: 15px 34px;
  border-radius: 999px;
  box-shadow: 0 8px 30px rgba(255, 90, 0, 0.4);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.btn-lava:hover { transform: translateY(-2px); box-shadow: 0 12px 40px rgba(255, 90, 0, 0.55); color: #1a0800; }

.btn-ghost {
  display: inline-block;
  border: 1px solid var(--card-border);
  background: var(--card);
  color: var(--text);
  font-weight: 600;
  font-size: 1rem;
  padding: 15px 34px;
  border-radius: 999px;
  transition: border-color 0.2s ease, background 0.2s ease;
}

.btn-ghost:hover { border-color: rgba(255, 255, 255, 0.25); background: rgba(255, 255, 255, 0.07); }

.hero-stats {
  margin: 70px auto 0;
  display: flex;
  justify-content: center;
  gap: clamp(30px, 6vw, 80px);
  flex-wrap: wrap;
}

.hero-stats .stat { text-align: center; }

.hero-stats .num {
  font-family: var(--font-head);
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  font-weight: 700;
  background: var(--grad-lava);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-stats .label {
  color: var(--muted);
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* ---------- Icon marquee ---------- */

.marquee-section { padding: 40px 0 10px; overflow: hidden; }

.marquee {
  display: flex;
  gap: 26px;
  width: max-content;
  animation: marquee 45s linear infinite;
  padding: 20px 0;
}

.marquee:hover { animation-play-state: paused; }

.marquee img {
  width: 72px;
  height: 72px;
  border-radius: 17px;
  box-shadow: 0 6px 22px rgba(0, 0, 0, 0.5);
  transition: transform 0.25s ease;
}

.marquee img:hover { transform: scale(1.14) rotate(-3deg); }

@keyframes marquee {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

@media (prefers-reduced-motion: reduce) {
  .marquee { animation: none; }
}

/* ---------- Section heads ---------- */

.section-head {
  position: relative;
  z-index: 2;
  text-align: center;
  margin-bottom: 18px;
  padding-top: 90px;
}

.section-head .kicker {
  display: block;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-size: 0.8rem;
  background: var(--grad-lava);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.section-head h2 {
  margin-top: 10px;
  font-size: clamp(2rem, 5vw, 3.2rem);
  font-weight: 700;
}

.section-intro {
  max-width: 640px;
  margin: 0 auto 50px;
  text-align: center;
  color: var(--muted);
}

/* ---------- Spotlight features ---------- */

.spotlight {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(30px, 6vw, 80px);
  align-items: center;
  padding: 55px 0;
}

.spotlight:nth-child(even) .spot-media { order: 2; }

.spot-media {
  position: relative;
  display: flex;
  justify-content: center;
}

.spot-media::before {
  content: "";
  position: absolute;
  z-index: -1;
  width: 120%;
  aspect-ratio: 1;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: radial-gradient(circle, var(--spot-glow, rgba(255, 90, 0, 0.28)), transparent 65%);
  filter: blur(10px);
  pointer-events: none;
}

.spot-media img {
  position: relative;
  width: min(280px, 70%);
  border-radius: 32px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.65);
  transform: rotate(-3deg);
  transition: transform 0.35s ease;
}

.spotlight:hover .spot-media img { transform: rotate(0deg) translateY(-6px); }

.spot-copy .chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--card-border);
  background: var(--card);
  border-radius: 999px;
  padding: 6px 14px;
  font-size: 0.8rem;
  color: var(--muted);
  margin-bottom: 18px;
}

.spot-copy .chip img { width: 20px; height: 20px; border-radius: 5px; }

.spot-copy h3 {
  font-size: clamp(1.7rem, 4vw, 2.5rem);
  font-weight: 700;
  line-height: 1.15;
}

.spot-copy p { margin: 16px 0 26px; color: var(--muted); max-width: 480px; }

/* ---------- App grid + filters ---------- */

.apps-section { padding-bottom: 40px; }

.filters {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-bottom: 46px;
}

.filter-btn {
  font-family: var(--font-body);
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--muted);
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: 999px;
  padding: 9px 20px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.filter-btn:hover { color: var(--text); border-color: rgba(255, 255, 255, 0.25); }

.filter-btn.active {
  background: var(--grad-lava);
  border-color: transparent;
  color: #1a0800;
  box-shadow: 0 4px 18px rgba(255, 90, 0, 0.35);
}

.app-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}

.app-card {
  position: relative;
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-lg);
  padding: 26px 26px 24px;
  display: flex;
  flex-direction: column;
  transition: transform 0.25s ease, border-color 0.25s ease, background 0.25s ease;
}

.app-card:hover {
  transform: translateY(-5px);
  border-color: rgba(255, 138, 0, 0.45);
  background: rgba(255, 255, 255, 0.06);
}

.app-card.hidden { display: none; }

.card-top {
  display: flex;
  align-items: center;
  gap: 15px;
  margin-bottom: 16px;
}

.card-top img {
  width: 58px;
  height: 58px;
  border-radius: 14px;
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.45);
  transition: transform 0.25s ease;
}

.app-card:hover .card-top img { transform: scale(1.08) rotate(-3deg); }

.card-top h3 { font-size: 1.1rem; font-weight: 700; line-height: 1.25; }

.card-top .category {
  display: inline-block;
  margin-top: 5px;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--lava-2);
  background: rgba(255, 138, 0, 0.1);
  border-radius: 999px;
  padding: 2px 10px;
}

.app-card p {
  color: var(--muted);
  font-size: 0.9rem;
  flex: 1;
  margin-bottom: 20px;
}

.app-card p a { font-weight: 600; }
.app-card p a:hover { text-decoration: underline; }

.card-store {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--text);
}

.card-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 22px;
  margin-top: auto;
}

.card-store .arrow { transition: transform 0.2s ease; color: var(--lava-2); }

.card-store:hover { color: var(--lava-2); }
.card-store:hover .arrow { transform: translate(3px, -3px); }

/* ---------- Quote band ---------- */

.quote-band { padding: 110px 0 30px; text-align: center; }

.quote-band blockquote {
  font-family: var(--font-head);
  font-size: clamp(1.8rem, 5vw, 3.4rem);
  font-weight: 700;
  line-height: 1.2;
}

.quote-band .attribution {
  margin-top: 18px;
  color: var(--muted);
  font-size: 0.95rem;
}

/* ---------- CTA band ---------- */

.cta-band { padding: 90px 0 110px; }

.cta-card {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-lg);
  border: 1px solid rgba(255, 138, 0, 0.25);
  background:
    radial-gradient(60% 120% at 50% 130%, rgba(255, 61, 0, 0.4), transparent 70%),
    radial-gradient(40% 80% at 85% 0%, rgba(139, 92, 246, 0.25), transparent 70%),
    var(--bg-raised);
  text-align: center;
  padding: 80px 30px;
}

.cta-card h2 {
  font-size: clamp(1.9rem, 4.5vw, 3rem);
  font-weight: 700;
  margin-bottom: 14px;
}

.cta-card p { color: var(--muted); max-width: 520px; margin: 0 auto 32px; }

/* ---------- About page ---------- */

.page-hero {
  position: relative;
  text-align: center;
  padding: 90px 0 20px;
}

.page-hero::before {
  content: "";
  position: absolute;
  inset: -100px 0 0;
  background: radial-gradient(45% 60% at 50% 0%, rgba(255, 90, 0, 0.16), transparent 70%);
  z-index: -1;
}

.page-hero .kicker {
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-size: 0.8rem;
  background: var(--grad-lava);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.page-hero h1 {
  margin-top: 12px;
  font-size: clamp(2.3rem, 6vw, 4rem);
  font-weight: 700;
}

.about-story {
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-lg);
  padding: clamp(28px, 5vw, 56px);
  max-width: 860px;
  margin: 40px auto 0;
  font-size: 1.03rem;
  color: #cdc6e4;
}

.about-story p + p { margin-top: 18px; }

.stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
  max-width: 860px;
  margin: 40px auto 0;
}

.stat-card {
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-lg);
  padding: 44px 20px;
  text-align: center;
  transition: transform 0.25s ease, border-color 0.25s ease;
}

.stat-card:hover { transform: translateY(-4px); border-color: rgba(255, 138, 0, 0.4); }

.stat-card .num {
  font-family: var(--font-head);
  font-size: clamp(2.4rem, 5vw, 3.4rem);
  font-weight: 700;
  line-height: 1;
  background: var(--grad-lava);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.stat-card .label { margin-top: 12px; font-weight: 600; color: var(--text); }

.remote-card {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: clamp(24px, 5vw, 60px);
  align-items: center;
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-lg);
  padding: clamp(28px, 5vw, 56px);
  margin-top: 90px;
}

.remote-card h2 {
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  font-weight: 700;
  line-height: 1.15;
}

.remote-card p { color: var(--muted); }

/* ---------- Legal pages ---------- */

.legal-wrap {
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-lg);
  padding: clamp(28px, 5vw, 60px);
  max-width: 860px;
  margin: 40px auto 100px;
}

.legal-wrap .updated { color: var(--muted); font-size: 0.9rem; margin-bottom: 30px; }

.legal-wrap h2 {
  font-size: 1.3rem;
  font-weight: 700;
  margin: 36px 0 10px;
}

.legal-wrap p, .legal-wrap li { color: #cdc6e4; font-size: 0.97rem; }

.legal-wrap ul { padding-left: 22px; margin: 10px 0; }

.legal-wrap li { margin-bottom: 6px; }

/* ---------- Footer ---------- */

.site-footer {
  border-top: 1px solid rgba(255, 255, 255, 0.07);
  background: #0a0813;
  padding: 64px 0 30px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 40px;
}

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

.footer-brand img { width: 30px; filter: drop-shadow(0 0 10px rgba(255, 90, 0, 0.45)); }

.footer-tagline { margin-top: 14px; color: var(--muted); font-size: 0.95rem; max-width: 300px; }

.site-footer h4 {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: #6f6790;
  margin-bottom: 14px;
}

.site-footer ul { list-style: none; }
.site-footer ul li { margin-bottom: 10px; }

.site-footer a { color: #cdc6e4; font-size: 0.95rem; }
.site-footer a:hover { color: var(--lava-2); }

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.07);
  margin-top: 46px;
  padding-top: 22px;
  text-align: center;
  color: #6f6790;
  font-size: 0.85rem;
}

/* ---------- Scroll reveal ---------- */

.reveal {
  opacity: 0;
  transform: translateY(26px);
  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; }
}

/* ---------- Responsive ---------- */

@media (max-width: 960px) {
  .app-grid { grid-template-columns: repeat(2, 1fr); }
  .spotlight { grid-template-columns: 1fr; text-align: center; }
  .spotlight:nth-child(even) .spot-media { order: 0; }
  .spot-copy p { margin-inline: auto; }
  .remote-card { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  .app-grid { grid-template-columns: 1fr; }
  .stats-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; gap: 30px; }
  .hero { padding-top: 70px; }

  .main-nav {
    display: none;
    position: absolute;
    top: 72px;
    right: 4%;
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
    background: var(--bg-raised);
    border: 1px solid var(--card-border);
    border-radius: var(--radius-md);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6);
    padding: 18px 26px;
    min-width: 190px;
  }

  .main-nav.open { display: flex; }
  .main-nav a { padding: 8px 0; font-size: 1rem; }
  .main-nav a.nav-cta { margin-top: 6px; }
  .nav-toggle { display: block; }
}
